Saving and loading a model in R

前端 未结 3 681
粉色の甜心
粉色の甜心 2020-12-03 06:50

When working with caret, how can I save a model after training, and load it later (e.g. in a different session) for prediction?

3条回答
  •  伪装坚强ぢ
    2020-12-03 07:26

    The correct syntax would be to use:

    save(model, file="model.Rdata")
    

    Thereafter, it can be loaded using the load() command.

提交回复
热议问题