Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update tol
  • Loading branch information
zhengruifeng committed Jan 16, 2017
commit 9e316b9bd88be30d75e2628134d29784feb8c502
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ class GaussianMixtureModel private[ml] (

val spark = dataset.sparkSession

import spark.implicits._

val bcWeightAndDists =
spark.sparkContext.broadcast(weights.zip(gaussians))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class GaussianMixtureSuite extends SparkFunSuite with MLlibTestSparkContext
val model = new GaussianMixtureModel("gmm", Array(0.2, 0.8), Array(gaussian1, gaussian2))

val llk = model.computeLogLikelihood(dataset)
assert(llk ~== -52.804472030823533 relTol 1E-4)
assert(llk ~== -52.804472030823533 relTol 1E-6)
/*
Using the following Python code to compute the log-likelihood:

Expand Down