Prepstellar

AIF-C01 · AI and ML Foundations

19 cards

Machine Learning Methods

Swipe, scroll or use ← →
  1. Three paradigms, one question each

    Machine learning finds patterns or relationships in data, and the techniques are grouped into three basic paradigms, each addressing its own problem types: supervised learning, unsupervised learning, and reinforcement learning.

    You do not choose between them by preference. The choice follows from the data you have — or could collect — and from the kind of outcome or behavior the system has to learn.

    Paradigm What the data offers What the system learns
    Supervised Inputs with target values A mapping from inputs to the target
    Unsupervised Inputs without labels or targets Structure discovered in the inputs
    Reinforcement An environment that returns rewards Behavior that maximizes long-term reward

    Note that a paradigm is a learning setup rather than a specific algorithm: many algorithms, such as neural networks, can be deployed under different paradigms and on different problem types, and multiple algorithms can address the same problem type.

    1 / 19
  2. Quick check

    What decides which learning paradigm a problem belongs to?

    1. AThe programming language and the compute instance chosen to run the training job

      Tooling and infrastructure are implementation details; they do not change the nature of the learning problem.

    2. BThe feedback available: supplied targets, no targets, or environmental rewards

      Right. Targets present, targets absent, or rewards from an environment is exactly the distinction between the three paradigms.

    3. CThe number of layers inside the algorithm, since deeper models are always supervised

      Architecture does not decide the paradigm: an algorithm such as a neural network can be used under different paradigms.

    2 / 19

  3. Supervised learning

    A problem is supervised when the data set consists of features or attributes (inputs) that contain target values (outputs). The known answers are what the model learns against.

    Two everyday cases show the shape: messages already marked spam or not spam, and houses described by their features together with the price each one actually sold for. In both, someone already knows the answer for the training examples, and the model's job is to reproduce it on new ones.

    Supervised learning therefore fits any task where correct outcomes are available and the goal is to predict them for new records.

    3 / 19
  4. Quick check

    What defines a supervised learning problem?

    1. AAn agent collects rewards while interacting with a changing environment

      Rewards from an environment define reinforcement learning, not supervised learning.

    2. BThe inputs omit targets, so the system must discover their internal groupings

      Missing targets is precisely the unsupervised case; supervised learning depends on having them.

    3. CThe training features include target values that supply the known outcomes

      Right. Supplied targets are the defining trait, and they give the model an answer to learn against.

    4 / 19

  5. Classification or regression

    Once a problem is supervised, the type of the target decides which of the two supervised problem types you have.

    If the target values are categorical (mathematically discrete), the problem is classification:

    • Binary classification assigns an individual to one of two predefined and mutually exclusive classes, based on that individual's attributes. A medical diagnosis of disease or no disease from test results is the standard example.
    • Multiclass classification assigns an individual to one of several classes. Predicting whether a document is about religion, politics, or finance is an example.

    Both are supervised, because the models are trained on examples whose attributes come with correctly labeled objects.

    5 / 19
  6. Classification or regression

    If the target values are mathematically continuous, the problem is regression. Regression estimates the value of a dependent target variable from one or more other variables or attributes that correlate with it — for instance, predicting a house price from the number of bedrooms and bathrooms and the square footage of the house and garden.

    Target Problem type Example
    One of two classes Binary classification Disease or no disease
    One of several classes Multiclass classification Document topic
    A continuous number Regression House sale price

    The trap in scenario questions is to treat "several categories" as regression or "a numeric value" as classification. Read the target, not the wording around it.

    6 / 19
  7. Quick check

    Which task is a supervised regression problem?

    1. AEstimating a house price from its features when historical sale prices are supplied

      Right. The price is a continuous target, and the supplied historical prices make the problem supervised.

    2. BAssigning already labeled documents to one of several predefined topic classes in advance

      A predefined set of topics is a categorical target, so that task is multiclass classification.

    3. CDiscovering customer groups from attributes when no group labels exist anywhere

      With no labels available at all, the task is unsupervised rather than any kind of regression.

    7 / 19

  8. Keep your progress in the app

    That’s 3 of 8 quick checks. In the app they stay answered, and every lesson remembers where you left off.

  9. Unsupervised learning

    A problem is unsupervised when the data set consists of features or attributes that do not contain labels or target values. The output must then be predicted from the patterns discovered in the input data, and the goal is to discover structure such as groupings within it.

    This is the paradigm for exploration: you use it when predefined answers are unavailable, or when the interesting result is the structure itself rather than a value to predict.

    8 / 19
  10. Quick check

    What defines an unsupervised learning problem?

    1. AThe inputs carry no labels or targets, so the output rests on discovered patterns

      Right. Without supplied answers, the result has to come from the structure found inside the inputs themselves.

    2. BEvery input arrives with a categorical or continuous target supplied during training

      Supplied targets are what make a problem supervised, whether the target is a class or a number.

    3. CAn agent takes trial-and-error actions in order to maximize its long-term reward totals

      Trial-and-error action in an environment describes reinforcement learning instead.

    9 / 19

  11. Problem types without labels

    Several distinct problem types live under this paradigm:

    Problem type What it produces
    Cluster analysis Discrete groupings within the data
    Anomaly detection Rare items that differ sharply from the rest
    Dimension reduction A lower-dimensional view that keeps the significant properties
    Density estimation An estimate of the underlying probability distribution

    Cluster analysis classifies objects or cases into groups called clusters. It looks for discrete groupings where members of a group are as similar as possible to one another and as different as possible from members of other groups. You define the attributes used to judge similarity, choose a distance function, and specify how many clusters to use.

    Anomaly detection identifies rare items, events, or observations that raise suspicion because they differ significantly from the rest of the data — bank fraud and medical errors are the classic uses. Anomalies are also called outliers or novelties.

    10 / 19
  12. Quick check

    What is the goal of cluster analysis?

    1. AEstimate a continuous value from features paired with correct known answers

      Estimating a value from known answers is supervised regression, which needs the targets that clustering does not have.

    2. BForm groups whose members are similar inside a group and different across groups

      Right. Clustering finds discrete groupings by similarity, using attributes you choose rather than supplied labels.

    3. CMaximize long-term rewards by choosing actions inside a changing environment over time

      Reward-driven action selection is reinforcement learning; clustering has no environment and no rewards.

    11 / 19

  13. Reinforcement learning

    Reinforcement learning is learning based on interaction with the environment. An agent must learn behavior through trial-and-error interactions with a dynamic environment, and its goal is to maximize the long-term rewards produced by its actions.

    Nothing here supplies a correct answer for each situation. The feedback is a reward that may arrive late, and success is judged over a sequence of actions rather than one prediction at a time. Reinforcement learning does not require labeled training data the way supervised learning does.

    12 / 19
  14. Reinforcement learning

    Rewards are maximized by trading off exploration against exploitation: exploring actions that have uncertain rewards, and exploiting actions that have known rewards. Explore too little and the agent never finds the better path; explore too much and it never cashes in on what it already knows.

    Signal available Paradigm
    The correct answer for each example Supervised
    Nothing but the inputs Unsupervised
    A reward after each action in an environment Reinforcement

    A simulated robot choosing a sequence of moves on a changing track is the model case: no state comes with its correct action attached, feedback arrives as rewards, and success depends on a long-term goal.

    13 / 19
  15. Quick check

    How does reinforcement learning balance exploration and exploitation?

    1. AIt trades labeled rows against unlabeled rows in order to name a fixed set of clusters

      Clusters come from unsupervised methods, and the trade-off has nothing to do with mixing labeled and unlabeled rows.

    2. BIt trades categorical targets against continuous targets inside one regression output

      Categorical versus continuous targets separates classification from regression, which are supervised problem types.

    3. CIt trades actions with uncertain rewards against actions with known rewards

      Right. Exploration tries the uncertain actions, exploitation uses the known ones, and both serve the long-term reward.

    14 / 19

  16. Choosing between the three

    Work from the feedback that the situation actually provides.

    1. Do the examples contain the correct targets to predict? Choose supervised learning, then classification for a categorical target and regression for a continuous one.
    2. Are there inputs but no targets? Choose unsupervised learning: clustering for groupings, anomaly detection for rare cases, dimension reduction or density estimation for exploration.
    3. Must an agent learn a sequence of actions from environmental feedback while optimizing long-term reward? Choose reinforcement learning.
    15 / 19
  17. Choosing between the three

    Two scenarios show the sequence at work.

    A retailer holds historical examples with a product category and a numeric sale price, and needs to predict the category in one workflow and the price in another. Both targets are known, so both workflows are supervised: the categorical target calls for classification, and the continuous target calls for regression. One dataset, two supervised problem types.

    A fraud team holds transaction features but no fraud labels, and wants both natural groupings and rare observations that differ sharply from the rest. With no targets, supervised methods are out; clustering supplies the groupings and anomaly detection flags the rare cases — two unsupervised problem types on the same data.

    16 / 19
  18. Quick check

    A fraud team has transaction features but no fraud labels, and wants natural groupings plus rare, sharply different observations. Which fits?

    1. AUnsupervised learning, using clustering for the groupings and anomaly detection for the rare cases

      Right. Both goals are unsupervised problem types, and both work on inputs that carry no targets.

    2. BSupervised classification, using the predefined fraud classes that this dataset does not contain

      Classification needs supplied classes to learn against, and the dataset has none.

    3. CReinforcement learning, using environment rewards to label each historical transaction

      Reinforcement learning learns behavior from rewards in an environment; it does not label a historical dataset.

    17 / 19

  19. Key takeaways

    • Supervised learning uses target values: categorical targets give classification, binary or multiclass, and continuous targets give regression.
    • Unsupervised learning has no labels or targets: its output rests on patterns discovered in the inputs, through clustering, anomaly detection, dimension reduction, or density estimation.
    • Reinforcement learning learns from interaction: an agent acts in a dynamic environment by trial and error, trading exploration against exploitation to maximize long-term rewards.
    • Choose from the feedback available — known targets, no targets, or environmental rewards — because the paradigm is a learning setup, not a particular algorithm.
    18 / 19
  20. Quick check

    Which summary of the three paradigms is correct?

    1. ASupervised learning discovers clusters, unsupervised learning predicts supplied targets, and reinforcement learning needs labeled examples for every state

      The first two are swapped, and reinforcement learning works precisely where no correct action is supplied for each state.

    2. BSupervised learning predicts supplied targets, unsupervised learning discovers structure in unlabeled inputs, and reinforcement learning optimizes actions from rewards

      Right. Each paradigm is matched with the feedback it depends on and the outcome it produces.

    3. CSupervised learning maximizes delayed rewards, unsupervised learning splits categorical from continuous targets, and reinforcement learning groups similar rows

      Rewards belong to reinforcement learning, the categorical-continuous split belongs to supervised learning, and grouping rows is unsupervised clustering.

    19 / 19

  21. 8 quick checks · then the test

    In the app, finishing the quick checks opens this lesson’s 10-question test, and the ones you miss come back exactly when you’re about to forget them.

The whole course, on your phone

Lessons you can read, audio you can listen to on the way to work, and practice that remembers what you got wrong.