Skip to content

GLM

Generalized Linear Model.

This serves as a base class for linear and logistic regression.

Parameters

  • optimizer (mutable)

    The sequential optimizer used for updating the weights. Note that the intercept updates are handled separately.

  • loss (mutable)

    The loss function to optimize for.

  • l2 (mutable)

    Amount 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)

    Amount 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

    Initial intercept value.

  • intercept_lr (mutable)

    Learning rate scheduler used for updating the intercept. A optim.schedulers.Constant is used if a float is provided. The intercept is not updated when this is set to 0.

  • clip_gradient (mutable)

    Clips the absolute value of each gradient value.

  • initializer (mutable)

    Weights initialization scheme.

Attributes

  • weights

Methods

learn_many
learn_one