keras-team / keras-io

Keras documentation, hosted live at keras.io
Apache License 2.0
2.79k stars 2.05k forks source link

Time Series Example "timeseries_anomaly_detection" is broken #243

Closed Root-DE closed 4 years ago

Root-DE commented 4 years ago

With the commit aa45363b1d7e2cb82a675a86ad89abe9bae59390 the File examples/timeseries/timeseries_anomaly_detection.py don’t plot a correct graph at the End, it should show the anomalies on the original graph as expected from comment "Let's overlay the anomalies on the original test data plot." but it doesn’t.

fchollet commented 4 years ago

@RobAltena please fix

RobAltena commented 4 years ago

Let me have another look. Everything looks fine in a quick look on colab:

image

There is no change in the data being charted. only using pandas default charting vs the plt method. I will poke around some more to see where and how I messed that up, As this is my first python PR and it was quite a struggle to get the environment up and running locally, for now I will assume there is a bug in the PR.

Root-DE commented 4 years ago

I used Python 3.8.5 64 Bit (Windows) and setup all with: pip install pandas tensorflow matplotlib numpy --use-feature=2020-resolver

(and I used Visual Studio Code)

Maybe I made a mistake here, but it works fine with the previously Version Here are the Versions of my Modules pip freeze absl-py==0.10.0 astroid==2.4.2 astunparse==1.6.3 autopep8==1.5.4 cachetools==4.1.1 certifi==2020.6.20 chardet==3.0.4 colorama==0.4.3 cycler==0.10.0 elasticsearch==7.8.1
gast==0.3.3 google-auth==1.21.0
google-auth-oauthlib==0.4.1 google-pasta==0.2.0
grpcio==1.31.0 h5py==2.10.0 idna==2.10 isort==5.4.2 Keras-Preprocessing==1.1.2 kiwisolver==1.2.0 lazy-object-proxy==1.4.3 Markdown==3.2.2 matplotlib==3.3.1 mccabe==0.6.1 monotonic==1.5 numpy==1.18.5 oauthlib==3.1.0 opt-einsum==3.3.0 pandas==1.1.1 Pillow==7.2.0 protobuf==3.13.0 pyasn1==0.4.8 pyasn1-modules==0.2.8 pycodestyle==2.6.0 pylint==2.6.0 pyparsing==2.4.7 python-dateutil==2.8.1 pytz==2020.1 requests==2.24.0 requests-oauthlib==1.3.0 rsa==4.6 scipy==1.4.1 six==1.15.0 tensorboard==2.3.0 tensorboard-plugin-wit==1.7.0 tensorflow==2.3.0 tensorflow-estimator==2.3.0 termcolor==1.1.0 toml==0.10.1 urllib3==1.25.10 Werkzeug==1.0.1 wrapt==1.12.1

RobAltena commented 4 years ago

I just ran locally and you are right: Charts are messed up. Not even just the last one. It looks like some state is kept in charts running locally where Jupyter notebooks start with a clean status after each chart. Learning some new Python magic here.