Quick Reference Guide
Module 2: Artificial Intelligence Technology Fundamentals: Machine
Learning
Learning Outcomes:
● Analyze the models, tools and algorithms of machine learning.
● Classify points using a linear model.
● Identify the concepts of the train, validate, test methodology.
● Run machine learning algorithms in Python.
Characteristics of Different Machine Learning Methods
● The first characteristic relates to how these models are trained or learn from available
data. There are three scenarios:
o Supervised learning is the most common scenario in which training data has both,
inputs or features, x, and some labels or output values, y, corresponding to each
input.
o Unsupervised learning only has inputs or features, but no corresponding labels or
outputs.
o Semi-supervised learning might have a subset of data, with only input, x, and known
labels or output, y.
● The next characteristic relates to the nature of the models that are constructed by the
machine learning algorithm and can be either:
o Parametric methods, the model complexity is known, in terms of the number of
model coefficients, and those do not depend on the number of training samples.
Parametric methods are often accompanied by additional mechanisms, like
regularization or additional hyperparameters.
o Non-parametric methods are models where the model complexity depends on the
© MIT xPRO 2024. All rights reserved. Page 1 of 5
number, or nature, of the training samples.
● The final characteristic is the nature of the input-output relationship, and the implied, or
explicit, probability model, that those relationships capture.
o Descriptive methods can predict the probability of output y, given an input x. It is a
forward model.
o Generative methods in contrast seek to model joint probability of x and y, or in some
cases, the reverse probability. Given an output y, what is the probability that
different x values are associated with that y?
Some machine learning methods combine these generative and descriptive predictions.
Example, generative adversarial networks (GANs).
Applying AI Tools in Machine Learning
Professor Manolis Kellis and his team at MIT have been using machine learning to develop
computational methods to determine patterns of sameness and the similarity between
closely related human genomes. To do so, his team uses linear regression-based models,
tree-based models, and support vector machines among other tools. Here, multiple tools
of machine learning are being used together, so it is not just one type of AI tool but many
that work together, and one of the projects of Professor Kellis’s group is the development
of gencode. The objective is to develop methods for understanding genomes with a view
to applying them to the human genome in medical applications. He has demonstrated that
you can use machine learning to tie the genome of different cells with the root cause of
the mechanisms producing a given unwanted behavior.
Linear Classifiers
Linear classifiers are a basic and important machine learning method for binary
classification, using supervised learning. A linear classifier has a particular model form.
𝜃 𝑇 𝑥 + 𝜃0 = 0, where the 𝜃 vector defines the positive side of that linear separator.
When, 𝜃 𝑇 𝑥 + 𝜃0 > 0, it is positive class.
When, 𝜃 𝑇 𝑥 + 𝜃0 ≤ 0, it is negative class.
© MIT xPRO 2024. All rights reserved. Page 2 of 5
Decision Trees
Decision trees are nonparametric models used for classification and regression tasks. A
decision tree structure can be viewed in two ways.
o Feature splits: The tree starts with a root node and splits based on conditions on
features. For a new example, navigate the tree from the root, taking branches based on
feature values. If the feature value is less than or equal to the split value, then take left
branch. If the feature value is greater than the split value, then take the right branch.
Continue until a leaf node is reached, which provides the class label.
o Binary partitioning: Visualize a decision tree as successive binary splits of the feature
space. Each leaf node corresponds to a specific region of the feature space and its
classification.
In both views, the decision tree is non-parametric, in that the complexity of the tree,
depends on the complexity of the model, training data, not on some a priori fixed number
of model parameters. That makes tree models attractive, for easily adapting during
supervised training to the available data. Limitation of a single decision tree is that it can
be very sensitive to the training data. Both, the structure of the tree and some of its
predictions can change, if a data point is removed or changes slightly. One way to
overcome the limitation of a single decision tree is called bootstrap aggregation or
bagging.
Bagging or Bootstrap Aggregation
• Take a random sample of the training data.
• Train a decision tree on this sample.
• Repeat the process with different random samples to create multiple trees.
• The overall ensemble tree makes a prediction based on a majority vote or averaging of
the predictions, from those multiple parallel trees.
Random Forest Machine Learning
A kind of ensemble tree, that not only uses bagging, but also randomly limits itself to
© MIT xPRO 2024. All rights reserved. Page 3 of 5
subsets of the feature choices, so that the random forest becomes more robust, across the
full set of features in the training data.
Boosting
In this method, one decision tree is based on the training data, but a second decision tree,
is trained specifically on the errors in training prediction coming from the first tree, to
compensate or account for those errors. A boosted decision tree might have several such
correcting decision trees in sequence.
Decision tree classifiers can provide class probabilities, highlighting the probabilistic nature
of many machine learning methods. Let us look at other machine learning approaches.
Bayesian and Probabilistic Models
Bayesian methods are a broad family of machine learning approaches that explicitly model
and account for beliefs about models. This approach inherently handles uncertainty and
can adapt to new information, blending with active learning strategies to sample the most
informative data points. For instance, if new evidence suggests a state with a higher
likelihood, Bayesian methods update the belief to reflect this. This incremental learning
process is powerful for dealing with noisy data and leveraging prior experience.
Regression Models
Unlike classification models that predict discrete classes, there are machine learning
models that can also produce continuous outputs, such as predicting outdoor
temperature. These are known as regression models. A key method for training these
models is gradient descent, which iteratively adjusts model parameters to minimize a cost
function that combines loss and regularization. Linear regression uses the squared error
function, while ridge regression adds a penalty for large coefficients. Gradient descent,
including its variant stochastic gradient descent (SGD), updates parameters incrementally
using subsets of training data. This powerful approach is crucial for training both simple
and complex models, including deep neural networks.
Logistic regression, built on a regression framework, uses a logistic function to output
probabilities, interpreting these as class probabilities. Training involves minimizing
negative log likelihood with regularization using gradient descent or SGD. Logistic
regression often finds effective linear classifiers that generalize well. Support vector
© MIT xPRO 2024. All rights reserved. Page 4 of 5
machines (SVMs) extend linear models to avoid classification errors and maximize margins
using a hinge loss function. Though less popular recently, SVMs remain powerful for
creating robust classifiers. Both models employ regularization and gradient-based
optimization to achieve accurate, generalizable results.
Semi-supervised and Unsupervised Learning
Semi-supervised learning involves methods like Bayesian optimization, where a learning
algorithm guides the collection of new data points to reduce uncertainty. Reinforcement
learning, a key semi-supervised method, involves a learner interacting with an
environment to learn optimal actions for maximizing long-term rewards. The learner
observes the current state, takes actions, receives immediate rewards, and updates its
state, striving for the best long-term outcomes. Reinforcement learning effectively
captures the concept of deferred gratification, making it valuable for AI applications.
Unsupervised clustering emphasizes the extraction of meaningful patterns from data
without labelled outputs. It begins with statistical properties like mean and variance and
extends to methods like principal component analysis (PCA) for dimensionality reduction.
Clustering, particularly k-means clustering, identifies natural groupings in data based on
feature similarities. The k-means algorithm involves initializing cluster means, assigning
data points to the nearest clusters, and updating means iteratively until convergence. The
challenge is determining the number of clusters (k), which can be optimized through
additional techniques. Hierarchical clustering offers another approach, recursively splitting
data into smaller clusters, revealing nested groupings and relationships. These methods
are crucial for discovering structure in unlabelled data and are often integrated into larger
machine learning solutions.
Summary
We have investigated some general machine learning concepts supervised vs.
unsupervised learning and classification vs. regression. We covered basic linear classifiers,
logistic regression, support vector machines, gradient descent, tree-based models, and
Bayesian methods.
© MIT xPRO 2024. All rights reserved. Page 5 of 5