Defines the learner, its optimizer, learning rate, number of epochs,
loss function, and regularisation, as a distinct stage prior to
training. With nofit = TRUE (the default here is FALSE) the object is
returned without being fitted, enabling batch control of expensive fits.
Arguments
- type
One of "logistic" (classification) or "linear" (regression). Distinguishes the default loss.
- optimizer
One of "gd" (full-batch gradient descent), "sgd" (stochastic minibatch), or "adam".
- learning_rate
Step size (default 0.1). Lower values give longer but more stable descent (ML7.4).
- epochs
Number of passes over the data (default 200).
- loss
Loss name; defaults to "logloss" for logistic and "mse" for linear. Custom losses may be supplied by name in
.ml_loss.- batch_size
Minibatch size for "sgd" (default 32).
- l2
Ridge (L2) penalty (default 0).
- tol
Convergence tolerance on the loss (default 1e-8).
- seed
RNG seed.
- nofit
If TRUE,
morie_ml_trainreturns the untrained spec.
