AutoClass#

class capymoa.automl.AutoClass[source]#

Bases: MOAClassifier

AutoClass

Reference: Maroua Bahri, Nikolaos Georgantas. Autoclass: Automl for data stream classification. In BigData, IEEE, 2023.

__init__(
schema: Schema = None,
random_seed: int = 0,
configuration_json: str = '../../data/settings_autoclass.json',
base_classifiers: list[Classifier] = ['lazy.kNN', 'trees.HoeffdingTree', 'trees.HoeffdingAdaptiveTree'],
number_active_classifiers: int = 1,
weight_classifiers: bool = False,
)[source]#

AutoClass automl algorithm by Bahri and Georgantas.

Note that configuration json file reading is delegated to the MOA object, thus in the configuration file the name of the learners should correspond to the MOA class full name.

Parameters:
  • schema – The schema of the stream.

  • random_seed – The random seed passed to the MOA learner.

  • configuration – A json file with the configuration for learners

  • base_classifiers – The learners that compose the ensemble

  • number_active_classifiers – The number of active classifiers (used for voting)

  • weight_classifiers – Uses online performance estimation to weight the classifiers

CLI_help()[source]#
predict(instance)[source]#

Predict the label of an instance.

The base implementation calls predict_proba() and returns the label with the highest probability.

Parameters:

instance – The instance to predict the label for.

Returns:

The predicted label or None if the classifier is unable to make a prediction.

predict_proba(instance)[source]#

Return probability estimates for each label.

Parameters:

instance – The instance to estimate the probabilities for.

Returns:

An array of probabilities for each label or None if the classifier is unable to make a prediction.

train(instance)[source]#

Train the classifier with a labeled instance.

Parameters:

instance – The labeled instance to train the classifier with.

random_seed: int#

The random seed for reproducibility.

When implementing a classifier ensure random number generators are seeded.

schema: Schema#

The schema representing the instances.