datatable.models.LinearModel.__init__()¶
Create a new LinearModel
object.
Parameters¶
float
The initial learning rate, should be positive.
float
Decay for the "time-based"
and "step-based"
learning rate schedules, should be non-negative.
float
Drop rate for the "step-based"
learning rate schedule,
should be positive.
"constant"
| "time-based"
| "step-based"
| "exponential"
Learning rate schedule. When it is "constant"
the learning rate
eta
is constant and equals to eta0
. Otherwise,
after each training iteration eta
is updated as follows:
for
"time-based"
schedule aseta0 / (1 + eta_decay * epoch)
;for
"step-based"
schedule aseta0 * eta_decay ^ floor((1 + epoch) / eta_drop_rate)
;for
"exponential"
schedule aseta0 / exp(eta_decay * epoch)
.
By default, the size of the training iteration is one epoch, it becomes
nepochs_validation
when validation dataset is specified.
float
L1 regularization parameter, should be non-negative.
float
L2 regularization parameter, should be non-negative.
float
Number of training epochs, should be non-negative. When nepochs
is an integer number, the model will train on all the data
provided to .fit()
method nepochs
times. If nepochs
has a fractional part {nepochs}
, the model will train on all
the data [nepochs]
times, i.e. the integer part of nepochs
.
Plus, it will also perform an additional training iteration
on the {nepochs}
fraction of data.
bool
An option to indicate whether double precision, i.e. float64
,
or single precision, i.e. float32
, arithmetic should be used
for computations. It is not guaranteed that setting
double_precision
to True
will automatically improve
the model accuracy. It will, however, roughly double the memory
footprint of the LinearModel
object.
bool
An option to indicate if a “negative” class should be created
in the case of multinomial classification. For the “negative”
class the model will train on all the negatives, and if
a new label is encountered in the target column, its
coefficients will be initialized to the current “negative” class coefficients.
If negative_class
is set to False
, the initial coefficients
become zeros.
"binomial"
| "multinomial"
| "regression"
| "auto"
The model type to be built. When this option is "auto"
then the model type will be automatically chosen based on
the target column stype
.
int
Seed for the quasi-random number generator that is used for data shuffling when fitting the model, should be non-negative. If seed is zero, no shuffling is performed.
LinearModelParams
Named tuple of the above parameters. One can pass either this tuple, or any combination of the individual parameters to the constructor, but not both at the same time.
ValueError
The exception is raised if both the params
and one of the
individual model parameters are passed at the same time.