functime-org / functime

Time-series machine learning at scale. Built with Polars for embarrassingly parallel feature extraction and forecasts on panel data.
https://docs.functime.ai
Apache License 2.0
970 stars 52 forks source link

fix: Add % support for num_points param in plotting methods() #243

Open montanarograziano opened 2 weeks ago

montanarograziano commented 2 weeks ago

Reference Issues/PRs

Fixes #236.

What does this implement/fix? Explain your changes.

num_points in plotting methods now is either float or int, and behaves accordingly. If it's a float, the number of selected points is computed as: ceil(num_points * y.select(pl.len()).item())

Any other comments?

I'm not sure how to write unit tests (and if they are necessary) for this feature, as it's just a small math computation.

vercel[bot] commented 2 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
functime-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 16, 2024 8:29pm
baggiponte commented 1 week ago

Ciao Graziano, thanks for the PR, Should have time to review tomorrow. Sorry for the late reply but this week was tough!