SlideShare ist ein Scribd-Unternehmen logo
1 von 79
Downloaden Sie, um offline zu lesen
Data Workflows for
Machine Learning:	



SF Bay Area ML Meetup	

2014-04-09	

!
Paco Nathan

@pacoid	

http://liber118.com/pxn/
meetup.com/SF-Bayarea-Machine-Learning/events/173759442/
BTW, since it’s April 9th…	

Happy #IoTDay !!	

http://iotday.org/	

!
(any idea of what this means?)
Why is this talk here?	

Machine Learning in production apps is less and less about
algorithms (even though that work is quite fun and vital)	

!
Performing real work is more about:	

! socializing a problem within an organization	

! feature engineering (“Beyond Product Managers”)	

! tournaments in CI/CD environments	

! operationalizing high-ROI apps at scale	

! etc.	

!
So I’ll just crawl out on a limb and state that leveraging great
frameworks to build data workflows is more important than 

chasing after diminishing returns on highly nuanced algorithms.	

!
Because Interwebs!
Data Workflows for Machine Learning	

Middleware has been evolving for Big Data, and there are some
great examples — we’ll review several. Process has been evolving
too, right along with the use cases.	

!
Popular frameworks typically provide some Machine Learning
capabilities within their core components, or at least among their
major use cases.	

!
Let’s consider features from Enterprise DataWorkflows as a basis 

for what’s needed in Data Workflows for Machine Learning.	

!
Their requirements for scale, robustness, cost trade-offs,
interdisciplinary teams, etc., serve as guides in general.
Caveat Auditor	

I won’t claim to be expert with each of the frameworks and
environments described in this talk. Expert with a few of them
perhaps, but more to the point: embroiled in many use cases.	

!
This talk attempts to define a “scorecard” for evaluating
important ML data workflow features: 

what’s needed for use cases, compare and contrast of what’s
available, plus some indication of which frameworks are likely 

to be best for a given scenario.	

!
Seriously, this is a work in progress.
Outline	

• Definition: Machine Learning	

• Definition: Data Workflows	

• A whole bunch o’ examples across several platforms	

• Nine points to discuss, leading up to a scorecard	

• A crazy little thing called PMML	

• Questions, comments, flying tomatoes…
Data Workflows for
Machine Learning:	



Frame the question…	

!
“A Basis for What’s Needed”	



“Machine learning algorithms can figure out how to perform

important tasks by generalizing from examples.This is often

feasible and cost-effective where manual programming is not. 

As more data becomes available, more ambitious problems 

can be tackled. As a result, machine learning is widely used 

in computer science and other fields.”	

Pedro Domingos, U Washington

A Few Useful Things to Know about Machine Learning
Definition: Machine Learning
• overfitting (variance) 	

• underfitting (bias)	

• “perfect classifier” (no free lunch)
[learning as generalization] =

[representation] + [evaluation] + [optimization]
Definition: Machine Learning … Conceptually

!
!
1. real-world data 	

2. graph theory for representation 	

3. convert to sparse matrix for production work 

leveraging abstract algebra + func programming 	

4. cost-effective parallel processing for ML apps 

at scale, live use cases
Definition: Machine Learning … Conceptually

!
!
1. real-world data 	

2. graph theory for representation 	

3. convert to sparse matrix for production work 

leveraging abstract algebra + func programming 	

4. cost-effective parallel processing for ML apps 

at scale, live use cases
[representation]
[evaluation]
[optimization]
[generalization]
f(x): loss function	

g(z): regularization term
discovery
discovery
modeling
modeling
integration
integration
appsapps
systems
systems
business process,	

stakeholder
data prep, discovery,
modeling, etc.
software engineering,
automation
systems engineering,
availability
data
science
Data
Scientist
App Dev
Ops
Domain
Expert
Definition: Machine Learning … Interdisciplinary Teams, Needs × Roles
Definition: Machine Learning … Process, Feature Engineering
evaluationrepresentation optimization use cases
feature engineering
data
sources
data
sources
data prep
pipeline
train
test
hold-outs
learners
classifiers
classifiers
classifiers
data
sources
scoring
Definition: Machine Learning … Process, Tournaments
evaluationrepresentation optimization use cases
feature engineering tournaments
data
sources
data
sources
data prep
pipeline
train
test
hold-outs
learners
classifiers
classifiers
classifiers
data
sources
scoring
quantify and measure:
• benefit?
• risk?
• operational costs?
• obtain other data?
• improve metadata?
• refine representation?
• improve optimization?
• iterate with stakeholders?
• can models (inference) inform
first principles approaches?
monoid (an alien life form, courtesy of abstract algebra):	

! binary associative operator	

! closure within a set of objects	

! unique identity element	

what are those good for?	

! composable functions in workflows	

! compiler “hints” on steroids, to parallelize	

! reassemble results minimizing bottlenecks at scale	

! reusable components, like Lego blocks	

! think: Docker for business logic	

Monoidify! Monoids as a Design Principle for Efficient
MapReduce Algorithms

Jimmy Lin, U Maryland/Twitter	

kudos to Oscar Boykin, Sam Ritchie, et al.
Definition: Machine Learning … Invasion of the Monoids
Definition: Machine Learning
evaluationrepresentation optimization use cases
feature engineering tournaments
data
sources
data
sources
data prep
pipeline
train
test
hold-outs
learners
classifiers
classifiers
classifiers
data
sources
scoring
quantify and measure:
• benefit?
• risk?
• operational costs?
• obtain other data?
• improve metadata?
• refine representation?
• improve optimization?
• iterate with stakeholders?
• can models (inference) inform
first principles approaches?
discovery
discovery
modeling
modeling
integration
integration
appsapps
systems
systems
data
science
Data
Scientist
App Dev
Ops
Domain
Expert
introduced
capability
Definition
evaluationrepresentation optimization use cases
feature engineering tournaments
data
sources
data
sources
data prep
pipeline
train
test
hold-outs
learners
classifiers
classifiers
classifiers
data
sources
scoring
quantify and measure:
• benefit?
• risk?
• operational costs?
• obtain other data?
• improve metadata?
• refine representation?
• improve optimization?
• iterate with stakeholders?
• can models (inference) inform
first principles approaches?
discovery
discovery
modeling
modeling
integration
integration
appsapps
systems
systems
data
science
Data
Scientist
App Dev
Ops
Domain
Expert
introduced
capability
Can we fit the required 

process into generalized 

workflow definitions?
Definition: Data Workflows	

Middleware, effectively, is evolving for Big Data and Machine Learning…

The following design pattern — a DAG — shows up in many places, 

via many frameworks:
ETL
data
prep
predictive
model
data
sources
end
uses
Definition: Data Workflows	

definition of a typical Enterprise workflow which crosses through
multiple departments, languages, and technologies…
ETL
data
prep
predictive
model
data
sources
end
uses
ANSI SQL for ETL
Definition: Data Workflows	

definition of a typical Enterprise workflow which crosses through
multiple departments, languages, and technologies…
ETL
data
prep
predictive
model
data
sources
end
usesJava, Pig, etc., for business logic
Definition: Data Workflows	

definition of a typical Enterprise workflow which crosses through
multiple departments, languages, and technologies…
ETL
data
prep
predictive
model
data
sources
end
uses
SAS for predictive models

Definition: Data Workflows
definition of a typical Enterprise workflow which crosses through
multiple departments, languages, and technologies…
ETL
data
prep
predictive
model
data
sources
end
uses
SAS for predictive models
ANSI SQL for ETL most of the licensing costs…
Definition: Data Workflows
definition of a typical Enterprise workflow which crosses through
multiple departments, languages, and technologies…
ETL
data
prep
predictive
model
data
sources
end
usesJava, Pig, etc.,
most of the project costs…
Definition: Data Workflows
definition of a typical Enterprise workflow which crosses through
multiple departments, languages, and technologies…
ETL
data
prep
predictive
model
data
sources
end
usesJava, Pig, etc.,
most of the project costs…
Something emerges 

to fill these needs, 

for instance…
ETL
data
prep
predictive
model
data
sources
end
uses
Lingual:
DW → ANSI SQL
Pattern:
SAS, R, etc. → PMML
business logic in Java,
Clojure, Scala, etc.
sink taps for
Memcached, HBase,
MongoDB, etc.
source taps for
Cassandra, JDBC,
Splunk, etc.
Definition: Data Workflows	

For example, Cascading and related projects implement the following
components, based on 100% open source: cascading.org
a compiler sees it all…

one connected DAG:
• troubleshooting
• exception handling
• notifications
• some optimizations
ETL
data
prep
predictive
model
data
sources
end
uses
Lingual:
DW → ANSI SQL
Pattern:
SAS, R, etc. → PMML
business logic in Java,
Clojure, Scala, etc.
sink taps for
Memcached, HBase,
MongoDB, etc.
source taps for
Cassandra, JDBC,
Splunk, etc.
Definition: Data Workflows
Cascading allows multiple departments to combine their workflow components
into an integrated app – one among many, typically – based on 100% open source
!
!
FlowDef flowDef = FlowDef.flowDef()!
.setName( "etl" )!
.addSource( "example.employee", emplTap )!
.addSource( "example.sales", salesTap )!
.addSink( "results", resultsTap );!
 !
SQLPlanner sqlPlanner = new SQLPlanner()!
.setSql( sqlStatement );!
 !
flowDef.addAssemblyPlanner( sqlPlanner );!
!
!
cascading.org
ETL
data
prep
predictive
model
data
sources
end
uses
Lingual:
DW → ANSI SQL
Pattern:
SAS, R, etc. → PMML
business logic in Java,
Clojure, Scala, etc.
sink taps for
Memcached, HBase,
MongoDB, etc.
source taps for
Cassandra, JDBC,
Splunk, etc.
Definition: Data Workflows
Cascading allows multiple departments to combine their workflow components
into an integrated app – one among many, typically – based on 100% open source
!
!
FlowDef flowDef = FlowDef.flowDef()!
.setName( "classifier" )!
.addSource( "input", inputTap )!
.addSink( "classify", classifyTap );!
 !
PMMLPlanner pmmlPlanner = new PMMLPlanner()!
.setPMMLInput( new File( pmmlModel ) )!
.retainOnlyActiveIncomingFields();!
 !
flowDef.addAssemblyPlanner( pmmlPlanner );!
!
!
Enterprise DataWorkflows with Cascading	

O’Reilly, 2013	

shop.oreilly.com/product/
0636920028536.do
ETL
data
prep
predictive
model
data
sources
end
uses
Enterprise DataWorkflows with Cascading	

O’Reilly, 2013	

shop.oreilly.com/product/
0636920028536.do
ETL
data
prep
predictive
model
data
sources
end
uses
This begs an update…
Enterprise DataWorkflows with Cascading	

O’Reilly, 2013	

shop.oreilly.com/product/
0636920028536.do
ETL
data
prep
predictive
model
data
sources
end
uses
Because…
Data Workflows for
Machine Learning:	



Examples…	

!
“Neque per exemplum”	



Example: KNIME	

“a user-friendly graphical workbench for the entire analysis

process: data access, data transformation, initial investigation,

powerful predictive analytics, visualisation and reporting.”	

• large number of integrations (over 1000 modules)	

• ranked #1 in customer satisfaction among 

open source analytics frameworks	

• visual editing of reusable modules	

• leverage prior work in R, Perl, etc.	

• Eclipse integration	

• easily extended for new integrations
knime.org
Example: Python stack	

Python has much to offer – ranging across an 

organization, no just for the analytics staff	

• ipython.org
• pandas.pydata.org
• scikit-learn.org
• numpy.org
• scipy.org
• code.google.com/p/augustus
• continuum.io
• nltk.org
• matplotlib.org
Example: Julia	

“a high-level, high-performance dynamic programming language

for technical computing, with syntax that is familiar to users of

other technical computing environments”	

• significantly faster than most alternatives	

• built to leverage parallelism, cloud computing	

• still relatively new — one to watch!
importall Base!
!
type BubbleSort <: Sort.Algorithm end!
!
function sort!(v::AbstractVector, lo::Int, hi::Int, ::BubbleSort, o::Sort.Ordering)!
    while true!
        clean = true!
        for i = lo:hi-1!
            if Sort.lt(o, v[i+1], v[i])!
                v[i+1], v[i] = v[i], v[i+1]!
                clean = false!
            end!
        end!
        clean && break!
    end!
    return v!
end!
julialang.org
Example: Summingbird	

“a library that lets you write streaming MapReduce programs

that look like native Scala or Java collection transformations 

and execute them on a number of well-known distributed

MapReduce platforms like Storm and Scalding.”	

• switch between Storm, Scalding (Hadoop)	

• Spark support is in progress	

• leverage Algebird, Storehaus, Matrix API, etc.
github.com/twitter/summingbird
def wordCount[P <: Platform[P]]!
(source: Producer[P, String], store: P#Store[String, Long]) =!
source.flatMap { sentence => !
toWords(sentence).map(_ -> 1L)!
}.sumByKey(store)
Example: Scalding	

import com.twitter.scalding._!
 !
class WordCount(args : Args) extends Job(args) {!
Tsv(args("doc"),!
('doc_id, 'text),!
skipHeader = true)!
.read!
.flatMap('text -> 'token) {!
text : String => text.split("[ [](),.]")!
}!
.groupBy('token) { _.size('count) }!
.write(Tsv(args("wc"), writeHeader = true))!
}
github.com/twitter/scalding
Example: Scalding	

• extends the Scala collections API so that distributed lists
become “pipes” backed by Cascading	

• code is compact, easy to understand	

• nearly 1:1 between elements of conceptual flow diagram 

and function calls	

• extensive libraries are available for linear algebra, abstract
algebra, machine learning – e.g., Matrix API, Algebird, etc.	

• significant investments by Twitter, Etsy, eBay, etc.	

• less learning curve than Cascalog	

• build scripts… those take a while to run :
github.com/twitter/scalding
Example: Cascalog	

(ns impatient.core!
  (:use [cascalog.api]!
        [cascalog.more-taps :only (hfs-delimited)])!
  (:require [clojure.string :as s]!
            [cascalog.ops :as c])!
  (:gen-class))!
!
(defmapcatop split [line]!
  "reads in a line of string and splits it by regex"!
  (s/split line #"[[](),.)s]+"))!
!
(defn -main [in out & args]!
  (?<- (hfs-delimited out)!
       [?word ?count]!
       ((hfs-delimited in :skip-header? true) _ ?line)!
       (split ?line :> ?word)!
       (c/count ?count)))!
!
; Paul Lam!
; github.com/Quantisan/Impatient
cascalog.org
Example: Cascalog	

• implements Datalog in Clojure, with predicates backed 

by Cascading – for a highly declarative language	

• run ad-hoc queries from the Clojure REPL –

approx. 10:1 code reduction compared with SQL	

• composable subqueries, used for test-driven
development (TDD) practices at scale	

• Leiningen build: simple, no surprises, in Clojure itself	

• more new deployments than other Cascading DSLs – 

Climate Corp is largest use case: 90% Clojure/Cascalog	

• has a learning curve, limited number of Clojure
developers	

• aggregators are the magic, and those take effort to learn
cascalog.org
Example: Apache Spark	

in-memory cluster computing, 

by Matei Zaharia, RamVenkataraman, et al.	

• intended to make data analytics fast to write and to run	

• load data into memory and query it repeatedly, much
more quickly than with Hadoop	

• APIs in Scala, Java and Python, shells in Scala and Python	

• Shark (Hive on Spark), Spark Streaming (like Storm), etc.	

• integrations with MLbase, Summingbird (in progress)	

// word count!
val file = spark.textFile(“hdfs://…”)!
val counts = file.flatMap(line => line.split(” “))!
.map(word => (word, 1))!
.reduceByKey(_ + _)!
counts.saveAsTextFile(“hdfs://…”)
spark-project.org
Example: MLbase	

“distributed machine learning made easy”	

• sponsored by UC Berkeley EECS AMP Lab	

• MLlib – common algorithms, low-level, written atop Spark	

• MLI – feature extraction, algorithm dev atop MLlib	

• ML Optimizer – automates model selection, 

compiler/optimizer	

• see article:

http://strata.oreilly.com/2013/02/mlbase-scalable-
machine-learning-made-accessible.html
!
mlbase.org
data = load("hdfs://path/to/als_clinical")!
// the features are stored in columns 2-10!
X = data[, 2 to 10]!
y = data[, 1]!
model = do_classify(y, X)
Example: Spark SQL	

“blurs the lines between RDDs and relational tables”	

intermix SQL commands to querying external data,
along with complex analytics, in a single app:	

• allows SQL extensions based on MLlib	

• Shark is being migrated to Spark SQL	

Spark SQL: Manipulating Structured Data Using Spark

Michael Armbrust, Reynold Xin (2014-03-24)

databricks.com/blog/2014/03/26/Spark-
SQL-manipulating-structured-data-using-
Spark.html

people.apache.org/~pwendell/catalyst-
docs/sql-programming-guide.html	

!
// data can be extracted from existing sources
// e.g., Apache Hive
val trainingDataTable = sql("""
SELECT e.action
u.age,
u.latitude,
u.logitude
FROM Users u
JOIN Events e
ON u.userId = e.userId""")
!
// since `sql` returns an RDD, the results above
// can be used in MLlib
val trainingData = trainingDataTable.map { row =>
val features = Array[Double](row(1), row(2), row(3))
LabeledPoint(row(0), features)
}
!
val model =
new LogisticRegressionWithSGD().run(trainingData)
spark-project.org
Example: Titan	

distributed graph database, 

by Matthias Broecheler, Marko Rodriguez, et al.	

• scalable graph database optimized for storing and
querying graphs	

• supports hundreds of billions of vertices and edges	

• transactional database that can support thousands of
concurrent users executing complex graph traversals	

• supports search through Lucene, ElasticSearch	

• can be backed by HBase, Cassandra, BerkeleyDB	

• TinkerPop native graph stack with Gremlin, etc.
// who is hercules' paternal grandfather?!
g.V('name','hercules').out('father').out('father').name
thinkaurelius.github.io/titan
Example: MBrace	

“a .NET based software stack that enables easy large-scale

distributed computation and big data analysis.”	

• declarative and concise distributed algorithms in 

F# asynchronous workflows	

• scalable for apps in private datacenters or public 

clouds, e.g.,Windows Azure or Amazon EC2	

• tooling for interactive, REPL-style deployment,
monitoring, management, debugging inVisual Studio	

• leverages monads (similar to Summingbird)	

• MapReduce as a library, but many patterns beyond
m-brace.net
let rec mapReduce (map: 'T -> Cloud<'R>)!
(reduce: 'R -> 'R -> Cloud<'R>)!
(identity: 'R)!
(input: 'T list) =!
cloud {!
match input with!
| [] -> return identity!
| [value] -> return! map value!
| _ ->!
let left, right = List.split input!
let! r1, r2 =!
(mapReduce map reduce identity left)!
<||>!
(mapReduce map reduce identity right)!
return! reduce r1 r2!
}
Data Workflows for
Machine Learning:	



Update the definitions…	

!
“Nine Points to Discuss”

Data Workflows	

Formally speaking, workflows include people (cross-dept) 

and define oversight for exceptional data	

…otherwise, data flow or pipeline would be more apt	

…examples include Cascading traps, with exceptional tuples 

routed to a review organization, e.g., Customer Support
includes people, defines
oversight for exceptional data
Hadoop
Cluster
source
tap
source
tap sink
tap
trap
tap
customer
profile DBsCustomer
Prefs
logs
logs
Logs
Data
Workflow
Cache
Customers
Support
Web
App
Reporting
Analytics
Cubes
sink
tap
Modeling PMML
1
Data Workflows	

Footnote –	

see also an excellent article related to this point 

and the next:	

!
Therbligs for data science: 

A nuts and bolts framework for accelerating data work	

Abe Gong @Jawbone	

blog.abegong.com/2014/03/therbligs-for-data-science.html	

strataconf.com/strata2014/public/schedule/detail/32291	

brighttalk.com/webcast/9059/105119	

!
!
!
includes people, defines
oversight for exceptional data
1+
Data Workflows	

Workflows impose a separation of concerns, allowing 

for multiple abstraction layers in the tech stack	

…specify what is required, not how to accomplish it	

…articulating the business logic	

… Cascading leverages pattern language	

…related notions from Knuth, literate programming	

…not unlike BPM/BPEL for Big Data	

…examples: IPython, R Markdown, etc.	

separation of concerns, allows
for literate programming
2
Data Workflows	

Footnote –	

while discussing separation of concerns and a general
design pattern, let’s consider data workflows in a
broader context of probabilistic programming, since
business data is heterogeneous and structured… 

the data for every domain is heterogeneous. 	

Paraphrasing Ginsberg:	

I’ve seen the best minds of my generation destroyed by
madness, dragging themselves through quagmires of large
LCD screens filled with Intellij debuggers and database
command lines, yearning to fit real-world data into their
preferred “deterministic” tools…
separation of concerns, allows
for literate programming
2+
Probabilistic Programming: 

Why,What, How,When

Beau Cronin

Strata SC (2014)

speakerdeck.com/beaucronin/
probabilistic-programming-
strata-santa-clara-2014
Why Probabilistic Programming 

Matters

Rob Zinkov

Convex Optimized (2012-06-27)

zinkov.com/posts/
2012-06-27-why-prob-
programming-matters/
Data Workflows	

Multiple abstraction layers in the tech stack are 

needed, but still emerging	

…feedback loops based on machine data	

…optimizers feed on abstraction	

…metadata accounting:	

• track data lineage	

• propagate schema	

• model / feature usage	

• ensemble performance	

…app history accounting:	

• util stats, mixing workloads	

• heavy-hitters, bottlenecks	

• throughput, latency
multiple abstraction layers 

for metadata, feedback, 

and optimization
Cluster
Scheduler
Planners/
Optimizers
Clusters
DSLs
Machine
Data
• app history
• util stats
• bottlenecksMixed
Topologies
Business
Process
Reusable
Components
Portable
Models
• data lineage
• schema propagation
• feature selection
• tournaments
3
Data Workflows
Multiple
needed, but still emerging	

…feedback loops based on
…optimizers feed on abstraction
…metadata accounting:	

• track data lineage
• propagate
• model / feature usage	

• ensemble performance	

…app history accounting:	

• util stats, mixing workloads	

• heavy-hitters, bottlenecks	

• throughput, latency
multiple abstraction layers 

for metadata, feedback, 

and optimization
Cluster
Scheduler
Planners/
Optimizers
Clusters
DSLs
Machine
Data
• app history
• util stats
• bottlenecksMixed
Topologies
Business
Process
Reusable
Components
Portable
Models
• data lineage
• schema propagation
• feature selection
• tournaments
3
Um, will compilers 

ever look like this??
Data Workflows	

Workflows must provide for test, which is no simple 

matter	

…testing is required on three abstraction layers:	

• model portability/evaluation, ensembles, tournaments	

• TDD in reusable components and business process	

• continuous integration / continuous deployment	

…examples: Cascalog for TDD, PMML for model eval	

…still so much more to improve	

…keep in mind that workflows involve people, too	

testing: model evaluation,
TDD, app deployment
4
Cluster
Scheduler
Planners/
Optimizers
Clusters
DSLs
Machine
Data
• app history
• util stats
• bottlenecksMixed
Topologies
Business
Process
Reusable
Components
Portable
Models
• data lineage
• schema propagation
• feature selection
• tournaments
Data Workflows	

Workflows enable system integration	

…future-proof integrations and scale-out	

…build components and apps, not jobs and command lines	

…allow compiler optimizations across the DAG,

i.e., cross-dept contributions	

…minimize operationalization costs:	

• troubleshooting, debugging at scale	

• exception handling	

• notifications, instrumentation	

…examples: KNIME, Cascading, etc.	

!
future-proof system
integration, scale-out, ops
Hadoop
Cluster
source
tap
source
tap sink
tap
trap
tap
customer
profile DBsCustomer
Prefs
logs
logs
Logs
Data
Workflow
Cache
Customers
Support
Web
App
Reporting
Analytics
Cubes
sink
tap
Modeling PMML
5
Data Workflows	

Visualizing workflows, what a great idea.	

…the practical basis for:	

• collaboration	

• rapid prototyping	

• component reuse	

…examples: KNIME wins best in category	

…Cascading generates flow diagrams, 

which are a nice start	

visualizing allows people 

to collaborate through code
6
Data Workflows	

Abstract algebra, containerizing workflow metadata
…monoids, semigroups, etc., allow for reusable components 

with well-defined properties for running in parallel at scale	

…let business process be agnostic about underlying topologies, 

with analogy to Linux containers (Docker, etc.)	

…compose functions, take advantage of sparsity (monoids)	

…because “data is fully functional” – FP for s/w eng benefits	

…aggregators are almost always “magic”, now we can solve 

for common use cases	

…read Monoidify! Monoids as a Design Principle for Efficient
MapReduce Algorithms by Jimmy Lin	

…Cascading introduced some notions of this circa 2007, 

but didn’t make it explicit	

…examples: Algebird in Summingbird, Simmer, Spark, etc.
abstract algebra and
functional programming
containerize business process
7
Data Workflows	

Footnote –	

see also two excellent talks related to this point:	

!
Algebra for Analytics

speakerdeck.com/johnynek/algebra-for-analytics

Oscar Boykin, Strata SC (2014)	

Add ALL theThings:

Abstract Algebra Meets Analytics

infoq.com/presentations/abstract-algebra-analytics

Avi Bryant, Strange Loop (2013)
abstract algebra and
functional programming
containerize business process
7+
Data Workflows	

Workflow needs vary in time, and need to blend time	

…something something batch, something something low-latency	

…scheduling batch isn’t hard; scheduling low-latency is 

computationally brutal (see the Omega paper)	

…because people like saying “Lambda Architecture”, 

it gives them goosebumps, or something	

…because real-time means so many different things	

…because batch windows are so 1964	

…examples: Summingbird, Oryx
blend results from different
time scales: batch plus low-
latency
8
Big Data

Nathan Marz, James Warren

manning.com/marz
Data Workflows	

Workflows may define contexts in which model selection 

possibly becomes a compiler problem	

…for example, see Boyd, Parikh, et al.	

…ultimately optimizing for loss function + regularization term	

…perhaps not ready for prime-time immediately	

…examples: MLbase
optimize learners in context,
to make model selection
potentially a compiler problem
9
f(x): loss function
g(z): regularization term
Data Workflows	

For one of the best papers about what workflows really

truly require, see Out of the Tar Pit by Moseley and Marks
bonus
Nine Points for Data Workflows — a wish list	

1. includes people, defines oversight for exceptional data
2. separation of concerns, allows for literate programming
3. multiple abstraction layers for metadata, feedback, and
optimization
4. testing: model evaluation, TDD, app deployment
5. future-proof system integration, scale-out, ops
6. visualizing workflows allows people to collaborate
through code
7. abstract algebra and functional programming
containerize business process
8. blend results from different time scales: 

batch plus low-latency
9. optimize learners in context, to make model 

selection potentially a compiler problem
Cluster
Scheduler
Planners/
Optimizers
Clusters
DSLs
Machine
Data
• app history
• util stats
• bottlenecksMixed
Topologies
Business
Process
Reusable
Components
Portable
Models
• data lineage
• schema propagation
• feature selection
• tournaments
Nine Points for Data Workflows — a scorecard	

Spark,
MLbase
Oryx Summing!
bird
Cascalog Cascading
!
KNIME Py Data R
Markdown
MBrace
includes people,
exceptional data
separation of
concerns
multiple 

abstraction layers
testing in depth
future-proof 

system
integration
visualize to collab
can haz monoids
blends batch + 

“real-time”
optimize learners 

in context
can haz PMML ✔ ✔ ✔ ✔ ✔
Data Workflows for
Machine Learning:	



PMML…	

!
“Oh, by the way…”	



• established XML standard for predictive model markup	

• organized by Data Mining Group (DMG), since 1997 

http://dmg.org/	

• members: IBM, SAS, Visa, FICO, Equifax, NASA,

Microstrategy, Microsoft, etc.	

• PMML concepts for metadata, ensembles, etc., translate 

directly into workflow abstractions, e.g., Cascading	

!
“PMML is the leading standard for statistical and data mining models and

supported by over 20 vendors and organizations.With PMML, it is easy 

to develop a model on one system using one application and deploy the

model on another system using another application.”
PMML – an industry standard
wikipedia.org/wiki/Predictive_Model_Markup_Language
PMML – vendor coverage
• Association Rules: AssociationModel element	

• Cluster Models: ClusteringModel element	

• Decision Trees: TreeModel element	

• Naïve Bayes Classifiers: NaiveBayesModel element	

• Neural Networks: NeuralNetwork element	

• Regression: RegressionModel and GeneralRegressionModel elements	

• Rulesets: RuleSetModel element	

• Sequences: SequenceModel element	

• SupportVector Machines: SupportVectorMachineModel element	

• Text Models: TextModel element	

• Time Series: TimeSeriesModel element
PMML – model coverage
ibm.com/developerworks/industry/library/ind-PMML2/
!
PMML in Action

Alex Guazzelli,Wen-Ching Lin,Tridivesh Jena

amazon.com/dp/1470003244	

!
See also excellent resources at:	

zementis.com/pmml.htm
PMML – further study
Hadoop
Cluster
source
tap
source
tap sink
tap
trap
tap
customer
profile DBsCustomer
Prefs
logs
logs
Logs
Data
Workflow
Cache
Customers
Support
Web
App
Reporting
Analytics
Cubes
sink
tap
Modeling PMML
Pattern – model scoring	

• a PMML library for Cascading workflows
• migrate workloads: SAS,Teradata, etc., 

exporting predictive models as PMML	

• great open source tools – R, Weka, 

KNIME, Matlab, RapidMiner, etc.	

• leverage PMML as another kind of DSL	

• only for scoring models, not training
Pattern – model scoring	

• originally intended as a general purpose, tuple-oriented
model scoring engine for JVM-based frameworks	

• library plugs into Cascading (Hadoop), and ostensibly
Cascalog, Scalding, Storm, Spark, Summingbird, etc.	

• dev forum:

https://groups.google.com/forum/#!forum/pattern-user	

• original GitHub repo:

https://github.com/ceteri/pattern/	

• somehow, the other fork became deeply intertwined 

with Cascading dependencies…	

• work in progress to integrate with other frameworks, 

add models, and also train models at scale using Spark
## train a RandomForest model!
 !
f <- as.formula("as.factor(label) ~ .")!
fit <- randomForest(f, data_train, ntree=50)!
 !
## test the model on the holdout test set!
 !
print(fit$importance)!
print(fit)!
 !
predicted <- predict(fit, data)!
data$predicted <- predicted!
confuse <- table(pred = predicted, true = data[,1])!
print(confuse)!
 !
## export predicted labels to TSV!
 !
write.table(data, file=paste(dat_folder, "sample.tsv", sep="/"), 

quote=FALSE, sep="t", row.names=FALSE)!
 !
## export RF model to PMML!
 !
saveXML(pmml(fit), file=paste(dat_folder, "sample.rf.xml", sep="/"))!
Pattern – create a model in R
<?xml version="1.0"?>!
<PMML version="4.0" xmlns="http://www.dmg.org/PMML-4_0"!
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"!
 xsi:schemaLocation="http://www.dmg.org/PMML-4_0

http://www.dmg.org/v4-0/pmml-4-0.xsd">!
 <Header copyright="Copyright (c)2012 Concurrent, Inc." description="Random Forest Tree Model">!
  <Extension name="user" value="ceteri" extender="Rattle/PMML"/>!
  <Application name="Rattle/PMML" version="1.2.30"/>!
  <Timestamp>2012-10-22 19:39:28</Timestamp>!
 </Header>!
 <DataDictionary numberOfFields="4">!
  <DataField name="label" optype="categorical" dataType="string">!
   <Value value="0"/>!
   <Value value="1"/>!
  </DataField>!
  <DataField name="var0" optype="continuous" dataType="double"/>!
  <DataField name="var1" optype="continuous" dataType="double"/>!
  <DataField name="var2" optype="continuous" dataType="double"/>!
 </DataDictionary>!
 <MiningModel modelName="randomForest_Model" functionName="classification">!
  <MiningSchema>!
   <MiningField name="label" usageType="predicted"/>!
   <MiningField name="var0" usageType="active"/>!
   <MiningField name="var1" usageType="active"/>!
   <MiningField name="var2" usageType="active"/>!
  </MiningSchema>!
  <Segmentation multipleModelMethod="majorityVote">!
   <Segment id="1">!
    <True/>!
    <TreeModel modelName="randomForest_Model" functionName="classification" algorithmName="randomForest" splitCharacteristic="binarySplit">!
     <MiningSchema>!
      <MiningField name="label" usageType="predicted"/>!
      <MiningField name="var0" usageType="active"/>!
      <MiningField name="var1" usageType="active"/>!
      <MiningField name="var2" usageType="active"/>!
     </MiningSchema>!
...!
Pattern – capture model parameters as PMML
public static void main( String[] args ) throws RuntimeException {!
String inputPath = args[ 0 ];!
String classifyPath = args[ 1 ];!
// set up the config properties!
Properties properties = new Properties();!
AppProps.setApplicationJarClass( properties, Main.class );!
HadoopFlowConnector flowConnector = new HadoopFlowConnector( properties );!
  // create source and sink taps!
Tap inputTap = new Hfs( new TextDelimited( true, "t" ), inputPath );!
Tap classifyTap = new Hfs( new TextDelimited( true, "t" ), classifyPath );!
  // handle command line options!
OptionParser optParser = new OptionParser();!
optParser.accepts( "pmml" ).withRequiredArg();!
  OptionSet options = optParser.parse( args );!
 !
// connect the taps, pipes, etc., into a flow!
FlowDef flowDef = FlowDef.flowDef().setName( "classify" )!
.addSource( "input", inputTap )!
.addSink( "classify", classifyTap );!
 !
if( options.hasArgument( "pmml" ) ) {!
String pmmlPath = (String) options.valuesOf( "pmml" ).get( 0 );!
PMMLPlanner pmmlPlanner = new PMMLPlanner()!
.setPMMLInput( new File( pmmlPath ) )!
.retainOnlyActiveIncomingFields()!
.setDefaultPredictedField( new Fields( "predict", Double.class ) ); // default value if missing from the model!
flowDef.addAssemblyPlanner( pmmlPlanner );!
}!
 !
// write a DOT file and run the flow!
Flow classifyFlow = flowConnector.connect( flowDef );!
classifyFlow.writeDOT( "dot/classify.dot" );!
classifyFlow.complete();!
}
Pattern – score a model, within an app
Customer
Orders
Classify
Scored
Orders
GroupBy
token
Count
PMML
Model
M R
Failure
Traps
Assert
Confusion
Matrix
Pattern – score a model, using pre-defined Cascading app
## run an RF classifier at scale!
 !
hadoop jar build/libs/pattern.jar !
data/sample.tsv out/classify out/trap !
--pmml data/sample.rf.xml!
 !
!
Pattern – score a model, using pre-defined Cascading app
Data Workflows for
Machine Learning:	



Summary	

!
“feedback and discussion”	



?
Nine Points for Data Workflows — a scorecard	

Spark,
MLbase
Oryx Summing!
bird
Cascalog Cascading
!
KNIME Py Data R
Markdown
MBrace
includes people,
exceptional data
separation of
concerns
multiple 

abstraction layers
testing in depth
future-proof 

system
integration
visualize to collab
can haz monoids
blends batch + 

“real-time”
optimize learners 

in context
can haz PMML ✔ ✔ ✔ ✔ ✔
PMML – what’s needed?	

in the language standard:	

! data preparation	

! data sources/sinks as parameters	

! track data lineage	

! more monoid, less XML	

! handle data exceptions => TDD	

! updates/active learning?	

! tournaments?	

!
in the workflow frameworks:	

! include feature engineering w/ model?	

! support evaluation better	

! build ensembles
evaluationrepresentation optimization use cases
feature engineering tournaments
data
sources
data
sources
data prep
pipeline
train
test
hold-outs
learners
classifiers
classifiers
classifiers
data
sources
scoring
quantify and measure:
• benefit?
• risk?
• operational costs?
• obtain other data?
• improve metadata?
• refine representation?
• improve optimization?
• iterate with stakeholders?
• can models (inference) inform
first principles approaches?
Thank you, and…	

stay tuned for	

Just Enough Math	

(Summer 2014 w/ Allen Day)	

!
monthly newsletter for updates, events,
conference summaries, etc.:	

liber118.com/pxn/

Weitere ähnliche Inhalte

Was ist angesagt?

DutchMLSchool. ML Automation
DutchMLSchool. ML AutomationDutchMLSchool. ML Automation
DutchMLSchool. ML AutomationBigML, Inc
 
Target Leakage in Machine Learning
Target Leakage in Machine LearningTarget Leakage in Machine Learning
Target Leakage in Machine LearningYuriy Guts
 
DutchMLSchool. ML Business Perspective
DutchMLSchool. ML Business PerspectiveDutchMLSchool. ML Business Perspective
DutchMLSchool. ML Business PerspectiveBigML, Inc
 
From Labelling Open data images to building a private recommender system
From Labelling Open data images to building a private recommender systemFrom Labelling Open data images to building a private recommender system
From Labelling Open data images to building a private recommender systemPierre Gutierrez
 
Data Science Reinvents Learning?
Data Science Reinvents Learning?Data Science Reinvents Learning?
Data Science Reinvents Learning?Paco Nathan
 
DutchMLSchool. Logistic Regression, Deepnets, Time Series
DutchMLSchool. Logistic Regression, Deepnets, Time SeriesDutchMLSchool. Logistic Regression, Deepnets, Time Series
DutchMLSchool. Logistic Regression, Deepnets, Time SeriesBigML, Inc
 
Interpretable Machine Learning
Interpretable Machine LearningInterpretable Machine Learning
Interpretable Machine LearningSri Ambati
 
Machine learning the high interest credit card of technical debt [PWL]
Machine learning the high interest credit card of technical debt [PWL]Machine learning the high interest credit card of technical debt [PWL]
Machine learning the high interest credit card of technical debt [PWL]Jenia Gorokhovsky
 
End-to-End Machine Learning Project
End-to-End Machine Learning ProjectEnd-to-End Machine Learning Project
End-to-End Machine Learning ProjectEng Teong Cheah
 
DutchMLSchool. Machine Learning End-to-End
DutchMLSchool. Machine Learning End-to-EndDutchMLSchool. Machine Learning End-to-End
DutchMLSchool. Machine Learning End-to-EndBigML, Inc
 
Automated Machine Learning
Automated Machine LearningAutomated Machine Learning
Automated Machine Learningsafa cimenli
 
Machine learning 101 sit hvr
Machine learning 101 sit hvrMachine learning 101 sit hvr
Machine learning 101 sit hvrfredverheul
 
HR Analytics: Using Machine Learning to Predict Employee Turnover - Matt Danc...
HR Analytics: Using Machine Learning to Predict Employee Turnover - Matt Danc...HR Analytics: Using Machine Learning to Predict Employee Turnover - Matt Danc...
HR Analytics: Using Machine Learning to Predict Employee Turnover - Matt Danc...Sri Ambati
 
Modelling and evaluation
Modelling and evaluationModelling and evaluation
Modelling and evaluationeShikshak
 
Automatic machine learning (AutoML) 101
Automatic machine learning (AutoML) 101Automatic machine learning (AutoML) 101
Automatic machine learning (AutoML) 101QuantUniversity
 
Machine learning in action at Pipedrive
Machine learning in action at PipedriveMachine learning in action at Pipedrive
Machine learning in action at PipedriveAndré Karpištšenko
 
Recommendations for Building Machine Learning Software
Recommendations for Building Machine Learning SoftwareRecommendations for Building Machine Learning Software
Recommendations for Building Machine Learning SoftwareJustin Basilico
 

Was ist angesagt? (20)

DutchMLSchool. ML Automation
DutchMLSchool. ML AutomationDutchMLSchool. ML Automation
DutchMLSchool. ML Automation
 
Target Leakage in Machine Learning
Target Leakage in Machine LearningTarget Leakage in Machine Learning
Target Leakage in Machine Learning
 
DutchMLSchool. ML Business Perspective
DutchMLSchool. ML Business PerspectiveDutchMLSchool. ML Business Perspective
DutchMLSchool. ML Business Perspective
 
Machine Learning Goes Production
Machine Learning Goes ProductionMachine Learning Goes Production
Machine Learning Goes Production
 
L11. The Future of Machine Learning
L11. The Future of Machine LearningL11. The Future of Machine Learning
L11. The Future of Machine Learning
 
From Labelling Open data images to building a private recommender system
From Labelling Open data images to building a private recommender systemFrom Labelling Open data images to building a private recommender system
From Labelling Open data images to building a private recommender system
 
Data Science Reinvents Learning?
Data Science Reinvents Learning?Data Science Reinvents Learning?
Data Science Reinvents Learning?
 
DutchMLSchool. Logistic Regression, Deepnets, Time Series
DutchMLSchool. Logistic Regression, Deepnets, Time SeriesDutchMLSchool. Logistic Regression, Deepnets, Time Series
DutchMLSchool. Logistic Regression, Deepnets, Time Series
 
Interpretable Machine Learning
Interpretable Machine LearningInterpretable Machine Learning
Interpretable Machine Learning
 
Machine learning the high interest credit card of technical debt [PWL]
Machine learning the high interest credit card of technical debt [PWL]Machine learning the high interest credit card of technical debt [PWL]
Machine learning the high interest credit card of technical debt [PWL]
 
End-to-End Machine Learning Project
End-to-End Machine Learning ProjectEnd-to-End Machine Learning Project
End-to-End Machine Learning Project
 
DutchMLSchool. Machine Learning End-to-End
DutchMLSchool. Machine Learning End-to-EndDutchMLSchool. Machine Learning End-to-End
DutchMLSchool. Machine Learning End-to-End
 
Automated Machine Learning
Automated Machine LearningAutomated Machine Learning
Automated Machine Learning
 
Debugging machine-learning
Debugging machine-learningDebugging machine-learning
Debugging machine-learning
 
Machine learning 101 sit hvr
Machine learning 101 sit hvrMachine learning 101 sit hvr
Machine learning 101 sit hvr
 
HR Analytics: Using Machine Learning to Predict Employee Turnover - Matt Danc...
HR Analytics: Using Machine Learning to Predict Employee Turnover - Matt Danc...HR Analytics: Using Machine Learning to Predict Employee Turnover - Matt Danc...
HR Analytics: Using Machine Learning to Predict Employee Turnover - Matt Danc...
 
Modelling and evaluation
Modelling and evaluationModelling and evaluation
Modelling and evaluation
 
Automatic machine learning (AutoML) 101
Automatic machine learning (AutoML) 101Automatic machine learning (AutoML) 101
Automatic machine learning (AutoML) 101
 
Machine learning in action at Pipedrive
Machine learning in action at PipedriveMachine learning in action at Pipedrive
Machine learning in action at Pipedrive
 
Recommendations for Building Machine Learning Software
Recommendations for Building Machine Learning SoftwareRecommendations for Building Machine Learning Software
Recommendations for Building Machine Learning Software
 

Andere mochten auch

Iteratee and stream with Play2 scala
Iteratee and stream with Play2 scalaIteratee and stream with Play2 scala
Iteratee and stream with Play2 scalaQuentin Adam
 
From Data to Decisions Makers: A Behind the Scenes Look at Building The Most ...
From Data to Decisions Makers: A Behind the Scenes Look at Building The Most ...From Data to Decisions Makers: A Behind the Scenes Look at Building The Most ...
From Data to Decisions Makers: A Behind the Scenes Look at Building The Most ...Bob Rudis
 
Introduction to Iteratees (Scala)
Introduction to Iteratees (Scala)Introduction to Iteratees (Scala)
Introduction to Iteratees (Scala)Alexander Lehmann
 
Composable and streamable Play apps
Composable and streamable Play appsComposable and streamable Play apps
Composable and streamable Play appsYevgeniy Brikman
 
Creating an end-to-end Recommender System with Apache Spark and Elasticsearch...
Creating an end-to-end Recommender System with Apache Spark and Elasticsearch...Creating an end-to-end Recommender System with Apache Spark and Elasticsearch...
Creating an end-to-end Recommender System with Apache Spark and Elasticsearch...sparktc
 
Detecting Hacks: Anomaly Detection on Networking Data
Detecting Hacks: Anomaly Detection on Networking DataDetecting Hacks: Anomaly Detection on Networking Data
Detecting Hacks: Anomaly Detection on Networking DataJames Sirota
 
Jean-François Puget, Distinguished Engineer, Machine Learning and Optimizatio...
Jean-François Puget, Distinguished Engineer, Machine Learning and Optimizatio...Jean-François Puget, Distinguished Engineer, Machine Learning and Optimizatio...
Jean-François Puget, Distinguished Engineer, Machine Learning and Optimizatio...MLconf
 
Linux Performance Analysis and Tools
Linux Performance Analysis and ToolsLinux Performance Analysis and Tools
Linux Performance Analysis and ToolsBrendan Gregg
 

Andere mochten auch (8)

Iteratee and stream with Play2 scala
Iteratee and stream with Play2 scalaIteratee and stream with Play2 scala
Iteratee and stream with Play2 scala
 
From Data to Decisions Makers: A Behind the Scenes Look at Building The Most ...
From Data to Decisions Makers: A Behind the Scenes Look at Building The Most ...From Data to Decisions Makers: A Behind the Scenes Look at Building The Most ...
From Data to Decisions Makers: A Behind the Scenes Look at Building The Most ...
 
Introduction to Iteratees (Scala)
Introduction to Iteratees (Scala)Introduction to Iteratees (Scala)
Introduction to Iteratees (Scala)
 
Composable and streamable Play apps
Composable and streamable Play appsComposable and streamable Play apps
Composable and streamable Play apps
 
Creating an end-to-end Recommender System with Apache Spark and Elasticsearch...
Creating an end-to-end Recommender System with Apache Spark and Elasticsearch...Creating an end-to-end Recommender System with Apache Spark and Elasticsearch...
Creating an end-to-end Recommender System with Apache Spark and Elasticsearch...
 
Detecting Hacks: Anomaly Detection on Networking Data
Detecting Hacks: Anomaly Detection on Networking DataDetecting Hacks: Anomaly Detection on Networking Data
Detecting Hacks: Anomaly Detection on Networking Data
 
Jean-François Puget, Distinguished Engineer, Machine Learning and Optimizatio...
Jean-François Puget, Distinguished Engineer, Machine Learning and Optimizatio...Jean-François Puget, Distinguished Engineer, Machine Learning and Optimizatio...
Jean-François Puget, Distinguished Engineer, Machine Learning and Optimizatio...
 
Linux Performance Analysis and Tools
Linux Performance Analysis and ToolsLinux Performance Analysis and Tools
Linux Performance Analysis and Tools
 

Ähnlich wie Data Workflows for Machine Learning - SF Bay Area ML

Big Data Meetup #7
Big Data Meetup #7Big Data Meetup #7
Big Data Meetup #7Paul Lo
 
Brochure data science learning path board-infinity (1)
Brochure   data science learning path board-infinity (1)Brochure   data science learning path board-infinity (1)
Brochure data science learning path board-infinity (1)NirupamNishant2
 
Data science presentation
Data science presentationData science presentation
Data science presentationMSDEVMTL
 
IIPGH Webinar 1: Getting Started With Data Science
IIPGH Webinar 1: Getting Started With Data ScienceIIPGH Webinar 1: Getting Started With Data Science
IIPGH Webinar 1: Getting Started With Data Scienceds4good
 
Maintainable Machine Learning Products
Maintainable Machine Learning ProductsMaintainable Machine Learning Products
Maintainable Machine Learning ProductsAndrew Musselman
 
Spsbepoelmanssharepointbigdataclean 150421080105-conversion-gate02
Spsbepoelmanssharepointbigdataclean 150421080105-conversion-gate02Spsbepoelmanssharepointbigdataclean 150421080105-conversion-gate02
Spsbepoelmanssharepointbigdataclean 150421080105-conversion-gate02BIWUG
 
How to build your own Delve: combining machine learning, big data and SharePoint
How to build your own Delve: combining machine learning, big data and SharePointHow to build your own Delve: combining machine learning, big data and SharePoint
How to build your own Delve: combining machine learning, big data and SharePointJoris Poelmans
 
TechEvent 2019: Artificial Intelligence in Dev & Ops; Martin Luckow - Trivadis
TechEvent 2019: Artificial Intelligence in Dev & Ops; Martin Luckow - TrivadisTechEvent 2019: Artificial Intelligence in Dev & Ops; Martin Luckow - Trivadis
TechEvent 2019: Artificial Intelligence in Dev & Ops; Martin Luckow - TrivadisTrivadis
 
EVAIN Artificial intelligence and semantic annotation: are you serious about it?
EVAIN Artificial intelligence and semantic annotation: are you serious about it?EVAIN Artificial intelligence and semantic annotation: are you serious about it?
EVAIN Artificial intelligence and semantic annotation: are you serious about it?FIAT/IFTA
 
Webinar: Scaling MongoDB
Webinar: Scaling MongoDBWebinar: Scaling MongoDB
Webinar: Scaling MongoDBMongoDB
 
Map Reduce amrp presentation
Map Reduce amrp presentationMap Reduce amrp presentation
Map Reduce amrp presentationrenjan131
 
SPSChicagoBurbs 2019 - What is CDM and CDS?
SPSChicagoBurbs 2019 - What is CDM and CDS?SPSChicagoBurbs 2019 - What is CDM and CDS?
SPSChicagoBurbs 2019 - What is CDM and CDS?Nicolas Georgeault
 
NLP & Machine Learning - An Introductory Talk
NLP & Machine Learning - An Introductory Talk NLP & Machine Learning - An Introductory Talk
NLP & Machine Learning - An Introductory Talk Vijay Ganti
 
AzureML Welcome to the future of Predictive Analytics
AzureML Welcome to the future of Predictive Analytics AzureML Welcome to the future of Predictive Analytics
AzureML Welcome to the future of Predictive Analytics Ruben Pertusa Lopez
 
State of Play. Data Science on Hadoop in 2015 by SEAN OWEN at Big Data Spain ...
State of Play. Data Science on Hadoop in 2015 by SEAN OWEN at Big Data Spain ...State of Play. Data Science on Hadoop in 2015 by SEAN OWEN at Big Data Spain ...
State of Play. Data Science on Hadoop in 2015 by SEAN OWEN at Big Data Spain ...Big Data Spain
 
Azure Machine Learning 101
Azure Machine Learning 101Azure Machine Learning 101
Azure Machine Learning 101Renato Jovic
 
NLP & Machine Learning - An Introductory Talk
NLP & Machine Learning - An Introductory Talk NLP & Machine Learning - An Introductory Talk
NLP & Machine Learning - An Introductory Talk Vijay Ganti
 

Ähnlich wie Data Workflows for Machine Learning - SF Bay Area ML (20)

Big Data Meetup #7
Big Data Meetup #7Big Data Meetup #7
Big Data Meetup #7
 
Brochure data science learning path board-infinity (1)
Brochure   data science learning path board-infinity (1)Brochure   data science learning path board-infinity (1)
Brochure data science learning path board-infinity (1)
 
Data science presentation
Data science presentationData science presentation
Data science presentation
 
IIPGH Webinar 1: Getting Started With Data Science
IIPGH Webinar 1: Getting Started With Data ScienceIIPGH Webinar 1: Getting Started With Data Science
IIPGH Webinar 1: Getting Started With Data Science
 
Machine Learning
Machine LearningMachine Learning
Machine Learning
 
Maintainable Machine Learning Products
Maintainable Machine Learning ProductsMaintainable Machine Learning Products
Maintainable Machine Learning Products
 
Architecting for Data Science
Architecting for Data ScienceArchitecting for Data Science
Architecting for Data Science
 
Spsbepoelmanssharepointbigdataclean 150421080105-conversion-gate02
Spsbepoelmanssharepointbigdataclean 150421080105-conversion-gate02Spsbepoelmanssharepointbigdataclean 150421080105-conversion-gate02
Spsbepoelmanssharepointbigdataclean 150421080105-conversion-gate02
 
How to build your own Delve: combining machine learning, big data and SharePoint
How to build your own Delve: combining machine learning, big data and SharePointHow to build your own Delve: combining machine learning, big data and SharePoint
How to build your own Delve: combining machine learning, big data and SharePoint
 
TechEvent 2019: Artificial Intelligence in Dev & Ops; Martin Luckow - Trivadis
TechEvent 2019: Artificial Intelligence in Dev & Ops; Martin Luckow - TrivadisTechEvent 2019: Artificial Intelligence in Dev & Ops; Martin Luckow - Trivadis
TechEvent 2019: Artificial Intelligence in Dev & Ops; Martin Luckow - Trivadis
 
EVAIN Artificial intelligence and semantic annotation: are you serious about it?
EVAIN Artificial intelligence and semantic annotation: are you serious about it?EVAIN Artificial intelligence and semantic annotation: are you serious about it?
EVAIN Artificial intelligence and semantic annotation: are you serious about it?
 
Webinar: Scaling MongoDB
Webinar: Scaling MongoDBWebinar: Scaling MongoDB
Webinar: Scaling MongoDB
 
Map Reduce amrp presentation
Map Reduce amrp presentationMap Reduce amrp presentation
Map Reduce amrp presentation
 
SPSChicagoBurbs 2019 - What is CDM and CDS?
SPSChicagoBurbs 2019 - What is CDM and CDS?SPSChicagoBurbs 2019 - What is CDM and CDS?
SPSChicagoBurbs 2019 - What is CDM and CDS?
 
NLP & Machine Learning - An Introductory Talk
NLP & Machine Learning - An Introductory Talk NLP & Machine Learning - An Introductory Talk
NLP & Machine Learning - An Introductory Talk
 
AzureML Welcome to the future of Predictive Analytics
AzureML Welcome to the future of Predictive Analytics AzureML Welcome to the future of Predictive Analytics
AzureML Welcome to the future of Predictive Analytics
 
Data engineering design patterns
Data engineering design patternsData engineering design patterns
Data engineering design patterns
 
State of Play. Data Science on Hadoop in 2015 by SEAN OWEN at Big Data Spain ...
State of Play. Data Science on Hadoop in 2015 by SEAN OWEN at Big Data Spain ...State of Play. Data Science on Hadoop in 2015 by SEAN OWEN at Big Data Spain ...
State of Play. Data Science on Hadoop in 2015 by SEAN OWEN at Big Data Spain ...
 
Azure Machine Learning 101
Azure Machine Learning 101Azure Machine Learning 101
Azure Machine Learning 101
 
NLP & Machine Learning - An Introductory Talk
NLP & Machine Learning - An Introductory Talk NLP & Machine Learning - An Introductory Talk
NLP & Machine Learning - An Introductory Talk
 

Mehr von Paco Nathan

Human in the loop: a design pattern for managing teams working with ML
Human in the loop: a design pattern for managing  teams working with MLHuman in the loop: a design pattern for managing  teams working with ML
Human in the loop: a design pattern for managing teams working with MLPaco Nathan
 
Human-in-the-loop: a design pattern for managing teams that leverage ML
Human-in-the-loop: a design pattern for managing teams that leverage MLHuman-in-the-loop: a design pattern for managing teams that leverage ML
Human-in-the-loop: a design pattern for managing teams that leverage MLPaco Nathan
 
Human-in-a-loop: a design pattern for managing teams which leverage ML
Human-in-a-loop: a design pattern for managing teams which leverage MLHuman-in-a-loop: a design pattern for managing teams which leverage ML
Human-in-a-loop: a design pattern for managing teams which leverage MLPaco Nathan
 
Humans in a loop: Jupyter notebooks as a front-end for AI
Humans in a loop: Jupyter notebooks as a front-end for AIHumans in a loop: Jupyter notebooks as a front-end for AI
Humans in a loop: Jupyter notebooks as a front-end for AIPaco Nathan
 
Humans in the loop: AI in open source and industry
Humans in the loop: AI in open source and industryHumans in the loop: AI in open source and industry
Humans in the loop: AI in open source and industryPaco Nathan
 
Computable Content
Computable ContentComputable Content
Computable ContentPaco Nathan
 
Computable Content: Lessons Learned
Computable Content: Lessons LearnedComputable Content: Lessons Learned
Computable Content: Lessons LearnedPaco Nathan
 
SF Python Meetup: TextRank in Python
SF Python Meetup: TextRank in PythonSF Python Meetup: TextRank in Python
SF Python Meetup: TextRank in PythonPaco Nathan
 
Use of standards and related issues in predictive analytics
Use of standards and related issues in predictive analyticsUse of standards and related issues in predictive analytics
Use of standards and related issues in predictive analyticsPaco Nathan
 
Data Science in 2016: Moving Up
Data Science in 2016: Moving UpData Science in 2016: Moving Up
Data Science in 2016: Moving UpPaco Nathan
 
Jupyter for Education: Beyond Gutenberg and Erasmus
Jupyter for Education: Beyond Gutenberg and ErasmusJupyter for Education: Beyond Gutenberg and Erasmus
Jupyter for Education: Beyond Gutenberg and ErasmusPaco Nathan
 
GalvanizeU Seattle: Eleven Almost-Truisms About Data
GalvanizeU Seattle: Eleven Almost-Truisms About DataGalvanizeU Seattle: Eleven Almost-Truisms About Data
GalvanizeU Seattle: Eleven Almost-Truisms About DataPaco Nathan
 
Microservices, containers, and machine learning
Microservices, containers, and machine learningMicroservices, containers, and machine learning
Microservices, containers, and machine learningPaco Nathan
 
GraphX: Graph analytics for insights about developer communities
GraphX: Graph analytics for insights about developer communitiesGraphX: Graph analytics for insights about developer communities
GraphX: Graph analytics for insights about developer communitiesPaco Nathan
 
Graph Analytics in Spark
Graph Analytics in SparkGraph Analytics in Spark
Graph Analytics in SparkPaco Nathan
 
Apache Spark and the Emerging Technology Landscape for Big Data
Apache Spark and the Emerging Technology Landscape for Big DataApache Spark and the Emerging Technology Landscape for Big Data
Apache Spark and the Emerging Technology Landscape for Big DataPaco Nathan
 
QCon São Paulo: Real-Time Analytics with Spark Streaming
QCon São Paulo: Real-Time Analytics with Spark StreamingQCon São Paulo: Real-Time Analytics with Spark Streaming
QCon São Paulo: Real-Time Analytics with Spark StreamingPaco Nathan
 
Strata 2015 Data Preview: Spark, Data Visualization, YARN, and More
Strata 2015 Data Preview: Spark, Data Visualization, YARN, and MoreStrata 2015 Data Preview: Spark, Data Visualization, YARN, and More
Strata 2015 Data Preview: Spark, Data Visualization, YARN, and MorePaco Nathan
 
A New Year in Data Science: ML Unpaused
A New Year in Data Science: ML UnpausedA New Year in Data Science: ML Unpaused
A New Year in Data Science: ML UnpausedPaco Nathan
 
Microservices, Containers, and Machine Learning
Microservices, Containers, and Machine LearningMicroservices, Containers, and Machine Learning
Microservices, Containers, and Machine LearningPaco Nathan
 

Mehr von Paco Nathan (20)

Human in the loop: a design pattern for managing teams working with ML
Human in the loop: a design pattern for managing  teams working with MLHuman in the loop: a design pattern for managing  teams working with ML
Human in the loop: a design pattern for managing teams working with ML
 
Human-in-the-loop: a design pattern for managing teams that leverage ML
Human-in-the-loop: a design pattern for managing teams that leverage MLHuman-in-the-loop: a design pattern for managing teams that leverage ML
Human-in-the-loop: a design pattern for managing teams that leverage ML
 
Human-in-a-loop: a design pattern for managing teams which leverage ML
Human-in-a-loop: a design pattern for managing teams which leverage MLHuman-in-a-loop: a design pattern for managing teams which leverage ML
Human-in-a-loop: a design pattern for managing teams which leverage ML
 
Humans in a loop: Jupyter notebooks as a front-end for AI
Humans in a loop: Jupyter notebooks as a front-end for AIHumans in a loop: Jupyter notebooks as a front-end for AI
Humans in a loop: Jupyter notebooks as a front-end for AI
 
Humans in the loop: AI in open source and industry
Humans in the loop: AI in open source and industryHumans in the loop: AI in open source and industry
Humans in the loop: AI in open source and industry
 
Computable Content
Computable ContentComputable Content
Computable Content
 
Computable Content: Lessons Learned
Computable Content: Lessons LearnedComputable Content: Lessons Learned
Computable Content: Lessons Learned
 
SF Python Meetup: TextRank in Python
SF Python Meetup: TextRank in PythonSF Python Meetup: TextRank in Python
SF Python Meetup: TextRank in Python
 
Use of standards and related issues in predictive analytics
Use of standards and related issues in predictive analyticsUse of standards and related issues in predictive analytics
Use of standards and related issues in predictive analytics
 
Data Science in 2016: Moving Up
Data Science in 2016: Moving UpData Science in 2016: Moving Up
Data Science in 2016: Moving Up
 
Jupyter for Education: Beyond Gutenberg and Erasmus
Jupyter for Education: Beyond Gutenberg and ErasmusJupyter for Education: Beyond Gutenberg and Erasmus
Jupyter for Education: Beyond Gutenberg and Erasmus
 
GalvanizeU Seattle: Eleven Almost-Truisms About Data
GalvanizeU Seattle: Eleven Almost-Truisms About DataGalvanizeU Seattle: Eleven Almost-Truisms About Data
GalvanizeU Seattle: Eleven Almost-Truisms About Data
 
Microservices, containers, and machine learning
Microservices, containers, and machine learningMicroservices, containers, and machine learning
Microservices, containers, and machine learning
 
GraphX: Graph analytics for insights about developer communities
GraphX: Graph analytics for insights about developer communitiesGraphX: Graph analytics for insights about developer communities
GraphX: Graph analytics for insights about developer communities
 
Graph Analytics in Spark
Graph Analytics in SparkGraph Analytics in Spark
Graph Analytics in Spark
 
Apache Spark and the Emerging Technology Landscape for Big Data
Apache Spark and the Emerging Technology Landscape for Big DataApache Spark and the Emerging Technology Landscape for Big Data
Apache Spark and the Emerging Technology Landscape for Big Data
 
QCon São Paulo: Real-Time Analytics with Spark Streaming
QCon São Paulo: Real-Time Analytics with Spark StreamingQCon São Paulo: Real-Time Analytics with Spark Streaming
QCon São Paulo: Real-Time Analytics with Spark Streaming
 
Strata 2015 Data Preview: Spark, Data Visualization, YARN, and More
Strata 2015 Data Preview: Spark, Data Visualization, YARN, and MoreStrata 2015 Data Preview: Spark, Data Visualization, YARN, and More
Strata 2015 Data Preview: Spark, Data Visualization, YARN, and More
 
A New Year in Data Science: ML Unpaused
A New Year in Data Science: ML UnpausedA New Year in Data Science: ML Unpaused
A New Year in Data Science: ML Unpaused
 
Microservices, Containers, and Machine Learning
Microservices, Containers, and Machine LearningMicroservices, Containers, and Machine Learning
Microservices, Containers, and Machine Learning
 

Kürzlich hochgeladen

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 

Kürzlich hochgeladen (20)

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 

Data Workflows for Machine Learning - SF Bay Area ML

  • 1. Data Workflows for Machine Learning: 
 SF Bay Area ML Meetup 2014-04-09 ! Paco Nathan
 @pacoid http://liber118.com/pxn/ meetup.com/SF-Bayarea-Machine-Learning/events/173759442/
  • 2. BTW, since it’s April 9th… Happy #IoTDay !! http://iotday.org/ ! (any idea of what this means?)
  • 3. Why is this talk here? Machine Learning in production apps is less and less about algorithms (even though that work is quite fun and vital) ! Performing real work is more about: ! socializing a problem within an organization ! feature engineering (“Beyond Product Managers”) ! tournaments in CI/CD environments ! operationalizing high-ROI apps at scale ! etc. ! So I’ll just crawl out on a limb and state that leveraging great frameworks to build data workflows is more important than 
 chasing after diminishing returns on highly nuanced algorithms. ! Because Interwebs!
  • 4. Data Workflows for Machine Learning Middleware has been evolving for Big Data, and there are some great examples — we’ll review several. Process has been evolving too, right along with the use cases. ! Popular frameworks typically provide some Machine Learning capabilities within their core components, or at least among their major use cases. ! Let’s consider features from Enterprise DataWorkflows as a basis 
 for what’s needed in Data Workflows for Machine Learning. ! Their requirements for scale, robustness, cost trade-offs, interdisciplinary teams, etc., serve as guides in general.
  • 5. Caveat Auditor I won’t claim to be expert with each of the frameworks and environments described in this talk. Expert with a few of them perhaps, but more to the point: embroiled in many use cases. ! This talk attempts to define a “scorecard” for evaluating important ML data workflow features: 
 what’s needed for use cases, compare and contrast of what’s available, plus some indication of which frameworks are likely 
 to be best for a given scenario. ! Seriously, this is a work in progress.
  • 6. Outline • Definition: Machine Learning • Definition: Data Workflows • A whole bunch o’ examples across several platforms • Nine points to discuss, leading up to a scorecard • A crazy little thing called PMML • Questions, comments, flying tomatoes…
  • 7. Data Workflows for Machine Learning: 
 Frame the question… ! “A Basis for What’s Needed” 

  • 8. “Machine learning algorithms can figure out how to perform
 important tasks by generalizing from examples.This is often
 feasible and cost-effective where manual programming is not. 
 As more data becomes available, more ambitious problems 
 can be tackled. As a result, machine learning is widely used 
 in computer science and other fields.” Pedro Domingos, U Washington
 A Few Useful Things to Know about Machine Learning Definition: Machine Learning • overfitting (variance) • underfitting (bias) • “perfect classifier” (no free lunch) [learning as generalization] =
 [representation] + [evaluation] + [optimization]
  • 9. Definition: Machine Learning … Conceptually
 ! ! 1. real-world data 2. graph theory for representation 3. convert to sparse matrix for production work 
 leveraging abstract algebra + func programming 4. cost-effective parallel processing for ML apps 
 at scale, live use cases
  • 10. Definition: Machine Learning … Conceptually
 ! ! 1. real-world data 2. graph theory for representation 3. convert to sparse matrix for production work 
 leveraging abstract algebra + func programming 4. cost-effective parallel processing for ML apps 
 at scale, live use cases [representation] [evaluation] [optimization] [generalization] f(x): loss function g(z): regularization term
  • 11. discovery discovery modeling modeling integration integration appsapps systems systems business process, stakeholder data prep, discovery, modeling, etc. software engineering, automation systems engineering, availability data science Data Scientist App Dev Ops Domain Expert Definition: Machine Learning … Interdisciplinary Teams, Needs × Roles
  • 12. Definition: Machine Learning … Process, Feature Engineering evaluationrepresentation optimization use cases feature engineering data sources data sources data prep pipeline train test hold-outs learners classifiers classifiers classifiers data sources scoring
  • 13. Definition: Machine Learning … Process, Tournaments evaluationrepresentation optimization use cases feature engineering tournaments data sources data sources data prep pipeline train test hold-outs learners classifiers classifiers classifiers data sources scoring quantify and measure: • benefit? • risk? • operational costs? • obtain other data? • improve metadata? • refine representation? • improve optimization? • iterate with stakeholders? • can models (inference) inform first principles approaches?
  • 14. monoid (an alien life form, courtesy of abstract algebra): ! binary associative operator ! closure within a set of objects ! unique identity element what are those good for? ! composable functions in workflows ! compiler “hints” on steroids, to parallelize ! reassemble results minimizing bottlenecks at scale ! reusable components, like Lego blocks ! think: Docker for business logic Monoidify! Monoids as a Design Principle for Efficient MapReduce Algorithms
 Jimmy Lin, U Maryland/Twitter kudos to Oscar Boykin, Sam Ritchie, et al. Definition: Machine Learning … Invasion of the Monoids
  • 15. Definition: Machine Learning evaluationrepresentation optimization use cases feature engineering tournaments data sources data sources data prep pipeline train test hold-outs learners classifiers classifiers classifiers data sources scoring quantify and measure: • benefit? • risk? • operational costs? • obtain other data? • improve metadata? • refine representation? • improve optimization? • iterate with stakeholders? • can models (inference) inform first principles approaches? discovery discovery modeling modeling integration integration appsapps systems systems data science Data Scientist App Dev Ops Domain Expert introduced capability
  • 16. Definition evaluationrepresentation optimization use cases feature engineering tournaments data sources data sources data prep pipeline train test hold-outs learners classifiers classifiers classifiers data sources scoring quantify and measure: • benefit? • risk? • operational costs? • obtain other data? • improve metadata? • refine representation? • improve optimization? • iterate with stakeholders? • can models (inference) inform first principles approaches? discovery discovery modeling modeling integration integration appsapps systems systems data science Data Scientist App Dev Ops Domain Expert introduced capability Can we fit the required 
 process into generalized 
 workflow definitions?
  • 17. Definition: Data Workflows Middleware, effectively, is evolving for Big Data and Machine Learning…
 The following design pattern — a DAG — shows up in many places, 
 via many frameworks: ETL data prep predictive model data sources end uses
  • 18. Definition: Data Workflows definition of a typical Enterprise workflow which crosses through multiple departments, languages, and technologies… ETL data prep predictive model data sources end uses ANSI SQL for ETL
  • 19. Definition: Data Workflows definition of a typical Enterprise workflow which crosses through multiple departments, languages, and technologies… ETL data prep predictive model data sources end usesJava, Pig, etc., for business logic
  • 20. Definition: Data Workflows definition of a typical Enterprise workflow which crosses through multiple departments, languages, and technologies… ETL data prep predictive model data sources end uses SAS for predictive models

  • 21. Definition: Data Workflows definition of a typical Enterprise workflow which crosses through multiple departments, languages, and technologies… ETL data prep predictive model data sources end uses SAS for predictive models ANSI SQL for ETL most of the licensing costs…
  • 22. Definition: Data Workflows definition of a typical Enterprise workflow which crosses through multiple departments, languages, and technologies… ETL data prep predictive model data sources end usesJava, Pig, etc., most of the project costs…
  • 23. Definition: Data Workflows definition of a typical Enterprise workflow which crosses through multiple departments, languages, and technologies… ETL data prep predictive model data sources end usesJava, Pig, etc., most of the project costs… Something emerges 
 to fill these needs, 
 for instance…
  • 24. ETL data prep predictive model data sources end uses Lingual: DW → ANSI SQL Pattern: SAS, R, etc. → PMML business logic in Java, Clojure, Scala, etc. sink taps for Memcached, HBase, MongoDB, etc. source taps for Cassandra, JDBC, Splunk, etc. Definition: Data Workflows For example, Cascading and related projects implement the following components, based on 100% open source: cascading.org a compiler sees it all…
 one connected DAG: • troubleshooting • exception handling • notifications • some optimizations
  • 25. ETL data prep predictive model data sources end uses Lingual: DW → ANSI SQL Pattern: SAS, R, etc. → PMML business logic in Java, Clojure, Scala, etc. sink taps for Memcached, HBase, MongoDB, etc. source taps for Cassandra, JDBC, Splunk, etc. Definition: Data Workflows Cascading allows multiple departments to combine their workflow components into an integrated app – one among many, typically – based on 100% open source ! ! FlowDef flowDef = FlowDef.flowDef()! .setName( "etl" )! .addSource( "example.employee", emplTap )! .addSource( "example.sales", salesTap )! .addSink( "results", resultsTap );!  ! SQLPlanner sqlPlanner = new SQLPlanner()! .setSql( sqlStatement );!  ! flowDef.addAssemblyPlanner( sqlPlanner );! ! ! cascading.org
  • 26. ETL data prep predictive model data sources end uses Lingual: DW → ANSI SQL Pattern: SAS, R, etc. → PMML business logic in Java, Clojure, Scala, etc. sink taps for Memcached, HBase, MongoDB, etc. source taps for Cassandra, JDBC, Splunk, etc. Definition: Data Workflows Cascading allows multiple departments to combine their workflow components into an integrated app – one among many, typically – based on 100% open source ! ! FlowDef flowDef = FlowDef.flowDef()! .setName( "classifier" )! .addSource( "input", inputTap )! .addSink( "classify", classifyTap );!  ! PMMLPlanner pmmlPlanner = new PMMLPlanner()! .setPMMLInput( new File( pmmlModel ) )! .retainOnlyActiveIncomingFields();!  ! flowDef.addAssemblyPlanner( pmmlPlanner );! ! !
  • 27. Enterprise DataWorkflows with Cascading O’Reilly, 2013 shop.oreilly.com/product/ 0636920028536.do ETL data prep predictive model data sources end uses
  • 28. Enterprise DataWorkflows with Cascading O’Reilly, 2013 shop.oreilly.com/product/ 0636920028536.do ETL data prep predictive model data sources end uses This begs an update…
  • 29. Enterprise DataWorkflows with Cascading O’Reilly, 2013 shop.oreilly.com/product/ 0636920028536.do ETL data prep predictive model data sources end uses Because…
  • 30.
  • 31. Data Workflows for Machine Learning: 
 Examples… ! “Neque per exemplum” 

  • 32. Example: KNIME “a user-friendly graphical workbench for the entire analysis
 process: data access, data transformation, initial investigation,
 powerful predictive analytics, visualisation and reporting.” • large number of integrations (over 1000 modules) • ranked #1 in customer satisfaction among 
 open source analytics frameworks • visual editing of reusable modules • leverage prior work in R, Perl, etc. • Eclipse integration • easily extended for new integrations knime.org
  • 33. Example: Python stack Python has much to offer – ranging across an 
 organization, no just for the analytics staff • ipython.org • pandas.pydata.org • scikit-learn.org • numpy.org • scipy.org • code.google.com/p/augustus • continuum.io • nltk.org • matplotlib.org
  • 34. Example: Julia “a high-level, high-performance dynamic programming language
 for technical computing, with syntax that is familiar to users of
 other technical computing environments” • significantly faster than most alternatives • built to leverage parallelism, cloud computing • still relatively new — one to watch! importall Base! ! type BubbleSort <: Sort.Algorithm end! ! function sort!(v::AbstractVector, lo::Int, hi::Int, ::BubbleSort, o::Sort.Ordering)!     while true!         clean = true!         for i = lo:hi-1!             if Sort.lt(o, v[i+1], v[i])!                 v[i+1], v[i] = v[i], v[i+1]!                 clean = false!             end!         end!         clean && break!     end!     return v! end! julialang.org
  • 35. Example: Summingbird “a library that lets you write streaming MapReduce programs
 that look like native Scala or Java collection transformations 
 and execute them on a number of well-known distributed
 MapReduce platforms like Storm and Scalding.” • switch between Storm, Scalding (Hadoop) • Spark support is in progress • leverage Algebird, Storehaus, Matrix API, etc. github.com/twitter/summingbird def wordCount[P <: Platform[P]]! (source: Producer[P, String], store: P#Store[String, Long]) =! source.flatMap { sentence => ! toWords(sentence).map(_ -> 1L)! }.sumByKey(store)
  • 36. Example: Scalding import com.twitter.scalding._!  ! class WordCount(args : Args) extends Job(args) {! Tsv(args("doc"),! ('doc_id, 'text),! skipHeader = true)! .read! .flatMap('text -> 'token) {! text : String => text.split("[ [](),.]")! }! .groupBy('token) { _.size('count) }! .write(Tsv(args("wc"), writeHeader = true))! } github.com/twitter/scalding
  • 37. Example: Scalding • extends the Scala collections API so that distributed lists become “pipes” backed by Cascading • code is compact, easy to understand • nearly 1:1 between elements of conceptual flow diagram 
 and function calls • extensive libraries are available for linear algebra, abstract algebra, machine learning – e.g., Matrix API, Algebird, etc. • significant investments by Twitter, Etsy, eBay, etc. • less learning curve than Cascalog • build scripts… those take a while to run : github.com/twitter/scalding
  • 38. Example: Cascalog (ns impatient.core!   (:use [cascalog.api]!         [cascalog.more-taps :only (hfs-delimited)])!   (:require [clojure.string :as s]!             [cascalog.ops :as c])!   (:gen-class))! ! (defmapcatop split [line]!   "reads in a line of string and splits it by regex"!   (s/split line #"[[](),.)s]+"))! ! (defn -main [in out & args]!   (?<- (hfs-delimited out)!        [?word ?count]!        ((hfs-delimited in :skip-header? true) _ ?line)!        (split ?line :> ?word)!        (c/count ?count)))! ! ; Paul Lam! ; github.com/Quantisan/Impatient cascalog.org
  • 39. Example: Cascalog • implements Datalog in Clojure, with predicates backed 
 by Cascading – for a highly declarative language • run ad-hoc queries from the Clojure REPL –
 approx. 10:1 code reduction compared with SQL • composable subqueries, used for test-driven development (TDD) practices at scale • Leiningen build: simple, no surprises, in Clojure itself • more new deployments than other Cascading DSLs – 
 Climate Corp is largest use case: 90% Clojure/Cascalog • has a learning curve, limited number of Clojure developers • aggregators are the magic, and those take effort to learn cascalog.org
  • 40. Example: Apache Spark in-memory cluster computing, 
 by Matei Zaharia, RamVenkataraman, et al. • intended to make data analytics fast to write and to run • load data into memory and query it repeatedly, much more quickly than with Hadoop • APIs in Scala, Java and Python, shells in Scala and Python • Shark (Hive on Spark), Spark Streaming (like Storm), etc. • integrations with MLbase, Summingbird (in progress) // word count! val file = spark.textFile(“hdfs://…”)! val counts = file.flatMap(line => line.split(” “))! .map(word => (word, 1))! .reduceByKey(_ + _)! counts.saveAsTextFile(“hdfs://…”) spark-project.org
  • 41. Example: MLbase “distributed machine learning made easy” • sponsored by UC Berkeley EECS AMP Lab • MLlib – common algorithms, low-level, written atop Spark • MLI – feature extraction, algorithm dev atop MLlib • ML Optimizer – automates model selection, 
 compiler/optimizer • see article:
 http://strata.oreilly.com/2013/02/mlbase-scalable- machine-learning-made-accessible.html ! mlbase.org data = load("hdfs://path/to/als_clinical")! // the features are stored in columns 2-10! X = data[, 2 to 10]! y = data[, 1]! model = do_classify(y, X)
  • 42. Example: Spark SQL “blurs the lines between RDDs and relational tables” intermix SQL commands to querying external data, along with complex analytics, in a single app: • allows SQL extensions based on MLlib • Shark is being migrated to Spark SQL Spark SQL: Manipulating Structured Data Using Spark
 Michael Armbrust, Reynold Xin (2014-03-24)
 databricks.com/blog/2014/03/26/Spark- SQL-manipulating-structured-data-using- Spark.html
 people.apache.org/~pwendell/catalyst- docs/sql-programming-guide.html ! // data can be extracted from existing sources // e.g., Apache Hive val trainingDataTable = sql(""" SELECT e.action u.age, u.latitude, u.logitude FROM Users u JOIN Events e ON u.userId = e.userId""") ! // since `sql` returns an RDD, the results above // can be used in MLlib val trainingData = trainingDataTable.map { row => val features = Array[Double](row(1), row(2), row(3)) LabeledPoint(row(0), features) } ! val model = new LogisticRegressionWithSGD().run(trainingData) spark-project.org
  • 43. Example: Titan distributed graph database, 
 by Matthias Broecheler, Marko Rodriguez, et al. • scalable graph database optimized for storing and querying graphs • supports hundreds of billions of vertices and edges • transactional database that can support thousands of concurrent users executing complex graph traversals • supports search through Lucene, ElasticSearch • can be backed by HBase, Cassandra, BerkeleyDB • TinkerPop native graph stack with Gremlin, etc. // who is hercules' paternal grandfather?! g.V('name','hercules').out('father').out('father').name thinkaurelius.github.io/titan
  • 44. Example: MBrace “a .NET based software stack that enables easy large-scale
 distributed computation and big data analysis.” • declarative and concise distributed algorithms in 
 F# asynchronous workflows • scalable for apps in private datacenters or public 
 clouds, e.g.,Windows Azure or Amazon EC2 • tooling for interactive, REPL-style deployment, monitoring, management, debugging inVisual Studio • leverages monads (similar to Summingbird) • MapReduce as a library, but many patterns beyond m-brace.net let rec mapReduce (map: 'T -> Cloud<'R>)! (reduce: 'R -> 'R -> Cloud<'R>)! (identity: 'R)! (input: 'T list) =! cloud {! match input with! | [] -> return identity! | [value] -> return! map value! | _ ->! let left, right = List.split input! let! r1, r2 =! (mapReduce map reduce identity left)! <||>! (mapReduce map reduce identity right)! return! reduce r1 r2! }
  • 45. Data Workflows for Machine Learning: 
 Update the definitions… ! “Nine Points to Discuss”

  • 46. Data Workflows Formally speaking, workflows include people (cross-dept) 
 and define oversight for exceptional data …otherwise, data flow or pipeline would be more apt …examples include Cascading traps, with exceptional tuples 
 routed to a review organization, e.g., Customer Support includes people, defines oversight for exceptional data Hadoop Cluster source tap source tap sink tap trap tap customer profile DBsCustomer Prefs logs logs Logs Data Workflow Cache Customers Support Web App Reporting Analytics Cubes sink tap Modeling PMML 1
  • 47. Data Workflows Footnote – see also an excellent article related to this point 
 and the next: ! Therbligs for data science: 
 A nuts and bolts framework for accelerating data work Abe Gong @Jawbone blog.abegong.com/2014/03/therbligs-for-data-science.html strataconf.com/strata2014/public/schedule/detail/32291 brighttalk.com/webcast/9059/105119 ! ! ! includes people, defines oversight for exceptional data 1+
  • 48. Data Workflows Workflows impose a separation of concerns, allowing 
 for multiple abstraction layers in the tech stack …specify what is required, not how to accomplish it …articulating the business logic … Cascading leverages pattern language …related notions from Knuth, literate programming …not unlike BPM/BPEL for Big Data …examples: IPython, R Markdown, etc. separation of concerns, allows for literate programming 2
  • 49. Data Workflows Footnote – while discussing separation of concerns and a general design pattern, let’s consider data workflows in a broader context of probabilistic programming, since business data is heterogeneous and structured… 
 the data for every domain is heterogeneous. Paraphrasing Ginsberg: I’ve seen the best minds of my generation destroyed by madness, dragging themselves through quagmires of large LCD screens filled with Intellij debuggers and database command lines, yearning to fit real-world data into their preferred “deterministic” tools… separation of concerns, allows for literate programming 2+ Probabilistic Programming: 
 Why,What, How,When
 Beau Cronin
 Strata SC (2014)
 speakerdeck.com/beaucronin/ probabilistic-programming- strata-santa-clara-2014 Why Probabilistic Programming 
 Matters
 Rob Zinkov
 Convex Optimized (2012-06-27)
 zinkov.com/posts/ 2012-06-27-why-prob- programming-matters/
  • 50. Data Workflows Multiple abstraction layers in the tech stack are 
 needed, but still emerging …feedback loops based on machine data …optimizers feed on abstraction …metadata accounting: • track data lineage • propagate schema • model / feature usage • ensemble performance …app history accounting: • util stats, mixing workloads • heavy-hitters, bottlenecks • throughput, latency multiple abstraction layers 
 for metadata, feedback, 
 and optimization Cluster Scheduler Planners/ Optimizers Clusters DSLs Machine Data • app history • util stats • bottlenecksMixed Topologies Business Process Reusable Components Portable Models • data lineage • schema propagation • feature selection • tournaments 3
  • 51. Data Workflows Multiple needed, but still emerging …feedback loops based on …optimizers feed on abstraction …metadata accounting: • track data lineage • propagate • model / feature usage • ensemble performance …app history accounting: • util stats, mixing workloads • heavy-hitters, bottlenecks • throughput, latency multiple abstraction layers 
 for metadata, feedback, 
 and optimization Cluster Scheduler Planners/ Optimizers Clusters DSLs Machine Data • app history • util stats • bottlenecksMixed Topologies Business Process Reusable Components Portable Models • data lineage • schema propagation • feature selection • tournaments 3 Um, will compilers 
 ever look like this??
  • 52. Data Workflows Workflows must provide for test, which is no simple 
 matter …testing is required on three abstraction layers: • model portability/evaluation, ensembles, tournaments • TDD in reusable components and business process • continuous integration / continuous deployment …examples: Cascalog for TDD, PMML for model eval …still so much more to improve …keep in mind that workflows involve people, too testing: model evaluation, TDD, app deployment 4 Cluster Scheduler Planners/ Optimizers Clusters DSLs Machine Data • app history • util stats • bottlenecksMixed Topologies Business Process Reusable Components Portable Models • data lineage • schema propagation • feature selection • tournaments
  • 53. Data Workflows Workflows enable system integration …future-proof integrations and scale-out …build components and apps, not jobs and command lines …allow compiler optimizations across the DAG,
 i.e., cross-dept contributions …minimize operationalization costs: • troubleshooting, debugging at scale • exception handling • notifications, instrumentation …examples: KNIME, Cascading, etc. ! future-proof system integration, scale-out, ops Hadoop Cluster source tap source tap sink tap trap tap customer profile DBsCustomer Prefs logs logs Logs Data Workflow Cache Customers Support Web App Reporting Analytics Cubes sink tap Modeling PMML 5
  • 54. Data Workflows Visualizing workflows, what a great idea. …the practical basis for: • collaboration • rapid prototyping • component reuse …examples: KNIME wins best in category …Cascading generates flow diagrams, 
 which are a nice start visualizing allows people 
 to collaborate through code 6
  • 55. Data Workflows Abstract algebra, containerizing workflow metadata …monoids, semigroups, etc., allow for reusable components 
 with well-defined properties for running in parallel at scale …let business process be agnostic about underlying topologies, 
 with analogy to Linux containers (Docker, etc.) …compose functions, take advantage of sparsity (monoids) …because “data is fully functional” – FP for s/w eng benefits …aggregators are almost always “magic”, now we can solve 
 for common use cases …read Monoidify! Monoids as a Design Principle for Efficient MapReduce Algorithms by Jimmy Lin …Cascading introduced some notions of this circa 2007, 
 but didn’t make it explicit …examples: Algebird in Summingbird, Simmer, Spark, etc. abstract algebra and functional programming containerize business process 7
  • 56. Data Workflows Footnote – see also two excellent talks related to this point: ! Algebra for Analytics
 speakerdeck.com/johnynek/algebra-for-analytics
 Oscar Boykin, Strata SC (2014) Add ALL theThings:
 Abstract Algebra Meets Analytics
 infoq.com/presentations/abstract-algebra-analytics
 Avi Bryant, Strange Loop (2013) abstract algebra and functional programming containerize business process 7+
  • 57. Data Workflows Workflow needs vary in time, and need to blend time …something something batch, something something low-latency …scheduling batch isn’t hard; scheduling low-latency is 
 computationally brutal (see the Omega paper) …because people like saying “Lambda Architecture”, 
 it gives them goosebumps, or something …because real-time means so many different things …because batch windows are so 1964 …examples: Summingbird, Oryx blend results from different time scales: batch plus low- latency 8 Big Data
 Nathan Marz, James Warren
 manning.com/marz
  • 58. Data Workflows Workflows may define contexts in which model selection 
 possibly becomes a compiler problem …for example, see Boyd, Parikh, et al. …ultimately optimizing for loss function + regularization term …perhaps not ready for prime-time immediately …examples: MLbase optimize learners in context, to make model selection potentially a compiler problem 9 f(x): loss function g(z): regularization term
  • 59. Data Workflows For one of the best papers about what workflows really
 truly require, see Out of the Tar Pit by Moseley and Marks bonus
  • 60. Nine Points for Data Workflows — a wish list 1. includes people, defines oversight for exceptional data 2. separation of concerns, allows for literate programming 3. multiple abstraction layers for metadata, feedback, and optimization 4. testing: model evaluation, TDD, app deployment 5. future-proof system integration, scale-out, ops 6. visualizing workflows allows people to collaborate through code 7. abstract algebra and functional programming containerize business process 8. blend results from different time scales: 
 batch plus low-latency 9. optimize learners in context, to make model 
 selection potentially a compiler problem Cluster Scheduler Planners/ Optimizers Clusters DSLs Machine Data • app history • util stats • bottlenecksMixed Topologies Business Process Reusable Components Portable Models • data lineage • schema propagation • feature selection • tournaments
  • 61.
  • 62. Nine Points for Data Workflows — a scorecard Spark, MLbase Oryx Summing! bird Cascalog Cascading ! KNIME Py Data R Markdown MBrace includes people, exceptional data separation of concerns multiple 
 abstraction layers testing in depth future-proof 
 system integration visualize to collab can haz monoids blends batch + 
 “real-time” optimize learners 
 in context can haz PMML ✔ ✔ ✔ ✔ ✔
  • 63. Data Workflows for Machine Learning: 
 PMML… ! “Oh, by the way…” 

  • 64. • established XML standard for predictive model markup • organized by Data Mining Group (DMG), since 1997 
 http://dmg.org/ • members: IBM, SAS, Visa, FICO, Equifax, NASA,
 Microstrategy, Microsoft, etc. • PMML concepts for metadata, ensembles, etc., translate 
 directly into workflow abstractions, e.g., Cascading ! “PMML is the leading standard for statistical and data mining models and
 supported by over 20 vendors and organizations.With PMML, it is easy 
 to develop a model on one system using one application and deploy the
 model on another system using another application.” PMML – an industry standard wikipedia.org/wiki/Predictive_Model_Markup_Language
  • 65. PMML – vendor coverage
  • 66. • Association Rules: AssociationModel element • Cluster Models: ClusteringModel element • Decision Trees: TreeModel element • Naïve Bayes Classifiers: NaiveBayesModel element • Neural Networks: NeuralNetwork element • Regression: RegressionModel and GeneralRegressionModel elements • Rulesets: RuleSetModel element • Sequences: SequenceModel element • SupportVector Machines: SupportVectorMachineModel element • Text Models: TextModel element • Time Series: TimeSeriesModel element PMML – model coverage ibm.com/developerworks/industry/library/ind-PMML2/
  • 67. ! PMML in Action
 Alex Guazzelli,Wen-Ching Lin,Tridivesh Jena
 amazon.com/dp/1470003244 ! See also excellent resources at: zementis.com/pmml.htm PMML – further study
  • 68. Hadoop Cluster source tap source tap sink tap trap tap customer profile DBsCustomer Prefs logs logs Logs Data Workflow Cache Customers Support Web App Reporting Analytics Cubes sink tap Modeling PMML Pattern – model scoring • a PMML library for Cascading workflows • migrate workloads: SAS,Teradata, etc., 
 exporting predictive models as PMML • great open source tools – R, Weka, 
 KNIME, Matlab, RapidMiner, etc. • leverage PMML as another kind of DSL • only for scoring models, not training
  • 69. Pattern – model scoring • originally intended as a general purpose, tuple-oriented model scoring engine for JVM-based frameworks • library plugs into Cascading (Hadoop), and ostensibly Cascalog, Scalding, Storm, Spark, Summingbird, etc. • dev forum:
 https://groups.google.com/forum/#!forum/pattern-user • original GitHub repo:
 https://github.com/ceteri/pattern/ • somehow, the other fork became deeply intertwined 
 with Cascading dependencies… • work in progress to integrate with other frameworks, 
 add models, and also train models at scale using Spark
  • 70. ## train a RandomForest model!  ! f <- as.formula("as.factor(label) ~ .")! fit <- randomForest(f, data_train, ntree=50)!  ! ## test the model on the holdout test set!  ! print(fit$importance)! print(fit)!  ! predicted <- predict(fit, data)! data$predicted <- predicted! confuse <- table(pred = predicted, true = data[,1])! print(confuse)!  ! ## export predicted labels to TSV!  ! write.table(data, file=paste(dat_folder, "sample.tsv", sep="/"), 
 quote=FALSE, sep="t", row.names=FALSE)!  ! ## export RF model to PMML!  ! saveXML(pmml(fit), file=paste(dat_folder, "sample.rf.xml", sep="/"))! Pattern – create a model in R
  • 71. <?xml version="1.0"?>! <PMML version="4.0" xmlns="http://www.dmg.org/PMML-4_0"!  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"!  xsi:schemaLocation="http://www.dmg.org/PMML-4_0
 http://www.dmg.org/v4-0/pmml-4-0.xsd">!  <Header copyright="Copyright (c)2012 Concurrent, Inc." description="Random Forest Tree Model">!   <Extension name="user" value="ceteri" extender="Rattle/PMML"/>!   <Application name="Rattle/PMML" version="1.2.30"/>!   <Timestamp>2012-10-22 19:39:28</Timestamp>!  </Header>!  <DataDictionary numberOfFields="4">!   <DataField name="label" optype="categorical" dataType="string">!    <Value value="0"/>!    <Value value="1"/>!   </DataField>!   <DataField name="var0" optype="continuous" dataType="double"/>!   <DataField name="var1" optype="continuous" dataType="double"/>!   <DataField name="var2" optype="continuous" dataType="double"/>!  </DataDictionary>!  <MiningModel modelName="randomForest_Model" functionName="classification">!   <MiningSchema>!    <MiningField name="label" usageType="predicted"/>!    <MiningField name="var0" usageType="active"/>!    <MiningField name="var1" usageType="active"/>!    <MiningField name="var2" usageType="active"/>!   </MiningSchema>!   <Segmentation multipleModelMethod="majorityVote">!    <Segment id="1">!     <True/>!     <TreeModel modelName="randomForest_Model" functionName="classification" algorithmName="randomForest" splitCharacteristic="binarySplit">!      <MiningSchema>!       <MiningField name="label" usageType="predicted"/>!       <MiningField name="var0" usageType="active"/>!       <MiningField name="var1" usageType="active"/>!       <MiningField name="var2" usageType="active"/>!      </MiningSchema>! ...! Pattern – capture model parameters as PMML
  • 72. public static void main( String[] args ) throws RuntimeException {! String inputPath = args[ 0 ];! String classifyPath = args[ 1 ];! // set up the config properties! Properties properties = new Properties();! AppProps.setApplicationJarClass( properties, Main.class );! HadoopFlowConnector flowConnector = new HadoopFlowConnector( properties );!   // create source and sink taps! Tap inputTap = new Hfs( new TextDelimited( true, "t" ), inputPath );! Tap classifyTap = new Hfs( new TextDelimited( true, "t" ), classifyPath );!   // handle command line options! OptionParser optParser = new OptionParser();! optParser.accepts( "pmml" ).withRequiredArg();!   OptionSet options = optParser.parse( args );!  ! // connect the taps, pipes, etc., into a flow! FlowDef flowDef = FlowDef.flowDef().setName( "classify" )! .addSource( "input", inputTap )! .addSink( "classify", classifyTap );!  ! if( options.hasArgument( "pmml" ) ) {! String pmmlPath = (String) options.valuesOf( "pmml" ).get( 0 );! PMMLPlanner pmmlPlanner = new PMMLPlanner()! .setPMMLInput( new File( pmmlPath ) )! .retainOnlyActiveIncomingFields()! .setDefaultPredictedField( new Fields( "predict", Double.class ) ); // default value if missing from the model! flowDef.addAssemblyPlanner( pmmlPlanner );! }!  ! // write a DOT file and run the flow! Flow classifyFlow = flowConnector.connect( flowDef );! classifyFlow.writeDOT( "dot/classify.dot" );! classifyFlow.complete();! } Pattern – score a model, within an app
  • 74. ## run an RF classifier at scale!  ! hadoop jar build/libs/pattern.jar ! data/sample.tsv out/classify out/trap ! --pmml data/sample.rf.xml!  ! ! Pattern – score a model, using pre-defined Cascading app
  • 75. Data Workflows for Machine Learning: 
 Summary ! “feedback and discussion” 
 ?
  • 76.
  • 77. Nine Points for Data Workflows — a scorecard Spark, MLbase Oryx Summing! bird Cascalog Cascading ! KNIME Py Data R Markdown MBrace includes people, exceptional data separation of concerns multiple 
 abstraction layers testing in depth future-proof 
 system integration visualize to collab can haz monoids blends batch + 
 “real-time” optimize learners 
 in context can haz PMML ✔ ✔ ✔ ✔ ✔
  • 78. PMML – what’s needed? in the language standard: ! data preparation ! data sources/sinks as parameters ! track data lineage ! more monoid, less XML ! handle data exceptions => TDD ! updates/active learning? ! tournaments? ! in the workflow frameworks: ! include feature engineering w/ model? ! support evaluation better ! build ensembles evaluationrepresentation optimization use cases feature engineering tournaments data sources data sources data prep pipeline train test hold-outs learners classifiers classifiers classifiers data sources scoring quantify and measure: • benefit? • risk? • operational costs? • obtain other data? • improve metadata? • refine representation? • improve optimization? • iterate with stakeholders? • can models (inference) inform first principles approaches?
  • 79. Thank you, and… stay tuned for Just Enough Math (Summer 2014 w/ Allen Day) ! monthly newsletter for updates, events, conference summaries, etc.: liber118.com/pxn/