modelhub.LogisticRegression

class modelhub.LogisticRegression

(*args, **kwargs)

[source]

A binary class logistic regression model that takes Bach data objects as input data.

It is based on sklearn’s LogisticRegression. All supported methods are run on the database using Bach directly, with the exeption of fit(). For the fit method, data is extracted from the database before applying sklearn’s fit method on the data.

All parameters to instantiate sklearn’s logistic regression are supported.

For the full documentation, including a description of the parameters, of the Logistic Regression model see: https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html

Methods

fit(X, y)Fits a binary class logistic regression model.
get_params()Return the parameters as a dictionary.
predict(X)Predict the labels based on the fitted estimator.
predict_proba(X)Predict the probability of the 'True' label based on the fitted estimator.
score(X, y)Returns the accuracy score from a series of true values compared to predicted values.
set_params(**params)Set parameters for the model.