# `ARFFIMTDD`

### *class* capymoa.regressor.ARFFIMTDD[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/regressor/_arffimtdd.py#L13)

Bases: [`MOARegressor`](capymoa.base.MOARegressor.md#capymoa.base.MOARegressor)

Adaptive Random Forest Fast Incremental Model Tree with Drift Detection.

Adaptive Random Forest Fast Incremental Model Tree with Drift Detection (ARFFIMT-DD)
<sup>[1](#f0)</sup> is a model tree. It an extension of the Fast Incremental Model Tree with Drift
Detection (FIMT-DD) <sup>[2](#f1)</sup>.

* <a id='f0'>**[1]**</a> Heitor Murilo Gomes, Jean Paul Barddal, Luis Eduardo Boiko Ferreira, Albert Bifet. Adaptive random forests for data stream regression. In European Symposium on Artificial Neural Networks, Computational Intelligence and Machine Learning (ESANN), 2018. [https://www.elen.ucl.ac.be/Proceedings/esann/esannpdf/es2018-183.pdf](https://www.elen.ucl.ac.be/Proceedings/esann/esannpdf/es2018-183.pdf)
* <a id='f1'>**[2]**</a> Elena Ikonomovska, João Gama, and Saso Dzeroski. Learning model trees from evolving data streams. Data Min. Knowl. Discov. , 23(1):128–168, 2011.

#### \_\_init_\_(schema: [Schema](capymoa.stream.Schema.md#capymoa.stream.Schema), subspace_size_size: [int](https://docs.python.org/3/builtins/functions.html#int) = 2, split_criterion: [SplitCriterion](capymoa.core.moa.splitcriteria.SplitCriterion.md#capymoa.core.moa.splitcriteria.SplitCriterion) | [str](https://docs.python.org/3/builtins/stdtypes.html#str) = 'VarianceReductionSplitCriterion', grace_period: [int](https://docs.python.org/3/builtins/functions.html#int) = 200, split_confidence: [float](https://docs.python.org/3/builtins/functions.html#float) = 1.0e-7, tie_threshold: [float](https://docs.python.org/3/builtins/functions.html#float) = 0.05, page_hinckley_alpha: [float](https://docs.python.org/3/builtins/functions.html#float) = 0.005, page_hinckley_threshold: [int](https://docs.python.org/3/builtins/functions.html#int) = 50, alternate_tree_fading_factor: [float](https://docs.python.org/3/builtins/functions.html#float) = 0.995, alternate_tree_t_min: [int](https://docs.python.org/3/builtins/functions.html#int) = 150, alternate_tree_time: [int](https://docs.python.org/3/builtins/functions.html#int) = 1500, learning_ratio: [float](https://docs.python.org/3/builtins/functions.html#float) = 0.02, learning_ratio_decay_factor: [float](https://docs.python.org/3/builtins/functions.html#float) = 0.001, learning_ratio_const: [bool](https://docs.python.org/3/builtins/functions.html#bool) = False, random_seed: [int](https://docs.python.org/3/builtins/functions.html#int) | [None](https://docs.python.org/3/builtins/constants.html#None) = None) → [None](https://docs.python.org/3/builtins/constants.html#None)[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/regressor/_arffimtdd.py#L29)

Construct ARFFIMTDD.

* **Parameters:**
  * **subspace_size_size** – Number of features per subset for each node split. Negative values = #features - k
  * **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.
  * **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]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/base/_regressor.py#L53)

#### *classmethod* from_params(schema: [Any](https://docs.python.org/3/library/typing.html#typing.Any) = None, params: [dict](https://docs.python.org/3/builtins/stdtypes.html#dict)[[str](https://docs.python.org/3/builtins/stdtypes.html#str), [Any](https://docs.python.org/3/library/typing.html#typing.Any)] | [None](https://docs.python.org/3/builtins/constants.html#None) = None, random_seed: [int](https://docs.python.org/3/builtins/functions.html#int) = 1) → [Any](https://docs.python.org/3/library/typing.html#typing.Any)[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/base/_learner_params.py#L170)

Construct an instance from parameters produced by `get_params`.

#### get_params() → [dict](https://docs.python.org/3/builtins/stdtypes.html#dict)[[str](https://docs.python.org/3/builtins/stdtypes.html#str), [Any](https://docs.python.org/3/library/typing.html#typing.Any)][[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/base/_learner_params.py#L163)

Return the hyper-parameters captured from the constructor.

#### predict(instance)[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/base/_regressor.py#L59)

#### train(instance)[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/base/_regressor.py#L56)
