ShallowModel

class ShallowModel(x: Panel, y: Panel, model: str, metrics: list[str], **kwargs)[source]

Bases: object

Shallow model.

Methods Summary

fit(**kwargs)

Fit the model.

get_auc()

Get the AUC score.

predict([data])

Predict on data.

predict_proba([data])

Predict probabilities.

residuals()

Residuals.

score([on])

Score the model.

set_arrays()

Sets arrays for training, testing, and validation.

Methods Documentation

fit(**kwargs)[source]

Fit the model.

Parameters

**kwargs – Keyword arguments for the fit method of the model.

get_auc() float[source]

Get the AUC score.

predict(data: Optional[Panel] = None) Panel[source]

Predict on data.

Parameters

data (Panel, optional) – Data to predict on. Defaults to None.

Returns

Predicted data

Return type

Panel

predict_proba(data: Optional[Panel] = None) Panel[source]

Predict probabilities.

Parameters

data (Panel) – Panel with data

Returns

The predicted probabilities.

Return type

ShallowModel

residuals() Panel[source]

Residuals.

Returns

Residuals

Return type

Panel

score(on: list[str] | str = None) pd.DataFrame[source]

Score the model.

Parameters

on (list[str] or str) – Data to use for scoring

Returns

Score

Return type

pd.Series

set_arrays() None[source]

Sets arrays for training, testing, and validation.