You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/03/02 19:13:34 UTC

[GitHub] [spark] GabeChurch commented on issue #24509: [SPARK-27621][ML] Linear Regression - validate training related params such as loss only during fitting phase

GabeChurch commented on issue #24509: [SPARK-27621][ML] Linear Regression - validate training related params such as loss only during fitting phase
URL: https://github.com/apache/spark/pull/24509#issuecomment-593568421
 
 
   I have a fix for this issue for anyone else who runs into it when re-loading a model. It seems like the default option should be saved in the params map but is not. So load your model as follows. 
   
   `
   val lrModel = LinearRegressionModel.load("/you_model_path")
   //can view your model params with 
   // lrModel.extractParamMap
   lrModel.set(lrModel.loss, "squaredError")
   `

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org