opendataval.model.ClassifierSkLearnWrapper#

class opendataval.model.ClassifierSkLearnWrapper(base_model, num_classes: int, *args, **kwargs)#

Wrapper for sk-learn classifiers that can have weighted fit methods.

Example:

wrapped = ClassifierSkLearnWrapper(LinearRegression(), 2)

Parameters#

base_modelBaseModel

Any sk-learn model that supports sample_weights

num_classesint

Label dimensionality

__init__(base_model, num_classes: int, *args, **kwargs)#

Methods

__init__(base_model, num_classes, *args, ...)

clone()

Clone Model object.

fit(x_train, y_train, *args[, sample_weight])

Fits the model on the training data.

predict(x)

Predict labels from sk-learn model.

Attributes

Models