SlideShare uma empresa Scribd logo
1 de 60
Baixar para ler offline
Online Learning
Felipe Almeida
Rio Machine Learning Meetup August / 2016
Introduction, overview and examples
Structure
● Introduction
● Use cases
● Types of Targets
● Approaches
● Current Trends / Related Areas
● Links
2
Introduction
● Online Learning is generally described as doing machine learning
in a streaming data setting, i.e. training a model in consecutive
rounds
3
Introduction
● Online Learning is generally described as doing machine learning
in a streaming data setting, i.e. training a model in consecutive
rounds
○ At the beginning of each round the algorithm is presented with
an input sample, and must perform a prediction
4
Introduction
● Online Learning is generally described as doing machine learning
in a streaming data setting, i.e. training a model in consecutive
rounds
○ At the beginning of each round the algorithm is presented with
an input sample, and must perform a prediction
○ The algorithm verifies whether its prediction was correct or
incorrect, and feeds this information back into the model, for
subsequent rounds
5
Introduction
6
Whereas in batch (or offline) learning you have
access to the whole dataset to train on
x1
x2
x3
... xd
y
x1
x2
x3
... xd
y
x1
x2
x3
... xd
y
x1
x2
x3
... xd
y
x1
x2
x3
... xd
y
D features
Nsamples
Trained model
Batch training
Introduction
7
In online learning your model evolves as you
see new data, one example at a time
x1
x2
x3
... xd
y
Timeincreases
Input data at time t Online update
model at time t
x1
x2
x3
... xd
y
Input data at time t+1 Online update
model at time t+1
x1
x2
x3
... xd
y
Input data at time t+2 Online update
model at time t+2
Introduction
● In other words, you need to answer a sequence of questions but
you only have access to answers to previous questions
8
Introduction
● In other words, you need to answer a sequence of questions but
you only have access to answers to previous questions
9
Adapted from Shalev-Shwartz 2012
Introduction
● In other words, you need to answer a sequence of questions but
you only have access to answers to previous questions
10
Each t represents a
trial
Adapted from Shalev-Shwartz 2012
Introduction
● In other words, you need to answer a sequence of questions but
you only have access to answers to previous questions
11
Each t represents a
trial
Adapted from Shalev-Shwartz 2012
xt
is the input data for
trial t
Introduction
● In other words, you need to answer a sequence of questions but
you only have access to answers to previous questions
12
Each t represents a
trial
Adapted from Shalev-Shwartz 2012
xt
is the input data for
trial t
pt
is the prediction for the
label corresponding to xt
Introduction
● In other words, you need to answer a sequence of questions but
you only have access to answers to previous questions
13
Each t represents a
trial
Adapted from Shalev-Shwartz 2012
xt
is the input data for
trial t
pt
is the prediction for the
label corresponding to xt
This is the difference
between what you
predicted and the actual
label
Introduction
● In other words, you need to answer a sequence of questions but
you only have access to answers to previous questions
14
Each t represents a
trial
xt
is the input data for
trial t
pt
is the prediction for the
label corresponding to xt
This is the difference
between what you
predicted and the actual
label
After computing the loss, the algorithm will use this information to
update the model generating the predictions for the next trials
Introduction: Main Concepts
The main objective of online learning algorithms is to minimize the
regret.
15
Introduction: Main Concepts
The main objective of online learning algorithms is to minimize the
regret.
The regret is the difference between the performance of:
● the online algorithm
● an ideal algorithm that has been able to train on the whole data
seen so far, in batch fashion
16
Introduction: Main Concepts
In other words, the main objective of an online machine learning
algorithm is to try to perform as closely to the corresponding offline
algorithm as possible.
17
Introduction: Main Concepts
In other words, the main objective of an online machine learning
algorithm is to try to perform as closely to the corresponding offline
algorithm as possible.
This is measured by the regret.
18
Use cases
● Online algorithms are useful in at least two scenarios:
19
Use cases
● Online algorithms are useful in at least two scenarios:
● When your data is too large to fit in the memory
○ So you need to train your model one example at a time
20
Use cases
● Online algorithms are useful in at least two scenarios:
● When your data is too large to fit in the memory
○ So you need to train your model one example at a time
● When new data is constantly being generated, and/or is
dependent upon time
21
Use cases
Some cases where data is constantly being generated and you need
quick predictions:
22
Use cases
Some cases where data is constantly being generated and you need
quick predictions:
● Real-time Recommendation
● Fraud Detection
● Spam detection
● Portfolio Selection
● Online ad placement
23
Types of Targets
There are two main ways to think about an online learning problem, as far as
the target functions (that we are trying to learn) are concerned:
24
Types of Targets
There are two main ways to think about an online learning problem, as far as
the target functions (that we are trying to learn) are concerned:
● Stationary Targets
○ The target function you are trying to learn does not change over time
(but may be stochastic)
25
Types of Targets
There are two main ways to think about an online learning problem, as far as
the target functions (that we are trying to learn) are concerned:
● Stationary Targets
○ The target function you are trying to learn does not change over time
(but may be stochastic)
● Dynamic Targets
○ The process that is generating input sample data is assumed to be
non-stationary (i.e. may change over time)
○ The process may even be adapting to your model (i.e. in an
adversarial manner) 26
Example I: Stationary Targets
For stationary targets, the input-generating process is a single, but
unknown, function of the attributes.
27
Example I: Stationary Targets
For stationary targets, the input-generating process is a single, but
unknown, function of the attributes.
● Ex.: Some process generates, at each time step t, inputs of the
form (x1
, x2
, x3
) where each attribute is a bit, and the label y is the
result of (x1
v (x2
^ x3
)):
28
Example I: Stationary Targets
For stationary targets, the input-generating process is a single, but
unknown, function of the attributes.
● Ex.: Some process generates, at each time step t, inputs of the
form (x1
, x2
, x3
) where each attribute is a bit, and the label y is the
result of (x1
v (x2
^ x3
)):
29
1 0 1 1
0 1 1 1
0 0 0 0
1 0 0 1
Input at time t
Input at time t+1
Input at time t+2
Input at time t+3
x1
x2
x3
y
Example I: Stationary Targets
For stationary targets, the input-generating process is a single, but
unknown, function of the attributes.
● Ex.: Some process generates, at each time step t, inputs of the
form (x1
, x2
, x3
) where each attribute is a bit, and the label y is the
result of (x1
v (x2
^ x3
)):
30
1 0 1 1
0 1 1 1
0 0 0 0
1 0 0 1
Input at time t
Input at time t+1
Input at time t+2
Input at time t+3
x1
x2
x3
y
From the point of view of the
online learning algorithm,
obviously!
Example II: Dynamic Targets
Spam filtering
The objective of a good spam filter is to accurately model the following
function:
31
Example II: Dynamic Targets
Spam filtering
The objective of a good spam filter is to accurately model the following
function:
32
x1
x2
x3
x4
... xd {0,1}
Example II: Dynamic Targets
Spam filtering
The objective of a good spam filter is to accurately model the following
function:
33
Features extracted from an e-mail
Spam or not spam?
model
x1
x2
x3
x4
... xd {0,1}
Example II: Dynamic Targets
Spam filtering
● So suppose you have learned that the presence of the word
“Dollars” implies that an e-mail is likely spam.
34
Example II: Dynamic Targets
Spam filtering
● So suppose you have learned that the presence of the word
“Dollars” implies that an e-mail is likely spam.
● Spammers have noticed that their scammy e-mails are falling prey
to spam filters so they change tactics:
35
Example II: Dynamic Targets
Spam filtering
● So suppose you have learned that the presence of the word
“Dollars” implies that an e-mail is likely spam.
● Spammers have noticed that their scammy e-mails are falling prey
to spam filters so they change tactics:
○ So instead of using the word “Dollars” they start using the
word “Euro”, which fools your filter but also accomplishes
their goal (have people read the e-mail)
36
Approaches
A couple of approaches have been proposed in the literature:
● Online Learning from Expert Advice
37
Approaches
A couple of approaches have been proposed in the literature:
● Online Learning from Expert Advice
● Online Learning from Examples
38
Approaches
A couple of approaches have been proposed in the literature:
● Online Learning from Expert Advice
● Online Learning from Examples
● General algorithms that may also be used in the online setting
39
Approaches: Expert Advice
In this approach, it is assumed that the algorithm has multiple oracles
(or experts at its disposal), which its can use to produce its output, in
each trial.
40
Approaches: Expert Advice
In this approach, it is assumed that the algorithm has multiple oracles
(or experts at its disposal), which its can use to produce its output, in
each trial.
In other words, the task of this online algorithm is simply to learn which
of the experts it should use.
41
Approaches: Expert Advice
In this approach, it is assumed that the algorithm has multiple oracles
(or experts at its disposal), which its can use to produce its output, in
each trial.
In other words, the task of this online algorithm is simply to learn which
of the experts it should use.
The simplest algorithm in this realm is the Randomized Weighted
Majority Algorithm
42
Approaches: Expert Advice
Randomized Weighted Majority Algorithm
● Every expert has a weight (starting at 1)
● For every trial:
○ Randomly select an expert (larger weight => more likely)
○ Use that expert’s output as your prediction
○ Verify the correct answer
○ For each expert:
■ If it was mistaken, decrease its weight by a constant factor
43
Approaches: Learning from Examples
Learning from examples is different from using Expert Advice inasmuch
as we don’t need to previously define prebuild experts we will derive
our predictions from.
44
Approaches: Learning from Examples
Learning from examples is different from using Expert Advice inasmuch
as we don’t need to previously define prebuild experts we will derive
our predictions from.
We need, however, to know what Concept Class we want to search
over.
45
Approaches: Learning from Examples
A Concept Class is a set of of functions (concepts) that subscribe to a
particular model.
46
Approaches: Learning from Examples
A Concept Class is a set of of functions (concepts) that subscribe to a
particular model.
Some examples of concept classes are:
● The set of all monotone disjunctions of N variables
● The set of non-monotone disjunctions of N variables
● Decision lists with N variables
● Linear threshold formulas
● DNF (disjunctive normal form) formulas
47
Approaches: Learning from Examples
The Winnow Algorithm is one example of a simple algorithm that
learns monotone disjunctions online.
48
Approaches: Learning from Examples
The Winnow Algorithm is one example of a simple algorithm that
learns monotone disjunctions online.
In other words, it learns any concept (function), provided the concept
belongs to the Concept Class of monotone disjunctions.
49
Approaches: Learning from Examples
The Winnow Algorithm is one example of a simple algorithm that
learns monotone disjunctions online.
In other words, it learns any concept (function), provided the concept
belongs to the Concept Class of monotone disjunctions.
It also uses weights, as in the previous example.
50
Approaches: Learning from Examples
Winnow algorithm
● Initialize all weights (w1
, w2
,... wn
) to 1
● Given a new example:
○ Predict 1 if wT
x > n
○ Predict 0 otherwise
● Check the true answer
● For each input attribute:
○ If algorithm predicted 1 but true answer was 0, double the value of
every weight corresponding to an attribute = 1
○ If algorithm predicted 0 but true answer was 1, halve the value of
each weight corresponding to an attribute = 0 51
Approaches: Learning from Examples
Winnow algorithm
● Initialize all weights (w1
, w2
,... wn
) to 1
● Given a new example:
○ Predict 1 if wT
x > n
○ Predict 0 otherwise
● Check the true answer
● For each input attribute:
○ If algorithm predicted 1 but true answer was 0, double the value of
every weight corresponding to an attribute = 1
○ If algorithm predicted 0 but true answer was 1, halve the value of
each weight corresponding to an attribute = 0 52
We aimed too low,
let’s try to make our
guess higher
Approaches: Learning from Examples
Winnow algorithm
● Initialize all weights (w1
, w2
,... wn
) to 1
● Given a new example:
○ Predict 1 if wT
x > n
○ Predict 0 otherwise
● Check the true answer
● For each input attribute:
○ If algorithm predicted 1 but true answer was 0, double the value of
every weight corresponding to an attribute = 1
○ If algorithm predicted 0 but true answer was 1, halve the value of
each weight corresponding to an attribute = 0 53
We aimed too high,
let’s try to make our
guess lower
Approaches: Other Approaches
More general algorithms can also be used in an online setting, such as:
54
Approaches: Other Approaches
More general algorithms can also be used in an online setting, such as:
● Stochastic Gradient Descent
55
Approaches: Other Approaches
More general algorithms can also be used in an online setting, such as:
● Stochastic Gradient Descent
● Perceptron Learning Algorithm
56
Current Trends / Related Areas
Adversarial Machine Learning
● Refers to scenarios where your input-generating process is an
adaptive adversary
● Applications in:
○ Information Security
○ Games
57
Current Trends / Related Areas
One-shot Learning
● Refers to scenarios where your must perform predictions after
seeing just a few, or even a single input sample
● Applications in:
○ Computer Vision
58
Links
● http://ttic.uchicago.edu/~shai/papers/ShalevThesis07.pdf
● Blum 1998 Survey Paper
● UofW CSE599S Online Learning
● Machine Learning From Streaming data
● Twitter Fighting Spam with BotMaker
● CS229 - Online Learning Lecture
● Building a real time Recommendation Engine with Data Science
● Online Optimization for Large Scale Machine Learning by prof A.
Banerjee
● Learning, Regret, Minimization and Equilibria
59
Links
● https://github.com/JohnLangford/vowpal_wabbit
● Shai Shalev-Shwartz 2011 Survey Paper
● Hoi et al 2014 - LIBOL
● MIT 6.883 Online Methods in Machine Learning
60

Mais conteúdo relacionado

Mais procurados

Semi-Supervised Learning
Semi-Supervised LearningSemi-Supervised Learning
Semi-Supervised LearningLukas Tencer
 
What is Deep Learning | Deep Learning Simplified | Deep Learning Tutorial | E...
What is Deep Learning | Deep Learning Simplified | Deep Learning Tutorial | E...What is Deep Learning | Deep Learning Simplified | Deep Learning Tutorial | E...
What is Deep Learning | Deep Learning Simplified | Deep Learning Tutorial | E...Edureka!
 
What Is Deep Learning? | Introduction to Deep Learning | Deep Learning Tutori...
What Is Deep Learning? | Introduction to Deep Learning | Deep Learning Tutori...What Is Deep Learning? | Introduction to Deep Learning | Deep Learning Tutori...
What Is Deep Learning? | Introduction to Deep Learning | Deep Learning Tutori...Simplilearn
 
Deep Learning: Recurrent Neural Network (Chapter 10)
Deep Learning: Recurrent Neural Network (Chapter 10) Deep Learning: Recurrent Neural Network (Chapter 10)
Deep Learning: Recurrent Neural Network (Chapter 10) Larry Guo
 
Supervised and Unsupervised Learning In Machine Learning | Machine Learning T...
Supervised and Unsupervised Learning In Machine Learning | Machine Learning T...Supervised and Unsupervised Learning In Machine Learning | Machine Learning T...
Supervised and Unsupervised Learning In Machine Learning | Machine Learning T...Simplilearn
 
Reinforcement Learning
Reinforcement LearningReinforcement Learning
Reinforcement LearningSalem-Kabbani
 
Introduction to ML (Machine Learning)
Introduction to ML (Machine Learning)Introduction to ML (Machine Learning)
Introduction to ML (Machine Learning)SwatiTripathi44
 
Lecture1 introduction to machine learning
Lecture1 introduction to machine learningLecture1 introduction to machine learning
Lecture1 introduction to machine learningUmmeSalmaM1
 
Pattern recognition and Machine Learning.
Pattern recognition and Machine Learning.Pattern recognition and Machine Learning.
Pattern recognition and Machine Learning.Rohit Kumar
 
Presentation on supervised learning
Presentation on supervised learningPresentation on supervised learning
Presentation on supervised learningTonmoy Bhagawati
 
Scalable machine learning
Scalable machine learningScalable machine learning
Scalable machine learningArnaud Rachez
 
Deep Learning Tutorial
Deep Learning TutorialDeep Learning Tutorial
Deep Learning TutorialAmr Rashed
 
Recurrent Neural Networks, LSTM and GRU
Recurrent Neural Networks, LSTM and GRURecurrent Neural Networks, LSTM and GRU
Recurrent Neural Networks, LSTM and GRUananth
 
Recurrent Neural Networks (RNNs)
Recurrent Neural Networks (RNNs)Recurrent Neural Networks (RNNs)
Recurrent Neural Networks (RNNs)Abdullah al Mamun
 
Classification Based Machine Learning Algorithms
Classification Based Machine Learning AlgorithmsClassification Based Machine Learning Algorithms
Classification Based Machine Learning AlgorithmsMd. Main Uddin Rony
 
Decision trees in Machine Learning
Decision trees in Machine Learning Decision trees in Machine Learning
Decision trees in Machine Learning Mohammad Junaid Khan
 
Gradient descent method
Gradient descent methodGradient descent method
Gradient descent methodSanghyuk Chun
 
An introduction to reinforcement learning
An introduction to reinforcement learningAn introduction to reinforcement learning
An introduction to reinforcement learningSubrat Panda, PhD
 

Mais procurados (20)

Semi-Supervised Learning
Semi-Supervised LearningSemi-Supervised Learning
Semi-Supervised Learning
 
What is Deep Learning | Deep Learning Simplified | Deep Learning Tutorial | E...
What is Deep Learning | Deep Learning Simplified | Deep Learning Tutorial | E...What is Deep Learning | Deep Learning Simplified | Deep Learning Tutorial | E...
What is Deep Learning | Deep Learning Simplified | Deep Learning Tutorial | E...
 
What Is Deep Learning? | Introduction to Deep Learning | Deep Learning Tutori...
What Is Deep Learning? | Introduction to Deep Learning | Deep Learning Tutori...What Is Deep Learning? | Introduction to Deep Learning | Deep Learning Tutori...
What Is Deep Learning? | Introduction to Deep Learning | Deep Learning Tutori...
 
Deep Learning: Recurrent Neural Network (Chapter 10)
Deep Learning: Recurrent Neural Network (Chapter 10) Deep Learning: Recurrent Neural Network (Chapter 10)
Deep Learning: Recurrent Neural Network (Chapter 10)
 
Supervised and Unsupervised Learning In Machine Learning | Machine Learning T...
Supervised and Unsupervised Learning In Machine Learning | Machine Learning T...Supervised and Unsupervised Learning In Machine Learning | Machine Learning T...
Supervised and Unsupervised Learning In Machine Learning | Machine Learning T...
 
Reinforcement Learning
Reinforcement LearningReinforcement Learning
Reinforcement Learning
 
Recommender Systems
Recommender SystemsRecommender Systems
Recommender Systems
 
Introduction to ML (Machine Learning)
Introduction to ML (Machine Learning)Introduction to ML (Machine Learning)
Introduction to ML (Machine Learning)
 
Lecture1 introduction to machine learning
Lecture1 introduction to machine learningLecture1 introduction to machine learning
Lecture1 introduction to machine learning
 
Pattern recognition and Machine Learning.
Pattern recognition and Machine Learning.Pattern recognition and Machine Learning.
Pattern recognition and Machine Learning.
 
Presentation on supervised learning
Presentation on supervised learningPresentation on supervised learning
Presentation on supervised learning
 
Scalable machine learning
Scalable machine learningScalable machine learning
Scalable machine learning
 
Regularization
RegularizationRegularization
Regularization
 
Deep Learning Tutorial
Deep Learning TutorialDeep Learning Tutorial
Deep Learning Tutorial
 
Recurrent Neural Networks, LSTM and GRU
Recurrent Neural Networks, LSTM and GRURecurrent Neural Networks, LSTM and GRU
Recurrent Neural Networks, LSTM and GRU
 
Recurrent Neural Networks (RNNs)
Recurrent Neural Networks (RNNs)Recurrent Neural Networks (RNNs)
Recurrent Neural Networks (RNNs)
 
Classification Based Machine Learning Algorithms
Classification Based Machine Learning AlgorithmsClassification Based Machine Learning Algorithms
Classification Based Machine Learning Algorithms
 
Decision trees in Machine Learning
Decision trees in Machine Learning Decision trees in Machine Learning
Decision trees in Machine Learning
 
Gradient descent method
Gradient descent methodGradient descent method
Gradient descent method
 
An introduction to reinforcement learning
An introduction to reinforcement learningAn introduction to reinforcement learning
An introduction to reinforcement learning
 

Semelhante a Online Machine Learning: introduction and examples

Machine learning For Smarter Manufacturing & its Fundamentals
Machine learning For Smarter Manufacturing & its FundamentalsMachine learning For Smarter Manufacturing & its Fundamentals
Machine learning For Smarter Manufacturing & its FundamentalsSuchitGaikwad
 
PyData SF 2016 --- Moving forward through the darkness
PyData SF 2016 --- Moving forward through the darknessPyData SF 2016 --- Moving forward through the darkness
PyData SF 2016 --- Moving forward through the darknessChia-Chi Chang
 
Overview of machine learning
Overview of machine learning Overview of machine learning
Overview of machine learning SolivarLabs
 
The Use of Static Code Analysis When Teaching or Developing Open-Source Software
The Use of Static Code Analysis When Teaching or Developing Open-Source SoftwareThe Use of Static Code Analysis When Teaching or Developing Open-Source Software
The Use of Static Code Analysis When Teaching or Developing Open-Source SoftwareAndrey Karpov
 
Jay Yagnik at AI Frontiers : A History Lesson on AI
Jay Yagnik at AI Frontiers : A History Lesson on AIJay Yagnik at AI Frontiers : A History Lesson on AI
Jay Yagnik at AI Frontiers : A History Lesson on AIAI Frontiers
 
Module 7: Unsupervised Learning
Module 7:  Unsupervised LearningModule 7:  Unsupervised Learning
Module 7: Unsupervised LearningSara Hooker
 
Machine-Learning-Overview a statistical approach
Machine-Learning-Overview a statistical approachMachine-Learning-Overview a statistical approach
Machine-Learning-Overview a statistical approachAjit Ghodke
 
Machine Learning for (DF)IR with Velociraptor: From Setting Expectations to a...
Machine Learning for (DF)IR with Velociraptor: From Setting Expectations to a...Machine Learning for (DF)IR with Velociraptor: From Setting Expectations to a...
Machine Learning for (DF)IR with Velociraptor: From Setting Expectations to a...Chris Hammerschmidt
 
Strata 2016 - Lessons Learned from building real-life Machine Learning Systems
Strata 2016 -  Lessons Learned from building real-life Machine Learning SystemsStrata 2016 -  Lessons Learned from building real-life Machine Learning Systems
Strata 2016 - Lessons Learned from building real-life Machine Learning SystemsXavier Amatriain
 
Optimization of power systems - old and new tools
Optimization of power systems - old and new toolsOptimization of power systems - old and new tools
Optimization of power systems - old and new toolsOlivier Teytaud
 
Tools for Discrete Time Control; Application to Power Systems
Tools for Discrete Time Control; Application to Power SystemsTools for Discrete Time Control; Application to Power Systems
Tools for Discrete Time Control; Application to Power SystemsOlivier Teytaud
 
Big Data Spain 2018: How to build Weighted XGBoost ML model for Imbalance dat...
Big Data Spain 2018: How to build Weighted XGBoost ML model for Imbalance dat...Big Data Spain 2018: How to build Weighted XGBoost ML model for Imbalance dat...
Big Data Spain 2018: How to build Weighted XGBoost ML model for Imbalance dat...Alok Singh
 
Владимир Гулин, Mail.Ru Group, Learning to rank using clickthrough data
Владимир Гулин, Mail.Ru Group, Learning to rank using clickthrough dataВладимир Гулин, Mail.Ru Group, Learning to rank using clickthrough data
Владимир Гулин, Mail.Ru Group, Learning to rank using clickthrough dataMail.ru Group
 
"What we learned from 5 years of building a data science software that actual...
"What we learned from 5 years of building a data science software that actual..."What we learned from 5 years of building a data science software that actual...
"What we learned from 5 years of building a data science software that actual...Dataconomy Media
 
Cs854 lecturenotes01
Cs854 lecturenotes01Cs854 lecturenotes01
Cs854 lecturenotes01Mehmet Çelik
 
CSE545 sp23 (2) Streaming Algorithms 2-4.pdf
CSE545 sp23 (2) Streaming Algorithms 2-4.pdfCSE545 sp23 (2) Streaming Algorithms 2-4.pdf
CSE545 sp23 (2) Streaming Algorithms 2-4.pdfAlexanderKyalo3
 
Primer to Machine Learning
Primer to Machine LearningPrimer to Machine Learning
Primer to Machine LearningJeff Tanner
 

Semelhante a Online Machine Learning: introduction and examples (20)

Machine learning For Smarter Manufacturing & its Fundamentals
Machine learning For Smarter Manufacturing & its FundamentalsMachine learning For Smarter Manufacturing & its Fundamentals
Machine learning For Smarter Manufacturing & its Fundamentals
 
PyData SF 2016 --- Moving forward through the darkness
PyData SF 2016 --- Moving forward through the darknessPyData SF 2016 --- Moving forward through the darkness
PyData SF 2016 --- Moving forward through the darkness
 
Overview of machine learning
Overview of machine learning Overview of machine learning
Overview of machine learning
 
The Use of Static Code Analysis When Teaching or Developing Open-Source Software
The Use of Static Code Analysis When Teaching or Developing Open-Source SoftwareThe Use of Static Code Analysis When Teaching or Developing Open-Source Software
The Use of Static Code Analysis When Teaching or Developing Open-Source Software
 
Jay Yagnik at AI Frontiers : A History Lesson on AI
Jay Yagnik at AI Frontiers : A History Lesson on AIJay Yagnik at AI Frontiers : A History Lesson on AI
Jay Yagnik at AI Frontiers : A History Lesson on AI
 
Module 7: Unsupervised Learning
Module 7:  Unsupervised LearningModule 7:  Unsupervised Learning
Module 7: Unsupervised Learning
 
Pycon 2012 Scikit-Learn
Pycon 2012 Scikit-LearnPycon 2012 Scikit-Learn
Pycon 2012 Scikit-Learn
 
Machine-Learning-Overview a statistical approach
Machine-Learning-Overview a statistical approachMachine-Learning-Overview a statistical approach
Machine-Learning-Overview a statistical approach
 
Machine Learning for (DF)IR with Velociraptor: From Setting Expectations to a...
Machine Learning for (DF)IR with Velociraptor: From Setting Expectations to a...Machine Learning for (DF)IR with Velociraptor: From Setting Expectations to a...
Machine Learning for (DF)IR with Velociraptor: From Setting Expectations to a...
 
Strata 2016 - Lessons Learned from building real-life Machine Learning Systems
Strata 2016 -  Lessons Learned from building real-life Machine Learning SystemsStrata 2016 -  Lessons Learned from building real-life Machine Learning Systems
Strata 2016 - Lessons Learned from building real-life Machine Learning Systems
 
Optimization of power systems - old and new tools
Optimization of power systems - old and new toolsOptimization of power systems - old and new tools
Optimization of power systems - old and new tools
 
Tools for Discrete Time Control; Application to Power Systems
Tools for Discrete Time Control; Application to Power SystemsTools for Discrete Time Control; Application to Power Systems
Tools for Discrete Time Control; Application to Power Systems
 
Big Data Spain 2018: How to build Weighted XGBoost ML model for Imbalance dat...
Big Data Spain 2018: How to build Weighted XGBoost ML model for Imbalance dat...Big Data Spain 2018: How to build Weighted XGBoost ML model for Imbalance dat...
Big Data Spain 2018: How to build Weighted XGBoost ML model for Imbalance dat...
 
Владимир Гулин, Mail.Ru Group, Learning to rank using clickthrough data
Владимир Гулин, Mail.Ru Group, Learning to rank using clickthrough dataВладимир Гулин, Mail.Ru Group, Learning to rank using clickthrough data
Владимир Гулин, Mail.Ru Group, Learning to rank using clickthrough data
 
daa unit 1.pptx
daa unit 1.pptxdaa unit 1.pptx
daa unit 1.pptx
 
"What we learned from 5 years of building a data science software that actual...
"What we learned from 5 years of building a data science software that actual..."What we learned from 5 years of building a data science software that actual...
"What we learned from 5 years of building a data science software that actual...
 
Cs854 lecturenotes01
Cs854 lecturenotes01Cs854 lecturenotes01
Cs854 lecturenotes01
 
CSE545 sp23 (2) Streaming Algorithms 2-4.pdf
CSE545 sp23 (2) Streaming Algorithms 2-4.pdfCSE545 sp23 (2) Streaming Algorithms 2-4.pdf
CSE545 sp23 (2) Streaming Algorithms 2-4.pdf
 
OR Ndejje Univ.pptx
OR Ndejje Univ.pptxOR Ndejje Univ.pptx
OR Ndejje Univ.pptx
 
Primer to Machine Learning
Primer to Machine LearningPrimer to Machine Learning
Primer to Machine Learning
 

Mais de Felipe

Aula rotulação automática - Automatic tagging
Aula rotulação automática - Automatic taggingAula rotulação automática - Automatic tagging
Aula rotulação automática - Automatic taggingFelipe
 
First steps with Keras 2: A tutorial with Examples
First steps with Keras 2: A tutorial with ExamplesFirst steps with Keras 2: A tutorial with Examples
First steps with Keras 2: A tutorial with ExamplesFelipe
 
Word embeddings introdução, motivação e exemplos
Word embeddings  introdução, motivação e exemplosWord embeddings  introdução, motivação e exemplos
Word embeddings introdução, motivação e exemplosFelipe
 
Cloud Certifications - Overview
Cloud Certifications - OverviewCloud Certifications - Overview
Cloud Certifications - OverviewFelipe
 
Elasticsearch for Data Analytics
Elasticsearch for Data AnalyticsElasticsearch for Data Analytics
Elasticsearch for Data AnalyticsFelipe
 
Cloudwatch: Monitoring your Services with Metrics and Alarms
Cloudwatch: Monitoring your Services with Metrics and AlarmsCloudwatch: Monitoring your Services with Metrics and Alarms
Cloudwatch: Monitoring your Services with Metrics and AlarmsFelipe
 
Cloudwatch: Monitoring your AWS services with Metrics and Alarms
Cloudwatch: Monitoring your AWS services with Metrics and AlarmsCloudwatch: Monitoring your AWS services with Metrics and Alarms
Cloudwatch: Monitoring your AWS services with Metrics and AlarmsFelipe
 
Aws cost optimization: lessons learned, strategies, tips and tools
Aws cost optimization: lessons learned, strategies, tips and toolsAws cost optimization: lessons learned, strategies, tips and tools
Aws cost optimization: lessons learned, strategies, tips and toolsFelipe
 
Exemplos de uso de apache spark usando aws elastic map reduce
Exemplos de uso de apache spark usando aws elastic map reduceExemplos de uso de apache spark usando aws elastic map reduce
Exemplos de uso de apache spark usando aws elastic map reduceFelipe
 
Pré processamento de grandes dados com Apache Spark
Pré processamento de grandes dados com Apache SparkPré processamento de grandes dados com Apache Spark
Pré processamento de grandes dados com Apache SparkFelipe
 
Hadoop MapReduce and Apache Spark on EMR: comparing performance for distribut...
Hadoop MapReduce and Apache Spark on EMR: comparing performance for distribut...Hadoop MapReduce and Apache Spark on EMR: comparing performance for distribut...
Hadoop MapReduce and Apache Spark on EMR: comparing performance for distribut...Felipe
 
Boas práticas no desenvolvimento de software
Boas práticas no desenvolvimento de softwareBoas práticas no desenvolvimento de software
Boas práticas no desenvolvimento de softwareFelipe
 
Rachinations
RachinationsRachinations
RachinationsFelipe
 
Ausgewählte preußische Tugenden
Ausgewählte preußische TugendenAusgewählte preußische Tugenden
Ausgewählte preußische TugendenFelipe
 
Short intro to scala and the play framework
Short intro to scala and the play frameworkShort intro to scala and the play framework
Short intro to scala and the play frameworkFelipe
 
Conceitos e exemplos em versionamento de código
Conceitos e exemplos em versionamento de códigoConceitos e exemplos em versionamento de código
Conceitos e exemplos em versionamento de códigoFelipe
 
DevOps Series: Extending vagrant with Puppet for configuration management
DevOps Series: Extending vagrant with Puppet for configuration managementDevOps Series: Extending vagrant with Puppet for configuration management
DevOps Series: Extending vagrant with Puppet for configuration managementFelipe
 
DevOps Series: Defining and Sharing Testable Machine Configurations with vagrant
DevOps Series: Defining and Sharing Testable Machine Configurations with vagrantDevOps Series: Defining and Sharing Testable Machine Configurations with vagrant
DevOps Series: Defining and Sharing Testable Machine Configurations with vagrantFelipe
 
D3.js 30-minute intro
D3.js   30-minute introD3.js   30-minute intro
D3.js 30-minute introFelipe
 

Mais de Felipe (19)

Aula rotulação automática - Automatic tagging
Aula rotulação automática - Automatic taggingAula rotulação automática - Automatic tagging
Aula rotulação automática - Automatic tagging
 
First steps with Keras 2: A tutorial with Examples
First steps with Keras 2: A tutorial with ExamplesFirst steps with Keras 2: A tutorial with Examples
First steps with Keras 2: A tutorial with Examples
 
Word embeddings introdução, motivação e exemplos
Word embeddings  introdução, motivação e exemplosWord embeddings  introdução, motivação e exemplos
Word embeddings introdução, motivação e exemplos
 
Cloud Certifications - Overview
Cloud Certifications - OverviewCloud Certifications - Overview
Cloud Certifications - Overview
 
Elasticsearch for Data Analytics
Elasticsearch for Data AnalyticsElasticsearch for Data Analytics
Elasticsearch for Data Analytics
 
Cloudwatch: Monitoring your Services with Metrics and Alarms
Cloudwatch: Monitoring your Services with Metrics and AlarmsCloudwatch: Monitoring your Services with Metrics and Alarms
Cloudwatch: Monitoring your Services with Metrics and Alarms
 
Cloudwatch: Monitoring your AWS services with Metrics and Alarms
Cloudwatch: Monitoring your AWS services with Metrics and AlarmsCloudwatch: Monitoring your AWS services with Metrics and Alarms
Cloudwatch: Monitoring your AWS services with Metrics and Alarms
 
Aws cost optimization: lessons learned, strategies, tips and tools
Aws cost optimization: lessons learned, strategies, tips and toolsAws cost optimization: lessons learned, strategies, tips and tools
Aws cost optimization: lessons learned, strategies, tips and tools
 
Exemplos de uso de apache spark usando aws elastic map reduce
Exemplos de uso de apache spark usando aws elastic map reduceExemplos de uso de apache spark usando aws elastic map reduce
Exemplos de uso de apache spark usando aws elastic map reduce
 
Pré processamento de grandes dados com Apache Spark
Pré processamento de grandes dados com Apache SparkPré processamento de grandes dados com Apache Spark
Pré processamento de grandes dados com Apache Spark
 
Hadoop MapReduce and Apache Spark on EMR: comparing performance for distribut...
Hadoop MapReduce and Apache Spark on EMR: comparing performance for distribut...Hadoop MapReduce and Apache Spark on EMR: comparing performance for distribut...
Hadoop MapReduce and Apache Spark on EMR: comparing performance for distribut...
 
Boas práticas no desenvolvimento de software
Boas práticas no desenvolvimento de softwareBoas práticas no desenvolvimento de software
Boas práticas no desenvolvimento de software
 
Rachinations
RachinationsRachinations
Rachinations
 
Ausgewählte preußische Tugenden
Ausgewählte preußische TugendenAusgewählte preußische Tugenden
Ausgewählte preußische Tugenden
 
Short intro to scala and the play framework
Short intro to scala and the play frameworkShort intro to scala and the play framework
Short intro to scala and the play framework
 
Conceitos e exemplos em versionamento de código
Conceitos e exemplos em versionamento de códigoConceitos e exemplos em versionamento de código
Conceitos e exemplos em versionamento de código
 
DevOps Series: Extending vagrant with Puppet for configuration management
DevOps Series: Extending vagrant with Puppet for configuration managementDevOps Series: Extending vagrant with Puppet for configuration management
DevOps Series: Extending vagrant with Puppet for configuration management
 
DevOps Series: Defining and Sharing Testable Machine Configurations with vagrant
DevOps Series: Defining and Sharing Testable Machine Configurations with vagrantDevOps Series: Defining and Sharing Testable Machine Configurations with vagrant
DevOps Series: Defining and Sharing Testable Machine Configurations with vagrant
 
D3.js 30-minute intro
D3.js   30-minute introD3.js   30-minute intro
D3.js 30-minute intro
 

Último

Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024thyngster
 
Thiophen Mechanism khhjjjjjjjhhhhhhhhhhh
Thiophen Mechanism khhjjjjjjjhhhhhhhhhhhThiophen Mechanism khhjjjjjjjhhhhhhhhhhh
Thiophen Mechanism khhjjjjjjjhhhhhhhhhhhYasamin16
 
RABBIT: A CLI tool for identifying bots based on their GitHub events.
RABBIT: A CLI tool for identifying bots based on their GitHub events.RABBIT: A CLI tool for identifying bots based on their GitHub events.
RABBIT: A CLI tool for identifying bots based on their GitHub events.natarajan8993
 
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理e4aez8ss
 
Learn How Data Science Changes Our World
Learn How Data Science Changes Our WorldLearn How Data Science Changes Our World
Learn How Data Science Changes Our WorldEduminds Learning
 
Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Seán Kennedy
 
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDRafezzaman
 
Heart Disease Classification Report: A Data Analysis Project
Heart Disease Classification Report: A Data Analysis ProjectHeart Disease Classification Report: A Data Analysis Project
Heart Disease Classification Report: A Data Analysis ProjectBoston Institute of Analytics
 
Advanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsAdvanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsVICTOR MAESTRE RAMIREZ
 
Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 2Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 217djon017
 
Vision, Mission, Goals and Objectives ppt..pptx
Vision, Mission, Goals and Objectives ppt..pptxVision, Mission, Goals and Objectives ppt..pptx
Vision, Mission, Goals and Objectives ppt..pptxellehsormae
 
DBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfDBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfJohn Sterrett
 
Conf42-LLM_Adding Generative AI to Real-Time Streaming Pipelines
Conf42-LLM_Adding Generative AI to Real-Time Streaming PipelinesConf42-LLM_Adding Generative AI to Real-Time Streaming Pipelines
Conf42-LLM_Adding Generative AI to Real-Time Streaming PipelinesTimothy Spann
 
Multiple time frame trading analysis -brianshannon.pdf
Multiple time frame trading analysis -brianshannon.pdfMultiple time frame trading analysis -brianshannon.pdf
Multiple time frame trading analysis -brianshannon.pdfchwongval
 
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...Boston Institute of Analytics
 
Student profile product demonstration on grades, ability, well-being and mind...
Student profile product demonstration on grades, ability, well-being and mind...Student profile product demonstration on grades, ability, well-being and mind...
Student profile product demonstration on grades, ability, well-being and mind...Seán Kennedy
 
办美国阿肯色大学小石城分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degree
办美国阿肯色大学小石城分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degree办美国阿肯色大学小石城分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degree
办美国阿肯色大学小石城分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degreeyuu sss
 
Identifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population MeanIdentifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population MeanMYRABACSAFRA2
 
Top 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In QueensTop 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In Queensdataanalyticsqueen03
 
April 2024 - NLIT Cloudera Real-Time LLM Streaming 2024
April 2024 - NLIT Cloudera Real-Time LLM Streaming 2024April 2024 - NLIT Cloudera Real-Time LLM Streaming 2024
April 2024 - NLIT Cloudera Real-Time LLM Streaming 2024Timothy Spann
 

Último (20)

Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
 
Thiophen Mechanism khhjjjjjjjhhhhhhhhhhh
Thiophen Mechanism khhjjjjjjjhhhhhhhhhhhThiophen Mechanism khhjjjjjjjhhhhhhhhhhh
Thiophen Mechanism khhjjjjjjjhhhhhhhhhhh
 
RABBIT: A CLI tool for identifying bots based on their GitHub events.
RABBIT: A CLI tool for identifying bots based on their GitHub events.RABBIT: A CLI tool for identifying bots based on their GitHub events.
RABBIT: A CLI tool for identifying bots based on their GitHub events.
 
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
 
Learn How Data Science Changes Our World
Learn How Data Science Changes Our WorldLearn How Data Science Changes Our World
Learn How Data Science Changes Our World
 
Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...
 
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
 
Heart Disease Classification Report: A Data Analysis Project
Heart Disease Classification Report: A Data Analysis ProjectHeart Disease Classification Report: A Data Analysis Project
Heart Disease Classification Report: A Data Analysis Project
 
Advanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsAdvanced Machine Learning for Business Professionals
Advanced Machine Learning for Business Professionals
 
Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 2Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 2
 
Vision, Mission, Goals and Objectives ppt..pptx
Vision, Mission, Goals and Objectives ppt..pptxVision, Mission, Goals and Objectives ppt..pptx
Vision, Mission, Goals and Objectives ppt..pptx
 
DBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdfDBA Basics: Getting Started with Performance Tuning.pdf
DBA Basics: Getting Started with Performance Tuning.pdf
 
Conf42-LLM_Adding Generative AI to Real-Time Streaming Pipelines
Conf42-LLM_Adding Generative AI to Real-Time Streaming PipelinesConf42-LLM_Adding Generative AI to Real-Time Streaming Pipelines
Conf42-LLM_Adding Generative AI to Real-Time Streaming Pipelines
 
Multiple time frame trading analysis -brianshannon.pdf
Multiple time frame trading analysis -brianshannon.pdfMultiple time frame trading analysis -brianshannon.pdf
Multiple time frame trading analysis -brianshannon.pdf
 
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
 
Student profile product demonstration on grades, ability, well-being and mind...
Student profile product demonstration on grades, ability, well-being and mind...Student profile product demonstration on grades, ability, well-being and mind...
Student profile product demonstration on grades, ability, well-being and mind...
 
办美国阿肯色大学小石城分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degree
办美国阿肯色大学小石城分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degree办美国阿肯色大学小石城分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degree
办美国阿肯色大学小石城分校毕业证成绩单pdf电子版制作修改#真实留信入库#永久存档#真实可查#diploma#degree
 
Identifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population MeanIdentifying Appropriate Test Statistics Involving Population Mean
Identifying Appropriate Test Statistics Involving Population Mean
 
Top 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In QueensTop 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In Queens
 
April 2024 - NLIT Cloudera Real-Time LLM Streaming 2024
April 2024 - NLIT Cloudera Real-Time LLM Streaming 2024April 2024 - NLIT Cloudera Real-Time LLM Streaming 2024
April 2024 - NLIT Cloudera Real-Time LLM Streaming 2024
 

Online Machine Learning: introduction and examples

  • 1. Online Learning Felipe Almeida Rio Machine Learning Meetup August / 2016 Introduction, overview and examples
  • 2. Structure ● Introduction ● Use cases ● Types of Targets ● Approaches ● Current Trends / Related Areas ● Links 2
  • 3. Introduction ● Online Learning is generally described as doing machine learning in a streaming data setting, i.e. training a model in consecutive rounds 3
  • 4. Introduction ● Online Learning is generally described as doing machine learning in a streaming data setting, i.e. training a model in consecutive rounds ○ At the beginning of each round the algorithm is presented with an input sample, and must perform a prediction 4
  • 5. Introduction ● Online Learning is generally described as doing machine learning in a streaming data setting, i.e. training a model in consecutive rounds ○ At the beginning of each round the algorithm is presented with an input sample, and must perform a prediction ○ The algorithm verifies whether its prediction was correct or incorrect, and feeds this information back into the model, for subsequent rounds 5
  • 6. Introduction 6 Whereas in batch (or offline) learning you have access to the whole dataset to train on x1 x2 x3 ... xd y x1 x2 x3 ... xd y x1 x2 x3 ... xd y x1 x2 x3 ... xd y x1 x2 x3 ... xd y D features Nsamples Trained model Batch training
  • 7. Introduction 7 In online learning your model evolves as you see new data, one example at a time x1 x2 x3 ... xd y Timeincreases Input data at time t Online update model at time t x1 x2 x3 ... xd y Input data at time t+1 Online update model at time t+1 x1 x2 x3 ... xd y Input data at time t+2 Online update model at time t+2
  • 8. Introduction ● In other words, you need to answer a sequence of questions but you only have access to answers to previous questions 8
  • 9. Introduction ● In other words, you need to answer a sequence of questions but you only have access to answers to previous questions 9 Adapted from Shalev-Shwartz 2012
  • 10. Introduction ● In other words, you need to answer a sequence of questions but you only have access to answers to previous questions 10 Each t represents a trial Adapted from Shalev-Shwartz 2012
  • 11. Introduction ● In other words, you need to answer a sequence of questions but you only have access to answers to previous questions 11 Each t represents a trial Adapted from Shalev-Shwartz 2012 xt is the input data for trial t
  • 12. Introduction ● In other words, you need to answer a sequence of questions but you only have access to answers to previous questions 12 Each t represents a trial Adapted from Shalev-Shwartz 2012 xt is the input data for trial t pt is the prediction for the label corresponding to xt
  • 13. Introduction ● In other words, you need to answer a sequence of questions but you only have access to answers to previous questions 13 Each t represents a trial Adapted from Shalev-Shwartz 2012 xt is the input data for trial t pt is the prediction for the label corresponding to xt This is the difference between what you predicted and the actual label
  • 14. Introduction ● In other words, you need to answer a sequence of questions but you only have access to answers to previous questions 14 Each t represents a trial xt is the input data for trial t pt is the prediction for the label corresponding to xt This is the difference between what you predicted and the actual label After computing the loss, the algorithm will use this information to update the model generating the predictions for the next trials
  • 15. Introduction: Main Concepts The main objective of online learning algorithms is to minimize the regret. 15
  • 16. Introduction: Main Concepts The main objective of online learning algorithms is to minimize the regret. The regret is the difference between the performance of: ● the online algorithm ● an ideal algorithm that has been able to train on the whole data seen so far, in batch fashion 16
  • 17. Introduction: Main Concepts In other words, the main objective of an online machine learning algorithm is to try to perform as closely to the corresponding offline algorithm as possible. 17
  • 18. Introduction: Main Concepts In other words, the main objective of an online machine learning algorithm is to try to perform as closely to the corresponding offline algorithm as possible. This is measured by the regret. 18
  • 19. Use cases ● Online algorithms are useful in at least two scenarios: 19
  • 20. Use cases ● Online algorithms are useful in at least two scenarios: ● When your data is too large to fit in the memory ○ So you need to train your model one example at a time 20
  • 21. Use cases ● Online algorithms are useful in at least two scenarios: ● When your data is too large to fit in the memory ○ So you need to train your model one example at a time ● When new data is constantly being generated, and/or is dependent upon time 21
  • 22. Use cases Some cases where data is constantly being generated and you need quick predictions: 22
  • 23. Use cases Some cases where data is constantly being generated and you need quick predictions: ● Real-time Recommendation ● Fraud Detection ● Spam detection ● Portfolio Selection ● Online ad placement 23
  • 24. Types of Targets There are two main ways to think about an online learning problem, as far as the target functions (that we are trying to learn) are concerned: 24
  • 25. Types of Targets There are two main ways to think about an online learning problem, as far as the target functions (that we are trying to learn) are concerned: ● Stationary Targets ○ The target function you are trying to learn does not change over time (but may be stochastic) 25
  • 26. Types of Targets There are two main ways to think about an online learning problem, as far as the target functions (that we are trying to learn) are concerned: ● Stationary Targets ○ The target function you are trying to learn does not change over time (but may be stochastic) ● Dynamic Targets ○ The process that is generating input sample data is assumed to be non-stationary (i.e. may change over time) ○ The process may even be adapting to your model (i.e. in an adversarial manner) 26
  • 27. Example I: Stationary Targets For stationary targets, the input-generating process is a single, but unknown, function of the attributes. 27
  • 28. Example I: Stationary Targets For stationary targets, the input-generating process is a single, but unknown, function of the attributes. ● Ex.: Some process generates, at each time step t, inputs of the form (x1 , x2 , x3 ) where each attribute is a bit, and the label y is the result of (x1 v (x2 ^ x3 )): 28
  • 29. Example I: Stationary Targets For stationary targets, the input-generating process is a single, but unknown, function of the attributes. ● Ex.: Some process generates, at each time step t, inputs of the form (x1 , x2 , x3 ) where each attribute is a bit, and the label y is the result of (x1 v (x2 ^ x3 )): 29 1 0 1 1 0 1 1 1 0 0 0 0 1 0 0 1 Input at time t Input at time t+1 Input at time t+2 Input at time t+3 x1 x2 x3 y
  • 30. Example I: Stationary Targets For stationary targets, the input-generating process is a single, but unknown, function of the attributes. ● Ex.: Some process generates, at each time step t, inputs of the form (x1 , x2 , x3 ) where each attribute is a bit, and the label y is the result of (x1 v (x2 ^ x3 )): 30 1 0 1 1 0 1 1 1 0 0 0 0 1 0 0 1 Input at time t Input at time t+1 Input at time t+2 Input at time t+3 x1 x2 x3 y From the point of view of the online learning algorithm, obviously!
  • 31. Example II: Dynamic Targets Spam filtering The objective of a good spam filter is to accurately model the following function: 31
  • 32. Example II: Dynamic Targets Spam filtering The objective of a good spam filter is to accurately model the following function: 32 x1 x2 x3 x4 ... xd {0,1}
  • 33. Example II: Dynamic Targets Spam filtering The objective of a good spam filter is to accurately model the following function: 33 Features extracted from an e-mail Spam or not spam? model x1 x2 x3 x4 ... xd {0,1}
  • 34. Example II: Dynamic Targets Spam filtering ● So suppose you have learned that the presence of the word “Dollars” implies that an e-mail is likely spam. 34
  • 35. Example II: Dynamic Targets Spam filtering ● So suppose you have learned that the presence of the word “Dollars” implies that an e-mail is likely spam. ● Spammers have noticed that their scammy e-mails are falling prey to spam filters so they change tactics: 35
  • 36. Example II: Dynamic Targets Spam filtering ● So suppose you have learned that the presence of the word “Dollars” implies that an e-mail is likely spam. ● Spammers have noticed that their scammy e-mails are falling prey to spam filters so they change tactics: ○ So instead of using the word “Dollars” they start using the word “Euro”, which fools your filter but also accomplishes their goal (have people read the e-mail) 36
  • 37. Approaches A couple of approaches have been proposed in the literature: ● Online Learning from Expert Advice 37
  • 38. Approaches A couple of approaches have been proposed in the literature: ● Online Learning from Expert Advice ● Online Learning from Examples 38
  • 39. Approaches A couple of approaches have been proposed in the literature: ● Online Learning from Expert Advice ● Online Learning from Examples ● General algorithms that may also be used in the online setting 39
  • 40. Approaches: Expert Advice In this approach, it is assumed that the algorithm has multiple oracles (or experts at its disposal), which its can use to produce its output, in each trial. 40
  • 41. Approaches: Expert Advice In this approach, it is assumed that the algorithm has multiple oracles (or experts at its disposal), which its can use to produce its output, in each trial. In other words, the task of this online algorithm is simply to learn which of the experts it should use. 41
  • 42. Approaches: Expert Advice In this approach, it is assumed that the algorithm has multiple oracles (or experts at its disposal), which its can use to produce its output, in each trial. In other words, the task of this online algorithm is simply to learn which of the experts it should use. The simplest algorithm in this realm is the Randomized Weighted Majority Algorithm 42
  • 43. Approaches: Expert Advice Randomized Weighted Majority Algorithm ● Every expert has a weight (starting at 1) ● For every trial: ○ Randomly select an expert (larger weight => more likely) ○ Use that expert’s output as your prediction ○ Verify the correct answer ○ For each expert: ■ If it was mistaken, decrease its weight by a constant factor 43
  • 44. Approaches: Learning from Examples Learning from examples is different from using Expert Advice inasmuch as we don’t need to previously define prebuild experts we will derive our predictions from. 44
  • 45. Approaches: Learning from Examples Learning from examples is different from using Expert Advice inasmuch as we don’t need to previously define prebuild experts we will derive our predictions from. We need, however, to know what Concept Class we want to search over. 45
  • 46. Approaches: Learning from Examples A Concept Class is a set of of functions (concepts) that subscribe to a particular model. 46
  • 47. Approaches: Learning from Examples A Concept Class is a set of of functions (concepts) that subscribe to a particular model. Some examples of concept classes are: ● The set of all monotone disjunctions of N variables ● The set of non-monotone disjunctions of N variables ● Decision lists with N variables ● Linear threshold formulas ● DNF (disjunctive normal form) formulas 47
  • 48. Approaches: Learning from Examples The Winnow Algorithm is one example of a simple algorithm that learns monotone disjunctions online. 48
  • 49. Approaches: Learning from Examples The Winnow Algorithm is one example of a simple algorithm that learns monotone disjunctions online. In other words, it learns any concept (function), provided the concept belongs to the Concept Class of monotone disjunctions. 49
  • 50. Approaches: Learning from Examples The Winnow Algorithm is one example of a simple algorithm that learns monotone disjunctions online. In other words, it learns any concept (function), provided the concept belongs to the Concept Class of monotone disjunctions. It also uses weights, as in the previous example. 50
  • 51. Approaches: Learning from Examples Winnow algorithm ● Initialize all weights (w1 , w2 ,... wn ) to 1 ● Given a new example: ○ Predict 1 if wT x > n ○ Predict 0 otherwise ● Check the true answer ● For each input attribute: ○ If algorithm predicted 1 but true answer was 0, double the value of every weight corresponding to an attribute = 1 ○ If algorithm predicted 0 but true answer was 1, halve the value of each weight corresponding to an attribute = 0 51
  • 52. Approaches: Learning from Examples Winnow algorithm ● Initialize all weights (w1 , w2 ,... wn ) to 1 ● Given a new example: ○ Predict 1 if wT x > n ○ Predict 0 otherwise ● Check the true answer ● For each input attribute: ○ If algorithm predicted 1 but true answer was 0, double the value of every weight corresponding to an attribute = 1 ○ If algorithm predicted 0 but true answer was 1, halve the value of each weight corresponding to an attribute = 0 52 We aimed too low, let’s try to make our guess higher
  • 53. Approaches: Learning from Examples Winnow algorithm ● Initialize all weights (w1 , w2 ,... wn ) to 1 ● Given a new example: ○ Predict 1 if wT x > n ○ Predict 0 otherwise ● Check the true answer ● For each input attribute: ○ If algorithm predicted 1 but true answer was 0, double the value of every weight corresponding to an attribute = 1 ○ If algorithm predicted 0 but true answer was 1, halve the value of each weight corresponding to an attribute = 0 53 We aimed too high, let’s try to make our guess lower
  • 54. Approaches: Other Approaches More general algorithms can also be used in an online setting, such as: 54
  • 55. Approaches: Other Approaches More general algorithms can also be used in an online setting, such as: ● Stochastic Gradient Descent 55
  • 56. Approaches: Other Approaches More general algorithms can also be used in an online setting, such as: ● Stochastic Gradient Descent ● Perceptron Learning Algorithm 56
  • 57. Current Trends / Related Areas Adversarial Machine Learning ● Refers to scenarios where your input-generating process is an adaptive adversary ● Applications in: ○ Information Security ○ Games 57
  • 58. Current Trends / Related Areas One-shot Learning ● Refers to scenarios where your must perform predictions after seeing just a few, or even a single input sample ● Applications in: ○ Computer Vision 58
  • 59. Links ● http://ttic.uchicago.edu/~shai/papers/ShalevThesis07.pdf ● Blum 1998 Survey Paper ● UofW CSE599S Online Learning ● Machine Learning From Streaming data ● Twitter Fighting Spam with BotMaker ● CS229 - Online Learning Lecture ● Building a real time Recommendation Engine with Data Science ● Online Optimization for Large Scale Machine Learning by prof A. Banerjee ● Learning, Regret, Minimization and Equilibria 59
  • 60. Links ● https://github.com/JohnLangford/vowpal_wabbit ● Shai Shalev-Shwartz 2011 Survey Paper ● Hoi et al 2014 - LIBOL ● MIT 6.883 Online Methods in Machine Learning 60