Github user yanboliang commented on the issue:
https://github.com/apache/spark/pull/18610
@hhbyyh We got agreement that the initialModel should be of type ```[T <:
Model[T]]``` at #11119. I understand the scenario you mentioned, however, I
think they are different scenarios:
1, If we set ```initialModel``` as a string path, we should guarantee there
is correct model stored in the path, but we can't guarantee it only to refer
the string path.
2, I agree that the scenario you mentioned above is really useful, but it
think the requirement is beyond initial model. The following code snippet can
meet that requirement under my framework:
```
val initialModel =
LinearRegressionModel.load("path_lr_20iteration_reg0.001.model")
val lr = new LinearRegression().setInitialModel(initialModel)
val model = lr.fit(dataset)
```
3, If users have a model in memory, they want to use this model as the
initial model to train another one, they need to save the model firstly and
then set the corresponding path as the initial model path.
4, For your comments about serializing the initial model, I agree with you.
I'm ok not to save ```initialModel``` when saving estimator.
What do you think of it? Thanks.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]