3203. Introduction to Artificial Intelligence

Supervised Learning

1. What is Supervised Learning?

Traditionally, a computational problem is specified as a mapping from inputs to outputs. A human programmer designs an algorithm that explicitly describes how each input should be transformed into the desired output.

In supervised learning, instead of manually specifying all rules, a learning algorithm is given a collection of examples and automatically discovers the relationship between inputs and outputs.

Definition: A supervised learning system learns a predictive function from labeled examples consisting of input features and desired outputs (targets). Types of Supervised Learning: The primary goal of supervised learning is not memorization but generalization, which means performing well on previously unseen data.

2. Learning Decision Trees

A decision tree is a hierarchical model that classifies examples by testing features one at a time. It resembles the game Twenty Questions, where each question progressively narrows the set of possible answers.

A Decision Tree Learner algorithm builds a decision tree from the top down by repeatedly divide the sample data, as in Example 7.11.

3. Linear regression

Linear regression builds a linear mapping y = w1x1 + w2x2 + ... + wnxn + b where:

The objective is to minimize the mean squared error (loss) over all training examples.

Binary classification uses a squashed linear function to separate positive and negative instances of a concept by applying a non-linear activation function to a linear combination of inputs, to "squash" the output into the range of [0, 1].

A Boolean classification is linearly separable if there exists a hyperplane where the classification is true on one side of the hyperplane and false on the other side.

Gradient Descent is an iterative method to find a local minimum of a function. Stochastic gradient descent updates the weights using one random sample at a time.

When the domain of the target variable is categorical with more than two values, indicator variables can be used to convert the classification to binary variables.

4. Composite Models

A model overfits when it learns training examples too precisely, including accidental patterns and noise. A model underfits when it is too simple to capture the underlying patterns. Good machine learning achieves a balance between underfitting (high bias) and overfitting (high variance).

Ockham's Razor states that, among competing hypotheses that explain the data equally well, the simplest one should generally be preferred. It is often used to reduce overfitting.

A kernel function implicitly maps data into a higher-dimensional space with new features to turn previously difficult classification problems into linearly separable, as in Example 7.20.

Ensemble methods combine multiple learners to obtain stronger performance than individual models. Boosting combines multiple weak learners, each of which learns from the errors of the previous ones, to produce a stronger predictive model

5. Learning belief networks

Learning a belief network (Bayesian network) may happen in several forms: In general, to learn a belief network from data is difficult.