opendataval.model.ClassifierUnweightedSkLearnWrapper#
- class opendataval.model.ClassifierUnweightedSkLearnWrapper(base_model, num_classes: int, *args, **kwargs)#
Wrapper for sk-learn classifiers that can don’t have weighted fit methods.
Example:
wrapped = ClassifierSkLearnWrapper(KNeighborsClassifier, 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