SlideShare une entreprise Scribd logo
1  sur  34
Télécharger pour lire hors ligne
Automating Data Science on Spark: 

A Bayesian Approach
Vu Pham, Huan Dao, Christopher Nguyen
San Francisco, June 8th 2016
@arimoinc
Feature
Engineering Model
Selection
Hyperparameter
Tuning
Data Science
is
so MANUAL!
@arimoinc
Natural
Interfaces
Machine
Learning
Collaboration
Agenda
@arimoinc
1. For Hyper-parameter Tuning
2. For “Automating” Data Science on Spark
3. Experiments
@arimoinc
Bayesian Optimization
for Hyper-parameter Tuning
@arimoinc
Feature
Engineering Model
Selection
Hyper-parameter
Tuning
We can
automate
this?
What if…
Hyper-parameters
@arimoinc
K-means K
Neural Network # of layers, dropout, momentum…
Random Forest Feature set, # of trees, max depth…
SVM Regularization term (C)
Gradient Descent Learning rate, number of iterations…
Manual Search
@arimoinc
Grid Search
@arimoinc
Random Search
@arimoinc
Hyper-parameters tuning
@arimoinc
U: S R
c U(c)
Hyper-parameter Space Performance onValidation Set
How to intelligently select the next configuration?
(Given the observations in the past)
Maximize a utility functions over hyper-parameter space:
@arimoinc
Bayesian Inference
Courtesy: http://www2.stat.duke.edu/~mw/fineart.html
Bayesian Optimization Explained
@arimoinc
1. Incorporate a prior over the space of possible objective functions (GP)
2. Combine the prior with the likelihood to obtain a posterior over
function values given observations
3. Select next configuration to evaluate based on the posterior
• According to an acquisition function
Bayesian Optimization Explained
@arimoinc
@arimoinc
expensive
multi-modal
noisy
blackbox
Bayesian Optimization is to
globally optimize functions that are:
@arimoinc
Bayesian Optimization for
“Automating” Data Science
on Spark
Automatic Data Science Workflow
@arimoinc
Feature
Engineering
Model
Selection
Hyperparameter
Tuning
Machines doing part of Data Science
@arimoinc
Dataset
Feature preprocessing
Data Cleaning
Generate new features
Feature selection
Dimensionality
reduction
Predictive modeling Scoring
A generic Machine Learning pipeline
@arimoinc
Training set
Val/Test set
Feature preprocessing
Truncated SVD
n: # of dims
f-score with target variable
Keep alpha percents top features
K-means
k: # of clusters
RandomForest #1
number of trees
maximum depth
percentage of features
RandomForest #k
…
Scoring
Spark WorkersSpark Workers
Pipeline on DDF and BayesOpt
@arimoinc
Spark Driver
DDF
Arimo Pipeline Manager
…
Client
Bayesian Optimizer
Client uses Bayesian Optimizer to select the hyper-parameters
of the pipeline so that it maximizes the performance on a validation set
Spark Workers
Pipeline on DDF and BayesOpt
@arimoinc
train_ddf = session.get_ddf(…)
valid_ddf = session.get_ddf(…)
optimizer = SpearmintOptimizer(chooser_name=‘GPEIperSecChooser',
max_finished_jobs=max_iters, grid_size=5000, ..)
best_params, trace = auto_model(
optimizer, train_ddf, 'arrdelay',
classification=True,
excluded_columns=['actualelapsedtime','arrtime', 'year'],
validation_ddf=val_ddf)
@arimoinc
Experimental Results
Experiment 1: SF Crimes
@arimoinc
Dates Category Descript DayOfWeek PdDistrict Resolution Address X Y
2015-05-13 23:53:00 WARRANTS WARRANT ARREST Wednesday NORTHERN ARREST, BOOKED OAK ST / LAGUNA ST -122.4258 37.7745
2015-05-13 23:53:00
OTHER
OFFENSES
TRAFFICVIOLATION
ARREST
Wednesday NORTHERN ARREST, BOOKED OAK ST / LAGUNA ST -122.4258 37.7745
2015-05-13 23:33:00
OTHER
OFFENSES
TRAFFICVIOLATION
ARREST
Wednesday NORTHERN ARREST, BOOKED
VANNESS AV /
GREENWICH ST
-122.4243 37.8004
Experiment 1: SF Crimes dataset
@arimoinc
Hyper-parameter Type Range
Number of hidden layers INT 1, 2, 3
Number of hidden units INT 64, 128, 256
Dropout at the input layer FLOAT [0, 0.5]
Dropout at the hidden layers FLOAT [0,0.75]
Learning rate FLOAT [0.01, 0.1]
L2 Weight decay FLOAT [0, 0.01]
Logloss on the validation set
Running time (hours) ~ 40 iterations
Experiment 1: SF Crimes dataset
@arimoinc
Hyper-parameter Type Range Spearmint
Number of hidden layers INT 1, 2, 3 2
Number of hidden units INT 64, 128, 256 256
Dropout at the input layer FLOAT [0, 0.5] 0.423678
Dropout at the hidden layers FLOAT [0,0.75] 0.091693
Learning rate FLOAT [0.01, 0.1] 0.025994
L2 Weight decay FLOAT [0, 0.01] 0.00238
Logloss on the validation set 2.1502
Running time (hours) ~ 40 iterations 15.8
Experiment 1: SF Crimes dataset
@arimoinc
2.149
2.152
2.155
2.157
2.16
1 7 17 18 39
2.1600
2.1555 2.1552 2.1551
2.1519
2.1502
Completed jobs 1 7 16 17 18 39
Elapsed time 1021 8003 12742 1623 1983 31561
Number of layers 1 3 3 2 3 2
Hidden units 64 256 256 256 256 256
Learning rate 0.01 0.1 0.01 0.01 0.021 0.026
Input dropout 0 0.5 0.5 0.463 0.5 0.424
Hidden dropout 0 0 0 0.024 0.089 0.092
Weight decay 0 0 0.002 0.003 0 0.002
Experiment #1: With SigOpt
@arimoinc
Hyper-parameter Type Range Spearmint
Number of hidden layers INT 1, 2, 3 2 3
Number of hidden units INT 64, 128, 256 256 256
Dropout at the input layer FLOAT [0, 0.5] 0.423678 0.3141
Dropout at the hidden layers FLOAT [0,0.75] 0.091693 0.0944
Learning rate FLOAT [0.01, 0.1] 0.025994 0.0979
L2 Weight decay FLOAT [0, 0.01] 0.00238 0.0039
Logloss on the validation set 2.1502 2.14892
Running time (hours) ~ 40 iterations 15.8 20.1
SF Crimes - Time to results
@arimoinc
Experiment #2: Airlines data
@arimoinc
Year 1987-2008 DepDelay departure delay, in minutes
Month 1-12 Origin origin IATA airport code
DayofMonth 1-31 Dest destination IATA airport code
DayOfWeek 1 (Monday) - 7 (Sunday) Distance in miles
DepTime actual departure time TaxiIn taxi in time, in minutes
CRSDepTime scheduled departure time TaxiOut taxi out time in minutes
ArrTime actual arrival time Cancelled was the flight cancelled?
CRSArrTime scheduled arrival time CancellationCode reason for cancellation
UniqueCarrier unique carrier code Diverted 1 = yes, 0 = no
FlightNum flight number CarrierDelay in minutes
TailNum plane tail number WeatherDelay in minutes
ActualElapsedTime in minutes NASDelay in minutes
CRSElapsedTime in minutes SecurityDelay in minutes
AirTime in minutes LateAircraftDelay in minutes
ArrDelay arrival delay, in minutes Delayed Is the flight delayed
Experiment #2
@arimoinc
Training set
Val/Test set
Feature preprocessing
~900 features
Truncated SVD
n: # of dims
f-score with target variable
Keep alpha percents top features
K-means
k: # of clusters
RandomForest #1
number of trees
maximum depth
percentage of features
RandomForest #k
…
Scoring
Experiment #2: Hyper-parameters
@arimoinc
Hyperparameter Type Range BayesOpt
Number of SVD dimensions INT [5, 100] 98
Top feature percentage FLOAT [0.1, 1] 0.8258
k (# of clusters) INT [1, 6] 2
Number of trees (RF) INT [50, 500] 327
Max. depth (RF) INT [1, 20] 12
Min. instances per node (RF) INT [1, 1000] 414
F1-score on validation set 0.8736
Summary
@arimoinc
1. Bayesian Optimization for Hyper-parameter Tuning
2. Bayesian Optimization for 

“Automating” Data Science on Spark
3. Experiments
Getting Started
@arimoinc
• Blogpost: http://goo.gl/PFyBKI
• Open-source: spearmint, hyperopt, SMAC, AutoML
• Commercial: Whetlab, SigOpt, …
http://goo.gl/PFyBKI
https://www.arimo.com
@arimoinc @pentagoniac @phvu
CHECK IT OUT!

Contenu connexe

Tendances

Super COMPUTING Journal
Super COMPUTING JournalSuper COMPUTING Journal
Super COMPUTING Journal
Pandey_G
 
A Deeper Dive into EXPLAIN
A Deeper Dive into EXPLAINA Deeper Dive into EXPLAIN
A Deeper Dive into EXPLAIN
EDB
 
Tianqi Chen, PhD Student, University of Washington, at MLconf Seattle 2017
Tianqi Chen, PhD Student, University of Washington, at MLconf Seattle 2017Tianqi Chen, PhD Student, University of Washington, at MLconf Seattle 2017
Tianqi Chen, PhD Student, University of Washington, at MLconf Seattle 2017
MLconf
 
Streams processing with Storm
Streams processing with StormStreams processing with Storm
Streams processing with Storm
Mariusz Gil
 

Tendances (20)

GoodFit: Multi-Resource Packing of Tasks with Dependencies
GoodFit: Multi-Resource Packing of Tasks with DependenciesGoodFit: Multi-Resource Packing of Tasks with Dependencies
GoodFit: Multi-Resource Packing of Tasks with Dependencies
 
QConSF 2014 talk on Netflix Mantis, a stream processing system
QConSF 2014 talk on Netflix Mantis, a stream processing systemQConSF 2014 talk on Netflix Mantis, a stream processing system
QConSF 2014 talk on Netflix Mantis, a stream processing system
 
Ufuc Celebi – Stream & Batch Processing in one System
Ufuc Celebi – Stream & Batch Processing in one SystemUfuc Celebi – Stream & Batch Processing in one System
Ufuc Celebi – Stream & Batch Processing in one System
 
Real-time driving score service using Flink
Real-time driving score service using FlinkReal-time driving score service using Flink
Real-time driving score service using Flink
 
Mantis: Netflix's Event Stream Processing System
Mantis: Netflix's Event Stream Processing SystemMantis: Netflix's Event Stream Processing System
Mantis: Netflix's Event Stream Processing System
 
Super COMPUTING Journal
Super COMPUTING JournalSuper COMPUTING Journal
Super COMPUTING Journal
 
Vasia Kalavri – Training: Gelly School
Vasia Kalavri – Training: Gelly School Vasia Kalavri – Training: Gelly School
Vasia Kalavri – Training: Gelly School
 
Real-time and long-time together
Real-time and long-time togetherReal-time and long-time together
Real-time and long-time together
 
A Deeper Dive into EXPLAIN
A Deeper Dive into EXPLAINA Deeper Dive into EXPLAIN
A Deeper Dive into EXPLAIN
 
Tianqi Chen, PhD Student, University of Washington, at MLconf Seattle 2017
Tianqi Chen, PhD Student, University of Washington, at MLconf Seattle 2017Tianqi Chen, PhD Student, University of Washington, at MLconf Seattle 2017
Tianqi Chen, PhD Student, University of Washington, at MLconf Seattle 2017
 
Stream Processing Frameworks
Stream Processing FrameworksStream Processing Frameworks
Stream Processing Frameworks
 
Michael Häusler – Everyday flink
Michael Häusler – Everyday flinkMichael Häusler – Everyday flink
Michael Häusler – Everyday flink
 
Improved Reliable Streaming Processing: Apache Storm as example
Improved Reliable Streaming Processing: Apache Storm as exampleImproved Reliable Streaming Processing: Apache Storm as example
Improved Reliable Streaming Processing: Apache Storm as example
 
The Power of Both Choices: Practical Load Balancing for Distributed Stream Pr...
The Power of Both Choices: Practical Load Balancing for Distributed Stream Pr...The Power of Both Choices: Practical Load Balancing for Distributed Stream Pr...
The Power of Both Choices: Practical Load Balancing for Distributed Stream Pr...
 
Online learning, Vowpal Wabbit and Hadoop
Online learning, Vowpal Wabbit and HadoopOnline learning, Vowpal Wabbit and Hadoop
Online learning, Vowpal Wabbit and Hadoop
 
Introduction to Twitter Storm
Introduction to Twitter StormIntroduction to Twitter Storm
Introduction to Twitter Storm
 
Apache Flink internals
Apache Flink internalsApache Flink internals
Apache Flink internals
 
Streams processing with Storm
Streams processing with StormStreams processing with Storm
Streams processing with Storm
 
Samantha Wang [InfluxData] | Best Practices on How to Transform Your Data Usi...
Samantha Wang [InfluxData] | Best Practices on How to Transform Your Data Usi...Samantha Wang [InfluxData] | Best Practices on How to Transform Your Data Usi...
Samantha Wang [InfluxData] | Best Practices on How to Transform Your Data Usi...
 
Prediction as a service with ensemble model in SparkML and Python ScikitLearn
Prediction as a service with ensemble model in SparkML and Python ScikitLearnPrediction as a service with ensemble model in SparkML and Python ScikitLearn
Prediction as a service with ensemble model in SparkML and Python ScikitLearn
 

Similaire à Automatic Features Generation And Model Training On Spark: A Bayesian Approach

How to avoid the latency trap and lessons about software design
How to avoid the latency trap and lessons  about software designHow to avoid the latency trap and lessons  about software design
How to avoid the latency trap and lessons about software design
Tom Croucher
 
Letting In the Light: Using Solr as an External Search Component
Letting In the Light: Using Solr as an External Search ComponentLetting In the Light: Using Solr as an External Search Component
Letting In the Light: Using Solr as an External Search Component
Jay Luker
 

Similaire à Automatic Features Generation And Model Training On Spark: A Bayesian Approach (20)

AWS re:Invent 2016: IoT Blueprints: Optimizing Supply for Smart Agriculture f...
AWS re:Invent 2016: IoT Blueprints: Optimizing Supply for Smart Agriculture f...AWS re:Invent 2016: IoT Blueprints: Optimizing Supply for Smart Agriculture f...
AWS re:Invent 2016: IoT Blueprints: Optimizing Supply for Smart Agriculture f...
 
The First IoT JSR: Units of Measurement JSR-363 [BOF5981]
The First IoT JSR: Units of Measurement JSR-363 [BOF5981]The First IoT JSR: Units of Measurement JSR-363 [BOF5981]
The First IoT JSR: Units of Measurement JSR-363 [BOF5981]
 
112 portfpres.pdf
112 portfpres.pdf112 portfpres.pdf
112 portfpres.pdf
 
Accurate and Reliable What-If Analysis of Business Processes: Is it Achievable?
Accurate and Reliable What-If Analysis of Business Processes: Is it Achievable?Accurate and Reliable What-If Analysis of Business Processes: Is it Achievable?
Accurate and Reliable What-If Analysis of Business Processes: Is it Achievable?
 
Automated Verification of an Onboard Mission Planning and Execution System fo...
Automated Verification of an Onboard Mission Planning and Execution System fo...Automated Verification of an Onboard Mission Planning and Execution System fo...
Automated Verification of an Onboard Mission Planning and Execution System fo...
 
Automation Anywhere - Imagine New York 2019 - Verizon
Automation Anywhere - Imagine New York 2019 - VerizonAutomation Anywhere - Imagine New York 2019 - Verizon
Automation Anywhere - Imagine New York 2019 - Verizon
 
Unlimited Virtual Computing Capacity using the Cloud for Automated Parameter ...
Unlimited Virtual Computing Capacity using the Cloud for Automated Parameter ...Unlimited Virtual Computing Capacity using the Cloud for Automated Parameter ...
Unlimited Virtual Computing Capacity using the Cloud for Automated Parameter ...
 
Latency SLOs done right
Latency SLOs done rightLatency SLOs done right
Latency SLOs done right
 
How to avoid the latency trap and lessons about software design
How to avoid the latency trap and lessons  about software designHow to avoid the latency trap and lessons  about software design
How to avoid the latency trap and lessons about software design
 
Solve the colocation conundrum: Performance and density at scale with Kubernetes
Solve the colocation conundrum: Performance and density at scale with KubernetesSolve the colocation conundrum: Performance and density at scale with Kubernetes
Solve the colocation conundrum: Performance and density at scale with Kubernetes
 
Monitoring Clojure Applications with Prometheus
Monitoring Clojure Applications with PrometheusMonitoring Clojure Applications with Prometheus
Monitoring Clojure Applications with Prometheus
 
Quantifying the Value of Static Analysis
Quantifying the Value of Static AnalysisQuantifying the Value of Static Analysis
Quantifying the Value of Static Analysis
 
Full accesspolicyconsolidation for event processing systems
Full accesspolicyconsolidation for event processing systemsFull accesspolicyconsolidation for event processing systems
Full accesspolicyconsolidation for event processing systems
 
Letting In the Light: Using Solr as an External Search Component
Letting In the Light: Using Solr as an External Search ComponentLetting In the Light: Using Solr as an External Search Component
Letting In the Light: Using Solr as an External Search Component
 
Sumo Logic QuickStart Webinar
Sumo Logic QuickStart WebinarSumo Logic QuickStart Webinar
Sumo Logic QuickStart Webinar
 
Cortana Analytics Workshop: Real-Time Data Processing -- How Do I Choose the ...
Cortana Analytics Workshop: Real-Time Data Processing -- How Do I Choose the ...Cortana Analytics Workshop: Real-Time Data Processing -- How Do I Choose the ...
Cortana Analytics Workshop: Real-Time Data Processing -- How Do I Choose the ...
 
AEMP Connect 2021 Can AI Solve Construction Telematics Overload Problem? Ode...
AEMP Connect 2021  Can AI Solve Construction Telematics Overload Problem? Ode...AEMP Connect 2021  Can AI Solve Construction Telematics Overload Problem? Ode...
AEMP Connect 2021 Can AI Solve Construction Telematics Overload Problem? Ode...
 
Achieving Scalability in Software Testing with Machine Learning and Metaheuri...
Achieving Scalability in Software Testing with Machine Learning and Metaheuri...Achieving Scalability in Software Testing with Machine Learning and Metaheuri...
Achieving Scalability in Software Testing with Machine Learning and Metaheuri...
 
Ginsbourg.com - Performance and Load Test Report Template LTR 1.2
Ginsbourg.com - Performance and Load Test Report Template LTR 1.2Ginsbourg.com - Performance and Load Test Report Template LTR 1.2
Ginsbourg.com - Performance and Load Test Report Template LTR 1.2
 
Storage Consumption and Chargeback
Storage Consumption and ChargebackStorage Consumption and Chargeback
Storage Consumption and Chargeback
 

Plus de Spark Summit

Apache Spark Structured Streaming Helps Smart Manufacturing with Xiaochang Wu
Apache Spark Structured Streaming Helps Smart Manufacturing with  Xiaochang WuApache Spark Structured Streaming Helps Smart Manufacturing with  Xiaochang Wu
Apache Spark Structured Streaming Helps Smart Manufacturing with Xiaochang Wu
Spark Summit
 
Improving Traffic Prediction Using Weather Data with Ramya Raghavendra
Improving Traffic Prediction Using Weather Data  with Ramya RaghavendraImproving Traffic Prediction Using Weather Data  with Ramya Raghavendra
Improving Traffic Prediction Using Weather Data with Ramya Raghavendra
Spark Summit
 
MMLSpark: Lessons from Building a SparkML-Compatible Machine Learning Library...
MMLSpark: Lessons from Building a SparkML-Compatible Machine Learning Library...MMLSpark: Lessons from Building a SparkML-Compatible Machine Learning Library...
MMLSpark: Lessons from Building a SparkML-Compatible Machine Learning Library...
Spark Summit
 
Improving Traffic Prediction Using Weather Datawith Ramya Raghavendra
Improving Traffic Prediction Using Weather Datawith Ramya RaghavendraImproving Traffic Prediction Using Weather Datawith Ramya Raghavendra
Improving Traffic Prediction Using Weather Datawith Ramya Raghavendra
Spark Summit
 
Deduplication and Author-Disambiguation of Streaming Records via Supervised M...
Deduplication and Author-Disambiguation of Streaming Records via Supervised M...Deduplication and Author-Disambiguation of Streaming Records via Supervised M...
Deduplication and Author-Disambiguation of Streaming Records via Supervised M...
Spark Summit
 
MatFast: In-Memory Distributed Matrix Computation Processing and Optimization...
MatFast: In-Memory Distributed Matrix Computation Processing and Optimization...MatFast: In-Memory Distributed Matrix Computation Processing and Optimization...
MatFast: In-Memory Distributed Matrix Computation Processing and Optimization...
Spark Summit
 

Plus de Spark Summit (20)

FPGA-Based Acceleration Architecture for Spark SQL Qi Xie and Quanfu Wang
FPGA-Based Acceleration Architecture for Spark SQL Qi Xie and Quanfu Wang FPGA-Based Acceleration Architecture for Spark SQL Qi Xie and Quanfu Wang
FPGA-Based Acceleration Architecture for Spark SQL Qi Xie and Quanfu Wang
 
VEGAS: The Missing Matplotlib for Scala/Apache Spark with DB Tsai and Roger M...
VEGAS: The Missing Matplotlib for Scala/Apache Spark with DB Tsai and Roger M...VEGAS: The Missing Matplotlib for Scala/Apache Spark with DB Tsai and Roger M...
VEGAS: The Missing Matplotlib for Scala/Apache Spark with DB Tsai and Roger M...
 
Apache Spark Structured Streaming Helps Smart Manufacturing with Xiaochang Wu
Apache Spark Structured Streaming Helps Smart Manufacturing with  Xiaochang WuApache Spark Structured Streaming Helps Smart Manufacturing with  Xiaochang Wu
Apache Spark Structured Streaming Helps Smart Manufacturing with Xiaochang Wu
 
Improving Traffic Prediction Using Weather Data with Ramya Raghavendra
Improving Traffic Prediction Using Weather Data  with Ramya RaghavendraImproving Traffic Prediction Using Weather Data  with Ramya Raghavendra
Improving Traffic Prediction Using Weather Data with Ramya Raghavendra
 
A Tale of Two Graph Frameworks on Spark: GraphFrames and Tinkerpop OLAP Artem...
A Tale of Two Graph Frameworks on Spark: GraphFrames and Tinkerpop OLAP Artem...A Tale of Two Graph Frameworks on Spark: GraphFrames and Tinkerpop OLAP Artem...
A Tale of Two Graph Frameworks on Spark: GraphFrames and Tinkerpop OLAP Artem...
 
No More Cumbersomeness: Automatic Predictive Modeling on Apache Spark Marcin ...
No More Cumbersomeness: Automatic Predictive Modeling on Apache Spark Marcin ...No More Cumbersomeness: Automatic Predictive Modeling on Apache Spark Marcin ...
No More Cumbersomeness: Automatic Predictive Modeling on Apache Spark Marcin ...
 
Apache Spark and Tensorflow as a Service with Jim Dowling
Apache Spark and Tensorflow as a Service with Jim DowlingApache Spark and Tensorflow as a Service with Jim Dowling
Apache Spark and Tensorflow as a Service with Jim Dowling
 
Apache Spark and Tensorflow as a Service with Jim Dowling
Apache Spark and Tensorflow as a Service with Jim DowlingApache Spark and Tensorflow as a Service with Jim Dowling
Apache Spark and Tensorflow as a Service with Jim Dowling
 
MMLSpark: Lessons from Building a SparkML-Compatible Machine Learning Library...
MMLSpark: Lessons from Building a SparkML-Compatible Machine Learning Library...MMLSpark: Lessons from Building a SparkML-Compatible Machine Learning Library...
MMLSpark: Lessons from Building a SparkML-Compatible Machine Learning Library...
 
Next CERN Accelerator Logging Service with Jakub Wozniak
Next CERN Accelerator Logging Service with Jakub WozniakNext CERN Accelerator Logging Service with Jakub Wozniak
Next CERN Accelerator Logging Service with Jakub Wozniak
 
Powering a Startup with Apache Spark with Kevin Kim
Powering a Startup with Apache Spark with Kevin KimPowering a Startup with Apache Spark with Kevin Kim
Powering a Startup with Apache Spark with Kevin Kim
 
Improving Traffic Prediction Using Weather Datawith Ramya Raghavendra
Improving Traffic Prediction Using Weather Datawith Ramya RaghavendraImproving Traffic Prediction Using Weather Datawith Ramya Raghavendra
Improving Traffic Prediction Using Weather Datawith Ramya Raghavendra
 
Hiding Apache Spark Complexity for Fast Prototyping of Big Data Applications—...
Hiding Apache Spark Complexity for Fast Prototyping of Big Data Applications—...Hiding Apache Spark Complexity for Fast Prototyping of Big Data Applications—...
Hiding Apache Spark Complexity for Fast Prototyping of Big Data Applications—...
 
How Nielsen Utilized Databricks for Large-Scale Research and Development with...
How Nielsen Utilized Databricks for Large-Scale Research and Development with...How Nielsen Utilized Databricks for Large-Scale Research and Development with...
How Nielsen Utilized Databricks for Large-Scale Research and Development with...
 
Spline: Apache Spark Lineage not Only for the Banking Industry with Marek Nov...
Spline: Apache Spark Lineage not Only for the Banking Industry with Marek Nov...Spline: Apache Spark Lineage not Only for the Banking Industry with Marek Nov...
Spline: Apache Spark Lineage not Only for the Banking Industry with Marek Nov...
 
Goal Based Data Production with Sim Simeonov
Goal Based Data Production with Sim SimeonovGoal Based Data Production with Sim Simeonov
Goal Based Data Production with Sim Simeonov
 
Preventing Revenue Leakage and Monitoring Distributed Systems with Machine Le...
Preventing Revenue Leakage and Monitoring Distributed Systems with Machine Le...Preventing Revenue Leakage and Monitoring Distributed Systems with Machine Le...
Preventing Revenue Leakage and Monitoring Distributed Systems with Machine Le...
 
Getting Ready to Use Redis with Apache Spark with Dvir Volk
Getting Ready to Use Redis with Apache Spark with Dvir VolkGetting Ready to Use Redis with Apache Spark with Dvir Volk
Getting Ready to Use Redis with Apache Spark with Dvir Volk
 
Deduplication and Author-Disambiguation of Streaming Records via Supervised M...
Deduplication and Author-Disambiguation of Streaming Records via Supervised M...Deduplication and Author-Disambiguation of Streaming Records via Supervised M...
Deduplication and Author-Disambiguation of Streaming Records via Supervised M...
 
MatFast: In-Memory Distributed Matrix Computation Processing and Optimization...
MatFast: In-Memory Distributed Matrix Computation Processing and Optimization...MatFast: In-Memory Distributed Matrix Computation Processing and Optimization...
MatFast: In-Memory Distributed Matrix Computation Processing and Optimization...
 

Dernier

FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
MarinCaroMartnezBerg
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
AroojKhan71
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
shivangimorya083
 
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in  KishangarhDelhi 99530 vip 56974 Genuine Escort Service Call Girls in  Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...
shambhavirathore45
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
shivangimorya083
 

Dernier (20)

Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signals
 
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
 
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxBPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFx
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
 
Zuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptxZuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptx
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
 
Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interaction
 
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightCheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFx
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
 
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in  KishangarhDelhi 99530 vip 56974 Genuine Escort Service Call Girls in  Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
 
Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
 
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfAccredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysis
 

Automatic Features Generation And Model Training On Spark: A Bayesian Approach

  • 1. Automating Data Science on Spark: 
 A Bayesian Approach Vu Pham, Huan Dao, Christopher Nguyen San Francisco, June 8th 2016
  • 4. Agenda @arimoinc 1. For Hyper-parameter Tuning 2. For “Automating” Data Science on Spark 3. Experiments
  • 7. Hyper-parameters @arimoinc K-means K Neural Network # of layers, dropout, momentum… Random Forest Feature set, # of trees, max depth… SVM Regularization term (C) Gradient Descent Learning rate, number of iterations…
  • 11. Hyper-parameters tuning @arimoinc U: S R c U(c) Hyper-parameter Space Performance onValidation Set How to intelligently select the next configuration? (Given the observations in the past) Maximize a utility functions over hyper-parameter space:
  • 13. Bayesian Optimization Explained @arimoinc 1. Incorporate a prior over the space of possible objective functions (GP) 2. Combine the prior with the likelihood to obtain a posterior over function values given observations 3. Select next configuration to evaluate based on the posterior • According to an acquisition function
  • 17. Automatic Data Science Workflow @arimoinc Feature Engineering Model Selection Hyperparameter Tuning
  • 18. Machines doing part of Data Science @arimoinc Dataset Feature preprocessing Data Cleaning Generate new features Feature selection Dimensionality reduction Predictive modeling Scoring
  • 19. A generic Machine Learning pipeline @arimoinc Training set Val/Test set Feature preprocessing Truncated SVD n: # of dims f-score with target variable Keep alpha percents top features K-means k: # of clusters RandomForest #1 number of trees maximum depth percentage of features RandomForest #k … Scoring
  • 20. Spark WorkersSpark Workers Pipeline on DDF and BayesOpt @arimoinc Spark Driver DDF Arimo Pipeline Manager … Client Bayesian Optimizer Client uses Bayesian Optimizer to select the hyper-parameters of the pipeline so that it maximizes the performance on a validation set Spark Workers
  • 21. Pipeline on DDF and BayesOpt @arimoinc train_ddf = session.get_ddf(…) valid_ddf = session.get_ddf(…) optimizer = SpearmintOptimizer(chooser_name=‘GPEIperSecChooser', max_finished_jobs=max_iters, grid_size=5000, ..) best_params, trace = auto_model( optimizer, train_ddf, 'arrdelay', classification=True, excluded_columns=['actualelapsedtime','arrtime', 'year'], validation_ddf=val_ddf)
  • 23. Experiment 1: SF Crimes @arimoinc Dates Category Descript DayOfWeek PdDistrict Resolution Address X Y 2015-05-13 23:53:00 WARRANTS WARRANT ARREST Wednesday NORTHERN ARREST, BOOKED OAK ST / LAGUNA ST -122.4258 37.7745 2015-05-13 23:53:00 OTHER OFFENSES TRAFFICVIOLATION ARREST Wednesday NORTHERN ARREST, BOOKED OAK ST / LAGUNA ST -122.4258 37.7745 2015-05-13 23:33:00 OTHER OFFENSES TRAFFICVIOLATION ARREST Wednesday NORTHERN ARREST, BOOKED VANNESS AV / GREENWICH ST -122.4243 37.8004
  • 24. Experiment 1: SF Crimes dataset @arimoinc Hyper-parameter Type Range Number of hidden layers INT 1, 2, 3 Number of hidden units INT 64, 128, 256 Dropout at the input layer FLOAT [0, 0.5] Dropout at the hidden layers FLOAT [0,0.75] Learning rate FLOAT [0.01, 0.1] L2 Weight decay FLOAT [0, 0.01] Logloss on the validation set Running time (hours) ~ 40 iterations
  • 25. Experiment 1: SF Crimes dataset @arimoinc Hyper-parameter Type Range Spearmint Number of hidden layers INT 1, 2, 3 2 Number of hidden units INT 64, 128, 256 256 Dropout at the input layer FLOAT [0, 0.5] 0.423678 Dropout at the hidden layers FLOAT [0,0.75] 0.091693 Learning rate FLOAT [0.01, 0.1] 0.025994 L2 Weight decay FLOAT [0, 0.01] 0.00238 Logloss on the validation set 2.1502 Running time (hours) ~ 40 iterations 15.8
  • 26. Experiment 1: SF Crimes dataset @arimoinc 2.149 2.152 2.155 2.157 2.16 1 7 17 18 39 2.1600 2.1555 2.1552 2.1551 2.1519 2.1502 Completed jobs 1 7 16 17 18 39 Elapsed time 1021 8003 12742 1623 1983 31561 Number of layers 1 3 3 2 3 2 Hidden units 64 256 256 256 256 256 Learning rate 0.01 0.1 0.01 0.01 0.021 0.026 Input dropout 0 0.5 0.5 0.463 0.5 0.424 Hidden dropout 0 0 0 0.024 0.089 0.092 Weight decay 0 0 0.002 0.003 0 0.002
  • 27. Experiment #1: With SigOpt @arimoinc Hyper-parameter Type Range Spearmint Number of hidden layers INT 1, 2, 3 2 3 Number of hidden units INT 64, 128, 256 256 256 Dropout at the input layer FLOAT [0, 0.5] 0.423678 0.3141 Dropout at the hidden layers FLOAT [0,0.75] 0.091693 0.0944 Learning rate FLOAT [0.01, 0.1] 0.025994 0.0979 L2 Weight decay FLOAT [0, 0.01] 0.00238 0.0039 Logloss on the validation set 2.1502 2.14892 Running time (hours) ~ 40 iterations 15.8 20.1
  • 28. SF Crimes - Time to results @arimoinc
  • 29. Experiment #2: Airlines data @arimoinc Year 1987-2008 DepDelay departure delay, in minutes Month 1-12 Origin origin IATA airport code DayofMonth 1-31 Dest destination IATA airport code DayOfWeek 1 (Monday) - 7 (Sunday) Distance in miles DepTime actual departure time TaxiIn taxi in time, in minutes CRSDepTime scheduled departure time TaxiOut taxi out time in minutes ArrTime actual arrival time Cancelled was the flight cancelled? CRSArrTime scheduled arrival time CancellationCode reason for cancellation UniqueCarrier unique carrier code Diverted 1 = yes, 0 = no FlightNum flight number CarrierDelay in minutes TailNum plane tail number WeatherDelay in minutes ActualElapsedTime in minutes NASDelay in minutes CRSElapsedTime in minutes SecurityDelay in minutes AirTime in minutes LateAircraftDelay in minutes ArrDelay arrival delay, in minutes Delayed Is the flight delayed
  • 30. Experiment #2 @arimoinc Training set Val/Test set Feature preprocessing ~900 features Truncated SVD n: # of dims f-score with target variable Keep alpha percents top features K-means k: # of clusters RandomForest #1 number of trees maximum depth percentage of features RandomForest #k … Scoring
  • 31. Experiment #2: Hyper-parameters @arimoinc Hyperparameter Type Range BayesOpt Number of SVD dimensions INT [5, 100] 98 Top feature percentage FLOAT [0.1, 1] 0.8258 k (# of clusters) INT [1, 6] 2 Number of trees (RF) INT [50, 500] 327 Max. depth (RF) INT [1, 20] 12 Min. instances per node (RF) INT [1, 1000] 414 F1-score on validation set 0.8736
  • 32. Summary @arimoinc 1. Bayesian Optimization for Hyper-parameter Tuning 2. Bayesian Optimization for 
 “Automating” Data Science on Spark 3. Experiments
  • 33. Getting Started @arimoinc • Blogpost: http://goo.gl/PFyBKI • Open-source: spearmint, hyperopt, SMAC, AutoML • Commercial: Whetlab, SigOpt, …