Skip to contents

Save a trained model to disk

Usage

morie_ml_save(fit, path)

Arguments

fit

A morie_ml_fit.

path

File path (.rds). A .rds suffix is appended if absent.

Value

The path written, invisibly.

Examples

m <- morie_ml_train(morie_ml_model("linear", "gd"),
                    mtcars[c("hp", "wt")], mtcars$mpg)
f <- file.path(tempdir(), "model")
morie_ml_save(m, f)