GLM¶
Generalized Linear Model.
This serves as a base class for linear and logistic regression.
Parameters¶
-
optimizer (mutable)
Type →
optim.base.OptimizerThe sequential optimizer used for updating the weights. Note that the intercept updates are handled separately.
-
loss (mutable)
Type →
optim.losses.LossThe loss function to optimize for.
-
l2 (mutable)
Type →
floatAmount of L2 regularization used to push weights towards 0. For now, only one type of penalty can be used. The joint use of L1 and L2 is not explicitly supported.
-
l1 (mutable)
Type →
floatAmount of L1 regularization used to push weights towards 0. For now, only one type of penalty can be used. The joint use of L1 and L2 is not explicitly supported.
-
intercept_init
Type →
floatInitial intercept value.
-
intercept_lr (mutable)
Type →
optim.base.Scheduler | floatLearning rate scheduler used for updating the intercept. A
optim.schedulers.Constantis used if afloatis provided. The intercept is not updated when this is set to 0. -
clip_gradient (mutable)
Type →
floatClips the absolute value of each gradient value.
-
initializer (mutable)
Type →
optim.base.InitializerWeights initialization scheme.
Attributes¶
- weights