Skip to content
Snippets Groups Projects
Commit 569788a5 authored by Zheng RuiFeng's avatar Zheng RuiFeng Committed by Yanbo Liang
Browse files

[SPARK-18109][ML] Add instrumentation to GMM

## What changes were proposed in this pull request?

Add instrumentation to GMM

## How was this patch tested?

Test in spark-shell

Author: Zheng RuiFeng <ruifengz@foxmail.com>

Closes #15636 from zhengruifeng/gmm_instr.
parent ab5f938b
No related branches found
No related tags found
No related merge requests found
......@@ -323,6 +323,9 @@ class GaussianMixture @Since("2.0.0") (
case Row(point: Vector) => OldVectors.fromML(point)
}
val instr = Instrumentation.create(this, rdd)
instr.logParams(featuresCol, predictionCol, probabilityCol, k, maxIter, seed, tol)
val algo = new MLlibGM()
.setK($(k))
.setMaxIterations($(maxIter))
......@@ -337,6 +340,9 @@ class GaussianMixture @Since("2.0.0") (
val summary = new GaussianMixtureSummary(model.transform(dataset),
$(predictionCol), $(probabilityCol), $(featuresCol), $(k))
model.setSummary(summary)
instr.logNumFeatures(model.gaussians.head.mean.size)
instr.logSuccess(model)
model
}
@Since("2.0.0")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment