Comp Vis Week 2
Comp Vis Week 2
• Performance Measure
• To evaluate the abilities of a machine learning algorithm, we must design a
quantitative measure of its performance. Usually this performance measure P
is specific to the task T being carried out by the system.
• For classification we usually measure the accuracy of the model.
• Accuracy is the proportion of examples for which the model produces the correct output.
• We can also measure the error rate.
• Error rate is the proportion of examples for which the model produces an incorrect
output.
A computer program is said to learn from experience E with
Learning 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.
• The Experience:
• Machine learning algorithms can be categorized as Supervised and
Unsupervised by what kind of experience they are allowed to have during the
learning process.
• Learning algorithms are allowed to experience a dataset.
• A dataset is a collection of many samples.
• Ex: Iris dataset.
• 150 iris plants with measurements of different parts.
• Features: sepal length, sepal width, petal length, petal width
• The specie of each plant is recorded (3 different species)
A computer program is said to learn from experience E with
Learning 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.
• The Experience:
• Unsupervised Learning: experience a dataset containing many features, then learn useful
properties of the structure of this dataset. Ex: clustering, dividing the dataset into
clusters of similar examples.
• Supervised Learning: experience a dataset containing features, but each example is also
associated with a label or target. For example, the Iris dataset is annotated with the
species of each iris plant. A supervised learning algorithm can study the Iris dataset and
learn to classify iris plants into three different species based on their measurements.
A computer program is said to learn from experience E with
Learning 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.
• The Experience:
• Unsupervised learning involves observing several examples of a random vector x and
attempting to implicitly or explicitly learn the probability distribution p(x), or some
interesting properties of that distribution;
• Supervised learning involves observing several examples of a random vector x and an
associated value or vector y, then learning to predict y from x, usually by estimating
p(y | x).
• The term supervised learning originates from the view of the target y being provided
by an instructor or teacher who shows the machine learning system what to do. In
unsupervised learning, there is no instructor or teacher, and the algorithm must
learn to make sense of the data without this guide.
A computer program is said to learn from experience E with
Learning 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.
• Performance ?
• Test set: m example inputs that will not be used for training
• Design matrix 𝑋 𝑡𝑒𝑠𝑡
• Vector of regression targets: 𝑦 𝑡𝑒𝑠𝑡
• How to measure the performance?
• Mean Squared Error
1 2
• 𝑀𝑆𝐸𝑡𝑒𝑠𝑡 = 𝑚 σ𝑖(𝑦ො 𝑡𝑒𝑠𝑡 − 𝑦 𝑡𝑒𝑠𝑡 )𝑖
Ex: Regression
• How to improve the performance for the regression task?
• Instead of linear regression employ polynomial regression.
• Polynomial regression is a form of Linear regression known as a special case of Multiple
linear regression which estimates the relationship as an nth degree polynomial.