SlideShare une entreprise Scribd logo
1  sur  24
Télécharger pour lire hors ligne
Basic WhizzML Workflows
The BigML Team
May 2016
The BigML Team Basic WhizzML Workflows May 2016 1 / 24
Outline
1 What is WhizzML?
2 WhizzML Server-side Resources
3 WhizzML Language Basics
4 Standard Library Overview
5 Tutorial Walkthrough: Model or Ensemble?
The BigML Team Basic WhizzML Workflows May 2016 2 / 24
Outline
1 What is WhizzML?
2 WhizzML Server-side Resources
3 WhizzML Language Basics
4 Standard Library Overview
5 Tutorial Walkthrough: Model or Ensemble?
The BigML Team Basic WhizzML Workflows May 2016 3 / 24
WhizzML in a Nutshell
• Domain-specific language for ML workflow automation
High-level problem and solution specification
• Framework for scalable, remote execution of ML workflows
Sophisticated server-side optimization
Out-of-the-box scalability
Client-server brittleness removed
Infrastructure for creating and sharing ML scripts and libraries
The BigML Team Basic WhizzML Workflows May 2016 4 / 24
Outline
1 What is WhizzML?
2 WhizzML Server-side Resources
3 WhizzML Language Basics
4 Standard Library Overview
5 Tutorial Walkthrough: Model or Ensemble?
The BigML Team Basic WhizzML Workflows May 2016 5 / 24
WhizzML REST Resources
Library Reusable building-block: a collection of
WhizzML definitions that can be imported by
other libraries or scripts.
Script Executable code that describes an actual
workflow.
• Imports List of libraries with code used by
the script.
• Inputs List of input values that
parameterize the workflow.
• Outputs List of values computed by the
script and returned to the user.
Execution Given a script and a complete set of inputs,
the workflow can be executed and its outputs
generated.
The BigML Team Basic WhizzML Workflows May 2016 6 / 24
Outline
1 What is WhizzML?
2 WhizzML Server-side Resources
3 WhizzML Language Basics
4 Standard Library Overview
5 Tutorial Walkthrough: Model or Ensemble?
The BigML Team Basic WhizzML Workflows May 2016 7 / 24
Basic Syntax
Atomic constants
"a string value"
23, -10, -1.23E11, 1.42342
true, false
Fully parenthesized prefix notation
(list-sources) ;; Function call without arguments
(log-info "Hello World!")
(* 2 (+ 2 3)) ;; Evaluates to 2 * (2 + 3)
(atan (tan 3)) ;; Nested function calls
The BigML Team Basic WhizzML Workflows May 2016 8 / 24
Variables
Names
dataset_id
date-of-birth
sources*
positive?
x, y
Definition
(define name "Arthur Samuel")
(define birth-year 1901)
(define age (- 2016 birth-year))
The BigML Team Basic WhizzML Workflows May 2016 9 / 24
Composite Values: Lists
Literals
[1.2 2.3 3.4]
["red" "blue" "orange" "yellow"]
[[1 2] "this" 3]
[] ;; the empty list
Constructors and accessors
(list 1 (+ 1 1) (* 3 2)) ;; => [1 2 6]
(append [1 2 3] 4) ;; => [1 2 3 4]
(head [1 2 3]) ;; => 1
(tail [1 2 3]) ;; => [2 3]
(nth ["a" "b" [1 2]] 1) ;; => "b"
The BigML Team Basic WhizzML Workflows May 2016 10 / 24
Composite Values: Maps
Literals
{"name" "John"
"married" true
"date-of-birth" 1901}
{"source" "source/122323445445565665"
"input_fields" ["000000" "000001" "000003"]
"sample" {"rate" 0.3}}
Constructors and accessors
(assoc {"a" 3} "b" 4 "c" 5) ;; => {"a" 3 "b" 4 "c" 5}
(dissoc {"a" 3 "b" "c"} "b") ;; => {"a" 3}
(get {"a" 1 "b" 2} "a") ;; => 1
(get {"a" 1 "b" 2} "non-existent-key") ;; => false
(get {"a" 1 "b" 2} "non-existent-key" 42) ;; => 42
(get-in {"a" {"b" 2 "c" {"d" 42}}} ["a" "c" "d"]) ;; => 42
The BigML Team Basic WhizzML Workflows May 2016 11 / 24
Functions
Defining a function
(define (function-name arg1 arg2 ...)
body)
Examples
(define (add-numbers x y)
(+ x y))
(define (create-model-and-ensemble dataset-id)
(create-model {"dataset" dataset-id})
(create-ensemble {"dataset" dataset-id
"number_of_models" 10}))
The BigML Team Basic WhizzML Workflows May 2016 12 / 24
Local variables
Let bindings
(let (name-1 val-1
name-2 val-2
...)
body)
Example:
(define no-of-models 10)
(let (msg "I am creating "
id "dataset/570861ecb85eee0472000016")
;; here msg, id and no-of-models are bound
(log-info msg no-of-models)
(create-ensemble {"dataset" id
"number_of_models" no-of-models}))
;;; here msg and id are *not* bound
The BigML Team Basic WhizzML Workflows May 2016 13 / 24
Conditionals
if
(if (> x 0) ;; condition
"x is positive" ;; consequent
"x is not positive") ;; alternative
when
(when (positive? n)
(log-info "Creating a few models...")
(create-lots-of-models n))
The BigML Team Basic WhizzML Workflows May 2016 14 / 24
Conditionals
cond
;; Nested conditionals
(if (> x 3)
"big"
(if (< x 1)
"small"
"standard"))
;; are better with cond:
(cond (> x 3) "big"
(< x 1) "small"
"standard")
The BigML Team Basic WhizzML Workflows May 2016 15 / 24
Error handling
Signaling errors
(raise {"message" "Division by zero" "code" -10})
Catching errors
(try (/ 42 x)
(catch e
(log-warn "I've got an error with message: "
(get e "message")
" and code "
(get e "code"))))
The BigML Team Basic WhizzML Workflows May 2016 16 / 24
Demo: a simple script
Create dataset and return its row number
(define (make-dataset id name)
(let (ds-id (create-and-wait-dataset {"source" id
"name" name}))
(fetch ds-id)))
(define dataset (make-dataset source-id source-name))
(define dataset-id (get dataset "resource"))
(define rows (get dataset "rows"))
https://gist.github.com/whizzmler/917a05cf6c173381116e3cc02da70e42
The BigML Team Basic WhizzML Workflows May 2016 17 / 24
Outline
1 What is WhizzML?
2 WhizzML Server-side Resources
3 WhizzML Language Basics
4 Standard Library Overview
5 Tutorial Walkthrough: Model or Ensemble?
The BigML Team Basic WhizzML Workflows May 2016 18 / 24
Standard functions
• Numeric and relational operators (+, *, <, =, ...)
• Mathematical functions (cos, sinh, floor ...)
• Strings and regular expressions (str, matches?, replace, ...)
• Flatline generation
• Collections: list traversal, sorting, map manipulation
• BigML resources manipulation
Creation create-source, create-and-wait-dataset, etc.
Retrieval fetch, list-anomalies, etc.
Update update
Deletion delete
• Machine Learning Algorithms (SMACDown, Boosting, etc.)
The BigML Team Basic WhizzML Workflows May 2016 19 / 24
Outline
1 What is WhizzML?
2 WhizzML Server-side Resources
3 WhizzML Language Basics
4 Standard Library Overview
5 Tutorial Walkthrough: Model or Ensemble?
The BigML Team Basic WhizzML Workflows May 2016 20 / 24
Model or Ensemble?
• Split a dataset in test and training parts
• Create a model and an ensemble with the training dataset
• Evaluate both with the test dataset
• Choose the one with better evaluation (f-measure)
https://github.com/whizzml/examples/tree/master/model-or-ensemble
The BigML Team Basic WhizzML Workflows May 2016 21 / 24
Model or Ensemble?
;; Functions for creating the two dataset parts
;; and the model and ensemble from the training set.
(define (sample-dataset ds-id rate oob)
(create-and-wait-dataset {"sample_rate" rate
"origin_dataset" ds-id
"out_of_bag" oob
"seed" "whizzml-example"}))
(define (split-dataset ds-id rate)
(list (sample-dataset ds-id rate false)
(sample-dataset ds-id rate true)))
(define (make-model ds-id)
(create-and-wait-model {"dataset" ds-id}))
(define (make-ensemble ds-id size)
(create-and-wait-ensemble {"dataset" ds-id
"number_of_models" size}))
The BigML Team Basic WhizzML Workflows May 2016 22 / 24
Model or Ensemble?
;; Functions for evaluating model and ensemble
;; using the test set, and to extract f-measure from
;; the evaluation results
(define (evaluate-model model-id ds-id)
(create-and-wait-evaluation {"model" model-id
"dataset" ds-id}))
(define (evaluate-ensemble model-id ds-id)
(create-and-wait-evaluation {"ensemble" model-id
"dataset" ds-id}))
(define (f-measure ev-id)
(get-in (fetch ev-id) ["result" "model" "average_f_measure"]))
The BigML Team Basic WhizzML Workflows May 2016 23 / 24
Model or Ensemble?
;; Function encapsulating the full workflow
(define (model-or-ensemble src-id)
(let (ds-id (create-and-wait-dataset {"source" src-id})
;; ^ full dataset
ids (split-dataset ds-id 0.8) ;; split it 80/20
train-id (nth ids 0) ;; the 80% for training
test-id (nth ids 1) ;; and 20% for evaluations
m-id (make-model train-id) ;; create a model
e-id (make-ensemble train-id 15) ;; and an ensemble
m-f (f-measure (evaluate-model m-id test-id)) ;; evaluate
e-f (f-measure (evaluate-ensemble e-id test-id)))
(log-info "model f " m-f " / ensemble f " e-f)
(if (> m-f e-f) m-id e-id)))
;; Compute the result of the script execution
;; - Inputs: [{"name": "input-source-id", "type": "source-id"}]
;; - Outputs: [{"name": "result", "type": "resource-id"}]
(define result (model-or-ensemble input-source-id))
The BigML Team Basic WhizzML Workflows May 2016 24 / 24

Contenu connexe

Tendances

Data profiling with Apache Calcite
Data profiling with Apache CalciteData profiling with Apache Calcite
Data profiling with Apache CalciteJulian Hyde
 
Python for R developers and data scientists
Python for R developers and data scientistsPython for R developers and data scientists
Python for R developers and data scientistsLambda Tree
 
Is there a perfect data-parallel programming language? (Experiments with More...
Is there a perfect data-parallel programming language? (Experiments with More...Is there a perfect data-parallel programming language? (Experiments with More...
Is there a perfect data-parallel programming language? (Experiments with More...Julian Hyde
 
GreenDao Introduction
GreenDao IntroductionGreenDao Introduction
GreenDao IntroductionBooch Lin
 
Java & OOP Core Concept
Java & OOP Core ConceptJava & OOP Core Concept
Java & OOP Core ConceptPin-Lun Huang
 
Using xUnit as a Swiss-Aarmy Testing Toolkit
Using xUnit as a Swiss-Aarmy Testing ToolkitUsing xUnit as a Swiss-Aarmy Testing Toolkit
Using xUnit as a Swiss-Aarmy Testing ToolkitChris Oldwood
 
Fast querying indexing for performance (4)
Fast querying   indexing for performance (4)Fast querying   indexing for performance (4)
Fast querying indexing for performance (4)MongoDB
 
SparkSQL and Dataframe
SparkSQL and DataframeSparkSQL and Dataframe
SparkSQL and DataframeNamgee Lee
 
Big Data Day LA 2016/ Hadoop/ Spark/ Kafka track - Iterative Spark Developmen...
Big Data Day LA 2016/ Hadoop/ Spark/ Kafka track - Iterative Spark Developmen...Big Data Day LA 2016/ Hadoop/ Spark/ Kafka track - Iterative Spark Developmen...
Big Data Day LA 2016/ Hadoop/ Spark/ Kafka track - Iterative Spark Developmen...Data Con LA
 
The Very ^ 2 Basics of R
The Very ^ 2 Basics of RThe Very ^ 2 Basics of R
The Very ^ 2 Basics of RWinston Chen
 
Joining the Club: Using Spark to Accelerate Big Data at Dollar Shave Club
Joining the Club: Using Spark to Accelerate Big Data at Dollar Shave ClubJoining the Club: Using Spark to Accelerate Big Data at Dollar Shave Club
Joining the Club: Using Spark to Accelerate Big Data at Dollar Shave ClubData Con LA
 
R statistics with mongo db
R statistics with mongo dbR statistics with mongo db
R statistics with mongo dbMongoDB
 
ComputeFest 2012: Intro To R for Physical Sciences
ComputeFest 2012: Intro To R for Physical SciencesComputeFest 2012: Intro To R for Physical Sciences
ComputeFest 2012: Intro To R for Physical Sciencesalexstorer
 

Tendances (19)

Data profiling with Apache Calcite
Data profiling with Apache CalciteData profiling with Apache Calcite
Data profiling with Apache Calcite
 
Ahda exploration
Ahda explorationAhda exploration
Ahda exploration
 
Python for R developers and data scientists
Python for R developers and data scientistsPython for R developers and data scientists
Python for R developers and data scientists
 
02 stackqueue
02 stackqueue02 stackqueue
02 stackqueue
 
Is there a perfect data-parallel programming language? (Experiments with More...
Is there a perfect data-parallel programming language? (Experiments with More...Is there a perfect data-parallel programming language? (Experiments with More...
Is there a perfect data-parallel programming language? (Experiments with More...
 
Meet scala
Meet scalaMeet scala
Meet scala
 
GreenDao Introduction
GreenDao IntroductionGreenDao Introduction
GreenDao Introduction
 
Java 8 monads
Java 8   monadsJava 8   monads
Java 8 monads
 
Java & OOP Core Concept
Java & OOP Core ConceptJava & OOP Core Concept
Java & OOP Core Concept
 
Using xUnit as a Swiss-Aarmy Testing Toolkit
Using xUnit as a Swiss-Aarmy Testing ToolkitUsing xUnit as a Swiss-Aarmy Testing Toolkit
Using xUnit as a Swiss-Aarmy Testing Toolkit
 
D3.js workshop
D3.js workshopD3.js workshop
D3.js workshop
 
Fast querying indexing for performance (4)
Fast querying   indexing for performance (4)Fast querying   indexing for performance (4)
Fast querying indexing for performance (4)
 
SparkSQL and Dataframe
SparkSQL and DataframeSparkSQL and Dataframe
SparkSQL and Dataframe
 
Big Data Day LA 2016/ Hadoop/ Spark/ Kafka track - Iterative Spark Developmen...
Big Data Day LA 2016/ Hadoop/ Spark/ Kafka track - Iterative Spark Developmen...Big Data Day LA 2016/ Hadoop/ Spark/ Kafka track - Iterative Spark Developmen...
Big Data Day LA 2016/ Hadoop/ Spark/ Kafka track - Iterative Spark Developmen...
 
The Very ^ 2 Basics of R
The Very ^ 2 Basics of RThe Very ^ 2 Basics of R
The Very ^ 2 Basics of R
 
Joining the Club: Using Spark to Accelerate Big Data at Dollar Shave Club
Joining the Club: Using Spark to Accelerate Big Data at Dollar Shave ClubJoining the Club: Using Spark to Accelerate Big Data at Dollar Shave Club
Joining the Club: Using Spark to Accelerate Big Data at Dollar Shave Club
 
Green dao
Green daoGreen dao
Green dao
 
R statistics with mongo db
R statistics with mongo dbR statistics with mongo db
R statistics with mongo db
 
ComputeFest 2012: Intro To R for Physical Sciences
ComputeFest 2012: Intro To R for Physical SciencesComputeFest 2012: Intro To R for Physical Sciences
ComputeFest 2012: Intro To R for Physical Sciences
 

En vedette

Thinking of getting a breast reduction here are some pros and cons
Thinking of getting a breast reduction here are some pros and consThinking of getting a breast reduction here are some pros and cons
Thinking of getting a breast reduction here are some pros and consHealth First
 
The natural story new 4 d motion vibration cleanser with free shipping
The natural story new 4 d motion vibration cleanser with free shippingThe natural story new 4 d motion vibration cleanser with free shipping
The natural story new 4 d motion vibration cleanser with free shippingtradeacoglobal
 
Flu season means urgent care season!
Flu season means urgent care season!Flu season means urgent care season!
Flu season means urgent care season!Health First
 
FINAL DISSERTATION (optimised)
FINAL DISSERTATION (optimised)FINAL DISSERTATION (optimised)
FINAL DISSERTATION (optimised)Jessica Smith
 
Essaying the past chapter 1
Essaying the past chapter 1Essaying the past chapter 1
Essaying the past chapter 1Lingbai Hu
 
Astrinidis Vangelis Indicative Projects
Astrinidis Vangelis Indicative ProjectsAstrinidis Vangelis Indicative Projects
Astrinidis Vangelis Indicative Projectsvangelis astrinidis
 
Get shop.tv шариф кармо 2016
Get shop.tv  шариф кармо 2016Get shop.tv  шариф кармо 2016
Get shop.tv шариф кармо 2016RedLamp Accelerate
 

En vedette (9)

Hábitos deportivos
Hábitos deportivosHábitos deportivos
Hábitos deportivos
 
Thinking of getting a breast reduction here are some pros and cons
Thinking of getting a breast reduction here are some pros and consThinking of getting a breast reduction here are some pros and cons
Thinking of getting a breast reduction here are some pros and cons
 
The natural story new 4 d motion vibration cleanser with free shipping
The natural story new 4 d motion vibration cleanser with free shippingThe natural story new 4 d motion vibration cleanser with free shipping
The natural story new 4 d motion vibration cleanser with free shipping
 
Flu season means urgent care season!
Flu season means urgent care season!Flu season means urgent care season!
Flu season means urgent care season!
 
FINAL DISSERTATION (optimised)
FINAL DISSERTATION (optimised)FINAL DISSERTATION (optimised)
FINAL DISSERTATION (optimised)
 
Essaying the past chapter 1
Essaying the past chapter 1Essaying the past chapter 1
Essaying the past chapter 1
 
Astrinidis Vangelis Indicative Projects
Astrinidis Vangelis Indicative ProjectsAstrinidis Vangelis Indicative Projects
Astrinidis Vangelis Indicative Projects
 
Get shop.tv шариф кармо 2016
Get shop.tv  шариф кармо 2016Get shop.tv  шариф кармо 2016
Get shop.tv шариф кармо 2016
 
Tarea de tecnologia
Tarea de tecnologiaTarea de tecnologia
Tarea de tecnologia
 

Similaire à Basic WhizzML Workflows

Advanced WhizzML Workflows
Advanced WhizzML WorkflowsAdvanced WhizzML Workflows
Advanced WhizzML WorkflowsBigML, Inc
 
Intermediate WhizzML Workflows
Intermediate WhizzML WorkflowsIntermediate WhizzML Workflows
Intermediate WhizzML WorkflowsBigML, Inc
 
BSSML16 L9. Advanced Workflows: Feature Selection, Boosting, Gradient Descent...
BSSML16 L9. Advanced Workflows: Feature Selection, Boosting, Gradient Descent...BSSML16 L9. Advanced Workflows: Feature Selection, Boosting, Gradient Descent...
BSSML16 L9. Advanced Workflows: Feature Selection, Boosting, Gradient Descent...BigML, Inc
 
VSSML16 L8. Advanced Workflows: Feature Selection, Boosting, Gradient Descent...
VSSML16 L8. Advanced Workflows: Feature Selection, Boosting, Gradient Descent...VSSML16 L8. Advanced Workflows: Feature Selection, Boosting, Gradient Descent...
VSSML16 L8. Advanced Workflows: Feature Selection, Boosting, Gradient Descent...BigML, Inc
 
VSSML18. Introduction to WhizzML
VSSML18. Introduction to WhizzMLVSSML18. Introduction to WhizzML
VSSML18. Introduction to WhizzMLBigML, Inc
 
Java/Scala Lab: Борис Трофимов - Обжигающая Big Data.
Java/Scala Lab: Борис Трофимов - Обжигающая Big Data.Java/Scala Lab: Борис Трофимов - Обжигающая Big Data.
Java/Scala Lab: Борис Трофимов - Обжигающая Big Data.GeeksLab Odessa
 
Cascading Through Hadoop for the Boulder JUG
Cascading Through Hadoop for the Boulder JUGCascading Through Hadoop for the Boulder JUG
Cascading Through Hadoop for the Boulder JUGMatthew McCullough
 
Cb15 presentation-yingyi
Cb15 presentation-yingyiCb15 presentation-yingyi
Cb15 presentation-yingyiYingyi Bu
 
AI與大數據數據處理 Spark實戰(20171216)
AI與大數據數據處理 Spark實戰(20171216)AI與大數據數據處理 Spark實戰(20171216)
AI與大數據數據處理 Spark實戰(20171216)Paul Chao
 
.gradle 파일 정독해보기
.gradle 파일 정독해보기.gradle 파일 정독해보기
.gradle 파일 정독해보기경주 전
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBantoinegirbal
 
2011 Mongo FR - MongoDB introduction
2011 Mongo FR - MongoDB introduction2011 Mongo FR - MongoDB introduction
2011 Mongo FR - MongoDB introductionantoinegirbal
 
Data science and OSS
Data science and OSSData science and OSS
Data science and OSSKevin Crocker
 
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...Data Con LA
 
Smoothing Your Java with DSLs
Smoothing Your Java with DSLsSmoothing Your Java with DSLs
Smoothing Your Java with DSLsintelliyole
 
Raquel Guimaraes- Third party infrastructure as code
Raquel Guimaraes-  Third party infrastructure as codeRaquel Guimaraes-  Third party infrastructure as code
Raquel Guimaraes- Third party infrastructure as codeThoughtworks
 
Haxe for Flash Platform developer
Haxe for Flash Platform developerHaxe for Flash Platform developer
Haxe for Flash Platform developermatterhaxe
 

Similaire à Basic WhizzML Workflows (20)

Advanced WhizzML Workflows
Advanced WhizzML WorkflowsAdvanced WhizzML Workflows
Advanced WhizzML Workflows
 
Intermediate WhizzML Workflows
Intermediate WhizzML WorkflowsIntermediate WhizzML Workflows
Intermediate WhizzML Workflows
 
BSSML16 L9. Advanced Workflows: Feature Selection, Boosting, Gradient Descent...
BSSML16 L9. Advanced Workflows: Feature Selection, Boosting, Gradient Descent...BSSML16 L9. Advanced Workflows: Feature Selection, Boosting, Gradient Descent...
BSSML16 L9. Advanced Workflows: Feature Selection, Boosting, Gradient Descent...
 
VSSML16 L8. Advanced Workflows: Feature Selection, Boosting, Gradient Descent...
VSSML16 L8. Advanced Workflows: Feature Selection, Boosting, Gradient Descent...VSSML16 L8. Advanced Workflows: Feature Selection, Boosting, Gradient Descent...
VSSML16 L8. Advanced Workflows: Feature Selection, Boosting, Gradient Descent...
 
VSSML18. Introduction to WhizzML
VSSML18. Introduction to WhizzMLVSSML18. Introduction to WhizzML
VSSML18. Introduction to WhizzML
 
Java/Scala Lab: Борис Трофимов - Обжигающая Big Data.
Java/Scala Lab: Борис Трофимов - Обжигающая Big Data.Java/Scala Lab: Борис Трофимов - Обжигающая Big Data.
Java/Scala Lab: Борис Трофимов - Обжигающая Big Data.
 
Cascading Through Hadoop for the Boulder JUG
Cascading Through Hadoop for the Boulder JUGCascading Through Hadoop for the Boulder JUG
Cascading Through Hadoop for the Boulder JUG
 
Cb15 presentation-yingyi
Cb15 presentation-yingyiCb15 presentation-yingyi
Cb15 presentation-yingyi
 
AI與大數據數據處理 Spark實戰(20171216)
AI與大數據數據處理 Spark實戰(20171216)AI與大數據數據處理 Spark實戰(20171216)
AI與大數據數據處理 Spark實戰(20171216)
 
.gradle 파일 정독해보기
.gradle 파일 정독해보기.gradle 파일 정독해보기
.gradle 파일 정독해보기
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
2011 Mongo FR - MongoDB introduction
2011 Mongo FR - MongoDB introduction2011 Mongo FR - MongoDB introduction
2011 Mongo FR - MongoDB introduction
 
MongoDB 3.0
MongoDB 3.0 MongoDB 3.0
MongoDB 3.0
 
Data science and OSS
Data science and OSSData science and OSS
Data science and OSS
 
Cubes 1.0 Overview
Cubes 1.0 OverviewCubes 1.0 Overview
Cubes 1.0 Overview
 
PHP - Intriduction to MySQL And PHP
PHP - Intriduction to MySQL And PHPPHP - Intriduction to MySQL And PHP
PHP - Intriduction to MySQL And PHP
 
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
 
Smoothing Your Java with DSLs
Smoothing Your Java with DSLsSmoothing Your Java with DSLs
Smoothing Your Java with DSLs
 
Raquel Guimaraes- Third party infrastructure as code
Raquel Guimaraes-  Third party infrastructure as codeRaquel Guimaraes-  Third party infrastructure as code
Raquel Guimaraes- Third party infrastructure as code
 
Haxe for Flash Platform developer
Haxe for Flash Platform developerHaxe for Flash Platform developer
Haxe for Flash Platform developer
 

Dernier

➥🔝 7737669865 🔝▻ Bangalore Call-girls in Women Seeking Men 🔝Bangalore🔝 Esc...
➥🔝 7737669865 🔝▻ Bangalore Call-girls in Women Seeking Men  🔝Bangalore🔝   Esc...➥🔝 7737669865 🔝▻ Bangalore Call-girls in Women Seeking Men  🔝Bangalore🔝   Esc...
➥🔝 7737669865 🔝▻ Bangalore Call-girls in Women Seeking Men 🔝Bangalore🔝 Esc...amitlee9823
 
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 Analysismanisha194592
 
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...amitlee9823
 
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...karishmasinghjnh
 
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...amitlee9823
 
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...amitlee9823
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxolyaivanovalion
 
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...Delhi Call girls
 
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...Valters Lauzums
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...amitlee9823
 
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 ServiceDelhi Call girls
 
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...amitlee9823
 
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 nightDelhi Call girls
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...amitlee9823
 
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night StandCall Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -Pooja Nehwal
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...amitlee9823
 

Dernier (20)

➥🔝 7737669865 🔝▻ Bangalore Call-girls in Women Seeking Men 🔝Bangalore🔝 Esc...
➥🔝 7737669865 🔝▻ Bangalore Call-girls in Women Seeking Men  🔝Bangalore🔝   Esc...➥🔝 7737669865 🔝▻ Bangalore Call-girls in Women Seeking Men  🔝Bangalore🔝   Esc...
➥🔝 7737669865 🔝▻ Bangalore Call-girls in Women Seeking Men 🔝Bangalore🔝 Esc...
 
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
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
 
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
 
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
 
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
 
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
 
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFx
 
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...
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
 
Anomaly detection and data imputation within time series
Anomaly detection and data imputation within time seriesAnomaly detection and data imputation within time series
Anomaly detection and data imputation within time series
 
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
 
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...
 
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
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
 
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night StandCall Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
 
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 

Basic WhizzML Workflows

  • 1. Basic WhizzML Workflows The BigML Team May 2016 The BigML Team Basic WhizzML Workflows May 2016 1 / 24
  • 2. Outline 1 What is WhizzML? 2 WhizzML Server-side Resources 3 WhizzML Language Basics 4 Standard Library Overview 5 Tutorial Walkthrough: Model or Ensemble? The BigML Team Basic WhizzML Workflows May 2016 2 / 24
  • 3. Outline 1 What is WhizzML? 2 WhizzML Server-side Resources 3 WhizzML Language Basics 4 Standard Library Overview 5 Tutorial Walkthrough: Model or Ensemble? The BigML Team Basic WhizzML Workflows May 2016 3 / 24
  • 4. WhizzML in a Nutshell • Domain-specific language for ML workflow automation High-level problem and solution specification • Framework for scalable, remote execution of ML workflows Sophisticated server-side optimization Out-of-the-box scalability Client-server brittleness removed Infrastructure for creating and sharing ML scripts and libraries The BigML Team Basic WhizzML Workflows May 2016 4 / 24
  • 5. Outline 1 What is WhizzML? 2 WhizzML Server-side Resources 3 WhizzML Language Basics 4 Standard Library Overview 5 Tutorial Walkthrough: Model or Ensemble? The BigML Team Basic WhizzML Workflows May 2016 5 / 24
  • 6. WhizzML REST Resources Library Reusable building-block: a collection of WhizzML definitions that can be imported by other libraries or scripts. Script Executable code that describes an actual workflow. • Imports List of libraries with code used by the script. • Inputs List of input values that parameterize the workflow. • Outputs List of values computed by the script and returned to the user. Execution Given a script and a complete set of inputs, the workflow can be executed and its outputs generated. The BigML Team Basic WhizzML Workflows May 2016 6 / 24
  • 7. Outline 1 What is WhizzML? 2 WhizzML Server-side Resources 3 WhizzML Language Basics 4 Standard Library Overview 5 Tutorial Walkthrough: Model or Ensemble? The BigML Team Basic WhizzML Workflows May 2016 7 / 24
  • 8. Basic Syntax Atomic constants "a string value" 23, -10, -1.23E11, 1.42342 true, false Fully parenthesized prefix notation (list-sources) ;; Function call without arguments (log-info "Hello World!") (* 2 (+ 2 3)) ;; Evaluates to 2 * (2 + 3) (atan (tan 3)) ;; Nested function calls The BigML Team Basic WhizzML Workflows May 2016 8 / 24
  • 9. Variables Names dataset_id date-of-birth sources* positive? x, y Definition (define name "Arthur Samuel") (define birth-year 1901) (define age (- 2016 birth-year)) The BigML Team Basic WhizzML Workflows May 2016 9 / 24
  • 10. Composite Values: Lists Literals [1.2 2.3 3.4] ["red" "blue" "orange" "yellow"] [[1 2] "this" 3] [] ;; the empty list Constructors and accessors (list 1 (+ 1 1) (* 3 2)) ;; => [1 2 6] (append [1 2 3] 4) ;; => [1 2 3 4] (head [1 2 3]) ;; => 1 (tail [1 2 3]) ;; => [2 3] (nth ["a" "b" [1 2]] 1) ;; => "b" The BigML Team Basic WhizzML Workflows May 2016 10 / 24
  • 11. Composite Values: Maps Literals {"name" "John" "married" true "date-of-birth" 1901} {"source" "source/122323445445565665" "input_fields" ["000000" "000001" "000003"] "sample" {"rate" 0.3}} Constructors and accessors (assoc {"a" 3} "b" 4 "c" 5) ;; => {"a" 3 "b" 4 "c" 5} (dissoc {"a" 3 "b" "c"} "b") ;; => {"a" 3} (get {"a" 1 "b" 2} "a") ;; => 1 (get {"a" 1 "b" 2} "non-existent-key") ;; => false (get {"a" 1 "b" 2} "non-existent-key" 42) ;; => 42 (get-in {"a" {"b" 2 "c" {"d" 42}}} ["a" "c" "d"]) ;; => 42 The BigML Team Basic WhizzML Workflows May 2016 11 / 24
  • 12. Functions Defining a function (define (function-name arg1 arg2 ...) body) Examples (define (add-numbers x y) (+ x y)) (define (create-model-and-ensemble dataset-id) (create-model {"dataset" dataset-id}) (create-ensemble {"dataset" dataset-id "number_of_models" 10})) The BigML Team Basic WhizzML Workflows May 2016 12 / 24
  • 13. Local variables Let bindings (let (name-1 val-1 name-2 val-2 ...) body) Example: (define no-of-models 10) (let (msg "I am creating " id "dataset/570861ecb85eee0472000016") ;; here msg, id and no-of-models are bound (log-info msg no-of-models) (create-ensemble {"dataset" id "number_of_models" no-of-models})) ;;; here msg and id are *not* bound The BigML Team Basic WhizzML Workflows May 2016 13 / 24
  • 14. Conditionals if (if (> x 0) ;; condition "x is positive" ;; consequent "x is not positive") ;; alternative when (when (positive? n) (log-info "Creating a few models...") (create-lots-of-models n)) The BigML Team Basic WhizzML Workflows May 2016 14 / 24
  • 15. Conditionals cond ;; Nested conditionals (if (> x 3) "big" (if (< x 1) "small" "standard")) ;; are better with cond: (cond (> x 3) "big" (< x 1) "small" "standard") The BigML Team Basic WhizzML Workflows May 2016 15 / 24
  • 16. Error handling Signaling errors (raise {"message" "Division by zero" "code" -10}) Catching errors (try (/ 42 x) (catch e (log-warn "I've got an error with message: " (get e "message") " and code " (get e "code")))) The BigML Team Basic WhizzML Workflows May 2016 16 / 24
  • 17. Demo: a simple script Create dataset and return its row number (define (make-dataset id name) (let (ds-id (create-and-wait-dataset {"source" id "name" name})) (fetch ds-id))) (define dataset (make-dataset source-id source-name)) (define dataset-id (get dataset "resource")) (define rows (get dataset "rows")) https://gist.github.com/whizzmler/917a05cf6c173381116e3cc02da70e42 The BigML Team Basic WhizzML Workflows May 2016 17 / 24
  • 18. Outline 1 What is WhizzML? 2 WhizzML Server-side Resources 3 WhizzML Language Basics 4 Standard Library Overview 5 Tutorial Walkthrough: Model or Ensemble? The BigML Team Basic WhizzML Workflows May 2016 18 / 24
  • 19. Standard functions • Numeric and relational operators (+, *, <, =, ...) • Mathematical functions (cos, sinh, floor ...) • Strings and regular expressions (str, matches?, replace, ...) • Flatline generation • Collections: list traversal, sorting, map manipulation • BigML resources manipulation Creation create-source, create-and-wait-dataset, etc. Retrieval fetch, list-anomalies, etc. Update update Deletion delete • Machine Learning Algorithms (SMACDown, Boosting, etc.) The BigML Team Basic WhizzML Workflows May 2016 19 / 24
  • 20. Outline 1 What is WhizzML? 2 WhizzML Server-side Resources 3 WhizzML Language Basics 4 Standard Library Overview 5 Tutorial Walkthrough: Model or Ensemble? The BigML Team Basic WhizzML Workflows May 2016 20 / 24
  • 21. Model or Ensemble? • Split a dataset in test and training parts • Create a model and an ensemble with the training dataset • Evaluate both with the test dataset • Choose the one with better evaluation (f-measure) https://github.com/whizzml/examples/tree/master/model-or-ensemble The BigML Team Basic WhizzML Workflows May 2016 21 / 24
  • 22. Model or Ensemble? ;; Functions for creating the two dataset parts ;; and the model and ensemble from the training set. (define (sample-dataset ds-id rate oob) (create-and-wait-dataset {"sample_rate" rate "origin_dataset" ds-id "out_of_bag" oob "seed" "whizzml-example"})) (define (split-dataset ds-id rate) (list (sample-dataset ds-id rate false) (sample-dataset ds-id rate true))) (define (make-model ds-id) (create-and-wait-model {"dataset" ds-id})) (define (make-ensemble ds-id size) (create-and-wait-ensemble {"dataset" ds-id "number_of_models" size})) The BigML Team Basic WhizzML Workflows May 2016 22 / 24
  • 23. Model or Ensemble? ;; Functions for evaluating model and ensemble ;; using the test set, and to extract f-measure from ;; the evaluation results (define (evaluate-model model-id ds-id) (create-and-wait-evaluation {"model" model-id "dataset" ds-id})) (define (evaluate-ensemble model-id ds-id) (create-and-wait-evaluation {"ensemble" model-id "dataset" ds-id})) (define (f-measure ev-id) (get-in (fetch ev-id) ["result" "model" "average_f_measure"])) The BigML Team Basic WhizzML Workflows May 2016 23 / 24
  • 24. Model or Ensemble? ;; Function encapsulating the full workflow (define (model-or-ensemble src-id) (let (ds-id (create-and-wait-dataset {"source" src-id}) ;; ^ full dataset ids (split-dataset ds-id 0.8) ;; split it 80/20 train-id (nth ids 0) ;; the 80% for training test-id (nth ids 1) ;; and 20% for evaluations m-id (make-model train-id) ;; create a model e-id (make-ensemble train-id 15) ;; and an ensemble m-f (f-measure (evaluate-model m-id test-id)) ;; evaluate e-f (f-measure (evaluate-ensemble e-id test-id))) (log-info "model f " m-f " / ensemble f " e-f) (if (> m-f e-f) m-id e-id))) ;; Compute the result of the script execution ;; - Inputs: [{"name": "input-source-id", "type": "source-id"}] ;; - Outputs: [{"name": "result", "type": "resource-id"}] (define result (model-or-ensemble input-source-id)) The BigML Team Basic WhizzML Workflows May 2016 24 / 24