Module linear_model (0.4.0)

Linear models. This module is styled after scikit-learn's linear_model module: https://scikit-learn.org/stable/modules/linear_model.html.

Classes

LinearRegression

LinearRegression(fit_intercept: bool = True)

Ordinary least squares Linear Regression.

LinearRegression fits a linear model with coefficients w = (w1, ..., wp) to minimize the residual sum of squares between the observed targets in the dataset, and the targets predicted by the linear approximation.

Parameter
NameDescription
fit_intercept default True

Default True. Whether to calculate the intercept for this model. If set to False, no intercept will be used in calculations (i.e. data is expected to be centered).

LogisticRegression

LogisticRegression(fit_intercept: bool = True, auto_class_weights: bool = False)

Logistic Regression (aka logit, MaxEnt) classifier.

Parameters
NameDescription
fit_intercept default True

Default True. Specifies if a constant (a.k.a. bias or intercept) should be added to the decision function.

auto_class_weights default False

Default False. If True, balance class labels using weights for each class in inverse proportion to the frequency of that class.