why and how to leverage predictive apis in any application

65
Why and how to leverage Predictive APIs in any application Louis Dorard (@louisdorard)

Upload: programmableweb

Post on 02-Jul-2015

1.307 views

Category:

Technology


3 download

DESCRIPTION

APIcon 2014 Louis Dorard, Author of Bootstrapping Machine Learning, Codole

TRANSCRIPT

Page 1: Why And How To Leverage Predictive APIs In Any Application

Why and how to leverage Predictive APIs!

in any application!

Louis Dorard (@louisdorard)

Page 2: Why And How To Leverage Predictive APIs In Any Application
Page 3: Why And How To Leverage Predictive APIs In Any Application
Page 4: Why And How To Leverage Predictive APIs In Any Application
Page 5: Why And How To Leverage Predictive APIs In Any Application

–Waqar Hasan, Apigee Insights

“Predictive is the ‘killer app’ for big data.”

Page 6: Why And How To Leverage Predictive APIs In Any Application

–Mike Gualtieri, Principal Analyst at Forrester

“Predictive apps are the next big thing

in app development.”

Page 7: Why And How To Leverage Predictive APIs In Any Application

–Vik Singh, CEO of Infer

“Predictive apps enable people to work smarter and reduce their

workloads dramatically”

Page 8: Why And How To Leverage Predictive APIs In Any Application

Machine Learning

Page 9: Why And How To Leverage Predictive APIs In Any Application

Data

Page 10: Why And How To Leverage Predictive APIs In Any Application

BUT

Page 11: Why And How To Leverage Predictive APIs In Any Application

–McKinsey & Co.

“A significant constraint on realizing value from big data will be a shortage of talent, particularly of people with deep expertise in statistics

and machine learning.”

Page 12: Why And How To Leverage Predictive APIs In Any Application

What the @#?~% is ML?

Page 13: Why And How To Leverage Predictive APIs In Any Application
Page 14: Why And How To Leverage Predictive APIs In Any Application

“Which type of email is this? — Spam/Ham”!-> Classification

Page 15: Why And How To Leverage Predictive APIs In Any Application
Page 16: Why And How To Leverage Predictive APIs In Any Application

“How much is this house worth? — X $” -> Regression

Page 17: Why And How To Leverage Predictive APIs In Any Application

Classification

Page 18: Why And How To Leverage Predictive APIs In Any Application
Page 19: Why And How To Leverage Predictive APIs In Any Application
Page 20: Why And How To Leverage Predictive APIs In Any Application
Page 21: Why And How To Leverage Predictive APIs In Any Application
Page 22: Why And How To Leverage Predictive APIs In Any Application

Regression

Page 23: Why And How To Leverage Predictive APIs In Any Application

Bedrooms Bathrooms Surface (foot²) Year built Type Price ($)

3 1 860 1950 house 565,000

3 1 1012 1951 house

2 1.5 968 1976 townhouse 447,000

4 1315 1950 house 648,000

3 2 1599 1964 house

3 2 987 1951 townhouse 790,0001 1 530 2007 condo 122,0004 2 1574 1964 house 835,000

4 2001 house 855,000

3 2.5 1472 2005 house

4 3.5 1714 2005 townhouse

2 2 1113 1999 condo

1 769 1999 condo 315,000

Page 24: Why And How To Leverage Predictive APIs In Any Application

Bedrooms Bathrooms Surface (foot²) Year built Type Price ($)

3 1 860 1950 house 565,000

3 1 1012 1951 house

2 1.5 968 1976 townhouse 447,000

4 1315 1950 house 648,000

3 2 1599 1964 house

3 2 987 1951 townhouse 790,0001 1 530 2007 condo 122,0004 2 1574 1964 house 835,000

4 2001 house 855,000

3 2.5 1472 2005 house

4 3.5 1714 2005 townhouse

2 2 1113 1999 condo

1 769 1999 condo 315,000

Page 25: Why And How To Leverage Predictive APIs In Any Application
Page 26: Why And How To Leverage Predictive APIs In Any Application

Bedrooms Bathrooms Surface (foot²) Year built Type Price ($)

3 1 860 1950 house 565,000

3 1 1012 1951 house

2 1.5 968 1976 townhouse 447,000

4 1315 1950 house 648,000

3 2 1599 1964 house

3 2 987 1951 townhouse 790,0001 1 530 2007 condo 122,0004 2 1574 1964 house 835,000

4 2001 house 855,000

3 2.5 1472 2005 house

4 3.5 1714 2005 townhouse

2 2 1113 1999 condo

1 769 1999 condo 315,000

Page 27: Why And How To Leverage Predictive APIs In Any Application

ML is a set of AI techniques where “intelligence” is built by

referring to examples

Page 28: Why And How To Leverage Predictive APIs In Any Application
Page 29: Why And How To Leverage Predictive APIs In Any Application

??

Page 30: Why And How To Leverage Predictive APIs In Any Application

Prediction APIs to the rescue

Page 31: Why And How To Leverage Predictive APIs In Any Application

(Dr Kiri L. Wagstaff, Researcher at NASA)

Getting ML software into the hands of domain experts

Page 32: Why And How To Leverage Predictive APIs In Any Application

(Bret Victor)

Making ML effortless

Page 33: Why And How To Leverage Predictive APIs In Any Application
Page 34: Why And How To Leverage Predictive APIs In Any Application

HTML / CSS / JavaScript

Page 35: Why And How To Leverage Predictive APIs In Any Application

HTML / CSS / JavaScript

Page 36: Why And How To Leverage Predictive APIs In Any Application

squarespace.com

Page 37: Why And How To Leverage Predictive APIs In Any Application
Page 38: Why And How To Leverage Predictive APIs In Any Application
Page 39: Why And How To Leverage Predictive APIs In Any Application

The two phases of machine learning:

• TRAIN a model

• PREDICT with a model

Page 40: Why And How To Leverage Predictive APIs In Any Application

The two methods of prediction APIs:

• TRAIN a model

• PREDICT with a model

Page 41: Why And How To Leverage Predictive APIs In Any Application

The two methods of prediction APIs: • model = create_model(dataset)!

• predicted_output = create_prediction(model, new_input)

Page 42: Why And How To Leverage Predictive APIs In Any Application

from bigml.api import BigML !# create a model!api = BigML()!source = api.create_source('training_data.csv')!dataset = api.create_dataset(source)!model = api.create_model(dataset) !# make a prediction!prediction = api.create_prediction(model, new_input)!print "Predicted output value: ",prediction['object']['output']

http://bit.ly/bigml_wakari

Page 43: Why And How To Leverage Predictive APIs In Any Application
Page 44: Why And How To Leverage Predictive APIs In Any Application

Enter a new world of possibilities…

Page 45: Why And How To Leverage Predictive APIs In Any Application

Business:!

• Churn

• Up-sell

• Pricing optimization

• Sales optimization

• Fraud detection

• Credit scoring

Page 46: Why And How To Leverage Predictive APIs In Any Application

Apps:!

• Priority Inbox (Gmail)

• Google Now

• Tweet sentiment analysis (Mention)

• Crowd prediction (Snips)

• House value estimation (Zillow)

• Language detection (Google Translate)

Page 47: Why And How To Leverage Predictive APIs In Any Application

Different needs, different Predictive APIs

Page 48: Why And How To Leverage Predictive APIs In Any Application

ML Algorithm API

Automated Pred. API

Text Classification API

Vertical Pred. API

Fixed-model Pred. API

AB

STRA

CTIO

N

Page 49: Why And How To Leverage Predictive APIs In Any Application

ML Algorithm API!

Automated Pred. API

Text Classification API

Vertical Pred. API

Fixed-model Pred. API

AB

STRA

CTIO

N

Page 50: Why And How To Leverage Predictive APIs In Any Application

ML Algorithm APIs:!

• ErsatzLabs.com -> deep learning

• BigML.com -> decision trees

• Wise.io -> random forests

• Microsoft Azure ML

Page 51: Why And How To Leverage Predictive APIs In Any Application

ML Algorithm API

Automated Pred. API!

Text Classification API

Vertical Pred. API

Fixed-model Pred. API

AB

STRA

CTIO

N

Page 52: Why And How To Leverage Predictive APIs In Any Application

Automated Prediction APIs:!

• BigML.com

• Google Prediction API

• WolframCloud.com

• Reco: DirectedEdge.com, Prediction.IO (offline)

Page 53: Why And How To Leverage Predictive APIs In Any Application

ML Algorithm API

Automated Pred. API

Text Classification API!

Vertical Pred. API

Fixed-model Pred. API

AB

STRA

CTIO

N

Page 54: Why And How To Leverage Predictive APIs In Any Application

Text Classification APIs:!

• uClassify.com

• MonkeyLearn.com

• Cortical.io

• etcML.com (discontinued?)

Page 55: Why And How To Leverage Predictive APIs In Any Application

ML Algorithm API

Automated Pred. API

Text Classification API

Vertical Pred. API!

Fixed-model Pred. API

AB

STRA

CTIO

N

Page 56: Why And How To Leverage Predictive APIs In Any Application

Vertical Prediction APIs:!

• Churn: Framed.io

• Fraud detection: SiftScience.com

• Lead scoring: Infer.com

• Personal assistant (Siri): Wit.ai

Page 57: Why And How To Leverage Predictive APIs In Any Application

ML Algorithm API

Automated Pred. API

Text Classification API

Vertical Pred. API

Fixed-model Pred. API

AB

STRA

CTIO

N

Page 58: Why And How To Leverage Predictive APIs In Any Application

Fixed-model Prediction APIs:!

• Text: Datumbox.com, AlchemyAPI.com, Semantria.com

• Siri-like: Maluuba.com

• Vision: Nsure.io, AlchemyAPI.com

Page 59: Why And How To Leverage Predictive APIs In Any Application

7 questions to ask:!

• Instant sign-up?

• Pricing?

• Parameters to tune?

• Cloud?

• Training data?

• Type of ML problem?

• Ownership of model?

Page 60: Why And How To Leverage Predictive APIs In Any Application

Recap

Page 61: Why And How To Leverage Predictive APIs In Any Application

• Classification and regression

• 2 phases in ML: train and predict

• Prediction APIs make it easy to build models

• Use cases in business and in apps

• 5 types of APIs

• 7 questions to ask

Page 62: Why And How To Leverage Predictive APIs In Any Application
Page 63: Why And How To Leverage Predictive APIs In Any Application
Page 64: Why And How To Leverage Predictive APIs In Any Application

www.louisdorard.com !

@louisdorard

Page 65: Why And How To Leverage Predictive APIs In Any Application