SlideShare a Scribd company logo
Supervised	
Learning	
Algorithms	
Analysis	
of	
	Different	
approaches	
Evgeniy	Marinov	
ML	Consultant	
Philip	Yankov	
x8academy
ML	DefiniCon	
•  There	are	plenty	of	definiCons...		
•  Informal:	The	field	of	study	that	gives	
computers	the	ability	to	learn	without	being	
explicitly	programmed	(Arthur	Samuel,	1959)		
•  Formal:	A	computer	program	is	said	to	learn	
from	experience	E,	with	respect	to	some	task	
T,	and	some	performance	measure	P,	if	its	
performance	on	T	as	measured	by	P	improves	
with	experience	E	(Tom	Mitchell,	1998).
From	Wikipedia	
•  Machine	learning	is:		
– a	subfield	of	computer	science	that	evolved	from	
the	study	of	paRern	recogniCon	and	in	AI	in	the	
1980s	(ML	is	a	separate	field	flourishing	from	the	
1990s,	first	benefited	from	staCsCcs	and	then	
from	the	increasing	availability	of	digiCzed	
informaCon	at	that	Cme).
Why	ML?
Why	ML?
Key	factors	enabling	ML	growth	today	
•  Cloud	Compu)ng	
•  Internet	of	Things	
•  Big	Data	(+	Unstructured	Data)
Why	Data	is	so	important?
Why	Data	is	so	important?	
•  Google	Photos	
– Unlimited	storage	
•  Google	voice	
– OK,	Google
Supervised Learning Algorithms - Analysis of different approaches
Nowadays	
•  It	is	so	easy	to	get	data	you	need	and	to	use	
an	API	or	service	of	some	company	to	
experiment	with	them
Methods	for	collecCng	data
Methods	for	collecCng	data	
•  Download	
– Spreadsheet	
– Text	
•  API	
•  Crawling	/	scraping
Supervised	Learning
Task Description
Pipeline
IniCal	example
NotaCon
Supervised Learning Algorithms - Analysis of different approaches
•  Asdasd	
•  Asdasd	
•  Asdasd	
•  Asdasd	
The	regression	funcCon	f(x)
•  as	
•  as	
•  as
How	to	evaluate	our	model?
Pipeline
Assessing the Model Accuracy
Supervised Learning Algorithms - Analysis of different approaches
Bias-variance	trade-off
Bias-variance	trade-off
Cross-validaCon
GeneralizaCon	Error	and	Overfi`ng
Choosing	a	Model	by	data	types	of	
response
Pipeline
Data	types	and	Generalized	Linear	
model	
•  Simple	and	General	linear	models	
•  RestricCons	of	the	linear	model		
•  Data	type	of	the	response	Y	
	
1)  	(General)	Linear	model	R,	Y	~	Gaussian(µ,	σ^2)			--	conCnuous	
2)  	LogisCc	regression	{0,	1},	Y	~	Bernoulli(p)		--	binary	data	
3)		Poisson	regression	{0,	1,...},	Y	~	Poisson(µ)		--	counCng	data
Simple	and	General	linear	models	
Simple:	
General:
Error	of	the	General	Linear	model	
		
Click	to	add	Text
RestricCons	of	Linear	models	
Although	the	General	linear	model	is	a	useful	
framework,	it	is	not	appropriate	in	the	following	cases:	
•  The	range	of	Y	is	restricted	(e.g.	binary,	count,	
posiCve/negaCve)	
•  Var[Y]	depends	on	the	mean	E[Y]	(for	the	Gaussian	
they	are	independent)	
Name	 Mean	 Variance	
Bernoulli(p)	 p	 p(1 - p)	
Binomial(p, n)	 np	 np(1 - p)	
Poisson(p)	 p	 p
Binary	response	Y	–	{0,	1}		
•  The	Bernoulli(p)	is	discrete	r.v.	with	two	possible	outcomes:	
•  p	and	q	=	1	–	p	
•  The	parameter	p	does	not	change	over	Cme			
•  Bernoulli	is	building	block	for	other	more	complicated	
distribuCons	
•  Examples:	
•  Coin	flips	{Heads,	Tails}	–	if	unbiased	
•  then	p	=	0.5	
•  Click	on	Ad,	Fail/Success	on	Exam
Generalized	Linear	model	-	IntuiCon
ExponenCal	Family
General	linear	model
Binary Data
Modeling	CounCng	/	Poisson	Data
Maximizing	the	Log-Likelihood	and	Parameters	
esCmaCon
Preprocessing
Pipeline
Problems	with	feature	types	
•  Big	number	of	features	->	Dimensionality	
reducCon	->	SVD,	PCA	
– Dimensionality	reduc)on:	“compress”	the	data	
from	a	high-dimensional	representaCon	into	a	
lower-dimensional	one	(useful	for	visualizaCon	or	
as	an	internal	transformaCon	for	other	ML	
algorithms)	
•  Sparse	features	->	Hashing
•  Instead	of	using	two	coordinates	( 𝒙, 𝒚)	to	describe	
point	locaCons,	let’s	use	only	one	coordinate	(𝒛)	
•  Point’s	posiCon	is	its	locaCon	along	vector	​ 𝒗↓ 𝟏 	
•  How	to	choose	​ 𝒗↓ 𝟏 ?	Minimize	reconstruc)on	error	
SVD	–	Dimensionality	ReducCon	
v1
first right
singular vector
Movie 1 rating
Movie2rating
SVD	-	Dimensionality	ReducCon	
More	details	
•  Q:	How	exactly	is	dim.	reduc)on	done?	
•  A:	Set	smallest	singular	values	to	zero	
	
46	
0.56 0.59 0.56 0.09 0.09
0.12 -0.02 0.12 -0.69 -0.69
0.40 -0.80 0.40 0.09 0.09
x	 x	
1 1 1 0 0
3 3 3 0 0
4 4 4 0 0
5 5 5 0 0
0 2 0 4 4
0 0 0 5 5
0 1 0 2 2
0.13 0.02 -0.01
0.41 0.07 -0.03
0.55 0.09 -0.04
0.68 0.11 -0.05
0.15 -0.59 0.65
0.07 -0.73 -0.67
0.07 -0.29 0.32
12.4 0 0
0 9.5 0
0 0 1.3
≈
SVD	-	Dimensionality	ReducCon	
More	details	
•  Q:	How	exactly	is	dim.	reduc)on	done?	
•  A:	Set	smallest	singular	values	to	zero	
	
47	
x	 x	
1 1 1 0 0
3 3 3 0 0
4 4 4 0 0
5 5 5 0 0
0 2 0 4 4
0 0 0 5 5
0 1 0 2 2
0.13 0.02 -0.01
0.41 0.07 -0.03
0.55 0.09 -0.04
0.68 0.11 -0.05
0.15 -0.59 0.65
0.07 -0.73 -0.67
0.07 -0.29 0.32
12.4 0 0
0 9.5 0
0 0 1.3
0.56 0.59 0.56 0.09 0.09
0.12 -0.02 0.12 -0.69 -0.69
0.40 -0.80 0.40 0.09 0.09
≈
SVD	-	Dimensionality	ReducCon	
More	details	
•  Q:	How	exactly	is	dim.	reduc)on	done?	
•  A:	Set	smallest	singular	values	to	zero	
	
≈	 x	 x	
1 1 1 0 0
3 3 3 0 0
4 4 4 0 0
5 5 5 0 0
0 2 0 4 4
0 0 0 5 5
0 1 0 2 2
0.13 0.02
0.41 0.07
0.55 0.09
0.68 0.11
0.15 -0.59
0.07 -0.73
0.07 -0.29
12.4 0
0 9.5
0.56 0.59 0.56 0.09 0.09
0.12 -0.02 0.12 -0.69 -0.69
ǁA-BǁF =	√	Σij (Aij-Bij)2
is	“small”	
SVD	–	Dimensionality	ReducCon	(PCA	
generalizaCon)	
More	details	
•  Q:	How	exactly	is	dim.	reduc)on	done?	
•  A:	Set	smallest	singular	values	to	zero	
	
≈	
1 1 1 0 0
3 3 3 0 0
4 4 4 0 0
5 5 5 0 0
0 2 0 4 4
0 0 0 5 5
0 1 0 2 2
0.92 0.95 0.92 0.01 0.01
2.91 3.01 2.91 -0.01 -0.01
3.90 4.04 3.90 0.01 0.01
4.82 5.00 4.82 0.03 0.03
0.70 0.53 0.70 4.11 4.11
-0.69 1.34 -0.69 4.78 4.78
0.32 0.23 0.32 2.01 2.01
Frobenius	norm:	
ǁMǁF =	√Σij Mij
2
Feature selection - example
Dummy Encoding
(De)MoCvaCon
SoluCon	to	those	problems	with	
features
Pipeline
Factorization Machine (degree 2)
General Applications of FMs
Summary	Pipeline
Pipeline
From	prototype	to	producCon	
•  Prototype	vs	ProducCon	Cme?	–	model	
(pipeline)	should	stay	the	same
Libraries
QuesCons?
Thank	you!!!
References	
•  hRps://www.coursera.org/learn/machine-
learning	
•  hRp://www.cs.cmu.edu/~tom/	
•  hRp://scikit-learn.org/stable/	
•  hRp://www.scalanlp.org/	
•  hRp://www.algo.uni-konstanz.de/members/
rendle/pdf/Rendle2010FM.pdf	
•  hRps://securityintelligence.com/factorizaCon-
machines-a-new-way-of-looking-at-machine-
learning/
References	
•  An	IntroducCon	to	Generalized	Linear	Models	
–	AnneRe	Dobson,	Adrian	BarneR	
•  Applying	Generalized	Linear	Models	–	James	
Lindsey	
•  hRps://www.codementor.io/jadianes/
building-a-recommender-with-apache-spark-
python-example-app-part1-du1083qbw	
•  hRps://www.chrisstucchio.com/blog/
index.html

More Related Content

PDF
Java Memory Model - memory in the eyes of a multithreading application
PDF
Machine Learning in Python - PyLadies Stockholm
PDF
Pitfalls of object_oriented_programming_gcap_09
PDF
Pybcn machine learning for dummies with python
PDF
QCon Rio - Machine Learning for Everyone
PPTX
Reinforcement Learning for Self Driving Cars
PPTX
Le Song, Assistant Professor, College of Computing, Georgia Institute of Tech...
PPTX
Ultrasound Nerve Segmentation
Java Memory Model - memory in the eyes of a multithreading application
Machine Learning in Python - PyLadies Stockholm
Pitfalls of object_oriented_programming_gcap_09
Pybcn machine learning for dummies with python
QCon Rio - Machine Learning for Everyone
Reinforcement Learning for Self Driving Cars
Le Song, Assistant Professor, College of Computing, Georgia Institute of Tech...
Ultrasound Nerve Segmentation

What's hot (20)

PDF
H2O Distributed Deep Learning by Arno Candel 071614
PDF
Training Neural Networks
PPTX
"Practical Machine Learning With Ruby" by Iqbal Farabi (ID Ruby Community)
PPTX
Squeezing Deep Learning Into Mobile Phones
PDF
Applying your Convolutional Neural Networks
PDF
Practical Deep Learning
PPTX
Deep Learning for AI (3)
PDF
Deep Learning in Python with Tensorflow for Finance
PDF
Neural Networks and Deep Learning for Physicists
PPTX
The Art Of Backpropagation
ODP
Wapid and wobust active online machine leawning with Vowpal Wabbit
PDF
How to win data science competitions with Deep Learning
PDF
PFN Spring Internship Final Report: Autonomous Drive by Deep RL
PPTX
Deep Learning: Advances Of The Last Year
PPTX
AI powered emotion recognition: From Inception to Production - Global AI Conf...
PDF
H2O Deep Learning at Next.ML
PDF
Large Scale Deep Learning with TensorFlow
PDF
TensorFlow 101
PDF
Generating Sequences with Deep LSTMs & RNNS in julia
PDF
Neural networks
H2O Distributed Deep Learning by Arno Candel 071614
Training Neural Networks
"Practical Machine Learning With Ruby" by Iqbal Farabi (ID Ruby Community)
Squeezing Deep Learning Into Mobile Phones
Applying your Convolutional Neural Networks
Practical Deep Learning
Deep Learning for AI (3)
Deep Learning in Python with Tensorflow for Finance
Neural Networks and Deep Learning for Physicists
The Art Of Backpropagation
Wapid and wobust active online machine leawning with Vowpal Wabbit
How to win data science competitions with Deep Learning
PFN Spring Internship Final Report: Autonomous Drive by Deep RL
Deep Learning: Advances Of The Last Year
AI powered emotion recognition: From Inception to Production - Global AI Conf...
H2O Deep Learning at Next.ML
Large Scale Deep Learning with TensorFlow
TensorFlow 101
Generating Sequences with Deep LSTMs & RNNS in julia
Neural networks
Ad

Viewers also liked (20)

PDF
Will Internet of Things change the world or it is yet another buzzword?
PPTX
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)
PDF
Robotics in Medical Care - Howie Choset
PDF
Greatest Moments of Digital History
PDF
Augmented Reality - Blair MacIntyre
PDF
Our Data, Ourselves - Ramayya Krishnan
PDF
The Next Wave of Social Media
PDF
Connecting the Unconnected
PPTX
Digital Apps At the Speed of Thought - Confluence of Agile & DevOps
PDF
Managing Catastrophic Risks - Satoru Nishikawa
PPTX
24 Tips for Leading Self & Leading Others
PDF
Trend Watch: Eventbranche, Live Marketing, Event Agenturen, Event Marketing
PDF
Trend Hacking: Trends Verstehen & Nutzen
PDF
The Internet of Things: Sensors, Smart Objects & Quantified Self
PDF
New Frontiers: Optogenetics - I-han Chou
PDF
Digital Future: Trends & Opportunities You Need to Know About
PDF
SAP HANA Express Edition
PDF
Digital Big Bang: New TLDs, New Opportunities?
PDF
Global Leadership Fellows Programme 2011
PDF
Übersicht über die SAP HANA Cloud Platform
Will Internet of Things change the world or it is yet another buzzword?
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)
Robotics in Medical Care - Howie Choset
Greatest Moments of Digital History
Augmented Reality - Blair MacIntyre
Our Data, Ourselves - Ramayya Krishnan
The Next Wave of Social Media
Connecting the Unconnected
Digital Apps At the Speed of Thought - Confluence of Agile & DevOps
Managing Catastrophic Risks - Satoru Nishikawa
24 Tips for Leading Self & Leading Others
Trend Watch: Eventbranche, Live Marketing, Event Agenturen, Event Marketing
Trend Hacking: Trends Verstehen & Nutzen
The Internet of Things: Sensors, Smart Objects & Quantified Self
New Frontiers: Optogenetics - I-han Chou
Digital Future: Trends & Opportunities You Need to Know About
SAP HANA Express Edition
Digital Big Bang: New TLDs, New Opportunities?
Global Leadership Fellows Programme 2011
Übersicht über die SAP HANA Cloud Platform
Ad

Similar to Supervised Learning Algorithms - Analysis of different approaches (20)

PDF
Choosing a Machine Learning technique to solve your need
PPT
Machine Learning and Statistical Analysis
PPT
Machine Learning and Statistical Analysis
PPT
Machine Learning and Statistical Analysis
PPT
Machine Learning and Statistical Analysis
PPT
Machine Learning and Statistical Analysis
PPT
Machine Learning and Statistical Analysis
PPT
Machine Learning and Statistical Analysis
PPTX
Introduction to Machine Learning
PDF
Python Machine Learning - Getting Started
PDF
Chapter1.pdf this is the first chapter of the book, will share
PPT
Machine learning-in-details-with-out-python-code
PDF
Machine Learning 101 - AWS Machine Learning Web Day
PPTX
Machine learning
PPTX
Machine learning introduction
PPTX
Supervised learning
PDF
[Eestec] Machine Learning online seminar 1, 12 2016
PDF
Machine Learning
PPTX
Machine Learning Presentation - Vilnius Tech
PDF
ml.pdf by Tee
Choosing a Machine Learning technique to solve your need
Machine Learning and Statistical Analysis
Machine Learning and Statistical Analysis
Machine Learning and Statistical Analysis
Machine Learning and Statistical Analysis
Machine Learning and Statistical Analysis
Machine Learning and Statistical Analysis
Machine Learning and Statistical Analysis
Introduction to Machine Learning
Python Machine Learning - Getting Started
Chapter1.pdf this is the first chapter of the book, will share
Machine learning-in-details-with-out-python-code
Machine Learning 101 - AWS Machine Learning Web Day
Machine learning
Machine learning introduction
Supervised learning
[Eestec] Machine Learning online seminar 1, 12 2016
Machine Learning
Machine Learning Presentation - Vilnius Tech
ml.pdf by Tee

Recently uploaded (20)

PPTX
The KM-GBF monitoring framework – status & key messages.pptx
PPTX
Introduction to Cardiovascular system_structure and functions-1
PPTX
2. Earth - The Living Planet Module 2ELS
PPTX
Comparative Structure of Integument in Vertebrates.pptx
PPTX
neck nodes and dissection types and lymph nodes levels
PPTX
ECG_Course_Presentation د.محمد صقران ppt
PPTX
EPIDURAL ANESTHESIA ANATOMY AND PHYSIOLOGY.pptx
PPT
protein biochemistry.ppt for university classes
PDF
Unveiling a 36 billion solar mass black hole at the centre of the Cosmic Hors...
PPTX
ognitive-behavioral therapy, mindfulness-based approaches, coping skills trai...
PPTX
Derivatives of integument scales, beaks, horns,.pptx
PDF
AlphaEarth Foundations and the Satellite Embedding dataset
PDF
An interstellar mission to test astrophysical black holes
PPTX
Introduction to Fisheries Biotechnology_Lesson 1.pptx
PPTX
DRUG THERAPY FOR SHOCK gjjjgfhhhhh.pptx.
PPTX
7. General Toxicologyfor clinical phrmacy.pptx
PPTX
cpcsea ppt.pptxssssssssssssssjjdjdndndddd
PPT
The World of Physical Science, • Labs: Safety Simulation, Measurement Practice
PPTX
BIOMOLECULES PPT........................
PDF
HPLC-PPT.docx high performance liquid chromatography
The KM-GBF monitoring framework – status & key messages.pptx
Introduction to Cardiovascular system_structure and functions-1
2. Earth - The Living Planet Module 2ELS
Comparative Structure of Integument in Vertebrates.pptx
neck nodes and dissection types and lymph nodes levels
ECG_Course_Presentation د.محمد صقران ppt
EPIDURAL ANESTHESIA ANATOMY AND PHYSIOLOGY.pptx
protein biochemistry.ppt for university classes
Unveiling a 36 billion solar mass black hole at the centre of the Cosmic Hors...
ognitive-behavioral therapy, mindfulness-based approaches, coping skills trai...
Derivatives of integument scales, beaks, horns,.pptx
AlphaEarth Foundations and the Satellite Embedding dataset
An interstellar mission to test astrophysical black holes
Introduction to Fisheries Biotechnology_Lesson 1.pptx
DRUG THERAPY FOR SHOCK gjjjgfhhhhh.pptx.
7. General Toxicologyfor clinical phrmacy.pptx
cpcsea ppt.pptxssssssssssssssjjdjdndndddd
The World of Physical Science, • Labs: Safety Simulation, Measurement Practice
BIOMOLECULES PPT........................
HPLC-PPT.docx high performance liquid chromatography

Supervised Learning Algorithms - Analysis of different approaches