File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
mllib/src/main/scala/org/apache/spark/ml/tuning Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ class CrossValidator @Since("1.2.0") (@Since("1.4.0") override val uid: String)
132132 models(i) match {
133133 case w : MLWritable =>
134134 val path = new Path ($(modelPath), epm(i).toSeq.map(p => p.param.name + " -" + p.value)
135- .mkString(" -" ) + s " -split $splitIndex- $metric" )
135+ .mkString(" -" ) + s " -split $splitIndex- ${math.rint( metric * 1000 ) / 1000 } " )
136136 w.save(path.toString)
137137 case _ =>
138138 logWarning(models(i).uid + " did not implement MLWritable. Serialization omitted." )
Original file line number Diff line number Diff line change @@ -127,8 +127,8 @@ class TrainValidationSplit @Since("1.5.0") (@Since("1.5.0") override val uid: St
127127 if (isDefined(modelPath)) {
128128 models(i) match {
129129 case w : MLWritable =>
130- val path = new Path ($(modelPath), epm(i).toSeq
131- .map(p => p.param.name + " - " + p.value). mkString(" -" ) + s " - $metric" )
130+ val path = new Path ($(modelPath), epm(i).toSeq.map(p => p.param.name + " - " + p.value)
131+ .mkString(" -" ) + s " - ${math.rint( metric * 1000 ) / 1000 } " )
132132 w.save(path.toString)
133133 case _ =>
134134 logWarning(models(i).uid + " did not implement MLWritable. Serialization omitted." )
You can’t perform that action at this time.
0 commit comments