DS161 Introduction to Data Science & Artificial Intelligence
Lecture 5
Introduction to AI Subfields
Krishnendu Ghosh
Machine Learning
What is machine learning?
[Mitchell 1997] A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P, if its performance at tasks in T, as measured by P, improves with experience E.
What is machine learning?
Examples of the task, T
What is machine learning?
Performance measure, P
What is machine learning?
The Experience, E
Unsupervised and Supervised Learning are same
The chain rule of probability states that for a vector π β βπ , the joint probability distribution can be decomposed as:
The decomposition means that we can solve the problem of learning p( x ) by splitting it into n supervised learning problems
Alternatively we can solve the supervised learning problem p( y | x ) by using the traditional unsupervised learning technologies to learn the joint distribution p( x, y ), then inferring:
Why would one want machine learning?
It is one tool that might or might not be able to solve the problem at hand!
Linear Regression
Given a training data set where:
The output is a linear function of the input which predicts the value of a scalar πββ:
πβ = π^π»π
where π β βπ is a vector of parameters. We can think of w as a set of weights.
Task T: Predict y from x by outputting πβ = π^π»π
Performance: The mean squared error on the test data (which is different from the training data)
Linear Regression β a first cut approach
Linear Regression example
Capacity, Overfitting and Underfitting
Capacity, Overfitting and Underfitting
Capacity, Overfitting and Underfitting
The representational capacity of a model family is the set of functions that we are allowed to select
The effective capacity of a learning algorithm may be less than the representational capacity of the model family because the algorithm may restrict the hypothesis space
Occamβs razor: Among competing hypotheses that explain known observations equally well, we should choose the βsimplestβ one. We will therefore choose the quadratic one in the above.
Capacity vs Generalization Error
The No Free Lunch Theorem
How well can a machine learning algorithm generalize from a finite training set of examples?
The no free lunch theorem for machine learning [Wolper 1996] states:
Averaged over all possible data-generating distributions, every classification algorithm has the same error rate when classifying previously unobserved points.
Therefore in the absence of domain knowledge, no machine learning algorithm is universally any better than any other.
It is therefore important to understand the distributions relevant to the domain for choosing the model family and the learning algorithm.
Effect of Training Set
The quadratic model has inadequate capacity, hence training error increases with number of training examples. Also the test error asymptotes to a high value.
The optimal capacity plateaus after reaching sufficient complexity to solve the task.
Hyper-parameters and Validation Sets
Machine Learning Process
How to do Machine Learning
For (supervised) classification and regression (the most common tasks):