36
A primer to machine learning and predictive analytics using Azure ML

A primer to machine learning and predictive analytics using Azure ML

Embed Size (px)

Citation preview

Page 1: A primer to machine learning and predictive analytics using Azure ML

A primer to machine learning and predictive analytics using Azure ML

Page 2: A primer to machine learning and predictive analytics using Azure ML
Page 3: A primer to machine learning and predictive analytics using Azure ML
Page 4: A primer to machine learning and predictive analytics using Azure ML

predictive analyticspredictions based on models

Page 5: A primer to machine learning and predictive analytics using Azure ML
Page 6: A primer to machine learning and predictive analytics using Azure ML

predictive maintenancefix it before it breaks

Page 7: A primer to machine learning and predictive analytics using Azure ML

predictive assistantmake predictions personal

Page 8: A primer to machine learning and predictive analytics using Azure ML

fundamentals of machine learning

data science workflow

maml experiments

Page 9: A primer to machine learning and predictive analytics using Azure ML

machine learningalgorithms and systems that improve their performance with experience

Page 10: A primer to machine learning and predictive analytics using Azure ML

features model output

learning algorithm

Page 11: A primer to machine learning and predictive analytics using Azure ML

features describe the domaine.g. income, age, education, …

Page 12: A primer to machine learning and predictive analytics using Azure ML

labels augment the learning datae.g. this photo contains a man

Page 13: A primer to machine learning and predictive analytics using Azure ML

unsupervised learningdiscovering clusters and associations using unlabeled data

Page 14: A primer to machine learning and predictive analytics using Azure ML

supervised learningusing labeled data to train the model

Page 15: A primer to machine learning and predictive analytics using Azure ML

split

dataset

training data test data

train model

score model

train the model

algorithm

Page 16: A primer to machine learning and predictive analytics using Azure ML

different tasks require different algorithmsfinding similar companies k-means clusteringhourly bike rental prediction regression treecredit risk prediction decision tree

Page 17: A primer to machine learning and predictive analytics using Azure ML

machine learning toolsopen source: R, mahout, python, weka …commercial: Azure ML, SAS, SPSS, MATLAB …

Page 18: A primer to machine learning and predictive analytics using Azure ML

fundamentals of machine learning

data science workflow

maml experiments

Page 19: A primer to machine learning and predictive analytics using Azure ML

define

the goal

collect &

manage

data

build the

model

evaluate

& critique

model

deploy

model

what problem am I solving?

what information

do I need?

find patterns in the

data that lead to a

solution

does the model solve

my problem?

use the model in

the real world

Page 20: A primer to machine learning and predictive analytics using Azure ML

ask the right question!when will the clutch fail?versuswhat is the probability that the clutch fails within the next 3 months?

Page 21: A primer to machine learning and predictive analytics using Azure ML

feature constructiontransform e.g. cumulative time dependentclipping outliers e.g. faulty measurementsnormalize e.g. avoid feature dominancequantize e.g. create categories (great/bad)

Page 22: A primer to machine learning and predictive analytics using Azure ML

e.g. quantize wine quality ratings into

bad/good/great buckets

Page 23: A primer to machine learning and predictive analytics using Azure ML

train & test the modelbetter data often beats better algorithmsmore training data != better modeldoes the algorithm correlate features?does it support online learning?

Page 24: A primer to machine learning and predictive analytics using Azure ML

deciding on algorithms linear regression to predict decision trees

to classify classification tree (2 & multi)to predict regression tree

Page 25: A primer to machine learning and predictive analytics using Azure ML

2-way partitioning versus 3-way partitioning

train & test train, validate

& test

Page 26: A primer to machine learning and predictive analytics using Azure ML

A B C D E F

cross validation - divide dataset into n folds

Page 27: A primer to machine learning and predictive analytics using Azure ML

trade off between training error & validation

performance

Page 28: A primer to machine learning and predictive analytics using Azure ML

over fitting and generalization

Page 29: A primer to machine learning and predictive analytics using Azure ML

over fitting and generalization

Page 30: A primer to machine learning and predictive analytics using Azure ML

over fitting and generalization

Page 31: A primer to machine learning and predictive analytics using Azure ML

precision: 𝑇𝑃

𝑇𝑃+𝐹𝑃 1 means all P are P (but increased # of FN)

recall: 𝑇𝑃

𝑇𝑃+𝐹𝑁 1 means no FN (just another name for TP rate)

accuracy: 𝑇𝑃+𝑇𝑁

𝑃+𝑁 1 means all predictions are correct (over fitting)

F1 score: 𝑝𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛+𝑟𝑒𝑐𝑎𝑙𝑙

2 the closer to 1, the better

Page 32: A primer to machine learning and predictive analytics using Azure ML

evaluate the modelROC (Receiver Operating Characteristic) Precision/Recall Lift

Page 33: A primer to machine learning and predictive analytics using Azure ML

put the model in production as a Web Service

{

"Id": “wineTypeScore",

"Instance":

{

"FeatureVector":

{

"pH": “3.5",

"alcohol": “10.7“

},

"GlobalParameters": {}

}

}

predict

Page 34: A primer to machine learning and predictive analytics using Azure ML

fundamentals of machine learning

data science workflow

maml experiments

Page 35: A primer to machine learning and predictive analytics using Azure ML

References to the wine dataset:

P. Cortez, A. Cerdeira, F. Almeida, T. Matos and J. Reis.

Modeling wine preferences by data mining from physicochemical properties.

In Decision Support Systems, Elsevier, 47(4):547-553. ISSN: 0167-9236.

Available at:

[@Elsevier] http://dx.doi.org/10.1016/j.dss.2009.05.016

[Pre-press (pdf)] http://www3.dsi.uminho.pt/pcortez/winequality09.pdf

[bib] http://www3.dsi.uminho.pt/pcortez/dss09.bib

Page 36: A primer to machine learning and predictive analytics using Azure ML