FadingTargetMean#

class capymoa.regressor.FadingTargetMean[source]#

Bases: MOARegressor

Fading Target Mean Regressor.

Maintains a fading mean of the target values to make predictions. The fading factor determines the rate at which older observations are discounted. A fading factor close to 1.0 gives more weight to older observations, while a factor closer to 0.0 emphasizes more recent data.

__init__(
schema: Schema | None = None,
factor: float = 0.99,
)[source]#

Construct Fading Target Mean Regressor.

Parameters:
  • schema – Description of the stream’s data types.

  • fading_factor – The fading factor. Must be in (0, 1]. Defaults to 0.99.

cli_help()[source]#
classmethod from_params(
schema: Any = None,
params: dict[str, Any] | None = None,
random_seed: int = 1,
) → Any[source]#

Construct an instance from parameters produced by get_params.

get_params() → dict[str, Any][source]#

Return the hyper-parameters captured from the constructor.

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