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

Smooth prediction graph #152

Open
lexicalunit opened this issue May 7, 2020 · 1 comment
Open

Smooth prediction graph #152

lexicalunit opened this issue May 7, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@lexicalunit
Copy link
Collaborator

lexicalunit commented May 7, 2020

We may be able to generate a smooth nicer looking graph:

  1. Use turnips lib to generate the lines and collections.
  2. Iterate over those lines and collections to find the min and max for each day and time of day.
  3. Completely blank out the data on the plot.
  4. Put all the min and max points into a scatter on the plot.
  5. Draw a spline for the the line defined by the min points.
  6. Draw another spline for the line defined by the max points.
  7. Fill between the two splines.

As for how to calculate the spline, it's something that scipy could do but that's a huge dependency. An alternative is to directly implement it wth numpy as shown here: https://stackoverflow.com/questions/31543775/how-to-perform-cubic-spline-interpolation-in-python/48085583#48085583

@lexicalunit lexicalunit added the enhancement New feature or request label May 7, 2020
@lexicalunit
Copy link
Collaborator Author

The more I look at the non-smooth graphs we have now, the more I like them over the smooth one that you get on turnipprophet.io. You can actually see the different models in the graph, especially when you've narrowed it down to two or three. It lets you know when the important times to capture data are, the points that will let you immediately eliminate one or more models.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant