4.1 Machine Learning Basics
4.1 Machine Learning Basics
Machine Learning
Automating automation
Data
Computer Output
Program
Machine Learning
Data
Computer Program
Output
Why “Learn”?
• Machine learning is programming computers to optimize a performance
criterion using example data or past experience.
• There is no need to “learn” to calculate payroll
• Learning is used when:
• Human expertise does not exist (navigating on Mars),
• Humans are unable to explain their expertise (speech recognition)
• Solution changes in time (routing on a computer network)
• Solution needs to be adapted to particular cases (user biometrics)
What We Talk About When We Talk
About“Learning”
• Learning general models from a data of particular examples
• Data is cheap and abundant (data warehouses, data marts); knowledge is
expensive and scarce.
• Example in retail: Customer transactions to consumer behavior:
People who bought “Da Vinci Code” also bought “The Five People You Meet in
Heaven” (www.amazon.com)
• Build a model that is a good and useful approximation to the data.
What is Machine Learning?
• Machine Learning
• Study of algorithms that
• improve their performance
• at some task
• with experience
• Optimize a performance criterion using example data or past
experience.
• Role of Statistics: Inference from a sample
• Role of Computer science: Efficient algorithms to
• Solve the optimization problem
• Representing and evaluating the model for inference
Learning Associations
• Basket analysis:
P (Y | X ) probability that somebody who buys X also
buys Y where X and Y are products/services.
• Example: Credit
scoring
• Differentiating
between low-risk
and high-risk
customers from
their income and
savings
Discriminant: IF income > θ1 AND savings > θ2
THEN low-risk ELSE high-
risk`
Model
Classification: Applications
• Aka Pattern recognition
• Face recognition: Pose, lighting, occlusion (glasses, beard), make-
up, hair style
• Character recognition: Different handwriting styles.
• Speech recognition: Temporal dependency.
• Use of a dictionary or the syntax of the language.
• Sensor fusion: Combine multiple modalities; eg, visual (lip image) and
acoustic for speech
• Medical diagnosis: From symptoms to illnesses
• Web Advertizing: Predict if a user clicks on an ad on the Internet.
ML in a Nutshell
• Decision trees
• Sets of rules / Logic programs
• Instances
• Graphical models (Bayes/Markov nets)
• Neural networks
• Support vector machines
• Model ensembles
• Etc.
Evaluation
• Accuracy
• Precision and recall
• Squared error
• Likelihood
• Posterior probability
• Cost / Utility
• Margin
• Entropy
• K-L divergence
• Etc.
Optimization
• Combinatorial optimization
• E.g.: Greedy search
• Convex optimization
• E.g.: Gradient descent
• Constrained optimization
• E.g.: Linear programming
Types of Learning
Image classification is a popular problem in the computer vision field. Here, the
goal is to predict what class an image belongs to. In this set of problems, we are
interested in finding the class label of an image. More precisely: is the image of a
(x).
For example, you will able to determine the time taken to reach back