Skip to content

Commit ea9877c

Browse files
committed
More documentation
1 parent 9facbe3 commit ea9877c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

mllib/src/main/scala/org/apache/spark/mllib/clustering/StreamingKMeans.scala

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,16 @@ import org.apache.spark.streaming.StreamingContext._
6262
* This decay fraction can be specified in units of 'points' or 'batches'.
6363
* if 'batches', behavior will be independent of the number of points per batch;
6464
* if 'points', the expected number of points per batch must be specified.
65+
*
66+
* Use a builder pattern to construct a streaming KMeans analysis
67+
* in an application, like:
68+
*
69+
* val model = new StreamingKMeans()
70+
* .setDecayFactor(0.5)
71+
* .setK(3)
72+
* .setRandomCenters(5)
73+
* .trainOn(DStream)
74+
*
6575
*/
6676
@DeveloperApi
6777
class StreamingKMeansModel(

0 commit comments

Comments
 (0)