SlideShare a Scribd company logo
1 of 63
Download to read offline
@louisdorard
#apidays
PredictiveAPIs
–Mike Gualtieri, Principal Analyst at Forrester
“Predictive apps are
the next big thing
in app development.”
–Waqar Hasan, VISA
“Predictive is the ‘killer app’ for
big data.”
1. Machine Learning
2. Data
BUT
–McKinsey & Co. (2011)
“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.”
What the @#?~%

is ML?
“Which type of email is this?
— Spam/Ham”


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


I
O
• Need examples of inputs AND outputs
• Need enough examples
??
Predictive APIs
The two phases of machine learning:
• TRAIN a model
• PREDICT with a model
The two methods of predictive APIs:
• TRAIN a model
• PREDICT with a model
The two methods of predictive APIs:
• model = create_model(dataset)
• predicted_output =
create_prediction(model, new_input)
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
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
Different needs,
different Predictive APIs
ABSTRACTION
Algorithmic
Generic
Generic for text
Problem-specific
Fixed-model
ABSTRACTION
Algorithmic
Generic
Generic for text
Problem-specific
Fixed-model
“Is this email important?
— Yes/No”
Generic Predictive APIs:
• Google Prediction API
• BigML
• PredicSis
• WolframCloud
• Amazon
AMAZON GOOGLE PREDICSIS BIGML
ACCURACY 0.862 0.743 0.858 0.790
TRAINING
TIME
135s 76s 17s 5s
TEST TIME 188s 369s 5s 1s
louisdorard.com/blog/machine-learning-apis-comparison
ABSTRACTION
Algorithmic
Generic
Generic for text
Problem-specific
Fixed-model
“Which project does this document relate to?
— A/B/C”
Text classification APIs:
• uClassify.com
• MonkeyLearn.com
• Cortical.io
ABSTRACTION
Algorithmic
Generic
Generic for text
Problem-specific
Fixed-model
“Is this customer going to leave next month?
— Yes/No”
“Is this transaction fraudulent?
— Yes/No”
Problem-specific Predictive APIs:
• Churn: ChurnSpotter.io, Framed.io
• Fraud detection: SiftScience.com
• Lead scoring: Infer.com
• Personal assistant (Siri): Wit.ai
ABSTRACTION
Algorithmic
Generic
Generic for text
Problem-specific
Fixed-model
“What is the sentiment of this tweet?
— Positive/Neutral/Negative”
“Is this email spam?
— Yes/No”
Fixed-model Predictive APIs:
• Text: Datumbox.com, Semantria.com
• Vision: Indico, AlchemyAPI.com
• Siri-like: maluuba.com
ABSTRACTION
Algorithmic
Generic
Generic for text
Problem-specific
Fixed-model
CUSTOMIZATION
Algorithmic
Generic
Generic for text
Problem-specific
Fixed-model
Own ML

algorithm?
Own data processing

algorithm?
Data processing
APIfication
MLlib
• “Open source prediction server”
• Based on Spark
• Expose predictive models as (scalable
& robust) APIs
= PAPI+
• Send (new) data
• Send prediction queries
cli = predictionio.EventClient("<my_app_id>")
cli.record_user_action_on_item("view","John","Item")
eng = predictionio.EngineClient("<my_engine_url>")
rec = eng.send_query({"uid":"John","n":5})
Use cases
• Increase e-commerce revenue with recos
• Reduce attrition (“churn”)
• Automate decision making
• Predict real-estate prices w. open data
• Predict crowds (SNCF & La Poste)
• …
papis.io/connect
(discount code: APIDAYS)

More Related Content

Similar to Using predictive APIs to create smarter apps

Intro to machine learning for web folks @ BlendWebMix
Intro to machine learning for web folks @ BlendWebMixIntro to machine learning for web folks @ BlendWebMix
Intro to machine learning for web folks @ BlendWebMix
Louis Dorard
 
Data Summit Brussels: Introduction
Data Summit Brussels: IntroductionData Summit Brussels: Introduction
Data Summit Brussels: Introduction
Louis Dorard
 

Similar to Using predictive APIs to create smarter apps (20)

Intro to machine learning for web folks @ BlendWebMix
Intro to machine learning for web folks @ BlendWebMixIntro to machine learning for web folks @ BlendWebMix
Intro to machine learning for web folks @ BlendWebMix
 
The Past, Present, and Future of Machine Learning APIs
The Past, Present, and Future of Machine Learning APIsThe Past, Present, and Future of Machine Learning APIs
The Past, Present, and Future of Machine Learning APIs
 
L7. A developers’ overview of the world of predictive APIs
L7. A developers’ overview of the world of predictive APIsL7. A developers’ overview of the world of predictive APIs
L7. A developers’ overview of the world of predictive APIs
 
A developer's overview of the world of predictive APIs
A developer's overview of the world of predictive APIsA developer's overview of the world of predictive APIs
A developer's overview of the world of predictive APIs
 
Data Summit Brussels: Introduction
Data Summit Brussels: IntroductionData Summit Brussels: Introduction
Data Summit Brussels: Introduction
 
Data engineering track module 2
Data engineering track module 2Data engineering track module 2
Data engineering track module 2
 
How Will Your ML Project Fail
How Will Your ML Project FailHow Will Your ML Project Fail
How Will Your ML Project Fail
 
Why And How To Leverage Predictive APIs In Any Application
Why And How To Leverage Predictive APIs In Any Application Why And How To Leverage Predictive APIs In Any Application
Why And How To Leverage Predictive APIs In Any Application
 
Data engineering track module 2
Data engineering track module 2Data engineering track module 2
Data engineering track module 2
 
Future of data science as a profession
Future of data science as a professionFuture of data science as a profession
Future of data science as a profession
 
AI & AWS DeepComposer
AI & AWS DeepComposerAI & AWS DeepComposer
AI & AWS DeepComposer
 
Data Science-Why?What?How? By Hari Prasad
Data Science-Why?What?How? By Hari PrasadData Science-Why?What?How? By Hari Prasad
Data Science-Why?What?How? By Hari Prasad
 
Future of Work in Engineering
Future of Work in EngineeringFuture of Work in Engineering
Future of Work in Engineering
 
apidays Helsinki & North 2023 - API Security in the era of Generative AI, Mat...
apidays Helsinki & North 2023 - API Security in the era of Generative AI, Mat...apidays Helsinki & North 2023 - API Security in the era of Generative AI, Mat...
apidays Helsinki & North 2023 - API Security in the era of Generative AI, Mat...
 
Ml master class northeastern university
Ml master class   northeastern universityMl master class   northeastern university
Ml master class northeastern university
 
Towards enterprise-ready AI deployments: Minimizing the risk of consuming AI ...
Towards enterprise-ready AI deployments: Minimizing the risk of consuming AI ...Towards enterprise-ready AI deployments: Minimizing the risk of consuming AI ...
Towards enterprise-ready AI deployments: Minimizing the risk of consuming AI ...
 
Ml master class
Ml master classMl master class
Ml master class
 
Algorithm Marketplace and the new "Algorithm Economy"
Algorithm Marketplace and the new "Algorithm Economy"Algorithm Marketplace and the new "Algorithm Economy"
Algorithm Marketplace and the new "Algorithm Economy"
 
TechEvent 2019: Artificial Intelligence in Dev & Ops; Martin Luckow - Trivadis
TechEvent 2019: Artificial Intelligence in Dev & Ops; Martin Luckow - TrivadisTechEvent 2019: Artificial Intelligence in Dev & Ops; Martin Luckow - Trivadis
TechEvent 2019: Artificial Intelligence in Dev & Ops; Martin Luckow - Trivadis
 
AI for Software Engineering
AI for Software EngineeringAI for Software Engineering
AI for Software Engineering
 

More from Louis Dorard

More from Louis Dorard (9)

From Data to AI with the Machine Learning Canvas
From Data to AI with the Machine Learning CanvasFrom Data to AI with the Machine Learning Canvas
From Data to AI with the Machine Learning Canvas
 
Machine Learning: je m'y mets demain!
Machine Learning: je m'y mets demain!Machine Learning: je m'y mets demain!
Machine Learning: je m'y mets demain!
 
Trusting AI with important decisions
Trusting AI with important decisionsTrusting AI with important decisions
Trusting AI with important decisions
 
Predictive apps for startups
Predictive apps for startupsPredictive apps for startups
Predictive apps for startups
 
Future of AI-powered automation in business
Future of AI-powered automation in businessFuture of AI-powered automation in business
Future of AI-powered automation in business
 
Demystifying Machine Learning
Demystifying Machine LearningDemystifying Machine Learning
Demystifying Machine Learning
 
Bootstrapping Machine Learning
Bootstrapping Machine LearningBootstrapping Machine Learning
Bootstrapping Machine Learning
 
Big Data 2.0
Big Data 2.0Big Data 2.0
Big Data 2.0
 
Exploration & Exploitation Challenge 2011
Exploration & Exploitation Challenge 2011Exploration & Exploitation Challenge 2011
Exploration & Exploitation Challenge 2011
 

Recently uploaded

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

Using predictive APIs to create smarter apps