SlideShare una empresa de Scribd logo
1 de 136
Descargar para leer sin conexión
Machine Learning
Introduction
• Machine Learning is concerned with the study of building computer
programs that automatically improve and/or adapt their performance
through experience.
• Machine learning can be thought of as “programming by example" .
• The goal of machine learning is to devise learning algorithms that do
the learning automatically without human intervention or assistance.
Rather than program the computer to solve the task directly, in
machine learning, we seek methods by which the computer will come
up with its own program based on examples that we provide.
Introduction
• 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.
• A learning system is characterized by the following elements:
• task (or tasks) T
• experience E
• performance measure P
Introduction
• Ex: a learning system for playing tic-tac-toe game (or nuggets and
crosses) will have the following corresponding elements:
• T: Play tic-tac-toe;
• P: Percentage of games won (and eventually drawn);
• E: Playing against itself (can also be playing against others).
Introduction
• Some examples of machine learning problems are
• character (including digit) recognition
• handwriting recognition
• face detection
• spam filtering
• sound recognition
• spoken language understanding
• stock market prediction
• weather prediction
• medical diagnosis
• fraud detection
• fingerprint matching
Terminology
• Machine learning
• Data science
• Data mining
• Data Analysis
• Statistical learning
• Knowledge discovery in databases
• Pattern discovery
Data? Where?
• Google: processes 24 peta bytes of data per day.
• Facebook: 10 million photos uploaded every hour.
• Youtube: 1 hour of video uploaded every second.
• Twitter: 400 million tweets per day.
• Astronomy: Satellite data is in hundreds of PB.
• “By 2020 the digital universe will reach 44
zettabytes...” (That’s 44 trillion gigabytes!)
Data types
• Data comes in different sizes and also flavors (types):
• Texts
• Numbers
• Clickstreams
• Graphs
• Tables
• Images
• Transactions
• Videos
• Some or all of the above!
The data science process
Exploratory data analysis
Generic learning system
• A generic learning system can be defined by the following
components
• Goal: Defined with respect to the task to be performed by the system;
• Model: A mathematical function which maps perception to actions;
• Learning rules: Used to update the model parameters with new experience in
a way which optimizes the performance measures with respect to the goals.
Learning rules help the algorithm search for the best model;
• Experience: A set of perception (and possibly the corresponding actions).
Generic scheme of a learning system
The basic notions
• An example (sometimes also called an instance) is the object that is
being classified. For instance, if we consider the cancer tumor
patients classification, then the patients are the examples.
• An example is described by a set of attributes, also known as features
or variables. Ex: the cancer tumor patients classification, a patient
might be described by attributes such as gender, age, weight, tumor
size, tumor shape, blood pressure, etc.
The basic notions
• The label is the category that we are trying to predict. For instance, in
the cancer patient classification, the labels can be “avascular”,
“vascular” and “angiogenesis”.
Then,
• During training, the learning algorithm is supplied with labeled
examples,
while during testing, only unlabeled examples are provided.
In certain situation we can assume that only two labels are possible
that we might as well call 0 and 1 (for instance, cancer or not cancer).
This will make the things much simple.
Learning Steps
The main steps in a learning process are as follows:
• Data and assumptions
Data refers to the data available for the learning task and assumptions represent
what we can assume about the problem.
• Representation
We should define how to represent the examples to be classified. There are many
representation methods for the same data. The choice of representation may
determine whether the learning task is very easy or very difficult.
• Method and estimation
Method takes into account what are the possible hypotheses and estimation helps
to adjust the predictions based on the feedback (such as updating the parameters
when there is a mistake, etc).
Learning Steps
• Evaluation
This evaluates how well the method is working (for instance,
considering the ratio of wrong classified data and the whole dataset).
• Model selection
It tells us whether we can rethink the approach to do even better or to
make it more flexible, or, whether we should choose an entirely
different model that would be more suitable.
Learning Systems Classification
Classification Based on Goal, Tasks, Target Function
• Prediction: the system predicts the desired output for a given input based
on previous input/output pairs.
Example: prediction of a stock value given other (input) parameters
values like market index, interest rates, currency conversion, etc.
• Regression: the system estimates a function of many variables
(multivariate) or single variable (univariate) from scattered data.
Example: a simple univariate regression problem is x4+ x3+ x2+x+1
Learning Systems Classification
• Classification (categorization): the system classifies an object into one
of several categories (or classes) based on features of the object.
Example: A diagnosis system which has to classify a patient’s cancer
tumor into one of the three categories: avascular, vascular,
angiogenesis.
• Clustering: the system task is to organize a group of objects into
homogeneous segments.
Example: a satellite image analysis system which groups land areas
into forest, urban and water body, for better utilization of natural
resources.
Learning Systems Classification
• Planning: the system has to generate an optimal sequence of actions
to solve a particular problem.
Example: robot path planning (to perform a certain task or to move
from one place to another, etc).
Learning Systems Classification
Classification Based on the Model
• Decision trees
• Linear separators (perceptron model)
• Neural networks
• Genetic programming
• Evolutionary algorithms
• Graphical models
• Support vector machines
• Hidden Markov models
Learning Systems Classification
Classification Based on the Learning Rules
• gradient descent
• least square error
• expectation maximization
• margin maximization
Learning Systems Classification
Classification Based on Experience
• Supervised learning:
In supervised learning, the machine is given the desired outputs and its goal
is to learn to produce the correct output given a new input.
Examples : an automated vehicle where a set of vision inputs and the
corresponding steering actions are available to the learner.
• Unsupervised learning: (exploratory learning)
In unsupervised learning the goal of the machine is to build a model of
input that can be used for reasoning, decision making, predicting things, and
communicating.
Examples: Finding out malicious network attacks from a sequence of anomalous
data packets is an example of unsupervised learning
Learning Systems Classification
• Active learning:
Here not only a teacher is available, the learner has the freedom to ask
the teacher for suitable perception-action example pairs which will help the learner
to improve its performance.
Example: Consider a news recommender system which tries to learn a user’s
preference and categorize news articles as interesting or uninteresting to the user.
• Reinforcement learning:
In reinforcement learning, the machine can also produce actions which
affect the state of the world, and receive rewards (or punishments). The
goal is to learn to act in a way that maximizes rewards in the long term.
Example: a robot in an unknown terrain where its get a punishment when its hits
an obstacle and reward when it moves smoothly.
Machine Learning
• Learn models from data
• Machine learning
• Supervised learning
• Unsupervised learning
• Reinforcement learning
• Examples:
• Google
• Netflix
• Amazon
Supervised and unsupervised learning
• Unsupervised learning:
• Learning a model from unlabeled data.
• Supervised learning:
• Learning a model from labeled data.
Supervised and unsupervised learning
Unsupervised Learning
Unsupervised learning
Unsupervised learning
Methods: K-means, gaussian mixtures, hierarchical clustering, spectral clustering, etc.
Unsupervised Learning • Clustering
• Dimensionality
reduction
Clustering examples
• Clustering of the population by their demographics.
• Clustering of geographic objects (mineral deposits, houses, etc.)
• Clustering of stars
• Audio signal separation
• Image segmentation
K-means
K-means
K-means
K-means
K-means
K-means
K-means
K-Means visualization
• https://www.naftaliharris.com/blog/visualizing-k-means-clustering/
• Local file
Supervised learning
Supervised learning
Methods: Support Vector Machines, neural networks, decision trees, K-nearest neighbors, naive
Bayes, etc.
Supervised learning
• Classification:
Supervised learning
• Non linear classification
Supervised learning
Supervised learning
• Regression
Example: Income in function of age, weight of the fruit in function of its length.
Training and testing
Use generated model
K-nearest neighbours
K-nearest neighbours
• Not every ML method builds a model! (Ex: K-nearest neighbours)
• Our first ML method: KNN.
• Main idea: Uses the similarity between examples.
• Assumption: Two similar examples should have same labels.
• Assumes all examples (instances) are points in the d dimensional
space Rd.
K-nearest neighbours
• KNN uses the standard Euclidian distance to define nearest neighbors.
K-nearest neighbours
K-nearest neighbours
An approximate decision boundary for K = 3
K-nearest neighbours
• Pros:
• Simple to implement.
• Works well in practice.
• Does not require to build a model, make assumptions, tune parameters.
• Can be extended easily with news examples.
• Cons:
• Requires large space to store the entire training dataset.
• Slow! Given n examples and d features. The method takes O(n × d) to run.
• Suffers from the curse of dimensionality.
K-nearest neighbours
• Applications
• Information retrieval.
• Handwritten character classification using nearest neighbour in large
databases.
• Recommender systems (user like you may like similar movies).
• Breast cancer diagnosis.
• Medical data mining (similar patient symptoms).
• Pattern recognition in general.
Training and Testing
How can we be confident about f?
Training and Testing
Train, Validation and Test
Overfitting/underfitting
Overfitting/underfitting
Overfitting/underfitting
Overfitting/underfitting
Avoid overfitting
In general, use simple models!
• Reduce the number of features manually or do feature selection.
• Do a model selection (ML).
• Use regularization (keep the features but reduce their importance by
setting small parameter values) (ML).
• Do a cross-validation to estimate the test error.
Regularization
K-fold Cross Validation
Confusion matrix
• Calculate number of errors that the classifier is doing.
Reinforcement Learning
• Agent interacts and learns from a stochastic environment.
• No supervisor, only reward signals.
• Ex:
• Automated vehicle control
• An unmanned helicopter learning to fly and perform stunts
• Game playing
• Playing backgammon, Atari breakout, Tetris, Tic Tac Toe
• Medical treatment planning
• Planning a sequence of treatments based on the effect of past treatments
• Chat bots
• Agent figuring out how to make a conversation
Summary
Reference
• ColumbiaX: CSMM.101x Artificial Intelligence (AI)
Linear Models
Linear Models
• Linear Regression
• Linear Classification: Perceptron
Supervised Learning
Linear Regression
Linear Regression
Linear Regression
Linear Regression
Linear Regression
Linear Regression
Method 1
Linear Regression
Method 1
Linear Regression
Method 2
Linear Regression
Method 2
Linear Regression
Method 3
Gradient descent
Linear Regression
• Gradient descent
Pros and Cons
Classification
Classification
Classification - Perceptron
Classification - Perceptron
Classification - Perceptron
Classification - Perceptron
Classification - Perceptron
Classification - Perceptron
Classification - Perceptron
Classification - Perceptron
Classification - Perceptron
Classification - Perceptron
Classification - Perceptron
Select best hyperplane
Tree classifiers
Decision trees
• The terminology Tree is graphic.
• However, a decision tree is grown from the root downward. The idea
is to send the examples down the tree, using the concept of
information entropy
Decision trees
Decision trees
Decision trees
Decision trees
Entropy  Control how a decision tree decides where to split the data.
Ex:
If all examples are same class  Entropy=0
If examples are evenly split between classes  Entropy=1.0
𝐸𝑛𝑡𝑟𝑜𝑝𝑦 =
𝑖
−(𝑃𝑖)𝑙𝑜𝑔2(𝑃𝑖)
More about entropy
Information Gain
Decision trees
• How to decide which attribute is best to split on based on entropy?
Decision trees
Decision trees
Decision trees
Decision trees
• At the first split starting from the root, we choose the attribute that has the max gain.
• Then, we re-start the same process at each of the children no des (if node not pure).
Naive Bayes
Probability
Basics
• How likely something is to happen.
• Ex:
• Tossing a Coin
• Throwing Dice
Probability Line
Terminology
• Experiment or Trial: an action where the result is uncertain.
• Sample Space: all the possible outcomes of an experiment.
• Sample Point: just one of the possible outcomes
• Event: a single result of an experiment
Probability: Complement
• P(A) means "Probability of Event A“
• P(A') means "Probability of the complement of Event A“
• P(A) + P(A') = 1
Probability: Types of Events
• Independent (each event is not affected by other events),
• Dependent (also called "Conditional", where an event is affected by
other events)[Conditional Probability]
• Mutually Exclusive (events can't happen at the same time)
Probability Tree Diagrams
The probability of getting at least one Head from two tosses is 0.25+0.25+0.25 = 0.75
Probability: Independent Events
• Independent Events are not affected by previous events.
• We can calculate the chances of two or more independent events by
multiplying the chances.
• P(A and B) = P(A) × P(B)
(Probability of A and B
equals the probability
of A times the probability
of B)
Dependent Events
• They can be affected by previous events
Dependent Events
Dependent Events: Notation
• P(A) means "Probability Of Event A“
• Ex: Consider above example
• Event A is  get a Blue Marble first
• P(A) = 2/5
• Event B is  get a Blue Marble second
• If we got a Blue Marble first the chance is now 1/4
• If we got a Red Marble first the chance is now 2/4
• P(B|A) means "Event B given Event A“ (event A has already happened, now
what is the chance of event B?)
• P(B|A) is also called the "Conditional Probability" of B given A.
Dependent Events: Notation
• And in our case:
• P(B|A) = ¼
• So the probability of getting 2 blue marbles is:
• And we write it as
Dependent Events: Example
Mutually Exclusive Events
• When two events (call them "A" and "B") are Mutually Exclusive it is
impossible for them to happen together:
• P(A and B) = 0 ("The probability of A and B together equals 0 (impossible)")
• But the probability of A or B is the sum of the individual probabilities:
• P(A or B) = P(A) + P(B)
• If not Mutually Exclusive:
• P(A or B) = P(A) + P(B) − P(A and B)
• P(A ∪ B) = P(A) + P(B) − P(A ∩ B)
More about probability
False Positives and False Negatives
Bayes' Theorem
• How computers learn about people?
Bayes' Theorem
• Bayes’ Theorem is a way of finding a probability when we know
certain other probabilities.
•P(A|B) is "Probability of A given B", the probability of A given that B happens
•P(A) is Probability of A
•P(B|A) is "Probability of B given A", the probability of B given that A happens
•P(B) is Probability of B
Bayes' Theorem: Example
Bayes' Theorem:
Example
Bayes' Theorem: Example
• One of the famous uses for Bayes Theorem is False Positives and False
Negatives.
We want to know the chance of having the allergy when test says "Yes",
written P(Allergy|Yes)
Bayes' Theorem: Example
But we can calculate it by adding up those with, and those without the allergy:
Bayes' Theorem: Example
A special version of the Bayes' formula
Bayes' Theorem:
Example
Why probabilities?
• Why are we bringing here Bayes rule?
Reference
• ColumbiaX: CSMM.101x Artificial Intelligence (AI)

Más contenido relacionado

La actualidad más candente

Lecture 2 Basic Concepts in Machine Learning for Language Technology
Lecture 2 Basic Concepts in Machine Learning for Language TechnologyLecture 2 Basic Concepts in Machine Learning for Language Technology
Lecture 2 Basic Concepts in Machine Learning for Language TechnologyMarina Santini
 
Evolving Reinforcement Learning Algorithms, JD. Co-Reyes et al, 2021
Evolving Reinforcement Learning Algorithms, JD. Co-Reyes et al, 2021Evolving Reinforcement Learning Algorithms, JD. Co-Reyes et al, 2021
Evolving Reinforcement Learning Algorithms, JD. Co-Reyes et al, 2021Chris Ohk
 
Deep Learning Sample Class (Jon Lederman)
Deep Learning Sample Class (Jon Lederman)Deep Learning Sample Class (Jon Lederman)
Deep Learning Sample Class (Jon Lederman)Jon Lederman
 
Policy Based reinforcement Learning for time series Anomaly detection
Policy Based reinforcement Learning for time series Anomaly detectionPolicy Based reinforcement Learning for time series Anomaly detection
Policy Based reinforcement Learning for time series Anomaly detectionKishor Datta Gupta
 
Neural Networks and Deep Learning Basics
Neural Networks and Deep Learning BasicsNeural Networks and Deep Learning Basics
Neural Networks and Deep Learning BasicsJon Lederman
 
Hacking Predictive Modeling - RoadSec 2018
Hacking Predictive Modeling - RoadSec 2018Hacking Predictive Modeling - RoadSec 2018
Hacking Predictive Modeling - RoadSec 2018HJ van Veen
 
Survey on contrastive self supervised l earning
Survey on contrastive self supervised l earningSurvey on contrastive self supervised l earning
Survey on contrastive self supervised l earningAnirudh Ganguly
 
Muhammad Usman Akhtar | Ph.D Scholar | Wuhan University | School of Co...
Muhammad Usman Akhtar  |  Ph.D Scholar  |  Wuhan  University  |  School of Co...Muhammad Usman Akhtar  |  Ph.D Scholar  |  Wuhan  University  |  School of Co...
Muhammad Usman Akhtar | Ph.D Scholar | Wuhan University | School of Co...Wuhan University
 
Deep Learning in Recommender Systems - RecSys Summer School 2017
Deep Learning in Recommender Systems - RecSys Summer School 2017Deep Learning in Recommender Systems - RecSys Summer School 2017
Deep Learning in Recommender Systems - RecSys Summer School 2017Balázs Hidasi
 
Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine LearningShahar Cohen
 
Genetic algorithm for hyperparameter tuning
Genetic algorithm for hyperparameter tuningGenetic algorithm for hyperparameter tuning
Genetic algorithm for hyperparameter tuningDr. Jyoti Obia
 
08 neural networks
08 neural networks08 neural networks
08 neural networksankit_ppt
 
Optimization as a model for few shot learning
Optimization as a model for few shot learningOptimization as a model for few shot learning
Optimization as a model for few shot learningKaty Lee
 
Understanding Basics of Machine Learning
Understanding Basics of Machine LearningUnderstanding Basics of Machine Learning
Understanding Basics of Machine LearningPranav Ainavolu
 
DagdelenSiriwardaneY..
DagdelenSiriwardaneY..DagdelenSiriwardaneY..
DagdelenSiriwardaneY..butest
 
Using Deep Learning to Find Similar Dresses
Using Deep Learning to Find Similar DressesUsing Deep Learning to Find Similar Dresses
Using Deep Learning to Find Similar DressesHJ van Veen
 
Semi supervised learning machine learning made simple
Semi supervised learning  machine learning made simpleSemi supervised learning  machine learning made simple
Semi supervised learning machine learning made simpleDevansh16
 
Hands-On Machine Learning with Scikit-Learn and TensorFlow - Chapter8
Hands-On Machine Learning with Scikit-Learn and TensorFlow - Chapter8Hands-On Machine Learning with Scikit-Learn and TensorFlow - Chapter8
Hands-On Machine Learning with Scikit-Learn and TensorFlow - Chapter8Hakky St
 
Lecture 01: Machine Learning for Language Technology - Introduction
 Lecture 01: Machine Learning for Language Technology - Introduction Lecture 01: Machine Learning for Language Technology - Introduction
Lecture 01: Machine Learning for Language Technology - IntroductionMarina Santini
 

La actualidad más candente (20)

Lecture 2 Basic Concepts in Machine Learning for Language Technology
Lecture 2 Basic Concepts in Machine Learning for Language TechnologyLecture 2 Basic Concepts in Machine Learning for Language Technology
Lecture 2 Basic Concepts in Machine Learning for Language Technology
 
Evolving Reinforcement Learning Algorithms, JD. Co-Reyes et al, 2021
Evolving Reinforcement Learning Algorithms, JD. Co-Reyes et al, 2021Evolving Reinforcement Learning Algorithms, JD. Co-Reyes et al, 2021
Evolving Reinforcement Learning Algorithms, JD. Co-Reyes et al, 2021
 
Deep Learning Sample Class (Jon Lederman)
Deep Learning Sample Class (Jon Lederman)Deep Learning Sample Class (Jon Lederman)
Deep Learning Sample Class (Jon Lederman)
 
Policy Based reinforcement Learning for time series Anomaly detection
Policy Based reinforcement Learning for time series Anomaly detectionPolicy Based reinforcement Learning for time series Anomaly detection
Policy Based reinforcement Learning for time series Anomaly detection
 
Neural Networks and Deep Learning Basics
Neural Networks and Deep Learning BasicsNeural Networks and Deep Learning Basics
Neural Networks and Deep Learning Basics
 
Hacking Predictive Modeling - RoadSec 2018
Hacking Predictive Modeling - RoadSec 2018Hacking Predictive Modeling - RoadSec 2018
Hacking Predictive Modeling - RoadSec 2018
 
Survey on contrastive self supervised l earning
Survey on contrastive self supervised l earningSurvey on contrastive self supervised l earning
Survey on contrastive self supervised l earning
 
Muhammad Usman Akhtar | Ph.D Scholar | Wuhan University | School of Co...
Muhammad Usman Akhtar  |  Ph.D Scholar  |  Wuhan  University  |  School of Co...Muhammad Usman Akhtar  |  Ph.D Scholar  |  Wuhan  University  |  School of Co...
Muhammad Usman Akhtar | Ph.D Scholar | Wuhan University | School of Co...
 
Deep Learning in Recommender Systems - RecSys Summer School 2017
Deep Learning in Recommender Systems - RecSys Summer School 2017Deep Learning in Recommender Systems - RecSys Summer School 2017
Deep Learning in Recommender Systems - RecSys Summer School 2017
 
Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine Learning
 
ML Basics
ML BasicsML Basics
ML Basics
 
Genetic algorithm for hyperparameter tuning
Genetic algorithm for hyperparameter tuningGenetic algorithm for hyperparameter tuning
Genetic algorithm for hyperparameter tuning
 
08 neural networks
08 neural networks08 neural networks
08 neural networks
 
Optimization as a model for few shot learning
Optimization as a model for few shot learningOptimization as a model for few shot learning
Optimization as a model for few shot learning
 
Understanding Basics of Machine Learning
Understanding Basics of Machine LearningUnderstanding Basics of Machine Learning
Understanding Basics of Machine Learning
 
DagdelenSiriwardaneY..
DagdelenSiriwardaneY..DagdelenSiriwardaneY..
DagdelenSiriwardaneY..
 
Using Deep Learning to Find Similar Dresses
Using Deep Learning to Find Similar DressesUsing Deep Learning to Find Similar Dresses
Using Deep Learning to Find Similar Dresses
 
Semi supervised learning machine learning made simple
Semi supervised learning  machine learning made simpleSemi supervised learning  machine learning made simple
Semi supervised learning machine learning made simple
 
Hands-On Machine Learning with Scikit-Learn and TensorFlow - Chapter8
Hands-On Machine Learning with Scikit-Learn and TensorFlow - Chapter8Hands-On Machine Learning with Scikit-Learn and TensorFlow - Chapter8
Hands-On Machine Learning with Scikit-Learn and TensorFlow - Chapter8
 
Lecture 01: Machine Learning for Language Technology - Introduction
 Lecture 01: Machine Learning for Language Technology - Introduction Lecture 01: Machine Learning for Language Technology - Introduction
Lecture 01: Machine Learning for Language Technology - Introduction
 

Similar a Lecture 5 machine learning updated

Unit-V Machine Learning.ppt
Unit-V Machine Learning.pptUnit-V Machine Learning.ppt
Unit-V Machine Learning.pptSharpmark256
 
Intro to machine learning
Intro to machine learningIntro to machine learning
Intro to machine learningAkshay Kanchan
 
Unit 1 - ML - Introduction to Machine Learning.pptx
Unit 1 - ML - Introduction to Machine Learning.pptxUnit 1 - ML - Introduction to Machine Learning.pptx
Unit 1 - ML - Introduction to Machine Learning.pptxjawad184956
 
It's Machine Learning Basics -- For You!
It's Machine Learning Basics -- For You!It's Machine Learning Basics -- For You!
It's Machine Learning Basics -- For You!To Sum It Up
 
Machine learning --Introduction.pptx
Machine learning --Introduction.pptxMachine learning --Introduction.pptx
Machine learning --Introduction.pptxvinivijayan4
 
Rahul_Kirtoniya_11800121032_CSE_Machine_Learning.pptx
Rahul_Kirtoniya_11800121032_CSE_Machine_Learning.pptxRahul_Kirtoniya_11800121032_CSE_Machine_Learning.pptx
Rahul_Kirtoniya_11800121032_CSE_Machine_Learning.pptxRahulKirtoniya
 
Artificial Intelligence Approaches
Artificial Intelligence  ApproachesArtificial Intelligence  Approaches
Artificial Intelligence ApproachesJincy Nelson
 
Week_1 Machine Learning introduction.pptx
Week_1 Machine Learning introduction.pptxWeek_1 Machine Learning introduction.pptx
Week_1 Machine Learning introduction.pptxmuhammadsamroz
 
ML SFCSE.pptx
ML SFCSE.pptxML SFCSE.pptx
ML SFCSE.pptxNIKHILGR3
 
unit 1.2 supervised learning.pptx
unit 1.2 supervised learning.pptxunit 1.2 supervised learning.pptx
unit 1.2 supervised learning.pptxDr.Shweta
 
Machine Learning an Exploratory Tool: Key Concepts
Machine Learning an Exploratory Tool: Key ConceptsMachine Learning an Exploratory Tool: Key Concepts
Machine Learning an Exploratory Tool: Key Conceptsachakracu
 
An Introduction to Machine Learning
An Introduction to Machine LearningAn Introduction to Machine Learning
An Introduction to Machine LearningVedaj Padman
 

Similar a Lecture 5 machine learning updated (20)

Unit-V Machine Learning.ppt
Unit-V Machine Learning.pptUnit-V Machine Learning.ppt
Unit-V Machine Learning.ppt
 
Intro to machine learning
Intro to machine learningIntro to machine learning
Intro to machine learning
 
Unit-1.ppt
Unit-1.pptUnit-1.ppt
Unit-1.ppt
 
Unit 1 - ML - Introduction to Machine Learning.pptx
Unit 1 - ML - Introduction to Machine Learning.pptxUnit 1 - ML - Introduction to Machine Learning.pptx
Unit 1 - ML - Introduction to Machine Learning.pptx
 
It's Machine Learning Basics -- For You!
It's Machine Learning Basics -- For You!It's Machine Learning Basics -- For You!
It's Machine Learning Basics -- For You!
 
ML
MLML
ML
 
Machine learning --Introduction.pptx
Machine learning --Introduction.pptxMachine learning --Introduction.pptx
Machine learning --Introduction.pptx
 
Rahul_Kirtoniya_11800121032_CSE_Machine_Learning.pptx
Rahul_Kirtoniya_11800121032_CSE_Machine_Learning.pptxRahul_Kirtoniya_11800121032_CSE_Machine_Learning.pptx
Rahul_Kirtoniya_11800121032_CSE_Machine_Learning.pptx
 
Artificial Intelligence Approaches
Artificial Intelligence  ApproachesArtificial Intelligence  Approaches
Artificial Intelligence Approaches
 
Week_1 Machine Learning introduction.pptx
Week_1 Machine Learning introduction.pptxWeek_1 Machine Learning introduction.pptx
Week_1 Machine Learning introduction.pptx
 
AI Lesson 33
AI Lesson 33AI Lesson 33
AI Lesson 33
 
Lesson 33
Lesson 33Lesson 33
Lesson 33
 
ML SFCSE.pptx
ML SFCSE.pptxML SFCSE.pptx
ML SFCSE.pptx
 
unit 1.2 supervised learning.pptx
unit 1.2 supervised learning.pptxunit 1.2 supervised learning.pptx
unit 1.2 supervised learning.pptx
 
machine learning
machine learningmachine learning
machine learning
 
Machine Learning an Exploratory Tool: Key Concepts
Machine Learning an Exploratory Tool: Key ConceptsMachine Learning an Exploratory Tool: Key Concepts
Machine Learning an Exploratory Tool: Key Concepts
 
An Introduction to Machine Learning
An Introduction to Machine LearningAn Introduction to Machine Learning
An Introduction to Machine Learning
 
Machine Learning - Deep Learning
Machine Learning - Deep LearningMachine Learning - Deep Learning
Machine Learning - Deep Learning
 
ML.ppt
ML.pptML.ppt
ML.ppt
 
ML.ppt
ML.pptML.ppt
ML.ppt
 

Más de Vajira Thambawita

Lecture 4 principles of parallel algorithm design updated
Lecture 4   principles of parallel algorithm design updatedLecture 4   principles of parallel algorithm design updated
Lecture 4 principles of parallel algorithm design updatedVajira Thambawita
 
Lecture 3 parallel programming platforms
Lecture 3   parallel programming platformsLecture 3   parallel programming platforms
Lecture 3 parallel programming platformsVajira Thambawita
 
Lecture 2 more about parallel computing
Lecture 2   more about parallel computingLecture 2   more about parallel computing
Lecture 2 more about parallel computingVajira Thambawita
 
Lecture 1 introduction to parallel and distributed computing
Lecture 1   introduction to parallel and distributed computingLecture 1   introduction to parallel and distributed computing
Lecture 1 introduction to parallel and distributed computingVajira Thambawita
 
Lecture 12 localization and navigation
Lecture 12 localization and navigationLecture 12 localization and navigation
Lecture 12 localization and navigationVajira Thambawita
 
Lecture 11 neural network principles
Lecture 11 neural network principlesLecture 11 neural network principles
Lecture 11 neural network principlesVajira Thambawita
 
Lecture 10 mobile robot design
Lecture 10 mobile robot designLecture 10 mobile robot design
Lecture 10 mobile robot designVajira Thambawita
 
Lecture 08 robots and controllers
Lecture 08 robots and controllersLecture 08 robots and controllers
Lecture 08 robots and controllersVajira Thambawita
 
Lecture 06 pic programming in c
Lecture 06 pic programming in cLecture 06 pic programming in c
Lecture 06 pic programming in cVajira Thambawita
 
Lecture 05 pic io port programming
Lecture 05 pic io port programmingLecture 05 pic io port programming
Lecture 05 pic io port programmingVajira Thambawita
 
Lecture 04 branch call and time delay
Lecture 04  branch call and time delayLecture 04  branch call and time delay
Lecture 04 branch call and time delayVajira Thambawita
 
Lecture 02 mechatronics systems
Lecture 02 mechatronics systemsLecture 02 mechatronics systems
Lecture 02 mechatronics systemsVajira Thambawita
 
Lecture 1 - Introduction to embedded system and Robotics
Lecture 1 - Introduction to embedded system and RoboticsLecture 1 - Introduction to embedded system and Robotics
Lecture 1 - Introduction to embedded system and RoboticsVajira Thambawita
 
Lec 09 - Registers and Counters
Lec 09 - Registers and CountersLec 09 - Registers and Counters
Lec 09 - Registers and CountersVajira Thambawita
 
Lec 07 - ANALYSIS OF CLOCKED SEQUENTIAL CIRCUITS
Lec 07 - ANALYSIS OF CLOCKED SEQUENTIAL CIRCUITSLec 07 - ANALYSIS OF CLOCKED SEQUENTIAL CIRCUITS
Lec 07 - ANALYSIS OF CLOCKED SEQUENTIAL CIRCUITSVajira Thambawita
 
Lec 06 - Synchronous Sequential Logic
Lec 06 - Synchronous Sequential LogicLec 06 - Synchronous Sequential Logic
Lec 06 - Synchronous Sequential LogicVajira Thambawita
 

Más de Vajira Thambawita (20)

Lecture 4 principles of parallel algorithm design updated
Lecture 4   principles of parallel algorithm design updatedLecture 4   principles of parallel algorithm design updated
Lecture 4 principles of parallel algorithm design updated
 
Lecture 3 parallel programming platforms
Lecture 3   parallel programming platformsLecture 3   parallel programming platforms
Lecture 3 parallel programming platforms
 
Lecture 2 more about parallel computing
Lecture 2   more about parallel computingLecture 2   more about parallel computing
Lecture 2 more about parallel computing
 
Lecture 1 introduction to parallel and distributed computing
Lecture 1   introduction to parallel and distributed computingLecture 1   introduction to parallel and distributed computing
Lecture 1 introduction to parallel and distributed computing
 
Lecture 12 localization and navigation
Lecture 12 localization and navigationLecture 12 localization and navigation
Lecture 12 localization and navigation
 
Lecture 11 neural network principles
Lecture 11 neural network principlesLecture 11 neural network principles
Lecture 11 neural network principles
 
Lecture 10 mobile robot design
Lecture 10 mobile robot designLecture 10 mobile robot design
Lecture 10 mobile robot design
 
Lecture 09 control
Lecture 09 controlLecture 09 control
Lecture 09 control
 
Lecture 08 robots and controllers
Lecture 08 robots and controllersLecture 08 robots and controllers
Lecture 08 robots and controllers
 
Lecture 07 more about pic
Lecture 07 more about picLecture 07 more about pic
Lecture 07 more about pic
 
Lecture 06 pic programming in c
Lecture 06 pic programming in cLecture 06 pic programming in c
Lecture 06 pic programming in c
 
Lecture 05 pic io port programming
Lecture 05 pic io port programmingLecture 05 pic io port programming
Lecture 05 pic io port programming
 
Lecture 04 branch call and time delay
Lecture 04  branch call and time delayLecture 04  branch call and time delay
Lecture 04 branch call and time delay
 
Lecture 03 basics of pic
Lecture 03 basics of picLecture 03 basics of pic
Lecture 03 basics of pic
 
Lecture 02 mechatronics systems
Lecture 02 mechatronics systemsLecture 02 mechatronics systems
Lecture 02 mechatronics systems
 
Lecture 1 - Introduction to embedded system and Robotics
Lecture 1 - Introduction to embedded system and RoboticsLecture 1 - Introduction to embedded system and Robotics
Lecture 1 - Introduction to embedded system and Robotics
 
Lec 09 - Registers and Counters
Lec 09 - Registers and CountersLec 09 - Registers and Counters
Lec 09 - Registers and Counters
 
Lec 08 - DESIGN PROCEDURE
Lec 08 - DESIGN PROCEDURELec 08 - DESIGN PROCEDURE
Lec 08 - DESIGN PROCEDURE
 
Lec 07 - ANALYSIS OF CLOCKED SEQUENTIAL CIRCUITS
Lec 07 - ANALYSIS OF CLOCKED SEQUENTIAL CIRCUITSLec 07 - ANALYSIS OF CLOCKED SEQUENTIAL CIRCUITS
Lec 07 - ANALYSIS OF CLOCKED SEQUENTIAL CIRCUITS
 
Lec 06 - Synchronous Sequential Logic
Lec 06 - Synchronous Sequential LogicLec 06 - Synchronous Sequential Logic
Lec 06 - Synchronous Sequential Logic
 

Último

Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 

Último (20)

Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 

Lecture 5 machine learning updated

  • 2. Introduction • Machine Learning is concerned with the study of building computer programs that automatically improve and/or adapt their performance through experience. • Machine learning can be thought of as “programming by example" . • The goal of machine learning is to devise learning algorithms that do the learning automatically without human intervention or assistance. Rather than program the computer to solve the task directly, in machine learning, we seek methods by which the computer will come up with its own program based on examples that we provide.
  • 3. Introduction • 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. • A learning system is characterized by the following elements: • task (or tasks) T • experience E • performance measure P
  • 4. Introduction • Ex: a learning system for playing tic-tac-toe game (or nuggets and crosses) will have the following corresponding elements: • T: Play tic-tac-toe; • P: Percentage of games won (and eventually drawn); • E: Playing against itself (can also be playing against others).
  • 5. Introduction • Some examples of machine learning problems are • character (including digit) recognition • handwriting recognition • face detection • spam filtering • sound recognition • spoken language understanding • stock market prediction • weather prediction • medical diagnosis • fraud detection • fingerprint matching
  • 6. Terminology • Machine learning • Data science • Data mining • Data Analysis • Statistical learning • Knowledge discovery in databases • Pattern discovery
  • 7.
  • 8. Data? Where? • Google: processes 24 peta bytes of data per day. • Facebook: 10 million photos uploaded every hour. • Youtube: 1 hour of video uploaded every second. • Twitter: 400 million tweets per day. • Astronomy: Satellite data is in hundreds of PB. • “By 2020 the digital universe will reach 44 zettabytes...” (That’s 44 trillion gigabytes!)
  • 9. Data types • Data comes in different sizes and also flavors (types): • Texts • Numbers • Clickstreams • Graphs • Tables • Images • Transactions • Videos • Some or all of the above!
  • 10. The data science process Exploratory data analysis
  • 11. Generic learning system • A generic learning system can be defined by the following components • Goal: Defined with respect to the task to be performed by the system; • Model: A mathematical function which maps perception to actions; • Learning rules: Used to update the model parameters with new experience in a way which optimizes the performance measures with respect to the goals. Learning rules help the algorithm search for the best model; • Experience: A set of perception (and possibly the corresponding actions).
  • 12. Generic scheme of a learning system
  • 13. The basic notions • An example (sometimes also called an instance) is the object that is being classified. For instance, if we consider the cancer tumor patients classification, then the patients are the examples. • An example is described by a set of attributes, also known as features or variables. Ex: the cancer tumor patients classification, a patient might be described by attributes such as gender, age, weight, tumor size, tumor shape, blood pressure, etc.
  • 14. The basic notions • The label is the category that we are trying to predict. For instance, in the cancer patient classification, the labels can be “avascular”, “vascular” and “angiogenesis”. Then, • During training, the learning algorithm is supplied with labeled examples, while during testing, only unlabeled examples are provided. In certain situation we can assume that only two labels are possible that we might as well call 0 and 1 (for instance, cancer or not cancer). This will make the things much simple.
  • 15. Learning Steps The main steps in a learning process are as follows: • Data and assumptions Data refers to the data available for the learning task and assumptions represent what we can assume about the problem. • Representation We should define how to represent the examples to be classified. There are many representation methods for the same data. The choice of representation may determine whether the learning task is very easy or very difficult. • Method and estimation Method takes into account what are the possible hypotheses and estimation helps to adjust the predictions based on the feedback (such as updating the parameters when there is a mistake, etc).
  • 16. Learning Steps • Evaluation This evaluates how well the method is working (for instance, considering the ratio of wrong classified data and the whole dataset). • Model selection It tells us whether we can rethink the approach to do even better or to make it more flexible, or, whether we should choose an entirely different model that would be more suitable.
  • 17. Learning Systems Classification Classification Based on Goal, Tasks, Target Function • Prediction: the system predicts the desired output for a given input based on previous input/output pairs. Example: prediction of a stock value given other (input) parameters values like market index, interest rates, currency conversion, etc. • Regression: the system estimates a function of many variables (multivariate) or single variable (univariate) from scattered data. Example: a simple univariate regression problem is x4+ x3+ x2+x+1
  • 18. Learning Systems Classification • Classification (categorization): the system classifies an object into one of several categories (or classes) based on features of the object. Example: A diagnosis system which has to classify a patient’s cancer tumor into one of the three categories: avascular, vascular, angiogenesis. • Clustering: the system task is to organize a group of objects into homogeneous segments. Example: a satellite image analysis system which groups land areas into forest, urban and water body, for better utilization of natural resources.
  • 19. Learning Systems Classification • Planning: the system has to generate an optimal sequence of actions to solve a particular problem. Example: robot path planning (to perform a certain task or to move from one place to another, etc).
  • 20. Learning Systems Classification Classification Based on the Model • Decision trees • Linear separators (perceptron model) • Neural networks • Genetic programming • Evolutionary algorithms • Graphical models • Support vector machines • Hidden Markov models
  • 21. Learning Systems Classification Classification Based on the Learning Rules • gradient descent • least square error • expectation maximization • margin maximization
  • 22. Learning Systems Classification Classification Based on Experience • Supervised learning: In supervised learning, the machine is given the desired outputs and its goal is to learn to produce the correct output given a new input. Examples : an automated vehicle where a set of vision inputs and the corresponding steering actions are available to the learner. • Unsupervised learning: (exploratory learning) In unsupervised learning the goal of the machine is to build a model of input that can be used for reasoning, decision making, predicting things, and communicating. Examples: Finding out malicious network attacks from a sequence of anomalous data packets is an example of unsupervised learning
  • 23. Learning Systems Classification • Active learning: Here not only a teacher is available, the learner has the freedom to ask the teacher for suitable perception-action example pairs which will help the learner to improve its performance. Example: Consider a news recommender system which tries to learn a user’s preference and categorize news articles as interesting or uninteresting to the user. • Reinforcement learning: In reinforcement learning, the machine can also produce actions which affect the state of the world, and receive rewards (or punishments). The goal is to learn to act in a way that maximizes rewards in the long term. Example: a robot in an unknown terrain where its get a punishment when its hits an obstacle and reward when it moves smoothly.
  • 24. Machine Learning • Learn models from data • Machine learning • Supervised learning • Unsupervised learning • Reinforcement learning • Examples: • Google • Netflix • Amazon
  • 25. Supervised and unsupervised learning • Unsupervised learning: • Learning a model from unlabeled data. • Supervised learning: • Learning a model from labeled data.
  • 29. Unsupervised learning Methods: K-means, gaussian mixtures, hierarchical clustering, spectral clustering, etc.
  • 30. Unsupervised Learning • Clustering • Dimensionality reduction
  • 31. Clustering examples • Clustering of the population by their demographics. • Clustering of geographic objects (mineral deposits, houses, etc.) • Clustering of stars • Audio signal separation • Image segmentation
  • 41. Supervised learning Methods: Support Vector Machines, neural networks, decision trees, K-nearest neighbors, naive Bayes, etc.
  • 43. Supervised learning • Non linear classification
  • 45. Supervised learning • Regression Example: Income in function of age, weight of the fruit in function of its length.
  • 46. Training and testing Use generated model
  • 48. K-nearest neighbours • Not every ML method builds a model! (Ex: K-nearest neighbours) • Our first ML method: KNN. • Main idea: Uses the similarity between examples. • Assumption: Two similar examples should have same labels. • Assumes all examples (instances) are points in the d dimensional space Rd.
  • 49. K-nearest neighbours • KNN uses the standard Euclidian distance to define nearest neighbors.
  • 51. K-nearest neighbours An approximate decision boundary for K = 3
  • 52. K-nearest neighbours • Pros: • Simple to implement. • Works well in practice. • Does not require to build a model, make assumptions, tune parameters. • Can be extended easily with news examples. • Cons: • Requires large space to store the entire training dataset. • Slow! Given n examples and d features. The method takes O(n × d) to run. • Suffers from the curse of dimensionality.
  • 53. K-nearest neighbours • Applications • Information retrieval. • Handwritten character classification using nearest neighbour in large databases. • Recommender systems (user like you may like similar movies). • Breast cancer diagnosis. • Medical data mining (similar patient symptoms). • Pattern recognition in general.
  • 54. Training and Testing How can we be confident about f?
  • 61. Avoid overfitting In general, use simple models! • Reduce the number of features manually or do feature selection. • Do a model selection (ML). • Use regularization (keep the features but reduce their importance by setting small parameter values) (ML). • Do a cross-validation to estimate the test error.
  • 64. Confusion matrix • Calculate number of errors that the classifier is doing.
  • 65. Reinforcement Learning • Agent interacts and learns from a stochastic environment. • No supervisor, only reward signals. • Ex: • Automated vehicle control • An unmanned helicopter learning to fly and perform stunts • Game playing • Playing backgammon, Atari breakout, Tetris, Tic Tac Toe • Medical treatment planning • Planning a sequence of treatments based on the effect of past treatments • Chat bots • Agent figuring out how to make a conversation
  • 67. Reference • ColumbiaX: CSMM.101x Artificial Intelligence (AI)
  • 69. Linear Models • Linear Regression • Linear Classification: Perceptron
  • 98. Decision trees • The terminology Tree is graphic. • However, a decision tree is grown from the root downward. The idea is to send the examples down the tree, using the concept of information entropy
  • 102. Decision trees Entropy  Control how a decision tree decides where to split the data. Ex: If all examples are same class  Entropy=0 If examples are evenly split between classes  Entropy=1.0 𝐸𝑛𝑡𝑟𝑜𝑝𝑦 = 𝑖 −(𝑃𝑖)𝑙𝑜𝑔2(𝑃𝑖)
  • 105. Decision trees • How to decide which attribute is best to split on based on entropy?
  • 109. Decision trees • At the first split starting from the root, we choose the attribute that has the max gain. • Then, we re-start the same process at each of the children no des (if node not pure).
  • 112. Basics • How likely something is to happen. • Ex: • Tossing a Coin • Throwing Dice
  • 114. Terminology • Experiment or Trial: an action where the result is uncertain. • Sample Space: all the possible outcomes of an experiment. • Sample Point: just one of the possible outcomes • Event: a single result of an experiment
  • 115. Probability: Complement • P(A) means "Probability of Event A“ • P(A') means "Probability of the complement of Event A“ • P(A) + P(A') = 1
  • 116. Probability: Types of Events • Independent (each event is not affected by other events), • Dependent (also called "Conditional", where an event is affected by other events)[Conditional Probability] • Mutually Exclusive (events can't happen at the same time)
  • 117. Probability Tree Diagrams The probability of getting at least one Head from two tosses is 0.25+0.25+0.25 = 0.75
  • 118. Probability: Independent Events • Independent Events are not affected by previous events. • We can calculate the chances of two or more independent events by multiplying the chances. • P(A and B) = P(A) × P(B) (Probability of A and B equals the probability of A times the probability of B)
  • 119. Dependent Events • They can be affected by previous events
  • 121. Dependent Events: Notation • P(A) means "Probability Of Event A“ • Ex: Consider above example • Event A is  get a Blue Marble first • P(A) = 2/5 • Event B is  get a Blue Marble second • If we got a Blue Marble first the chance is now 1/4 • If we got a Red Marble first the chance is now 2/4 • P(B|A) means "Event B given Event A“ (event A has already happened, now what is the chance of event B?) • P(B|A) is also called the "Conditional Probability" of B given A.
  • 122. Dependent Events: Notation • And in our case: • P(B|A) = ¼ • So the probability of getting 2 blue marbles is: • And we write it as
  • 124. Mutually Exclusive Events • When two events (call them "A" and "B") are Mutually Exclusive it is impossible for them to happen together: • P(A and B) = 0 ("The probability of A and B together equals 0 (impossible)") • But the probability of A or B is the sum of the individual probabilities: • P(A or B) = P(A) + P(B) • If not Mutually Exclusive: • P(A or B) = P(A) + P(B) − P(A and B) • P(A ∪ B) = P(A) + P(B) − P(A ∩ B)
  • 126. False Positives and False Negatives
  • 127. Bayes' Theorem • How computers learn about people?
  • 128. Bayes' Theorem • Bayes’ Theorem is a way of finding a probability when we know certain other probabilities. •P(A|B) is "Probability of A given B", the probability of A given that B happens •P(A) is Probability of A •P(B|A) is "Probability of B given A", the probability of B given that A happens •P(B) is Probability of B
  • 131. Bayes' Theorem: Example • One of the famous uses for Bayes Theorem is False Positives and False Negatives. We want to know the chance of having the allergy when test says "Yes", written P(Allergy|Yes)
  • 132. Bayes' Theorem: Example But we can calculate it by adding up those with, and those without the allergy:
  • 133. Bayes' Theorem: Example A special version of the Bayes' formula
  • 135. Why probabilities? • Why are we bringing here Bayes rule?
  • 136. Reference • ColumbiaX: CSMM.101x Artificial Intelligence (AI)