-
-
Notifications
You must be signed in to change notification settings - Fork 69
feat: add support for more ml models #337
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
b552bda
feat: add pred intervals to missing models
AzulGarza 776be1a
docs: add new changelog
AzulGarza a624732
chore: add missing deps
AzulGarza 3eea074
feat: add missing models
AzulGarza a0f8472
fix: uv lock
AzulGarza 96c9fa5
fix: use correct s3 link
AzulGarza 7b1f7cb
chore: add accurate description
AzulGarza b25e1ff
fix: add accurate description
AzulGarza a942aa3
Merge branch 'main' into feat/ml-models
AzulGarza 5d4ebd3
fix: add correct code
AzulGarza bb54f51
Merge branch 'main' into feat/ml-models
AzulGarza a1e2944
docs: add correct changelogs
AzulGarza a64b5cb
fix(tests): add correct condition
AzulGarza 0d5a4ce
tests: add only subset of models
AzulGarza File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| ### Features | ||
|
|
||
| * **Prediction intervals for AutoLGBM, AutoNHITS, and AutoTFT**: These models now support quantile forecasts via the `quantiles` parameter. Pass a list of floats between 0 and 1 to receive additional output columns named `model-q-{percentile}`. Note that `level` is not supported for these models; use `quantiles` instead. | ||
|
|
||
| - `AutoLGBM` computes prediction intervals via conformal prediction using cross-validation residuals. | ||
| - `AutoNHITS` and `AutoTFT` are trained with [`MQLoss`](https://nixtla.github.io/neuralforecast/losses.pytorch.html) when quantiles are requested. | ||
|
|
||
| ```python | ||
| import pandas as pd | ||
| from timecopilot.models.ml import AutoLGBM | ||
| from timecopilot.models.neural import AutoNHITS, AutoTFT | ||
|
|
||
| df = pd.read_csv("AirPassengers.csv", parse_dates=["ds"]) | ||
| df.insert(0, "unique_id", "AirPassengers") | ||
|
|
||
| model = AutoLGBM() | ||
| fcst_df = model.forecast(df, h=12, quantiles=[0.1, 0.5, 0.9]) | ||
| # columns: unique_id, ds, AutoLGBM, AutoLGBM-q-10, AutoLGBM-q-50, AutoLGBM-q-90 | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| **Full Changelog**: https://github.com/TimeCopilot/timecopilot/compare/v0.0.25...v0.0.26 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.