microprediction / timemachines

Predict time-series with one line of code.
https://www.microprediction.com/blog/popular-timeseries-packages
MIT License
398 stars 51 forks source link

import error when trying to run the example on homepage #13

Closed crayonfu closed 3 years ago

crayonfu commented 3 years ago

Hello, I pip installed timemachines 0.7.2 with python3.8.5 on Ubuntu 20.04 LTS successfully. I can import timemachines package. But can't run the example on homepage due to missing imports on the first line:

from timemachines.skatertools.data import hospital_with_exog

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-2-e7d8e2dd7f0b> in <module>
----> 1 from timemachines.skatertools.data import hospital_with_exog
      2 from timemachines.skatertools.visualization.priorplot import prior_plot
      3 import matplotlib.pyplot as plt
      4 
      5 # Get some data

ImportError: cannot import name 'hospital_with_exog' from 'timemachines.skatertools.data' (/home/crayonfu/myProjects/ts_test/bt_venv/lib/python3.8/site-packages/timemachines/skatertools/data/__init__.py)

I can't find the class of hospital_with_exog in the directory of timemachines/skatertools/data on github repo. Am I missing something here? Thank you.

crayonfu commented 3 years ago

nvm. I find the hospital_with_exog function in timemachines/skatertools/data/real.py and can import it. maybe the example on the home page needs to be updated a bit.

microprediction commented 3 years ago

Thanks ... give me one second

microprediction commented 3 years ago

Horrendous! I made k compulsory and forgot.

Anyway should be fixed now... https://github.com/microprediction/timemachines/blob/main/README.md

Added examples/basic_usage too

microprediction commented 3 years ago

Closing. Hopefully, it works now. Sorry about that.