fatf.utils.models.models.Model

class fatf.utils.models.models.Model[source]

An abstract class used to implement predictive models.

This abstract class requires fit and predict methods and defines an optional predict_proba method.

This is a scikit-learn-inspired model specification and it is being relied on through out this package.

Raises
NotImplementedError

Any of the required methods – fit or predict – is not implemented.

Methods

fit(X, y)

Fits this predictive model.

predict(X)

Predicts labels of new data points using this model.

predict_proba(X)

Predicts probabilities of labels for new data points using this model.

abstract fit(X, y)[source]

Fits this predictive model.

Parameters
Xnumpy.ndarray

A 2-dimensional numpy data array used to fit the model.

ynumpy.ndarray

A 1-dimensional numpy labels array used to fit the model.

abstract predict(X)[source]

Predicts labels of new data points using this model.

Parameters
Xnumpy.ndarray

A 2-dimensional numpy data array for which labels are predicted.

predict_proba(X)[source]

Predicts probabilities of labels for new data points using this model.

Parameters
Xnumpy.ndarray

A 2-dimensional numpy data array for which labels probabilities are predicted.

Raises
NotImplementedError

By default this method is not required, hence it raises a NotImplementedError.