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: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
