zhengruifeng commented on issue #22087: [SPARK-25097][ML] Support prediction on 
single instance in KMeans/BiKMeans/GMM
URL: https://github.com/apache/spark/pull/22087#issuecomment-464950026
 
 
   @srowen I have tried it, and found that it seems not good to make clustering 
models extend `PredictionModel`. The differences maken by `PredictionModel` are:
   1, `override def numFeatures: Int = parentModel.clusterCenters.head.size`, 
it is OK
   2, `override def predict(features: Vector): Double`, current output is 
`Int`, this is a breaking change
   3, `labelCol: Param[String]` introduced from `PredictionModel`, while 
clustering algs do not have labels.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to