+ All Categories
Home > Documents > Implementing a Predictive Analytics model - · PDF filePMML description Caché can...

Implementing a Predictive Analytics model - · PDF filePMML description Caché can...

Date post: 07-Mar-2018
Category:
Upload: dangnhu
View: 213 times
Download: 1 times
Share this document with a friend
38
c h e Cache Conf Implementing a Predictive Model Danny Wijnschenk Sales Engineer
Transcript
Page 1: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

CacheConf

Implementing a Predictive Model

Danny Wijnschenk

Sales Engineer

Page 2: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Data Analytics

Descriptive

Analytics

What?

now

Predictive

Analytics

What?

Prescriptive

Analytics

Why?

Page 3: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Weather

Examples of Predictive Analytics

Page 4: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Retail

Examples of Predictive Analytics

Page 5: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Energy Smart Meters

Examples of Predictive Analytics

Page 6: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Building Predictive Models

Page 7: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Get the historical data

External data needed ?

Look for dependencies

(Overfitting)

Building Predictive Models

Explore

Page 8: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Empty fields

Wrong data

Formats

Building Predictive Models

Clean

Page 9: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Divide data in training and

testing set

Choose model

Train the model with training

set

Building Predictive Models

Train

Page 10: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Use test set to verify results

Go back to Explore-Clean-

Train till metrics are OK

Building Predictive Models

Test

Page 11: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Data Scientists

Page 12: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Production Environment

Page 13: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Predictive Model Markup Language

XML based file format

Supported by major modelling tools

(SPSS, SAS, R, Knime, MicroStrategy, …)

Connects the Data Scientists World to the

Production World

PMML

Page 14: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Insert PMML in a class or use Wizard

Compile

Run In Caché Object Script

In DeepSee (as Dimension, Calculated Measure, KPI)

In Caché SQL

Deploy a Predictive Model in Caché

Page 15: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Demo

Page 16: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Show how to build a Predictive Model Using Knime (www.knime.org)

Open Source

User Friendly UI

Export the model in PMML

Import PMML in Caché

Use the model in Caché (COS, SQL,

DeepSee)

Steps of the Demo

Page 17: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Create model based on Decision Tree

Car data contains Brand, Model, Year of car

Number of Cylinders of engine

Weight of the car

Engine Horsepower

Displacement of Cylinders

Consumption in Miles per Gallon

Origin should be Japan, US or Europe

Case 1 : Predicting the Origin of Cars

Page 18: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Step 1 : Database Reader

Page 19: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Step 2 : Column Filter

Page 20: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Step 3 : Decision Tree Learner

Page 21: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Step 4 : View Result

Page 22: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Step 4 : Example of Overfitting

Page 23: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Step 5 : Export PMML

Page 24: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Create model based on Polynomial

Regression

Car data contains Brand, Model, Year, Origin of car

Number of Cylinders of engine

Weight of the car

Engine Horsepower

Displacement of Cylinders

Consumption in Miles per Gallon

Case 2 : Predicting Car Consumption

Page 25: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Step 1 : Database Reader

Page 26: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Step 2 : Cleanup the Data

Page 27: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Step 3 : Polynomial Regression Learner

Page 28: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Step 4 : View Result

Page 29: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Step 5 : Export PMML

Page 30: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Import PMML in Caché Class

Page 31: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Do ##class(PredictiveAnalytics.

ModelOrigin).%GetModelInstance(, .model)

Set data("Acceleration") = 12

Set data("MilesPerGallon") = 20

Set data("Weight") = 2400

Set data("Horsepower") = 146

Do model.%ExecuteModel(.data, .output)

Write output.Origin

Run model in Caché Object Script

Page 32: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Run model in Caché SQL

Page 33: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Run model from any UI (e.g. AngularJS)

Page 34: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Test model in DeepSee

Page 35: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Run model in DeepSee

Page 36: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Run model in DeepSee

Page 37: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Data Scientists make Predictive Models

with specialized tools

Predictive Models can be exported in a

PMML description

Caché can deploy a Predictive Model by

using the PMML description

An Application Developer can run the

model anywhere in Caché (COS, SQL,

DeepSee)

TakeAway Summary

Page 38: Implementing a Predictive Analytics model - · PDF filePMML description Caché can deploy a Predictive Model by using the PMML description An Application Developer can run the model

Cache C o n f

Questions?


Recommended