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
971 stars 52 forks source link

`plot_residuals` as panel #166

Open FBruzzesi opened 6 months ago

FBruzzesi commented 6 months ago

Description

In current implementation of plot_residuals, all residuals are stacked into the same plot. The option to have one plot per entity, similarly to how plot_panel behaves, would be a nice to have.

Expected Result (*)

An image is worth a 16x16 words:

image

(*) Generated on random data

(Possible) implementation

The "out of the box" solution could be to add a parameter to require such behavior (e.g. as_panel: bool or kind: Enum('Kind', ['STACKED', 'PANEL']) and then to specify facet_row="entity" option in px.histogram

Edit: I am happy to take this task if we agree on how the result should look like 😊