LeveragingBagging#

class capymoa.classifier.LeveragingBagging[source]#

Bases: MOAClassifier

Leveraging Bagging for evolving data streams using ADWIN.

Leveraging Bagging and Leveraging Bagging MC using Random Output Codes ( -o option).

Reference:

Albert Bifet, Geoffrey Holmes, Bernhard Pfahringer. Leveraging Bagging for Evolving Data Streams Machine Learning and Knowledge Discovery in Databases, European Conference, ECML PKDD}, 2010.

See capymoa.base.MOAClassifier for train, predict and predict_proba.

__init__(
schema=None,
CLI=None,
random_seed=1,
base_learner=None,
ensemble_size=100,
minibatch_size=None,
number_of_jobs=None,
)[source]#

Construct a Leveraging Bagging classifier.

Parameters:
  • schema – The schema of the stream. If not provided, it will be inferred from the data.

  • CLI – Command Line Interface (CLI) options for configuring the ARF algorithm. If not provided, default options will be used.

  • random_seed – Seed for the random number generator.

  • base_learner – The base learner to use. If not provided, a default Hoeffding Tree is used.

  • ensemble_size – The number of trees in the ensemble.

  • minibatch_size – The number of instances that a learner must accumulate before training.

  • number_of_jobs – The number of parallel jobs to run during the execution of the algorithm. By default, the algorithm executes tasks sequentially (i.e., with number_of_jobs=1). Increasing the number_of_jobs can lead to faster execution on multi-core systems. However, setting it to a high value may consume more system resources and memory. This implementation focuses more on performance, therefore the predictive performance is modified. It’s recommended to experiment with different values to find the optimal setting based on the available hardware resources and the nature of the workload.

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