Machine learning for a busy developer - Amazon...
Transcript of Machine learning for a busy developer - Amazon...
![Page 1: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/1.jpg)
Machine learning for a busy developerLeonid Igolnik
![Page 2: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/2.jpg)
About me
5/31/13
• Based in California
• Java Developer for over 11 years
• More then 13 years of SaaS experience
• Love to Travel
![Page 3: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/3.jpg)
AGENDA
5/31/13
![Page 4: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/4.jpg)
AGENDA
5/31/13
![Page 5: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/5.jpg)
AGENDA
5/31/13
![Page 6: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/6.jpg)
AGENDA
• What is machine learning
• R for Machine Learning
• R demo
• Further reading
5/31/13
![Page 7: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/7.jpg)
Machine learning
5/31/13
![Page 8: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/8.jpg)
Defining machine learning
“"Field of study that gives computers the ability to learn without being explicitly programmed” - Arthur Samuel 1959
5/31/13
![Page 9: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/9.jpg)
Defining machine learning
• Statistics is set of tools help humans learn more about the world so the can make better decisions
• Machine learning is about teaching computers about the world so they can use the knowledge to perform tasks
• Intersection of mathematics, statistics, computer science and software engineering
5/31/13
![Page 10: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/10.jpg)
Problems we are solving
• Job Title clustering
• Predicting time to hire based on location, job type, source type etc.
• Predict probability of hire of a candidate given job type, skills, past employer, source type etc.
• Use number of hires in taleo to predict overall job market trends
• And many more
5/31/13
![Page 11: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/11.jpg)
R for machine learningR For Machine Learning
![Page 12: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/12.jpg)
R for Machine learning
Language and environment for statistical computing and is an Open Source alternative to S
![Page 13: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/13.jpg)
R for Machine learning
• Comes with comprehensive ecosystem of extensions: CRAN
• Provides variety of statistical and graphical data analysis tools
http://cran.us.r-project.org/
![Page 14: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/14.jpg)
R for Machine learning
http://www.revolutionanalytics.com/what-is-open-source-r/companies-using-r.php
![Page 15: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/15.jpg)
R for Machine learning
Does not always scale well with large data sets
![Page 16: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/16.jpg)
"The best thing about R is that it was developed by statisticians.
The worst thing about R is that... it was developed by statistician” -
Bo Cowgill, Google
![Page 17: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/17.jpg)
Statistics you say ?
5/31/13
![Page 18: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/18.jpg)
Teapots and other kitchen tools
5/31/13
![Page 19: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/19.jpg)
5/31/13
![Page 20: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/20.jpg)
What can you use R for ?
• Log analysis
• Getting insights into your data
• Creating pretty charts for management ….
• Fun
5/31/13
![Page 21: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/21.jpg)
HELLO world
5/31/13
![Page 22: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/22.jpg)
R Basics
• Workspaces
• Variables
• X = 1 or Y <- 3
• Functions
• C (1, 2, 3)
• [1] 1 2 3
• Comments
• 1 + 1 # this is a comment
5/31/13
![Page 23: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/23.jpg)
R Data types
• Numeric
• Integer
• Complex
• Logical: TRUE or FALSE
• Character
• Factors: aka Enum
5/31/13
![Page 24: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/24.jpg)
R Data types
• Vectors
• V1 = c(1 , 2, 3, 4)
• V2 = c (3, 4, 5)
• V3 = c(V1, V2)
• V4 = 5 * V3
• Matrix
• M1 = matrix(c(1,2,3,4,5,6), nrows=2)
• M2 = matrix(c(1,2,3,4,5,6), nrows=2, byrow=ROW)
• M3 = t(M2) # transpose
5/31/13
![Page 25: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/25.jpg)
R Data types
• Lists
• 1:5 [1] 1 2 3 4 5
• 2^(1:5) [1] 2 4 8 16 32
• Missing values: NA
• Indexing
• Letters[1:3]
• Letters[c(7,9)]
• Letters[-c(1:15)]
5/31/13
![Page 26: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/26.jpg)
Sounds like matlab, no ?
http://www.math.umaine.edu/~hiebeler/comp/matlabR.pdf MATLAB® / R Reference, by David Hiebeler
5/31/13
![Page 27: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/27.jpg)
Your mission should you ….
5/31/13
![Page 28: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/28.jpg)
Your second mission if you choose to accept it….
5/31/13
![Page 29: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/29.jpg)
5/31/13
![Page 30: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/30.jpg)
Kernel density estimation
“In statistics, kernel density estimation (KDE) is a non-parametric way to estimate the probability density function of a random variable. Kernel density estimation is a fundamental data smoothing problem where inferences about the population are made, based on a finite data sample. “ - Wikipedia
5/31/13
![Page 31: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/31.jpg)
Generalized linear model
“In statistics, the generalized linear model (GLM) is a flexible generalization of ordinary linear regression that allows for response variables that have other than a normal distribution. The GLM generalizes linear regression by allowing the linear model to be related to the response variable via a link function and by allowing the magnitude of the variance of each measurement to be a function of its predicted value.” - Wikipedia
5/31/13
![Page 32: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/32.jpg)
Typical flow
5/31/13
![Page 33: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/33.jpg)
Typical flow
5/31/13
![Page 34: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/34.jpg)
Model
• Gather
• Cleanse
• Explore
• Theorize
• Create training set
• Train
• Validate
• Refine
• Port
5/31/13
![Page 35: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/35.jpg)
Further reading
http://www.amazon.com/Machine-Learning-Hackers-Drew-Conway/dp/1449303714
5/31/13
![Page 36: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/36.jpg)
Further reading
http://cran.r-project.org/doc/manuals/R-intro.pdf
5/31/13
![Page 37: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/37.jpg)
Further reading
http://www-stat.stanford.edu/~tibs/ElemStatLearn/
5/31/13
![Page 38: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/38.jpg)
Further reading
https://class.coursera.org/datasci-001/class
5/31/13
![Page 39: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/39.jpg)
Q&A
5/31/13
![Page 40: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/40.jpg)
5/31/13
![Page 41: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/41.jpg)
Open Middleware 2.0 community & concept
proj. art. Natalia Borowicz
Douglas TaitOracle
Marcin NowakOrange Labs
www.openmiddleware.pl
![Page 42: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/42.jpg)
5/31/13
![Page 43: Machine learning for a busy developer - Amazon S3s3-eu-west-1.amazonaws.com/presentations2013/9... · 2013-05-31 · Generalized linear model “In statistics, the generalized linear](https://reader034.fdocuments.in/reader034/viewer/2022042406/5f209f1d2f5de022cb7ebb04/html5/thumbnails/43.jpg)
Thank you !!!
5/31/13