aboutsummaryrefslogtreecommitdiff
path: root/docs/mllib-clustering.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/mllib-clustering.md')
-rw-r--r--docs/mllib-clustering.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/mllib-clustering.md b/docs/mllib-clustering.md
index dac22f736e..1b088969dd 100644
--- a/docs/mllib-clustering.md
+++ b/docs/mllib-clustering.md
@@ -249,11 +249,11 @@ public class GaussianMixtureExample {
GaussianMixtureModel gmm = new GaussianMixture().setK(2).run(parsedData.rdd());
// Save and load GaussianMixtureModel
- gmm.save(sc, "myGMMModel")
- GaussianMixtureModel sameModel = GaussianMixtureModel.load(sc, "myGMMModel")
+ gmm.save(sc.sc(), "myGMMModel");
+ GaussianMixtureModel sameModel = GaussianMixtureModel.load(sc.sc(), "myGMMModel");
// Output the parameters of the mixture model
for(int j=0; j<gmm.k(); j++) {
- System.out.println("weight=%f\nmu=%s\nsigma=\n%s\n",
+ System.out.printf("weight=%f\nmu=%s\nsigma=\n%s\n",
gmm.weights()[j], gmm.gaussians()[j].mu(), gmm.gaussians()[j].sigma());
}
}