[SPARK-14634][ML][FOLLOWUP] Delete superfluous line in BisectingKMeans
## What changes were proposed in this pull request? As commented by jkbradley in https://github.com/apache/spark/pull/12394, `model.setSummary(summary)` is superfluous ## How was this patch tested? existing tests Author: Zheng RuiFeng <ruifengz@foxmail.com> Closes #15619 from zhengruifeng/del_superfluous.
This commit is contained in:
parent
6f31833dbe
commit
38cdd6ccda
|
@ -265,9 +265,8 @@ class BisectingKMeans @Since("2.0.0") (
|
|||
val summary = new BisectingKMeansSummary(
|
||||
model.transform(dataset), $(predictionCol), $(featuresCol), $(k))
|
||||
model.setSummary(summary)
|
||||
val m = model.setSummary(summary)
|
||||
instr.logSuccess(m)
|
||||
m
|
||||
instr.logSuccess(model)
|
||||
model
|
||||
}
|
||||
|
||||
@Since("2.0.0")
|
||||
|
|
|
@ -324,9 +324,9 @@ class KMeans @Since("1.5.0") (
|
|||
val model = copyValues(new KMeansModel(uid, parentModel).setParent(this))
|
||||
val summary = new KMeansSummary(
|
||||
model.transform(dataset), $(predictionCol), $(featuresCol), $(k))
|
||||
val m = model.setSummary(summary)
|
||||
instr.logSuccess(m)
|
||||
m
|
||||
model.setSummary(summary)
|
||||
instr.logSuccess(model)
|
||||
model
|
||||
}
|
||||
|
||||
@Since("1.5.0")
|
||||
|
|
Loading…
Reference in a new issue