@@ -46,11 +46,11 @@ private[mllib] class KMeansPMMLModelExport(model : KMeansModel) extends PMMLMode
4646 /**
4747 * Export the input KMeansModel model to PMML format
4848 */
49- populateKMeansPMML(model);
49+ populateKMeansPMML(model)
5050
5151 private def populateKMeansPMML (model : KMeansModel ): Unit = {
5252
53- pmml.getHeader().setDescription(" k-means clustering" );
53+ pmml.getHeader().setDescription(" k-means clustering" )
5454
5555 if (model.clusterCenters.length > 0 ){
5656
@@ -65,11 +65,11 @@ private[mllib] class KMeansPMMLModelExport(model : KMeansModel) extends PMMLMode
6565 val comparisonMeasure = new ComparisonMeasure ()
6666 .withKind(Kind .DISTANCE )
6767 .withMeasure(new SquaredEuclidean ()
68- );
68+ )
6969
7070 val clusteringModel = new ClusteringModel (miningSchema, comparisonMeasure,
7171 MiningFunctionType .CLUSTERING , ModelClass .CENTER_BASED , model.clusterCenters.length)
72- .withModelName(" k-means" );
72+ .withModelName(" k-means" )
7373
7474 for ( i <- 0 to (clusterCenter.size - 1 )) {
7575 fields(i) = FieldName .create(" field_" + i)
@@ -83,7 +83,7 @@ private[mllib] class KMeansPMMLModelExport(model : KMeansModel) extends PMMLMode
8383 )
8484 }
8585
86- dataDictionary.withNumberOfFields((dataDictionary.getDataFields()).size());
86+ dataDictionary.withNumberOfFields((dataDictionary.getDataFields()).size())
8787
8888 for ( i <- 0 until model.clusterCenters.size ) {
8989 val cluster = new Cluster ()
@@ -97,8 +97,8 @@ private[mllib] class KMeansPMMLModelExport(model : KMeansModel) extends PMMLMode
9797 clusteringModel.withClusters(cluster)
9898 }
9999
100- pmml.setDataDictionary(dataDictionary);
101- pmml.withModels(clusteringModel);
100+ pmml.setDataDictionary(dataDictionary)
101+ pmml.withModels(clusteringModel)
102102
103103 }
104104
0 commit comments