SlideShare ist ein Scribd-Unternehmen logo
1 von 113
Downloaden Sie, um offline zu lesen
Building parallel machine
learning algorithms:
scaling out and up
William Benton

willb@redhat.com • @willb
Motivation
Motivation
Motivation
Motivation
Forecast
Introducing our case study: self-organizing maps
Parallel implementations for partitioned collections (in particular, RDDs)
Beyond the RDD: data frames and ML pipelines
Practical considerations and key takeaways
Introducing our case study
Training self-organizing maps
Training self-organizing maps
Training self-organizing maps
Training self-organizing maps
Training self-organizing maps
while t < maxupdates:
random.shuffle(examples)
for ex in examples:
t = t + 1
if t == maxupdates:
break
bestMatch = closest(somt, ex)
for (unit, wt) in neighborhood(bestMatch, sigma(t)):
somt+1[unit] = somt[unit] + (ex - somt[unit]) * alpha(t) * wt
Training self-organizing maps
while t < maxupdates:
random.shuffle(examples)
for ex in examples:
t = t + 1
if t == maxupdates:
break
bestMatch = closest(somt, ex)
for (unit, wt) in neighborhood(bestMatch, sigma(t)):
somt+1[unit] = somt[unit] + (ex - somt[unit]) * alpha(t) * wt
process the training
set in random order
Training self-organizing maps
while t < maxupdates:
random.shuffle(examples)
for ex in examples:
t = t + 1
if t == maxupdates:
break
bestMatch = closest(somt, ex)
for (unit, wt) in neighborhood(bestMatch, sigma(t)):
somt+1[unit] = somt[unit] + (ex - somt[unit]) * alpha(t) * wt
process the training
set in random order
the neighborhood size controls
how much of the map around
the BMU is affected
Training self-organizing maps
while t < maxupdates:
random.shuffle(examples)
for ex in examples:
t = t + 1
if t == maxupdates:
break
bestMatch = closest(somt, ex)
for (unit, wt) in neighborhood(bestMatch, sigma(t)):
somt+1[unit] = somt[unit] + (ex - somt[unit]) * alpha(t) * wt
process the training
set in random order
the neighborhood size controls
how much of the map around
the BMU is affected
the learning rate controls
how much closer to the
example each unit gets
Parallel implementations for
partitioned collections
Historical aside: Amdahl’s Law
1
1 - p
lim So =sp —> ∞
What forces serial execution?
What forces serial execution?
What forces serial execution?
state[t+1] =
combine(state[t], x)
What forces serial execution?
state[t+1] =
combine(state[t], x)
What forces serial execution?
f1: (T, T) => T
f2: (T, U) => T
What forces serial execution?
f1: (T, T) => T
f2: (T, U) => T
What forces serial execution?
f1: (T, T) => T
f2: (T, U) => T
How can we fix these?
a ⊕ b = b ⊕ a
(a ⊕ b) ⊕ c = a ⊕ (b ⊕ c)
How can we fix these?
a ⊕ b = b ⊕ a
(a ⊕ b) ⊕ c = a ⊕ (b ⊕ c)
How can we fix these?
a ⊕ b = b ⊕ a
(a ⊕ b) ⊕ c = a ⊕ (b ⊕ c)
How can we fix these?
a ⊕ b = b ⊕ a
(a ⊕ b) ⊕ c = a ⊕ (b ⊕ c)
How can we fix these?
L-BGFSSGD
a ⊕ b = b ⊕ a
(a ⊕ b) ⊕ c = a ⊕ (b ⊕ c)
How can we fix these?
SGD L-BGFS
a ⊕ b = b ⊕ a
(a ⊕ b) ⊕ c = a ⊕ (b ⊕ c)
There will be examples of each
of these approaches for many
problems in the literature and
in open-source code!
Implementing atop RDDs
We’ll start with a batch implementation of our technique:
for t in (1 to iterations):
state = newState()
for ex in examples:
bestMatch = closest(somt-1, ex)
hood = neighborhood(bestMatch, sigma(t))
state.matches += ex * hood
state.hoods += hood
somt = newSOM(state.matches / state.hoods)
Implementing atop RDDs
for t in (1 to iterations):
state = newState()
for ex in examples:
bestMatch = closest(somt-1, ex)
hood = neighborhood(bestMatch, sigma(t))
state.matches += ex * hood
state.hoods += hood
somt = newSOM(state.matches / state.hoods)
Each batch produces a model that
can be averaged with other models
Implementing atop RDDs
Each batch produces a model that
can be averaged with other models
partition
for t in (1 to iterations):
state = newState()
for ex in examples:
bestMatch = closest(somt-1, ex)
hood = neighborhood(bestMatch, sigma(t))
state.matches += ex * hood
state.hoods += hood
somt = newSOM(state.matches / state.hoods)
Implementing atop RDDs
This won’t always work!
for t in (1 to iterations):
state = newState()
for ex in examples:
bestMatch = closest(somt-1, ex)
hood = neighborhood(bestMatch, sigma(t))
state.matches += ex * hood
state.hoods += hood
somt = newSOM(state.matches / state.hoods)
An implementation template
var nextModel = initialModel
for (int i = 0; i < iterations; i++) {
val current = sc.broadcast(nextModel)
val newState = examples.aggregate(ModelState.empty()) {
{ case (state: ModelState, example: Example) =>
state.update(current.value.lookup(example, i), example) }
{ case (s1: ModelState, s2: ModelState) => s1.combine(s2) }
}
nextModel = modelFromState(newState)
current.unpersist
}
var nextModel = initialModel
for (int i = 0; i < iterations; i++) {
val current = sc.broadcast(nextModel)
val newState = examples.aggregate(ModelState.empty()) {
{ case (state: ModelState, example: Example) =>
state.update(current.value.lookup(example, i), example) }
{ case (s1: ModelState, s2: ModelState) => s1.combine(s2) }
}
nextModel = modelFromState(newState)
current.unpersist
}
An implementation template

“fold”: update the state for
this partition with a single
new example
var nextModel = initialModel
for (int i = 0; i < iterations; i++) {
val current = sc.broadcast(nextModel)
val newState = examples.aggregate(ModelState.empty()) {
{ case (state: ModelState, example: Example) =>
state.update(current.value.lookup(example, i), example) }
{ case (s1: ModelState, s2: ModelState) => s1.combine(s2) }
}
nextModel = modelFromState(newState)
current.unpersist
}
var nextModel = initialModel
for (int i = 0; i < iterations; i++) {
val current = sc.broadcast(nextModel)
val newState = examples.aggregate(ModelState.empty()) {
{ case (state: ModelState, example: Example) =>
state.update(current.value.lookup(example, i), example) }
{ case (s1: ModelState, s2: ModelState) => s1.combine(s2) }
}
nextModel = modelFromState(newState)
current.unpersist
}
An implementation template
“reduce”: combine the
states from two partitions
var nextModel = initialModel
for (int i = 0; i < iterations; i++) {
val current = sc.broadcast(nextModel)
val newState = examples.aggregate(ModelState.empty()) {
{ case (state: ModelState, example: Example) =>
state.update(current.value.lookup(example, i), example) }
{ case (s1: ModelState, s2: ModelState) => s1.combine(s2) }
}
nextModel = modelFromState(newState)
current.unpersist
}
var nextModel = initialModel
for (int i = 0; i < iterations; i++) {
val current = sc.broadcast(nextModel)
val newState = examples.aggregate(ModelState.empty()) {
{ case (state: ModelState, example: Example) =>
state.update(current.value.lookup(example, i), example) }
{ case (s1: ModelState, s2: ModelState) => s1.combine(s2) }
}
nextModel = modelFromState(newState)
current.unpersist
}
An implementation template
var nextModel = initialModel
for (int i = 0; i < iterations; i++) {
val current = sc.broadcast(nextModel)
val newState = examples.aggregate(ModelState.empty()) {
{ case (state: ModelState, example: Example) =>
state.update(current.value.lookup(example, i), example) }
{ case (s1: ModelState, s2: ModelState) => s1.combine(s2) }
}
nextModel = modelFromState(newState)
current.unpersist
}
var nextModel = initialModel
for (int i = 0; i < iterations; i++) {
val current = sc.broadcast(nextModel)
val newState = examples.aggregate(ModelState.empty()) {
{ case (state: ModelState, example: Example) =>
state.update(current.value.lookup(example, i), example) }
{ case (s1: ModelState, s2: ModelState) => s1.combine(s2) }
}
nextModel = modelFromState(newState)
current.unpersist
} remove the stale
broadcasted model
broadcast the current working
model for this iteration
workersdriver (aggregate)
Implementing on RDDs
⊕ ⊕ ⊕ ⊕ ⊕ ⊕
⊕ ⊕ ⊕ ⊕ ⊕
⊕ ⊕ ⊕ ⊕
workersdriver (aggregate)
Implementing on RDDs
⊕ ⊕ ⊕ ⊕ ⊕ ⊕
⊕ ⊕ ⊕ ⊕ ⊕
⊕ ⊕ ⊕ ⊕
workersdriver (aggregate)
Implementing on RDDs
workersdriver (treeAggregate)
Implementing on RDDs
⊕
⊕
⊕
⊕
⊕ ⊕
⊕ ⊕
workersdriver (treeAggregate)
Implementing on RDDs
⊕
⊕
⊕
⊕
⊕ ⊕
⊕ ⊕
workersdriver (treeAggregate)
Implementing on RDDs
⊕
⊕
⊕
⊕
⊕ ⊕
⊕ ⊕
⊕
⊕
⊕
⊕
workersdriver (treeAggregate)
Implementing on RDDs
⊕
⊕
⊕
⊕
⊕
⊕
⊕ ⊕
driver (treeAggregate)
⊕
⊕
⊕
⊕
workersdriver (treeAggregate)
Implementing on RDDs
⊕
⊕
⊕
⊕
⊕ ⊕
⊕ ⊕
⊕ ⊕
workersdriver (treeAggregate)
Implementing on RDDs
⊕ ⊕
driver (treeAggregate) workers
Implementing on RDDs
⊕ ⊕
driver (treeAggregate) workers
Implementing on RDDs
⊕ ⊕⊕
Beyond the RDD: Data
frames and ML Pipelines
RDDs: some good parts
val rdd: RDD[String] = /* ... */
rdd.map(_ * 3.0).collect()
val df: DataFrame = /* data frame with one String-valued column */
df.select($"_1" * 3.0).show()
RDDs: some good parts
val rdd: RDD[String] = /* ... */
rdd.map(_ * 3.0).collect()
val df: DataFrame = /* data frame with one String-valued column */
df.select($"_1" * 3.0).show()
doesn’t compile
RDDs: some good parts
val rdd: RDD[String] = /* ... */
rdd.map(_ * 3.0).collect()
val df: DataFrame = /* data frame with one String-valued column */
df.select($"_1" * 3.0).show()
doesn’t compile
RDDs: some good parts
val rdd: RDD[String] = /* ... */
rdd.map(_ * 3.0).collect()
val df: DataFrame = /* data frame with one String-valued column */
df.select($"_1" * 3.0).show()
doesn’t compile
crashes at runtime
RDDs: some good parts
rdd.map {
vec => (vec, model.value.closestWithSimilarity(vec))
}
val predict = udf ((vec: SV) =>
model.value.closestWithSimilarity(vec))
df.withColumn($"predictions", predict($"features"))
RDDs: some good parts
rdd.map {
vec => (vec, model.value.closestWithSimilarity(vec))
}
val predict = udf ((vec: SV) =>
model.value.closestWithSimilarity(vec))
df.withColumn($"predictions", predict($"features"))
RDDs versus query planning
val numbers1 = sc.parallelize(1 to 100000000)
val numbers2 = sc.parallelize(1 to 1000000000)
numbers1.cartesian(numbers2)
.map((x, y) => (x, y, expensive(x, y)))
.filter((x, y, _) => isPrime(x), isPrime(y))
RDDs versus query planning
val numbers1 = sc.parallelize(1 to 100000000)
val numbers2 = sc.parallelize(1 to 1000000000)
numbers1.filter(isPrime(_))
.cartesian(numbers2.filter(isPrime(_)))
.map((x, y) => (x, y, expensive(x, y)))
RDDs and the Java heap
val mat = Array(Array(1.0, 2.0), Array(3.0, 4.0))
RDDs and the Java heap
val mat = Array(Array(1.0, 2.0), Array(3.0, 4.0))
class
pointer flags size locks element pointer element pointer
class
pointer flags size locks 1.0
class
pointer flags size locks 3.0 4.0
2.0
RDDs and the Java heap
val mat = Array(Array(1.0, 2.0), Array(3.0, 4.0))
class
pointer flags size locks element pointer element pointer
class
pointer flags size locks 1.0
class
pointer flags size locks 3.0 4.0
2.0 32 bytes of data…
RDDs and the Java heap
val mat = Array(Array(1.0, 2.0), Array(3.0, 4.0))
class
pointer flags size locks element pointer element pointer
class
pointer flags size locks 1.0
class
pointer flags size locks 3.0 4.0
2.0
…and 64 bytes
of overhead!
32 bytes of data…
ML pipelines: a quick example
from pyspark.ml.clustering import KMeans
K, SEED = 100, 0xdea110c8
randomDF = make_random_df()
kmeans = KMeans().setK(K).setSeed(SEED).setFeaturesCol("features")
model = kmeans.fit(randomDF)
withPredictions = model.transform(randomDF).select("x", "y", "prediction")
Working with ML pipelines
estimator.fit(df)
Working with ML pipelines
estimator.fit(df) model.transform(df)
Working with ML pipelines
model.transform(df)
Working with ML pipelines
model.transform(df)
Working with ML pipelines
estimator.fit(df) model.transform(df)
Working with ML pipelines
estimator.fit(df) model.transform(df)
inputCol
epochs
seed
outputCol
private[som] trait SOMParams extends Params
with DefaultParamsWritable {
final val x: IntParam =
new IntParam(this, "x", "width of self-organizing map (>= 1)",
ParamValidators.gtEq(1))
final def getX: Int = $(x)
final def setX(value: Int): this.type = set(x, value)
// ...
Defining parameters
private[som] trait SOMParams extends Params
with DefaultParamsWritable {
final val x: IntParam =
new IntParam(this, "x", "width of self-organizing map (>= 1)",
ParamValidators.gtEq(1))
final def getX: Int = $(x)
final def setX(value: Int): this.type = set(x, value)
// ...
private[som] trait SOMParams extends Params
with DefaultParamsWritable {
final val x: IntParam =
new IntParam(this, "x", "width of self-organizing map (>= 1)",
ParamValidators.gtEq(1))
final def getX: Int = $(x)
final def setX(value: Int): this.type = set(x, value)
// ...
Defining parameters
private[som] trait SOMParams extends Params
with DefaultParamsWritable {
final val x: IntParam =
new IntParam(this, "x", "width of self-organizing map (>= 1)",
ParamValidators.gtEq(1))
final def getX: Int = $(x)
final def setX(value: Int): this.type = set(x, value)
// ...
Defining parameters
private[som] trait SOMParams extends Params
with DefaultParamsWritable {
final val x: IntParam =
new IntParam(this, "x", "width of self-organizing map (>= 1)",
ParamValidators.gtEq(1))
final def getX: Int = $(x)
final def setX(value: Int): this.type = set(x, value)
// ...
private[som] trait SOMParams extends Params
with DefaultParamsWritable {
final val x: IntParam =
new IntParam(this, "x", "width of self-organizing map (>= 1)",
ParamValidators.gtEq(1))
final def getX: Int = $(x)
final def setX(value: Int): this.type = set(x, value)
// ...
Defining parameters
private[som] trait SOMParams extends Params
with DefaultParamsWritable {
final val x: IntParam =
new IntParam(this, "x", "width of self-organizing map (>= 1)",
ParamValidators.gtEq(1))
final def getX: Int = $(x)
final def setX(value: Int): this.type = set(x, value)
// ...
private[som] trait SOMParams extends Params
with DefaultParamsWritable {
final val x: IntParam =
new IntParam(this, "x", "width of self-organizing map (>= 1)",
ParamValidators.gtEq(1))
final def getX: Int = $(x)
final def setX(value: Int): this.type = set(x, value)
// ...
Defining parameters
private[som] trait SOMParams extends Params
with DefaultParamsWritable {
final val x: IntParam =
new IntParam(this, "x", "width of self-organizing map (>= 1)",
ParamValidators.gtEq(1))
final def getX: Int = $(x)
final def setX(value: Int): this.type = set(x, value)
// ...
private[som] trait SOMParams extends Params
with DefaultParamsWritable {
final val x: IntParam =
new IntParam(this, "x", "width of self-organizing map (>= 1)",
ParamValidators.gtEq(1))
final def getX: Int = $(x)
final def setX(value: Int): this.type = set(x, value)
// ...
Don’t repeat yourself
/**
* Common params for KMeans and KMeansModel
*/
private[clustering] trait KMeansParams extends Params
with HasMaxIter with HasFeaturesCol
with HasSeed with HasPredictionCol with HasTol { /* ... */ }
Estimators and transformers
estimator.fit(df)
Estimators and transformers
estimator.fit(df)
Estimators and transformers
estimator.fit(df) model.transform(df)
Estimators and transformers
estimator.fit(df) model.transform(df)
Estimators and transformers
estimator.fit(df) model.transform(df)
Validate and transform at once
def transformSchema(schema: StructType):
StructType = {
// check that the input columns exist...
// ...and are the proper type
// ...and that the output columns don’t exist
// ...and then make a new schema
}
Validate and transform at once
def transformSchema(schema: StructType):
StructType = {
// check that the input columns exist…
require(schema.fieldNames.contains($(featuresCol)))
// ...and are the proper type
// ...and that the output columns don’t exist
// ...and then make a new schema
}
Validate and transform at once
def transformSchema(schema: StructType):
StructType = {
// check that the input columns exist...
// ...and are the proper type
schema($(featuresCol)) match {
case sf: StructField => require(sf.dataType.equals(VectorType))
}
// ...and that the output columns don’t exist
// ...and then make a new schema
}
Validate and transform at once
def transformSchema(schema: StructType):
StructType = {
// check that the input columns exist…
// ...and are the proper type
// ...and that the output columns don’t exist
require(!schema.fieldNames.contains($(predictionCol)))
require(!schema.fieldNames.contains($(similarityCol)))
// ...and then make a new schema
}
Validate and transform at once
def transformSchema(schema: StructType):
StructType = {
// check that the input columns exist…
// ...and are the proper type
// ...and that the output columns don’t exist
// ...and then make a new schema
schema.add($(predictionCol), "int")
.add($(similarityCol), "double")
}
Training on data frames
def fit(examples: DataFrame) = {
import examples.sparkSession.implicits._
import org.apache.spark.ml.linalg.{Vector=>SV}
val dfexamples = examples.select($(exampleCol)).rdd.map {
case Row(sv: SV) => sv
}
/* construct a model object with the result of training */
new SOMModel(train(dfexamples, $(x), $(y)))
}
Practical considerations
Improve serial execution times
2
6
6
4
0 0 1
0 1 0
0 0 1
1 0 0
3
7
7
5 •
2
4
0.1
0.7
0.2
3
5
<latexit sha1_base64="yGPDKZdOXUPJZlyEHQdtfy2cnBM=">AAACcHicbVHLSgMxFM2Mr1pf1W4EFaNFERdlpgh1WXTjUsE+oFNKJr1tQzOZIcmIZeja/3PnR7jxC0yng9rWCyHnnnPvTXLiR5wp7Tgflr2yura+kdvMb23v7O4V9g8aKowlhToNeShbPlHAmYC6ZppDK5JAAp9D0x/dT/XmC0jFQvGsxxF0AjIQrM8o0YbqFt48HwZMJH5AtGSvE+zgy3S52PMyMCWy5Edxs8QoIHq/7Z4fcw4aL40tzwaWqzif7pX5xm6h5JSdNPAycDNQQlk8dgvvXi+kcQBCU06UartOpDsJkZpRDpO8FyuICB2RAbQNFCQA1U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+kcQBCU06UartOpDsJkZpRDpO8FyuICB2RAbQNFCQA1UlSwyb4wjA93A+lWULjlP3bkZBAqXHgm0pzv6Fa1Kbkf1o71v3bTsJEFGsQdHZQP+ZYh3jqPu4xCVTzsQGESmbuiumQSEK1+aO8McFdfPIyaFTKrrHz6aZUu8vsyKEjdI6ukIuqqIYe0COqI4o+raJ1bJ1YX/ahfWqfzUptK+spormwr78BvNCySg==</latexit><latexit sha1_base64="yGPDKZdOXUPJZlyEHQdtfy2cnBM=">AAACcHicbVHLSgMxFM2Mr1pf1W4EFaNFERdlpgh1WXTjUsE+oFNKJr1tQzOZIcmIZeja/3PnR7jxC0yng9rWCyHnnnPvTXLiR5wp7Tgflr2yura+kdvMb23v7O4V9g8aKowlhToNeShbPlHAmYC6ZppDK5JAAp9D0x/dT/XmC0jFQvGsxxF0AjIQrM8o0YbqFt48HwZMJH5AtGSvE+zgy3S52PMyMCWy5Edxs8QoIHq/7Z4fcw4aL40tzwaWqzif7pX5xm6h5JSdNPAycDNQQlk8dgvvXi+kcQBCU06UartOpDsJkZpRDpO8FyuICB2RAbQNFCQA1UlSwyb4wjA93A+lWULjlP3bkZBAqXHgm0pzv6Fa1Kbkf1o71v3bTsJEFGsQdHZQP+ZYh3jqPu4xCVTzsQGESmbuiumQSEK1+aO8McFdfPIyaFTKrrHz6aZUu8vsyKEjdI6ukIuqqIYe0COqI4o+raJ1bJ1YX/ahfWqfzUptK+spormwr78BvNCySg==</latexit>
Improve serial execution times
2
6
6
4
0 0 1
0 1 0
0 0 1
1 0 0
3
7
7
5 •
2
4
0.1
0.7
0.2
3
5
<latexit sha1_base64="yGPDKZdOXUPJZlyEHQdtfy2cnBM=">AAACcHicbVHLSgMxFM2Mr1pf1W4EFaNFERdlpgh1WXTjUsE+oFNKJr1tQzOZIcmIZeja/3PnR7jxC0yng9rWCyHnnnPvTXLiR5wp7Tgflr2yura+kdvMb23v7O4V9g8aKowlhToNeShbPlHAmYC6ZppDK5JAAp9D0x/dT/XmC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8aKowlhToNeShbPlHAmYC6ZppDK5JAAp9D0x/dT/XmC0jFQvGsxxF0AjIQrM8o0YbqFt48HwZMJH5AtGSvE+zgy3S52PMyMCWy5Edxs8QoIHq/7Z4fcw4aL40tzwaWqzif7pX5xm6h5JSdNPAycDNQQlk8dgvvXi+kcQBCU06UartOpDsJkZpRDpO8FyuICB2RAbQNFCQA1UlSwyb4wjA93A+lWULjlP3bkZBAqXHgm0pzv6Fa1Kbkf1o71v3bTsJEFGsQdHZQP+ZYh3jqPu4xCVTzsQGESmbuiumQSEK1+aO8McFdfPIyaFTKrrHz6aZUu8vsyKEjdI6ukIuqqIYe0COqI4o+raJ1bJ1YX/ahfWqfzUptK+spormwr78BvNCySg==</latexit><latexit sha1_base64="yGPDKZdOXUPJZlyEHQdtfy2cnBM=">AAACcHicbVHLSgMxFM2Mr1pf1W4EFaNFERdlpgh1WXTjUsE+oFNKJr1tQzOZIcmIZeja/3PnR7jxC0yng9rWCyHnnnPvTXLiR5wp7Tgflr2yura+kdvMb23v7O4V9g8aKowlhToNeShbPlHAmYC6ZppDK5JAAp9D0x/dT/XmC0jFQvGsxxF0AjIQrM8o0YbqFt48HwZMJH5AtGSvE+zgy3S52PMyMCWy5Edxs8QoIHq/7Z4fcw4aL40tzwaWqzif7pX5xm6h5JSdNPAycDNQQlk8dgvvXi+kcQBCU06UartOpDsJkZpRDpO8FyuICB2RAbQNFCQA1UlSwyb4wjA93A+lWULjlP3bkZBAqXHgm0pzv6Fa1Kbkf1o71v3bTsJEFGsQdHZQP+ZYh3jqPu4xCVTzsQGESmbuiumQSEK1+aO8McFdfPIyaFTKrrHz6aZUu8vsyKEjdI6ukIuqqIYe0COqI4o+raJ1bJ1YX/ahfWqfzUptK+spormwr78BvNCySg==</latexit>
Improve serial execution times
2
6
6
4
0 0 1
0 1 0
0 0 1
1 0 0
3
7
7
5 •
2
4
0.1
0.7
0.2
3
5
<latexit sha1_base64="yGPDKZdOXUPJZlyEHQdtfy2cnBM=">AAACcHic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bJ1YX/ahfWqfzUptK+spormwr78BvNCySg==</latexit>
<latexit sha1_base64="F0lpnVum/z3V85cOiWhHJHNgpmw=">AAACFHicbVDLSsNAFJ34rPUVdelmsAiCUBIRdFl047KCfUATymQ6aYdOkunMjVDSfoQbf8WNC0XcunDn3zhtI2jrgbkczrmXO/cEUnANjvNlLS2vrK6tFzaKm1vbO7v23n5dJ6mirEYTkahmQDQTPGY14CBYUypGokCwRtC/nviNe6Y0T+I7GErmR6Qb85BTAkZq26deqAjNJPaCVAgGeDDORiMssSk/kqEDU8Ztu+SUnSnwInFzUkI5qm370+skNI1YDFQQrVuuI8HPiAJOBRsXvVQzSWifdFnL0JhETPvZ9KgxPjZKB4eJMi8GPFV/T2Qk0noYBaYzItDT895E/M9rpRBe+hmPZQosprNFYSowJHiSEO5wxSiIoSGEKm7+immPmJTA5Fg0IbjzJy+S+lnZdcru7XmpcpXHUUCH6AidIBddoAq6QVVUQxQ9oCf0gl6tR+vZerPeZ61LVj5zgP7A+vgG1reeqw==</latexit>
||q||<latexit sha1_base64="Fotu1JHT5+QrvqFi2jYz5La5cyI=">AAAB7nicbVBNS8NAEJ3Ur1q/qh69LBbBU0lE0GPRi8cK9gPaUDbbTbt0s4m7E6Gk/RFePCji1d/jzX/jts1BWx8MPN6bYWZekEhh0HW/ncLa+sbmVnG7tLO7t39QPjxqmjjVjDdYLGPdDqjhUijeQIGStxPNaRRI3gpGtzO/9cS1EbF6wHHC/YgOlAgFo2il1mRCHslk0itX3Ko7B1klXk4qkKPeK391+zFLI66QSWpMx3MT9DOqUTDJp6VuanhC2YgOeMdSRSNu/Gx+7pScWaVPwljbUkjm6u+JjEbGjKPAdkYUh2bZm4n/eZ0Uw2s/EypJkSu2WBSmkmBMZr+TvtCcoRxbQpkW9lbChlRThjahkg3BW355lTQvqp5b9e4vK7WbPI4inMApnIMHV1CDO6hDAxiM4Ble4c1JnBfn3flYtBacfOYY/sD5/AESAY9h</latexit><latexit sha1_base64="Fotu1JHT5+Qrvq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5JL/NPjXCbzC4E8mGFQbruPmgReBV4AGKqIzqL76w4gmIQhNOVGq57mx7qdEakY5TCt+oiAm9JGMoWegICGofpqfyhQfG2aIR5E0T2ics98VKQmVmoSBqTT9Paj5XEb+luslenTeT5mIEw2CzoxGCcc6wtnd4SGTQDWfGECoZKZXTB+IJFSb66yYJXjzIy+C26bjmV1enzXaF8U6yugAHaJT5KEWaqMr1EFdREvv1qa1a+1ZH3bd3rcPZqVWqdDsoB9hH30CrJcKDw==</latexit>
⇥
0 0 1
⇤
•
⇥
0.1 0.7 0.2
⇤
⇥
0 1 0
⇤
•
⇥
0.1 0.7 0.2
⇤
⇥
0 0 1
⇤
•
⇥
0.1 0.7 0.2
⇤
⇥
1 0 0
⇤
•
⇥
0.1 0.7 0.2
⇤
<latexit sha1_base64="zslMj5nDZfArLAY/7Q+RF8nfHL4=">AAADanictVJNS8NAEN0mftT61VZQxMtiVTyFpAj1WPTisYJVoSlls53Wxc0m7G7EEgr+Rm/+Ai/+CDdpQG096sAujzfzeDPDBDFnSrvuW8myl5ZXVstrlfWNza3taq1+q6JEUujSiEfyPiAKOBPQ1UxzuI8lkDDgcBc8Xmb5uyeQikXiRk9i6IdkLNiIUaINNaiVXvwAxkykQUi0ZM9T7OKT/HnYBzH84v0g4Rw0Xqh3vEzhtPK/Oa/yK78Z5JL/NPjXCbzC4E8mGFQbruPmgReBV4AGKqIzqL76w4gmIQhNOVGq57mx7qdEakY5TCt+oiAm9JGMoWegICGofpqfyhQfG2aIR5E0T2ics98VKQmVmoSBqTT9Paj5XEb+luslenTeT5mIEw2CzoxGCcc6wtnd4SGTQDWfGECoZKZXTB+IJFSb66yYJXjzIy+C26bjmV1enzXaF8U6yugAHaJT5KEWaqMr1EFdREvv1qa1a+1ZH3bd3rcPZqVWqdDsoB9hH30CrJcKDw==</latexit><latexit sha1_base64="zslMj5nDZfArLAY/7Q+RF8nfHL4=">AAADanictVJNS8NAEN0mftT61VZQxMtiVTyFpAj1WPTisYJVoSlls53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jXCbzC4E8mGFQbruPmgReBV4AGKqIzqL76w4gmIQhNOVGq57mx7qdEakY5TCt+oiAm9JGMoWegICGofpqfyhQfG2aIR5E0T2ics98VKQmVmoSBqTT9Paj5XEb+luslenTeT5mIEw2CzoxGCcc6wtnd4SGTQDWfGECoZKZXTB+IJFSb66yYJXjzIy+C26bjmV1enzXaF8U6yugAHaJT5KEWaqMr1EFdREvv1qa1a+1ZH3bd3rcPZqVWqdDsoB9hH30CrJcKDw==</latexit>
<latexit sha1_base64="yGPDKZdOXUPJZlyEHQdtfy2cnBM=">AAACcHicbVHLSgMxFM2Mr1pf1W4EFaNFERdlpgh1WXTjUsE+oFNKJr1tQzOZIcmIZeja/3PnR7jxC0yng9rWCyHnnnPvTXLiR5wp7Tgflr2yura+kdvMb23v7O4V9g8aKowlhToNeShbPlHAmYC6ZppDK5JAAp9D0x/dT/XmC0jFQvGsxxF0AjIQrM8o0YbqFt48HwZMJH5AtGSvE+zgy3S52PMyMCWy5Edxs8QoIHq/7Z4fcw4aL40tzwaWqzif7pX5xm6h5JSdNPAycDNQQlk8dgvvXi+kcQBCU06UartOpDsJkZpRDpO8FyuICB2RAbQNFCQA1UlSwyb4wjA93A+lWULjlP3bkZBAqXHgm0pzv6Fa1Kbkf1o71v3bTsJEFGsQdHZQP+ZYh3jqPu4xCVTzsQGESmbuiumQSEK1+aO8McFdfPIyaFTKrrHz6aZUu8vsyKEjdI6ukIuqqIYe0COqI4o+raJ1bJ1YX/ahfWqfzUptK+spormwr78BvNCySg==</latexit>
libraryDependencies +=
"org.scalanlp" %% "breeze-natives" % "0.13.1"
val vec = Array[Double](/* ... */)
val vec = Array[Double](/* ... */)
def dot[S](a: Array[S], b: Array[S])
(implicit num: Numeric[S]): S = {
import num._
(0 until a.length).foldLeft(num.zero)({
(acc, i) => acc + a(i) * b(i)
})
}
val vec = Array[Double](/* ... */)
def dot[S](a: Array[S], b: Array[S])
(implicit num: Numeric[S]): S = {
import num._
(0 until a.length).foldLeft(num.zero)({
(acc, i) => acc + a(i) * b(i)
})
}
val vec = Array[Double](/* ... */)
dot(Array(0.1d, 0.2d, 0.3d), Array(1.0d, 0.0d, 0.0d))
dot(Array(0.1f, 0.2f, 0.3f), Array(1.0f, 0.0f, 0.0f))
val vec = Array[Double](/* ... */)
vdppd
vdppd
0.1d 0.2d 1.0d 0.0d
0.3d (unused) 0.0d (unused)
def dot[S](a: Array[S], b: Array[S])
(implicit num: Numeric[S]): S = {
import num._
(0 until a.length).foldLeft(num.zero)({
(acc, i) => acc + a(i) * b(i)
})
}
val vec = Array[Double](/* ... */)
vdppd
vdppd
0.1d 0.2d 1.0d 0.0d
0.3d (unused) 0.0d (unused)
vdpps
0.3f unused0.2f0.1f 0.0f unused0.0f1.0f
def dot[S](a: Array[S], b: Array[S])
(implicit num: Numeric[S]): S = {
import num._
(0 until a.length).foldLeft(num.zero)({
(acc, i) => acc + a(i) * b(i)
})
}
KEY TAKEAWAYS
THANKS!willb@redhat.com • @willb
https://chapeau.freevariable.com
https://radanalytics.io
also: “Spark for Library Developers”
Room 2014 at 5:40 PM today

Weitere ähnliche Inhalte

Was ist angesagt?

Three dimensional geometric transformations
Three dimensional geometric transformationsThree dimensional geometric transformations
Three dimensional geometric transformationsshanthishyam
 
Time series-mining-slides
Time series-mining-slidesTime series-mining-slides
Time series-mining-slidesYanchang Zhao
 
optimal control principle slided
optimal control principle slidedoptimal control principle slided
optimal control principle slidedKarthi Ramachandran
 
The power and Arnoldi methods in an algebra of circulants
The power and Arnoldi methods in an algebra of circulantsThe power and Arnoldi methods in an algebra of circulants
The power and Arnoldi methods in an algebra of circulantsDavid Gleich
 
Single source shortes path in dag
Single source shortes path in dagSingle source shortes path in dag
Single source shortes path in dagKiran K
 
Bellman ford
Bellman fordBellman ford
Bellman fordKiran K
 
Rewriting Engine for Process Algebras
Rewriting Engine for Process AlgebrasRewriting Engine for Process Algebras
Rewriting Engine for Process AlgebrasAnatolii Kmetiuk
 
Murphy: Machine learning A probabilistic perspective: Ch.9
Murphy: Machine learning A probabilistic perspective: Ch.9Murphy: Machine learning A probabilistic perspective: Ch.9
Murphy: Machine learning A probabilistic perspective: Ch.9Daisuke Yoneoka
 
lecture 21
lecture 21lecture 21
lecture 21sajinsc
 
String Matching with Finite Automata and Knuth Morris Pratt Algorithm
String Matching with Finite Automata and Knuth Morris Pratt AlgorithmString Matching with Finite Automata and Knuth Morris Pratt Algorithm
String Matching with Finite Automata and Knuth Morris Pratt AlgorithmKiran K
 
Rasterisation of a circle by the bresenham algorithm
Rasterisation of a circle by the bresenham algorithmRasterisation of a circle by the bresenham algorithm
Rasterisation of a circle by the bresenham algorithmKALAIRANJANI21
 
lecture 22
lecture 22lecture 22
lecture 22sajinsc
 
Longest common subsequence
Longest common subsequenceLongest common subsequence
Longest common subsequenceKiran K
 
lecture 20
lecture 20lecture 20
lecture 20sajinsc
 
Test s velocity_15_5_4
Test s velocity_15_5_4Test s velocity_15_5_4
Test s velocity_15_5_4Kunihiko Saito
 

Was ist angesagt? (20)

Three dimensional geometric transformations
Three dimensional geometric transformationsThree dimensional geometric transformations
Three dimensional geometric transformations
 
Time series-mining-slides
Time series-mining-slidesTime series-mining-slides
Time series-mining-slides
 
09 binary trees
09 binary trees09 binary trees
09 binary trees
 
optimal control principle slided
optimal control principle slidedoptimal control principle slided
optimal control principle slided
 
The power and Arnoldi methods in an algebra of circulants
The power and Arnoldi methods in an algebra of circulantsThe power and Arnoldi methods in an algebra of circulants
The power and Arnoldi methods in an algebra of circulants
 
Output Regulator_LinkedIn
Output Regulator_LinkedInOutput Regulator_LinkedIn
Output Regulator_LinkedIn
 
Oh Composable World!
Oh Composable World!Oh Composable World!
Oh Composable World!
 
Single source shortes path in dag
Single source shortes path in dagSingle source shortes path in dag
Single source shortes path in dag
 
Bellman ford
Bellman fordBellman ford
Bellman ford
 
Rewriting Engine for Process Algebras
Rewriting Engine for Process AlgebrasRewriting Engine for Process Algebras
Rewriting Engine for Process Algebras
 
Murphy: Machine learning A probabilistic perspective: Ch.9
Murphy: Machine learning A probabilistic perspective: Ch.9Murphy: Machine learning A probabilistic perspective: Ch.9
Murphy: Machine learning A probabilistic perspective: Ch.9
 
lecture 21
lecture 21lecture 21
lecture 21
 
String Matching with Finite Automata and Knuth Morris Pratt Algorithm
String Matching with Finite Automata and Knuth Morris Pratt AlgorithmString Matching with Finite Automata and Knuth Morris Pratt Algorithm
String Matching with Finite Automata and Knuth Morris Pratt Algorithm
 
Rasterisation of a circle by the bresenham algorithm
Rasterisation of a circle by the bresenham algorithmRasterisation of a circle by the bresenham algorithm
Rasterisation of a circle by the bresenham algorithm
 
lecture 22
lecture 22lecture 22
lecture 22
 
Longest common subsequence
Longest common subsequenceLongest common subsequence
Longest common subsequence
 
lecture 20
lecture 20lecture 20
lecture 20
 
Millionways
MillionwaysMillionways
Millionways
 
Test s velocity_15_5_4
Test s velocity_15_5_4Test s velocity_15_5_4
Test s velocity_15_5_4
 
CLIM Undergraduate Workshop: (Attachment) Performing Extreme Value Analysis (...
CLIM Undergraduate Workshop: (Attachment) Performing Extreme Value Analysis (...CLIM Undergraduate Workshop: (Attachment) Performing Extreme Value Analysis (...
CLIM Undergraduate Workshop: (Attachment) Performing Extreme Value Analysis (...
 

Ähnlich wie Building Machine Learning Algorithms on Apache Spark: Scaling Out and Up with William Benton

C++11 - A Change in Style - v2.0
C++11 - A Change in Style - v2.0C++11 - A Change in Style - v2.0
C++11 - A Change in Style - v2.0Yaser Zhian
 
Introduction to Neural Networks and Deep Learning from Scratch
Introduction to Neural Networks and Deep Learning from ScratchIntroduction to Neural Networks and Deep Learning from Scratch
Introduction to Neural Networks and Deep Learning from ScratchAhmed BESBES
 
User Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love StoryUser Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love StoryDatabricks
 
User Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love StoryUser Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love StoryDatabricks
 
Microsoft Word Practice Exercise Set 2
Microsoft Word   Practice Exercise Set 2Microsoft Word   Practice Exercise Set 2
Microsoft Word Practice Exercise Set 2rampan
 
Introduction To Lisp
Introduction To LispIntroduction To Lisp
Introduction To Lispkyleburton
 
Scala as a Declarative Language
Scala as a Declarative LanguageScala as a Declarative Language
Scala as a Declarative Languagevsssuresh
 
Big Data Analytics with Scala at SCALA.IO 2013
Big Data Analytics with Scala at SCALA.IO 2013Big Data Analytics with Scala at SCALA.IO 2013
Big Data Analytics with Scala at SCALA.IO 2013Samir Bessalah
 
What is TensorFlow and why do we use it
What is TensorFlow and why do we use itWhat is TensorFlow and why do we use it
What is TensorFlow and why do we use itRobert John
 
Basic R Data Manipulation
Basic R Data ManipulationBasic R Data Manipulation
Basic R Data ManipulationChu An
 
Compiler Construction | Lecture 9 | Constraint Resolution
Compiler Construction | Lecture 9 | Constraint ResolutionCompiler Construction | Lecture 9 | Constraint Resolution
Compiler Construction | Lecture 9 | Constraint ResolutionEelco Visser
 
Grokking Monads in Scala
Grokking Monads in ScalaGrokking Monads in Scala
Grokking Monads in ScalaTim Dalton
 
Rewriting Java In Scala
Rewriting Java In ScalaRewriting Java In Scala
Rewriting Java In ScalaSkills Matter
 
High-Performance Haskell
High-Performance HaskellHigh-Performance Haskell
High-Performance HaskellJohan Tibell
 
Apache Spark - Basics of RDD & RDD Operations | Big Data Hadoop Spark Tutoria...
Apache Spark - Basics of RDD & RDD Operations | Big Data Hadoop Spark Tutoria...Apache Spark - Basics of RDD & RDD Operations | Big Data Hadoop Spark Tutoria...
Apache Spark - Basics of RDD & RDD Operations | Big Data Hadoop Spark Tutoria...CloudxLab
 
Planning Under Uncertainty With Markov Decision Processes
Planning Under Uncertainty With Markov Decision ProcessesPlanning Under Uncertainty With Markov Decision Processes
Planning Under Uncertainty With Markov Decision Processesahmad bassiouny
 
Building Enigma with State Monad & Lens
Building Enigma with State Monad & LensBuilding Enigma with State Monad & Lens
Building Enigma with State Monad & LensTimothy Perrett
 
Monadologie
MonadologieMonadologie
Monadologieleague
 
ggtimeseries-->ggplot2 extensions
ggtimeseries-->ggplot2 extensions ggtimeseries-->ggplot2 extensions
ggtimeseries-->ggplot2 extensions Dr. Volkan OBAN
 

Ähnlich wie Building Machine Learning Algorithms on Apache Spark: Scaling Out and Up with William Benton (20)

C++11 - A Change in Style - v2.0
C++11 - A Change in Style - v2.0C++11 - A Change in Style - v2.0
C++11 - A Change in Style - v2.0
 
Introduction to Neural Networks and Deep Learning from Scratch
Introduction to Neural Networks and Deep Learning from ScratchIntroduction to Neural Networks and Deep Learning from Scratch
Introduction to Neural Networks and Deep Learning from Scratch
 
User Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love StoryUser Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love Story
 
User Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love StoryUser Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love Story
 
Clojure basics
Clojure basicsClojure basics
Clojure basics
 
Microsoft Word Practice Exercise Set 2
Microsoft Word   Practice Exercise Set 2Microsoft Word   Practice Exercise Set 2
Microsoft Word Practice Exercise Set 2
 
Introduction To Lisp
Introduction To LispIntroduction To Lisp
Introduction To Lisp
 
Scala as a Declarative Language
Scala as a Declarative LanguageScala as a Declarative Language
Scala as a Declarative Language
 
Big Data Analytics with Scala at SCALA.IO 2013
Big Data Analytics with Scala at SCALA.IO 2013Big Data Analytics with Scala at SCALA.IO 2013
Big Data Analytics with Scala at SCALA.IO 2013
 
What is TensorFlow and why do we use it
What is TensorFlow and why do we use itWhat is TensorFlow and why do we use it
What is TensorFlow and why do we use it
 
Basic R Data Manipulation
Basic R Data ManipulationBasic R Data Manipulation
Basic R Data Manipulation
 
Compiler Construction | Lecture 9 | Constraint Resolution
Compiler Construction | Lecture 9 | Constraint ResolutionCompiler Construction | Lecture 9 | Constraint Resolution
Compiler Construction | Lecture 9 | Constraint Resolution
 
Grokking Monads in Scala
Grokking Monads in ScalaGrokking Monads in Scala
Grokking Monads in Scala
 
Rewriting Java In Scala
Rewriting Java In ScalaRewriting Java In Scala
Rewriting Java In Scala
 
High-Performance Haskell
High-Performance HaskellHigh-Performance Haskell
High-Performance Haskell
 
Apache Spark - Basics of RDD & RDD Operations | Big Data Hadoop Spark Tutoria...
Apache Spark - Basics of RDD & RDD Operations | Big Data Hadoop Spark Tutoria...Apache Spark - Basics of RDD & RDD Operations | Big Data Hadoop Spark Tutoria...
Apache Spark - Basics of RDD & RDD Operations | Big Data Hadoop Spark Tutoria...
 
Planning Under Uncertainty With Markov Decision Processes
Planning Under Uncertainty With Markov Decision ProcessesPlanning Under Uncertainty With Markov Decision Processes
Planning Under Uncertainty With Markov Decision Processes
 
Building Enigma with State Monad & Lens
Building Enigma with State Monad & LensBuilding Enigma with State Monad & Lens
Building Enigma with State Monad & Lens
 
Monadologie
MonadologieMonadologie
Monadologie
 
ggtimeseries-->ggplot2 extensions
ggtimeseries-->ggplot2 extensions ggtimeseries-->ggplot2 extensions
ggtimeseries-->ggplot2 extensions
 

Mehr von Databricks

DW Migration Webinar-March 2022.pptx
DW Migration Webinar-March 2022.pptxDW Migration Webinar-March 2022.pptx
DW Migration Webinar-March 2022.pptxDatabricks
 
Data Lakehouse Symposium | Day 1 | Part 1
Data Lakehouse Symposium | Day 1 | Part 1Data Lakehouse Symposium | Day 1 | Part 1
Data Lakehouse Symposium | Day 1 | Part 1Databricks
 
Data Lakehouse Symposium | Day 1 | Part 2
Data Lakehouse Symposium | Day 1 | Part 2Data Lakehouse Symposium | Day 1 | Part 2
Data Lakehouse Symposium | Day 1 | Part 2Databricks
 
Data Lakehouse Symposium | Day 2
Data Lakehouse Symposium | Day 2Data Lakehouse Symposium | Day 2
Data Lakehouse Symposium | Day 2Databricks
 
Data Lakehouse Symposium | Day 4
Data Lakehouse Symposium | Day 4Data Lakehouse Symposium | Day 4
Data Lakehouse Symposium | Day 4Databricks
 
5 Critical Steps to Clean Your Data Swamp When Migrating Off of Hadoop
5 Critical Steps to Clean Your Data Swamp When Migrating Off of Hadoop5 Critical Steps to Clean Your Data Swamp When Migrating Off of Hadoop
5 Critical Steps to Clean Your Data Swamp When Migrating Off of HadoopDatabricks
 
Democratizing Data Quality Through a Centralized Platform
Democratizing Data Quality Through a Centralized PlatformDemocratizing Data Quality Through a Centralized Platform
Democratizing Data Quality Through a Centralized PlatformDatabricks
 
Learn to Use Databricks for Data Science
Learn to Use Databricks for Data ScienceLearn to Use Databricks for Data Science
Learn to Use Databricks for Data ScienceDatabricks
 
Why APM Is Not the Same As ML Monitoring
Why APM Is Not the Same As ML MonitoringWhy APM Is Not the Same As ML Monitoring
Why APM Is Not the Same As ML MonitoringDatabricks
 
The Function, the Context, and the Data—Enabling ML Ops at Stitch Fix
The Function, the Context, and the Data—Enabling ML Ops at Stitch FixThe Function, the Context, and the Data—Enabling ML Ops at Stitch Fix
The Function, the Context, and the Data—Enabling ML Ops at Stitch FixDatabricks
 
Stage Level Scheduling Improving Big Data and AI Integration
Stage Level Scheduling Improving Big Data and AI IntegrationStage Level Scheduling Improving Big Data and AI Integration
Stage Level Scheduling Improving Big Data and AI IntegrationDatabricks
 
Simplify Data Conversion from Spark to TensorFlow and PyTorch
Simplify Data Conversion from Spark to TensorFlow and PyTorchSimplify Data Conversion from Spark to TensorFlow and PyTorch
Simplify Data Conversion from Spark to TensorFlow and PyTorchDatabricks
 
Scaling your Data Pipelines with Apache Spark on Kubernetes
Scaling your Data Pipelines with Apache Spark on KubernetesScaling your Data Pipelines with Apache Spark on Kubernetes
Scaling your Data Pipelines with Apache Spark on KubernetesDatabricks
 
Scaling and Unifying SciKit Learn and Apache Spark Pipelines
Scaling and Unifying SciKit Learn and Apache Spark PipelinesScaling and Unifying SciKit Learn and Apache Spark Pipelines
Scaling and Unifying SciKit Learn and Apache Spark PipelinesDatabricks
 
Sawtooth Windows for Feature Aggregations
Sawtooth Windows for Feature AggregationsSawtooth Windows for Feature Aggregations
Sawtooth Windows for Feature AggregationsDatabricks
 
Redis + Apache Spark = Swiss Army Knife Meets Kitchen Sink
Redis + Apache Spark = Swiss Army Knife Meets Kitchen SinkRedis + Apache Spark = Swiss Army Knife Meets Kitchen Sink
Redis + Apache Spark = Swiss Army Knife Meets Kitchen SinkDatabricks
 
Re-imagine Data Monitoring with whylogs and Spark
Re-imagine Data Monitoring with whylogs and SparkRe-imagine Data Monitoring with whylogs and Spark
Re-imagine Data Monitoring with whylogs and SparkDatabricks
 
Raven: End-to-end Optimization of ML Prediction Queries
Raven: End-to-end Optimization of ML Prediction QueriesRaven: End-to-end Optimization of ML Prediction Queries
Raven: End-to-end Optimization of ML Prediction QueriesDatabricks
 
Processing Large Datasets for ADAS Applications using Apache Spark
Processing Large Datasets for ADAS Applications using Apache SparkProcessing Large Datasets for ADAS Applications using Apache Spark
Processing Large Datasets for ADAS Applications using Apache SparkDatabricks
 
Massive Data Processing in Adobe Using Delta Lake
Massive Data Processing in Adobe Using Delta LakeMassive Data Processing in Adobe Using Delta Lake
Massive Data Processing in Adobe Using Delta LakeDatabricks
 

Mehr von Databricks (20)

DW Migration Webinar-March 2022.pptx
DW Migration Webinar-March 2022.pptxDW Migration Webinar-March 2022.pptx
DW Migration Webinar-March 2022.pptx
 
Data Lakehouse Symposium | Day 1 | Part 1
Data Lakehouse Symposium | Day 1 | Part 1Data Lakehouse Symposium | Day 1 | Part 1
Data Lakehouse Symposium | Day 1 | Part 1
 
Data Lakehouse Symposium | Day 1 | Part 2
Data Lakehouse Symposium | Day 1 | Part 2Data Lakehouse Symposium | Day 1 | Part 2
Data Lakehouse Symposium | Day 1 | Part 2
 
Data Lakehouse Symposium | Day 2
Data Lakehouse Symposium | Day 2Data Lakehouse Symposium | Day 2
Data Lakehouse Symposium | Day 2
 
Data Lakehouse Symposium | Day 4
Data Lakehouse Symposium | Day 4Data Lakehouse Symposium | Day 4
Data Lakehouse Symposium | Day 4
 
5 Critical Steps to Clean Your Data Swamp When Migrating Off of Hadoop
5 Critical Steps to Clean Your Data Swamp When Migrating Off of Hadoop5 Critical Steps to Clean Your Data Swamp When Migrating Off of Hadoop
5 Critical Steps to Clean Your Data Swamp When Migrating Off of Hadoop
 
Democratizing Data Quality Through a Centralized Platform
Democratizing Data Quality Through a Centralized PlatformDemocratizing Data Quality Through a Centralized Platform
Democratizing Data Quality Through a Centralized Platform
 
Learn to Use Databricks for Data Science
Learn to Use Databricks for Data ScienceLearn to Use Databricks for Data Science
Learn to Use Databricks for Data Science
 
Why APM Is Not the Same As ML Monitoring
Why APM Is Not the Same As ML MonitoringWhy APM Is Not the Same As ML Monitoring
Why APM Is Not the Same As ML Monitoring
 
The Function, the Context, and the Data—Enabling ML Ops at Stitch Fix
The Function, the Context, and the Data—Enabling ML Ops at Stitch FixThe Function, the Context, and the Data—Enabling ML Ops at Stitch Fix
The Function, the Context, and the Data—Enabling ML Ops at Stitch Fix
 
Stage Level Scheduling Improving Big Data and AI Integration
Stage Level Scheduling Improving Big Data and AI IntegrationStage Level Scheduling Improving Big Data and AI Integration
Stage Level Scheduling Improving Big Data and AI Integration
 
Simplify Data Conversion from Spark to TensorFlow and PyTorch
Simplify Data Conversion from Spark to TensorFlow and PyTorchSimplify Data Conversion from Spark to TensorFlow and PyTorch
Simplify Data Conversion from Spark to TensorFlow and PyTorch
 
Scaling your Data Pipelines with Apache Spark on Kubernetes
Scaling your Data Pipelines with Apache Spark on KubernetesScaling your Data Pipelines with Apache Spark on Kubernetes
Scaling your Data Pipelines with Apache Spark on Kubernetes
 
Scaling and Unifying SciKit Learn and Apache Spark Pipelines
Scaling and Unifying SciKit Learn and Apache Spark PipelinesScaling and Unifying SciKit Learn and Apache Spark Pipelines
Scaling and Unifying SciKit Learn and Apache Spark Pipelines
 
Sawtooth Windows for Feature Aggregations
Sawtooth Windows for Feature AggregationsSawtooth Windows for Feature Aggregations
Sawtooth Windows for Feature Aggregations
 
Redis + Apache Spark = Swiss Army Knife Meets Kitchen Sink
Redis + Apache Spark = Swiss Army Knife Meets Kitchen SinkRedis + Apache Spark = Swiss Army Knife Meets Kitchen Sink
Redis + Apache Spark = Swiss Army Knife Meets Kitchen Sink
 
Re-imagine Data Monitoring with whylogs and Spark
Re-imagine Data Monitoring with whylogs and SparkRe-imagine Data Monitoring with whylogs and Spark
Re-imagine Data Monitoring with whylogs and Spark
 
Raven: End-to-end Optimization of ML Prediction Queries
Raven: End-to-end Optimization of ML Prediction QueriesRaven: End-to-end Optimization of ML Prediction Queries
Raven: End-to-end Optimization of ML Prediction Queries
 
Processing Large Datasets for ADAS Applications using Apache Spark
Processing Large Datasets for ADAS Applications using Apache SparkProcessing Large Datasets for ADAS Applications using Apache Spark
Processing Large Datasets for ADAS Applications using Apache Spark
 
Massive Data Processing in Adobe Using Delta Lake
Massive Data Processing in Adobe Using Delta LakeMassive Data Processing in Adobe Using Delta Lake
Massive Data Processing in Adobe Using Delta Lake
 

Kürzlich hochgeladen

Ranking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRanking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRajesh Mondal
 
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...HyderabadDolls
 
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样wsppdmt
 
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...HyderabadDolls
 
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...HyderabadDolls
 
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...nirzagarg
 
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...HyderabadDolls
 
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...nirzagarg
 
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...kumargunjan9515
 
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi ArabiaIn Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabiaahmedjiabur940
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...gajnagarg
 
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With OrangePredicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With OrangeThinkInnovation
 
High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...
High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...
High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...kumargunjan9515
 
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...Bertram Ludäscher
 
Gartner's Data Analytics Maturity Model.pptx
Gartner's Data Analytics Maturity Model.pptxGartner's Data Analytics Maturity Model.pptx
Gartner's Data Analytics Maturity Model.pptxchadhar227
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Valters Lauzums
 
Kings of Saudi Arabia, information about them
Kings of Saudi Arabia, information about themKings of Saudi Arabia, information about them
Kings of Saudi Arabia, information about themeitharjee
 
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...gajnagarg
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNKTimothy Spann
 

Kürzlich hochgeladen (20)

Ranking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRanking and Scoring Exercises for Research
Ranking and Scoring Exercises for Research
 
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
 
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
 
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
 
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
 
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
 
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
 
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
 
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...
 
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi ArabiaIn Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
 
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With OrangePredicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
 
High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...
High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...
High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...
 
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
 
Gartner's Data Analytics Maturity Model.pptx
Gartner's Data Analytics Maturity Model.pptxGartner's Data Analytics Maturity Model.pptx
Gartner's Data Analytics Maturity Model.pptx
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
 
Kings of Saudi Arabia, information about them
Kings of Saudi Arabia, information about themKings of Saudi Arabia, information about them
Kings of Saudi Arabia, information about them
 
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
 

Building Machine Learning Algorithms on Apache Spark: Scaling Out and Up with William Benton

  • 1. Building parallel machine learning algorithms: scaling out and up William Benton
 willb@redhat.com • @willb
  • 6. Forecast Introducing our case study: self-organizing maps Parallel implementations for partitioned collections (in particular, RDDs) Beyond the RDD: data frames and ML pipelines Practical considerations and key takeaways
  • 8.
  • 9.
  • 14. Training self-organizing maps while t < maxupdates: random.shuffle(examples) for ex in examples: t = t + 1 if t == maxupdates: break bestMatch = closest(somt, ex) for (unit, wt) in neighborhood(bestMatch, sigma(t)): somt+1[unit] = somt[unit] + (ex - somt[unit]) * alpha(t) * wt
  • 15. Training self-organizing maps while t < maxupdates: random.shuffle(examples) for ex in examples: t = t + 1 if t == maxupdates: break bestMatch = closest(somt, ex) for (unit, wt) in neighborhood(bestMatch, sigma(t)): somt+1[unit] = somt[unit] + (ex - somt[unit]) * alpha(t) * wt process the training set in random order
  • 16. Training self-organizing maps while t < maxupdates: random.shuffle(examples) for ex in examples: t = t + 1 if t == maxupdates: break bestMatch = closest(somt, ex) for (unit, wt) in neighborhood(bestMatch, sigma(t)): somt+1[unit] = somt[unit] + (ex - somt[unit]) * alpha(t) * wt process the training set in random order the neighborhood size controls how much of the map around the BMU is affected
  • 17. Training self-organizing maps while t < maxupdates: random.shuffle(examples) for ex in examples: t = t + 1 if t == maxupdates: break bestMatch = closest(somt, ex) for (unit, wt) in neighborhood(bestMatch, sigma(t)): somt+1[unit] = somt[unit] + (ex - somt[unit]) * alpha(t) * wt process the training set in random order the neighborhood size controls how much of the map around the BMU is affected the learning rate controls how much closer to the example each unit gets
  • 19. Historical aside: Amdahl’s Law 1 1 - p lim So =sp —> ∞
  • 20. What forces serial execution?
  • 21. What forces serial execution?
  • 22. What forces serial execution? state[t+1] = combine(state[t], x)
  • 23. What forces serial execution? state[t+1] = combine(state[t], x)
  • 24. What forces serial execution? f1: (T, T) => T f2: (T, U) => T
  • 25. What forces serial execution? f1: (T, T) => T f2: (T, U) => T
  • 26. What forces serial execution? f1: (T, T) => T f2: (T, U) => T
  • 27. How can we fix these? a ⊕ b = b ⊕ a (a ⊕ b) ⊕ c = a ⊕ (b ⊕ c)
  • 28. How can we fix these? a ⊕ b = b ⊕ a (a ⊕ b) ⊕ c = a ⊕ (b ⊕ c)
  • 29. How can we fix these? a ⊕ b = b ⊕ a (a ⊕ b) ⊕ c = a ⊕ (b ⊕ c)
  • 30. How can we fix these? a ⊕ b = b ⊕ a (a ⊕ b) ⊕ c = a ⊕ (b ⊕ c)
  • 31. How can we fix these? L-BGFSSGD a ⊕ b = b ⊕ a (a ⊕ b) ⊕ c = a ⊕ (b ⊕ c)
  • 32. How can we fix these? SGD L-BGFS a ⊕ b = b ⊕ a (a ⊕ b) ⊕ c = a ⊕ (b ⊕ c) There will be examples of each of these approaches for many problems in the literature and in open-source code!
  • 33. Implementing atop RDDs We’ll start with a batch implementation of our technique: for t in (1 to iterations): state = newState() for ex in examples: bestMatch = closest(somt-1, ex) hood = neighborhood(bestMatch, sigma(t)) state.matches += ex * hood state.hoods += hood somt = newSOM(state.matches / state.hoods)
  • 34. Implementing atop RDDs for t in (1 to iterations): state = newState() for ex in examples: bestMatch = closest(somt-1, ex) hood = neighborhood(bestMatch, sigma(t)) state.matches += ex * hood state.hoods += hood somt = newSOM(state.matches / state.hoods) Each batch produces a model that can be averaged with other models
  • 35. Implementing atop RDDs Each batch produces a model that can be averaged with other models partition for t in (1 to iterations): state = newState() for ex in examples: bestMatch = closest(somt-1, ex) hood = neighborhood(bestMatch, sigma(t)) state.matches += ex * hood state.hoods += hood somt = newSOM(state.matches / state.hoods)
  • 36. Implementing atop RDDs This won’t always work! for t in (1 to iterations): state = newState() for ex in examples: bestMatch = closest(somt-1, ex) hood = neighborhood(bestMatch, sigma(t)) state.matches += ex * hood state.hoods += hood somt = newSOM(state.matches / state.hoods)
  • 37. An implementation template var nextModel = initialModel for (int i = 0; i < iterations; i++) { val current = sc.broadcast(nextModel) val newState = examples.aggregate(ModelState.empty()) { { case (state: ModelState, example: Example) => state.update(current.value.lookup(example, i), example) } { case (s1: ModelState, s2: ModelState) => s1.combine(s2) } } nextModel = modelFromState(newState) current.unpersist } var nextModel = initialModel for (int i = 0; i < iterations; i++) { val current = sc.broadcast(nextModel) val newState = examples.aggregate(ModelState.empty()) { { case (state: ModelState, example: Example) => state.update(current.value.lookup(example, i), example) } { case (s1: ModelState, s2: ModelState) => s1.combine(s2) } } nextModel = modelFromState(newState) current.unpersist }
  • 38. An implementation template “fold”: update the state for this partition with a single new example var nextModel = initialModel for (int i = 0; i < iterations; i++) { val current = sc.broadcast(nextModel) val newState = examples.aggregate(ModelState.empty()) { { case (state: ModelState, example: Example) => state.update(current.value.lookup(example, i), example) } { case (s1: ModelState, s2: ModelState) => s1.combine(s2) } } nextModel = modelFromState(newState) current.unpersist } var nextModel = initialModel for (int i = 0; i < iterations; i++) { val current = sc.broadcast(nextModel) val newState = examples.aggregate(ModelState.empty()) { { case (state: ModelState, example: Example) => state.update(current.value.lookup(example, i), example) } { case (s1: ModelState, s2: ModelState) => s1.combine(s2) } } nextModel = modelFromState(newState) current.unpersist }
  • 39. An implementation template “reduce”: combine the states from two partitions var nextModel = initialModel for (int i = 0; i < iterations; i++) { val current = sc.broadcast(nextModel) val newState = examples.aggregate(ModelState.empty()) { { case (state: ModelState, example: Example) => state.update(current.value.lookup(example, i), example) } { case (s1: ModelState, s2: ModelState) => s1.combine(s2) } } nextModel = modelFromState(newState) current.unpersist } var nextModel = initialModel for (int i = 0; i < iterations; i++) { val current = sc.broadcast(nextModel) val newState = examples.aggregate(ModelState.empty()) { { case (state: ModelState, example: Example) => state.update(current.value.lookup(example, i), example) } { case (s1: ModelState, s2: ModelState) => s1.combine(s2) } } nextModel = modelFromState(newState) current.unpersist }
  • 40. An implementation template var nextModel = initialModel for (int i = 0; i < iterations; i++) { val current = sc.broadcast(nextModel) val newState = examples.aggregate(ModelState.empty()) { { case (state: ModelState, example: Example) => state.update(current.value.lookup(example, i), example) } { case (s1: ModelState, s2: ModelState) => s1.combine(s2) } } nextModel = modelFromState(newState) current.unpersist } var nextModel = initialModel for (int i = 0; i < iterations; i++) { val current = sc.broadcast(nextModel) val newState = examples.aggregate(ModelState.empty()) { { case (state: ModelState, example: Example) => state.update(current.value.lookup(example, i), example) } { case (s1: ModelState, s2: ModelState) => s1.combine(s2) } } nextModel = modelFromState(newState) current.unpersist } remove the stale broadcasted model broadcast the current working model for this iteration
  • 41. workersdriver (aggregate) Implementing on RDDs ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕
  • 42. workersdriver (aggregate) Implementing on RDDs ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕
  • 44. workersdriver (treeAggregate) Implementing on RDDs ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕
  • 45. workersdriver (treeAggregate) Implementing on RDDs ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕
  • 46. workersdriver (treeAggregate) Implementing on RDDs ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕
  • 47. workersdriver (treeAggregate) Implementing on RDDs ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ driver (treeAggregate) ⊕ ⊕ ⊕ ⊕
  • 48. workersdriver (treeAggregate) Implementing on RDDs ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ ⊕
  • 52. Beyond the RDD: Data frames and ML Pipelines
  • 53. RDDs: some good parts val rdd: RDD[String] = /* ... */ rdd.map(_ * 3.0).collect() val df: DataFrame = /* data frame with one String-valued column */ df.select($"_1" * 3.0).show()
  • 54. RDDs: some good parts val rdd: RDD[String] = /* ... */ rdd.map(_ * 3.0).collect() val df: DataFrame = /* data frame with one String-valued column */ df.select($"_1" * 3.0).show() doesn’t compile
  • 55. RDDs: some good parts val rdd: RDD[String] = /* ... */ rdd.map(_ * 3.0).collect() val df: DataFrame = /* data frame with one String-valued column */ df.select($"_1" * 3.0).show() doesn’t compile
  • 56. RDDs: some good parts val rdd: RDD[String] = /* ... */ rdd.map(_ * 3.0).collect() val df: DataFrame = /* data frame with one String-valued column */ df.select($"_1" * 3.0).show() doesn’t compile crashes at runtime
  • 57. RDDs: some good parts rdd.map { vec => (vec, model.value.closestWithSimilarity(vec)) } val predict = udf ((vec: SV) => model.value.closestWithSimilarity(vec)) df.withColumn($"predictions", predict($"features"))
  • 58. RDDs: some good parts rdd.map { vec => (vec, model.value.closestWithSimilarity(vec)) } val predict = udf ((vec: SV) => model.value.closestWithSimilarity(vec)) df.withColumn($"predictions", predict($"features"))
  • 59. RDDs versus query planning val numbers1 = sc.parallelize(1 to 100000000) val numbers2 = sc.parallelize(1 to 1000000000) numbers1.cartesian(numbers2) .map((x, y) => (x, y, expensive(x, y))) .filter((x, y, _) => isPrime(x), isPrime(y))
  • 60. RDDs versus query planning val numbers1 = sc.parallelize(1 to 100000000) val numbers2 = sc.parallelize(1 to 1000000000) numbers1.filter(isPrime(_)) .cartesian(numbers2.filter(isPrime(_))) .map((x, y) => (x, y, expensive(x, y)))
  • 61. RDDs and the Java heap val mat = Array(Array(1.0, 2.0), Array(3.0, 4.0))
  • 62. RDDs and the Java heap val mat = Array(Array(1.0, 2.0), Array(3.0, 4.0)) class pointer flags size locks element pointer element pointer class pointer flags size locks 1.0 class pointer flags size locks 3.0 4.0 2.0
  • 63. RDDs and the Java heap val mat = Array(Array(1.0, 2.0), Array(3.0, 4.0)) class pointer flags size locks element pointer element pointer class pointer flags size locks 1.0 class pointer flags size locks 3.0 4.0 2.0 32 bytes of data…
  • 64. RDDs and the Java heap val mat = Array(Array(1.0, 2.0), Array(3.0, 4.0)) class pointer flags size locks element pointer element pointer class pointer flags size locks 1.0 class pointer flags size locks 3.0 4.0 2.0 …and 64 bytes of overhead! 32 bytes of data…
  • 65. ML pipelines: a quick example from pyspark.ml.clustering import KMeans K, SEED = 100, 0xdea110c8 randomDF = make_random_df() kmeans = KMeans().setK(K).setSeed(SEED).setFeaturesCol("features") model = kmeans.fit(randomDF) withPredictions = model.transform(randomDF).select("x", "y", "prediction")
  • 66. Working with ML pipelines estimator.fit(df)
  • 67. Working with ML pipelines estimator.fit(df) model.transform(df)
  • 68. Working with ML pipelines model.transform(df)
  • 69. Working with ML pipelines model.transform(df)
  • 70. Working with ML pipelines estimator.fit(df) model.transform(df)
  • 71. Working with ML pipelines estimator.fit(df) model.transform(df) inputCol epochs seed outputCol
  • 72. private[som] trait SOMParams extends Params with DefaultParamsWritable { final val x: IntParam = new IntParam(this, "x", "width of self-organizing map (>= 1)", ParamValidators.gtEq(1)) final def getX: Int = $(x) final def setX(value: Int): this.type = set(x, value) // ... Defining parameters private[som] trait SOMParams extends Params with DefaultParamsWritable { final val x: IntParam = new IntParam(this, "x", "width of self-organizing map (>= 1)", ParamValidators.gtEq(1)) final def getX: Int = $(x) final def setX(value: Int): this.type = set(x, value) // ...
  • 73. private[som] trait SOMParams extends Params with DefaultParamsWritable { final val x: IntParam = new IntParam(this, "x", "width of self-organizing map (>= 1)", ParamValidators.gtEq(1)) final def getX: Int = $(x) final def setX(value: Int): this.type = set(x, value) // ... Defining parameters private[som] trait SOMParams extends Params with DefaultParamsWritable { final val x: IntParam = new IntParam(this, "x", "width of self-organizing map (>= 1)", ParamValidators.gtEq(1)) final def getX: Int = $(x) final def setX(value: Int): this.type = set(x, value) // ...
  • 74. Defining parameters private[som] trait SOMParams extends Params with DefaultParamsWritable { final val x: IntParam = new IntParam(this, "x", "width of self-organizing map (>= 1)", ParamValidators.gtEq(1)) final def getX: Int = $(x) final def setX(value: Int): this.type = set(x, value) // ... private[som] trait SOMParams extends Params with DefaultParamsWritable { final val x: IntParam = new IntParam(this, "x", "width of self-organizing map (>= 1)", ParamValidators.gtEq(1)) final def getX: Int = $(x) final def setX(value: Int): this.type = set(x, value) // ...
  • 75. Defining parameters private[som] trait SOMParams extends Params with DefaultParamsWritable { final val x: IntParam = new IntParam(this, "x", "width of self-organizing map (>= 1)", ParamValidators.gtEq(1)) final def getX: Int = $(x) final def setX(value: Int): this.type = set(x, value) // ... private[som] trait SOMParams extends Params with DefaultParamsWritable { final val x: IntParam = new IntParam(this, "x", "width of self-organizing map (>= 1)", ParamValidators.gtEq(1)) final def getX: Int = $(x) final def setX(value: Int): this.type = set(x, value) // ...
  • 76. Defining parameters private[som] trait SOMParams extends Params with DefaultParamsWritable { final val x: IntParam = new IntParam(this, "x", "width of self-organizing map (>= 1)", ParamValidators.gtEq(1)) final def getX: Int = $(x) final def setX(value: Int): this.type = set(x, value) // ... private[som] trait SOMParams extends Params with DefaultParamsWritable { final val x: IntParam = new IntParam(this, "x", "width of self-organizing map (>= 1)", ParamValidators.gtEq(1)) final def getX: Int = $(x) final def setX(value: Int): this.type = set(x, value) // ...
  • 77. Don’t repeat yourself /** * Common params for KMeans and KMeansModel */ private[clustering] trait KMeansParams extends Params with HasMaxIter with HasFeaturesCol with HasSeed with HasPredictionCol with HasTol { /* ... */ }
  • 83. Validate and transform at once def transformSchema(schema: StructType): StructType = { // check that the input columns exist... // ...and are the proper type // ...and that the output columns don’t exist // ...and then make a new schema }
  • 84. Validate and transform at once def transformSchema(schema: StructType): StructType = { // check that the input columns exist… require(schema.fieldNames.contains($(featuresCol))) // ...and are the proper type // ...and that the output columns don’t exist // ...and then make a new schema }
  • 85. Validate and transform at once def transformSchema(schema: StructType): StructType = { // check that the input columns exist... // ...and are the proper type schema($(featuresCol)) match { case sf: StructField => require(sf.dataType.equals(VectorType)) } // ...and that the output columns don’t exist // ...and then make a new schema }
  • 86. Validate and transform at once def transformSchema(schema: StructType): StructType = { // check that the input columns exist… // ...and are the proper type // ...and that the output columns don’t exist require(!schema.fieldNames.contains($(predictionCol))) require(!schema.fieldNames.contains($(similarityCol))) // ...and then make a new schema }
  • 87. Validate and transform at once def transformSchema(schema: StructType): StructType = { // check that the input columns exist… // ...and are the proper type // ...and that the output columns don’t exist // ...and then make a new schema schema.add($(predictionCol), "int") .add($(similarityCol), "double") }
  • 88. Training on data frames def fit(examples: DataFrame) = { import examples.sparkSession.implicits._ import org.apache.spark.ml.linalg.{Vector=>SV} val dfexamples = examples.select($(exampleCol)).rdd.map { case Row(sv: SV) => sv } /* construct a model object with the result of training */ new SOMModel(train(dfexamples, $(x), $(y))) }
  • 90. Improve serial execution times 2 6 6 4 0 0 1 0 1 0 0 0 1 1 0 0 3 7 7 5 • 2 4 0.1 0.7 0.2 3 5 <latexit sha1_base64="yGPDKZdOXUPJZlyEHQdtfy2cnBM=">AAACcHicbVHLSgMxFM2Mr1pf1W4EFaNFERdlpgh1WXTjUsE+oFNKJr1tQzOZIcmIZeja/3PnR7jxC0yng9rWCyHnnnPvTXLiR5wp7Tgflr2yura+kdvMb23v7O4V9g8aKowlhToNeShbPlHAmYC6ZppDK5JAAp9D0x/dT/XmC0jFQvGsxxF0AjIQrM8o0YbqFt48HwZMJH5AtGSvE+zgy3S52PMyMCWy5Edxs8QoIHq/7Z4fcw4aL40tzwaWqzif7pX5xm6h5JSdNPAycDNQQlk8dgvvXi+kcQBCU06UartOpDsJkZpRDpO8FyuICB2RAbQNFCQA1UlSwyb4wjA93A+lWULjlP3bkZBAqXHgm0pzv6Fa1Kbkf1o71v3bTsJEFGsQdHZQP+ZYh3jqPu4xCVTzsQGESmbuiumQSEK1+aO8McFdfPIyaFTKrrHz6aZUu8vsyKEjdI6ukIuqqIYe0COqI4o+raJ1bJ1YX/ahfWqfzUptK+spormwr78BvNCySg==</latexit><latexit sha1_base64="yGPDKZdOXUPJZlyEHQdtfy2cnBM=">AAACcHicbVHLSgMxFM2Mr1pf1W4EFaNFERdlpgh1WXTjUsE+oFNKJr1tQzOZIcmIZeja/3PnR7jxC0yng9rWCyHnnnPvTXLiR5wp7Tgflr2yura+kdvMb23v7O4V9g8aKowlhToNeShbPlHAmYC6ZppDK5JAAp9D0x/dT/XmC0jFQvGsxxF0AjIQrM8o0YbqFt48HwZMJH5AtGSvE+zgy3S52PMyMCWy5Edxs8QoIHq/7Z4fcw4aL40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SvE+zgy3S52PMyMCWy5Edxs8QoIHq/7Z4fcw4aL40tzwaWqzif7pX5xm6h5JSdNPAycDNQQlk8dgvvXi+kcQBCU06UartOpDsJkZpRDpO8FyuICB2RAbQNFCQA1UlSwyb4wjA93A+lWULjlP3bkZBAqXHgm0pzv6Fa1Kbkf1o71v3bTsJEFGsQdHZQP+ZYh3jqPu4xCVTzsQGESmbuiumQSEK1+aO8McFdfPIyaFTKrrHz6aZUu8vsyKEjdI6ukIuqqIYe0COqI4o+raJ1bJ1YX/ahfWqfzUptK+spormwr78BvNCySg==</latexit>
  • 91. Improve serial execution times 2 6 6 4 0 0 1 0 1 0 0 0 1 1 0 0 3 7 7 5 • 2 4 0.1 0.7 0.2 3 5 <latexit sha1_base64="yGPDKZdOXUPJZlyEHQdtfy2cnBM=">AAACcHicbVHLSgMxFM2Mr1pf1W4EFaNFERdlpgh1WXTjUsE+oFNKJr1tQzOZIcmIZeja/3PnR7jxC0yng9rWCyHnnnPvTXLiR5wp7Tgflr2yura+kdvMb23v7O4V9g8aKowlhToNeShbPlHAmYC6ZppDK5JAAp9D0x/dT/XmC0jFQvGsxxF0AjIQrM8o0YbqFt48HwZMJH5AtGSvE+zgy3S52PMyMCWy5Edxs8QoIHq/7Z4fcw4aL40tzwaWqzif7pX5xm6h5JSdNPAycDNQQlk8dgvvXi+kcQBCU06UartOpDsJkZpRDpO8FyuICB2RAbQNFCQA1UlSwyb4wjA93A+lWULjlP3bkZBAqXHgm0pzv6Fa1Kbkf1o71v3bTsJEFGsQdHZQP+ZYh3jqPu4xCVTzsQGESmbuiumQSEK1+aO8McFdfPIyaFTKrrHz6aZUu8vsyKEjdI6ukIuqqIYe0COqI4o+raJ1bJ1YX/ahfWqfzUptK+spormwr78BvNCySg==</latexit><latexit sha1_base64="yGPDKZdOXUPJZlyEHQdtfy2cnBM=">AAACcHicbVHLSgMxFM2Mr1pf1W4EFaNFERdlpgh1WXTjUsE+oFNKJr1tQzOZIcmIZeja/3PnR7jxC0yng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fPIyaFTKrrHz6aZUu8vsyKEjdI6ukIuqqIYe0COqI4o+raJ1bJ1YX/ahfWqfzUptK+spormwr78BvNCySg==</latexit><latexit sha1_base64="yGPDKZdOXUPJZlyEHQdtfy2cnBM=">AAACcHicbVHLSgMxFM2Mr1pf1W4EFaNFERdlpgh1WXTjUsE+oFNKJr1tQzOZIcmIZeja/3PnR7jxC0yng9rWCyHnnnPvTXLiR5wp7Tgflr2yura+kdvMb23v7O4V9g8aKowlhToNeShbPlHAmYC6ZppDK5JAAp9D0x/dT/XmC0jFQvGsxxF0AjIQrM8o0YbqFt48HwZMJH5AtGSvE+zgy3S52PMyMCWy5Edxs8QoIHq/7Z4fcw4aL40tzwaWqzif7pX5xm6h5JSdNPAycDNQQlk8dgvvXi+kcQBCU06UartOpDsJkZpRDpO8FyuICB2RAbQNFCQA1UlSwyb4wjA93A+lWULjlP3bkZBAqXHgm0pzv6Fa1Kbkf1o71v3bTsJEFGsQdHZQP+ZYh3jqPu4xCVTzsQGESmbuiumQSEK1+aO8McFdfPIyaFTKrrHz6aZUu8vsyKEjdI6ukIuqqIYe0COqI4o+raJ1bJ1YX/ahfWqfzUptK+spormwr78BvNCySg==</latexit>
  • 93.
  • 94.
  • 95. <latexit sha1_base64="F0lpnVum/z3V85cOiWhHJHNgpmw=">AAACFHicbVDLSsNAFJ34rPUVdelmsAiCUBIRdFl047KCfUATymQ6aYdOkunMjVDSfoQbf8WNC0XcunDn3zhtI2jrgbkczrmXO/cEUnANjvNlLS2vrK6tFzaKm1vbO7v23n5dJ6mirEYTkahmQDQTPGY14CBYUypGokCwRtC/nviNe6Y0T+I7GErmR6Qb85BTAkZq26deqAjNJPaCVAgGeDDORiMssSk/kqEDU8Ztu+SUnSnwInFzUkI5qm370+skNI1YDFQQrVuuI8HPiAJOBRsXvVQzSWifdFnL0JhETPvZ9KgxPjZKB4eJMi8GPFV/T2Qk0noYBaYzItDT895E/M9rpRBe+hmPZQosprNFYSowJHiSEO5wxSiIoSGEKm7+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/sD5/AESAY9h</latexit><latexit sha1_base64="Fotu1JHT5+QrvqFi2jYz5La5cyI=">AAAB7nicbVBNS8NAEJ3Ur1q/qh69LBbBU0lE0GPRi8cK9gPaUDbbTbt0s4m7E6Gk/RFePCji1d/jzX/jts1BWx8MPN6bYWZekEhh0HW/ncLa+sbmVnG7tLO7t39QPjxqmjjVjDdYLGPdDqjhUijeQIGStxPNaRRI3gpGtzO/9cS1EbF6wHHC/YgOlAgFo2il1mRCHslk0itX3Ko7B1klXk4qkKPeK391+zFLI66QSWpMx3MT9DOqUTDJp6VuanhC2YgOeMdSRSNu/Gx+7pScWaVPwljbUkjm6u+JjEbGjKPAdkYUh2bZm4n/eZ0Uw2s/EypJkSu2WBSmkmBMZr+TvtCcoRxbQpkW9lbChlRThjahkg3BW355lTQvqp5b9e4vK7WbPI4inMApnIMHV1CDO6hDAxiM4Ble4c1JnBfn3flYtBacfOYY/sD5/AESAY9h</latexit><latexit sha1_base64="Fotu1JHT5+QrvqFi2jYz5La5cyI=">AAAB7nicbVBNS8NAEJ3Ur1q/qh69LBbBU0lE0GPRi8cK9gPaUDbbTbt0s4m7E6Gk/RFePCji1d/jzX/jts1BWx8MPN6bYWZekEhh0HW/ncLa+sbmVnG7tLO7t39QPjxqmjjVjDdYLGPdDqjhUijeQIGStxPNaRRI3gpGtzO/9cS1EbF6wHHC/YgOlAgFo2il1mRCHslk0itX3Ko7B1klXk4qkKPeK391+zFLI66QSWpMx3MT9DOqUTDJp6VuanhC2YgOeMdSRSNu/Gx+7pScWaVPwljbUkjm6u+JjEbGjKPAdkYUh2bZm4n/eZ0Uw2s/EypJkSu2WBSmkmBMZr+TvtCcoRxbQpkW9lbChlRThjahkg3BW355lTQvqp5b9e4vK7WbPI4inMApnIMHV1CDO6hDAxiM4Ble4c1JnBfn3flYtBacfOYY/sD5/AESAY9h</latexit>
  • 96. <latexit sha1_base64="F0lpnVum/z3V85cOiWhHJHNgpmw=">AAACFHicbVDLSsNAFJ34rPUVdelmsAi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5ZXVstrlfWNza3taq1+q6JEUujSiEfyPiAKOBPQ1UxzuI8lkDDgcBc8Xmb5uyeQikXiRk9i6IdkLNiIUaINNaiVXvwAxkykQUi0ZM9T7OKT/HnYBzH84v0g4Rw0Xqh3vEzhtPK/Oa/yK78Z5JL/NPjXCbzC4E8mGFQbruPmgReBV4AGKqIzqL76w4gmIQhNOVGq57mx7qdEakY5TCt+oiAm9JGMoWegICGofpqfyhQfG2aIR5E0T2ics98VKQmVmoSBqTT9Paj5XEb+luslenTeT5mIEw2CzoxGCcc6wtnd4SGTQDWfGECoZKZXTB+IJFSb66yYJXjzIy+C26bjmV1enzXaF8U6yugAHaJT5KEWaqMr1EFdREvv1qa1a+1ZH3bd3rcPZqVWqdDsoB9hH30CrJcKDw==</latexit> <latexit sha1_base64="yGPDKZdOXUPJZlyEHQdtfy2cnBM=">AAACcHicbVHLSgMxFM2Mr1pf1W4EFaNFERdlpgh1WXTjUsE+oFNKJr1tQzOZIcmIZeja/3PnR7jxC0yng9rWCyHnnnPvTXLiR5wp7Tgflr2yura+kdvMb23v7O4V9g8aKowlhToNeShbPlHAmYC6ZppDK5JAAp9D0x/dT/XmC0jFQvGsxxF0AjIQrM8o0YbqFt48HwZMJH5AtGSvE+zgy3S52PMyMCWy5Edxs8QoIHq/7Z4fcw4aL40tzwaWqzif7pX5xm6h5JSdNPAycDNQQlk8dgvvXi+kcQBCU06UartOpDsJkZpRDpO8FyuICB2RAbQNFCQA1UlSwyb4wjA93A+lWULjlP3bkZBAqXHgm0pzv6Fa1Kbkf1o71v3bTsJEFGsQdHZQP+ZYh3jqPu4xCVTzsQGESmbuiumQSEK1+aO8McFdfPIyaFTKrrHz6aZUu8vsyKEjdI6ukIuqqIYe0COqI4o+raJ1bJ1YX/ahfWqfzUptK+spormwr78BvNCySg==</latexit> libraryDependencies += "org.scalanlp" %% "breeze-natives" % "0.13.1"
  • 102. val vec = Array[Double](/* ... */)
  • 103. val vec = Array[Double](/* ... */)
  • 104. def dot[S](a: Array[S], b: Array[S]) (implicit num: Numeric[S]): S = { import num._ (0 until a.length).foldLeft(num.zero)({ (acc, i) => acc + a(i) * b(i) }) } val vec = Array[Double](/* ... */)
  • 105. def dot[S](a: Array[S], b: Array[S]) (implicit num: Numeric[S]): S = { import num._ (0 until a.length).foldLeft(num.zero)({ (acc, i) => acc + a(i) * b(i) }) } val vec = Array[Double](/* ... */) dot(Array(0.1d, 0.2d, 0.3d), Array(1.0d, 0.0d, 0.0d)) dot(Array(0.1f, 0.2f, 0.3f), Array(1.0f, 0.0f, 0.0f))
  • 106. val vec = Array[Double](/* ... */) vdppd vdppd 0.1d 0.2d 1.0d 0.0d 0.3d (unused) 0.0d (unused) def dot[S](a: Array[S], b: Array[S]) (implicit num: Numeric[S]): S = { import num._ (0 until a.length).foldLeft(num.zero)({ (acc, i) => acc + a(i) * b(i) }) }
  • 107. val vec = Array[Double](/* ... */) vdppd vdppd 0.1d 0.2d 1.0d 0.0d 0.3d (unused) 0.0d (unused) vdpps 0.3f unused0.2f0.1f 0.0f unused0.0f1.0f def dot[S](a: Array[S], b: Array[S]) (implicit num: Numeric[S]): S = { import num._ (0 until a.length).foldLeft(num.zero)({ (acc, i) => acc + a(i) * b(i) }) }
  • 109.
  • 110.
  • 111.
  • 112.
  • 113. THANKS!willb@redhat.com • @willb https://chapeau.freevariable.com https://radanalytics.io also: “Spark for Library Developers” Room 2014 at 5:40 PM today