ORTO#

class capymoa.regressor.ORTO[source]#

Bases: MOARegressor

Implementation of the Online Regression Tree with Options (ORTO).

ORTO is an extension to FIMT-DD that allows options during the tree’s growth and splits.

Reference:

Ikonomovska, Elena, Joao Gama, Bernard Zenko, and Saso Dzeroski. “Speeding-up hoeffding-based regression trees with options.” In Proceedings of the 28th International Conference on Machine Learning (ICML-11), pp. 537-544. 2011.

Example usage:

>>> from capymoa.datasets import Fried
    >>> from capymoa.regressor import ORTO
    >>> from capymoa.evaluation import prequential_evaluation
>>> stream = Fried()
>>> schema = stream.get_schema()
>>> learner = ORTO(schema)
>>> results = prequential_evaluation(stream, learner, max_instances=1000)
>>> results["cumulative"].rmse()
9.228075678265904
__init__(
schema: Schema,
max_trees: int = 10,
max_option_level: int = 10,
option_decay_factor: float = 0.9,
option_fading_factor: float = 0.9995,
split_criterion: SplitCriterion | str = 'VarianceReductionSplitCriterion',
grace_period: int = 200,
split_confidence: float = 1e-07,
tie_threshold: float = 0.05,
page_hinckley_alpha: float = 0.005,
page_hinckley_threshold: int = 50,
alternate_tree_fading_factor: float = 0.995,
alternate_tree_t_min: int = 150,
alternate_tree_time: int = 1500,
regression_tree: bool = False,
learning_ratio: float = 0.02,
learning_ratio_decay_factor: float = 0.001,
learning_ratio_const: bool = False,
random_seed: int | None = None,
) None[source]#

Construct ORTO.

Parameters:
  • max_trees – The maximum number of trees contained in the option tree.

  • max_option_level – The maximal depth at which option nodes can be created.

  • option_decay_factor – The option decay factor that determines how many options can be selected at a given level.

  • option_fading_factor – The fading factor used for comparing subtrees of an option node.

  • split_criterion – Split criterion to use.

  • grace_period – Number of instances a leaf should observe between split attempts.

  • split_confidence – Allowed error in split decision, values close to 0 will take long to decide.

  • tie_threshold – Threshold below which a split will be forced to break ties.

  • page_hinckley_alpha – Alpha value to use in the Page Hinckley change detection tests.

  • page_hinckley_threshold – Threshold value used in the Page Hinckley change detection tests.

  • alternate_tree_fading_factor – Fading factor used to decide if an alternate tree should replace an original.

  • alternate_tree_t_min – Tmin value used to decide if an alternate tree should replace an original.

  • alternate_tree_time – The number of instances used to decide if an alternate tree should be discarded.

  • regression_tree – Build a regression tree instead of a model tree.

  • learning_ratio – Learning ratio to used for training the Perceptrons in the leaves.

  • learning_ratio_decay_factor – Learning rate decay factor (not used when learning rate is constant).

  • learning_ratio_const – Keep learning rate constant instead of decaying.

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