Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A first minimal version of timeseries lib #1

Merged
merged 1 commit into from
Sep 19, 2018
Merged

Conversation

hrzn
Copy link
Contributor

@hrzn hrzn commented Sep 13, 2018

Joint work with @kstyrc

Check the README and try it!


class ExponentialSmoothing(TimeseriesModel):

def __init__(self, trend='additive', seasonal='additive', seasonal_periods=12):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to documentation we should use endog parameter,
class statsmodels.tsa.holtwinters.ExponentialSmoothing(endog, trend=None, damped=False, seasonal=None, seasonal_periods=None, dates=None, freq=None, missing='none')
I've encountered an error while I was using ExpotentialSmoothing (init() missing 1 required positional argument: 'endog')

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure you called u8timeseries.ExponentialSmoothing? It seems you called the statsmodels version.
The code should look like this:

import pandas as pd
from u8timeseries import ExponentialSmoothing

my_df = pd.DataFrame({
  'timestep': [1, 2, 3],
  'values': [4, 5, 6]
})
my_model = ExponentialSmoothing()
my_model.fit(my_df, 'values')

 # n step ahead prediction:
predictions =  my_model.predict(n=6)
print(predictions)

@hrzn hrzn merged commit 304ed17 into master Sep 19, 2018
@endrjuskr endrjuskr deleted the feature/first-version branch May 5, 2020 15:18
mkos added a commit that referenced this pull request Sep 13, 2021
Co-authored-by: Julien Herzen <julien.herzen@unit8.co>
mkos added a commit that referenced this pull request Sep 13, 2021
mkos added a commit that referenced this pull request Sep 17, 2021
mkos added a commit that referenced this pull request Sep 17, 2021
mkos added a commit that referenced this pull request Sep 17, 2021
This reverts commit 5dfc9dd.
mkos added a commit that referenced this pull request Sep 27, 2021
Co-authored-by: Julien Herzen <julien.herzen@unit8.co>
Co-authored-by: Dennis Bader <dennis.bader@gmx.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants