The single unified training entry point. Runs the iterative optimiser declared in the model spec, recording the loss at each epoch and the gradient norm at each step, and returns a trained-model object.
Value
A morie_ml_fit object (or the untrained spec if
model$nofit), carrying weights, loss_path, grad_norm,
converged, and the input metadata.
Examples
m <- morie_ml_model("linear", optimizer = "gd", epochs = 100)
fit <- morie_ml_train(m, mtcars[c("hp", "wt")], mtcars$mpg)
