aboutsummaryrefslogtreecommitdiff
path: root/mllib
diff options
context:
space:
mode:
authorBertrand Dechoux <BertrandDechoux@users.noreply.github.com>2015-08-07 16:07:24 -0700
committerJoseph K. Bradley <joseph@databricks.com>2015-08-07 16:07:24 -0700
commit902334fd55bbe40a57c1de2a9bdb25eddf1c8cf6 (patch)
treef9ee1a0be6b8bdb44289655f6bc561b75019d017 /mllib
parente2fbbe73111d4624390f596a19a1799c86a05f6c (diff)
downloadspark-902334fd55bbe40a57c1de2a9bdb25eddf1c8cf6.tar.gz
spark-902334fd55bbe40a57c1de2a9bdb25eddf1c8cf6.tar.bz2
spark-902334fd55bbe40a57c1de2a9bdb25eddf1c8cf6.zip
[SPARK-9748] [MLLIB] Centriod typo in KMeansModel
A minor typo (centriod -> centroid). Readable variable names help every users. Author: Bertrand Dechoux <BertrandDechoux@users.noreply.github.com> Closes #8037 from BertrandDechoux/kmeans-typo and squashes the following commits: 47632fe [Bertrand Dechoux] centriod typo
Diffstat (limited to 'mllib')
-rw-r--r--mllib/src/main/scala/org/apache/spark/mllib/clustering/KMeansModel.scala10
1 files changed, 5 insertions, 5 deletions
diff --git a/mllib/src/main/scala/org/apache/spark/mllib/clustering/KMeansModel.scala b/mllib/src/main/scala/org/apache/spark/mllib/clustering/KMeansModel.scala
index 8ecb3df11d..96359024fa 100644
--- a/mllib/src/main/scala/org/apache/spark/mllib/clustering/KMeansModel.scala
+++ b/mllib/src/main/scala/org/apache/spark/mllib/clustering/KMeansModel.scala
@@ -120,11 +120,11 @@ object KMeansModel extends Loader[KMeansModel] {
assert(className == thisClassName)
assert(formatVersion == thisFormatVersion)
val k = (metadata \ "k").extract[Int]
- val centriods = sqlContext.read.parquet(Loader.dataPath(path))
- Loader.checkSchema[Cluster](centriods.schema)
- val localCentriods = centriods.map(Cluster.apply).collect()
- assert(k == localCentriods.size)
- new KMeansModel(localCentriods.sortBy(_.id).map(_.point))
+ val centroids = sqlContext.read.parquet(Loader.dataPath(path))
+ Loader.checkSchema[Cluster](centroids.schema)
+ val localCentroids = centroids.map(Cluster.apply).collect()
+ assert(k == localCentroids.size)
+ new KMeansModel(localCentroids.sortBy(_.id).map(_.point))
}
}
}