library.phases.phases_implementation.modelling.shallow.model_definition.model_types.classifier module

class library.phases.phases_implementation.modelling.shallow.model_definition.model_types.classifier.Classifier(modelName: str, model_sklearn: object, model_type: str, results_header: list[str], dataset: Dataset)[source]

Bases: Model

evaluate(modelName: str, current_phase: str)[source]
predict_default(X)[source]

Sklearn-compatible predict method (for LIME, cross_val_score, etc.). Uses the trained model directly.

predict_proba(X)[source]
score(X, y)[source]

Returns the accuracy score of the model on the given data.

Parameters:
  • X (array-like) – Feature matrix.

  • y (array-like) – True labels.

Returns:

Accuracy score.

Return type:

float