Skip to content

Mistake in type hinting Exponential Smoothing model - seasonality parameter  #1185

@rijkvandermeulen

Description

@rijkvandermeulen

I believe the type hinting for the seasonal parameter in the Exponential Smoothing model is incorrect (ModelMode iso SeasonalityMode):

class ExponentialSmoothing(ForecastingModel):
    def __init__(
        self,
        trend: Optional[ModelMode] = ModelMode.ADDITIVE,
        damped: Optional[bool] = False,
        seasonal: Optional[ModelMode] = SeasonalityMode.ADDITIVE,
        seasonal_periods: Optional[int] = None,
        random_state: int = 0,
        **fit_kwargs,
    ):

I'll open a PR to make this quick fix. :)

BTW: have you ever considered adding mypy to your pipeline and pre-commit hooks to spot issues like this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions