zhengruifeng commented on issue #26439: [SPARK-29801][ML] ML models unify 
toString method
URL: https://github.com/apache/spark/pull/26439#issuecomment-551663482
 
 
   For example, KMeansModel.toString should expose some basice information like 
LoR, but it only contains Estimator's uid now.
   
   ```scala
   scala> val kmeans = new KMeans().setK(2).setSeed(1L)
   kmeans: org.apache.spark.ml.clustering.KMeans = kmeans_4d760be410ff
   
   scala> val kmeans_model = kmeans.fit(dataset)
   kmeans_model: org.apache.spark.ml.clustering.KMeansModel = 
kmeans_4d760be410ff
   
   scala> val lr = new LogisticRegression().setMaxIter(1)
   lr: org.apache.spark.ml.classification.LogisticRegression = 
logreg_6523109640c2
   
   scala> val lrm = lr.fit(dataset)
   lrm: org.apache.spark.ml.classification.LogisticRegressionModel = 
LogisticRegressionModel: uid = logreg_6523109640c2, numClasses = 6, numFeatures 
= 3
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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