-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Forecasting model framework for time series. #1900
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not addressing an issue.
@codemzs That issue has not been triaged and does not have a clear design. #Resolved |
There should be API that does not only single point forecast but also gives area forecast based on confidence interval provided #Resolved Refers to: src/Microsoft.ML.TimeSeries/AdaptiveSingularSpectrumSequenceModeler.cs:1649 in 5a29c42. [](commit_id = 5a29c42, deletion_comment = False) |
We have moved away from having public constructors. All our transforms/trainers are found through MLContext. We should follow the same pattern here I believe. #Resolved Refers to: src/Microsoft.ML.TimeSeries/AdaptiveSingularSpectrumSequenceModeler.cs:83 in 5a29c42. [](commit_id = 5a29c42, deletion_comment = False) |
We spoke offline and agreed there is a separate work item for entrypoints in time series, In reply to: 497205979 [](ancestors = 497205979) Refers to: src/Microsoft.ML.TimeSeries/AdaptiveSingularSpectrumSequenceModeler.cs:1631 in 5a29c42. [](commit_id = 5a29c42, deletion_comment = False) |
Agreed but currently we don't have confidence intervals. I can check with Saeed and see if we can add later. In reply to: 497206778 [](ancestors = 497206778) Refers to: src/Microsoft.ML.TimeSeries/AdaptiveSingularSpectrumSequenceModeler.cs:1649 in 5a29c42. [](commit_id = 5a29c42, deletion_comment = False) |
+1 In reply to: 497401572 [](ancestors = 497401572) Refers to: src/Microsoft.ML.TimeSeries/AdaptiveSingularSpectrumSequenceModeler.cs:83 in 5a29c42. [](commit_id = 5a29c42, deletion_comment = False) |
see this method ComputeForecastIntervals in the modeler class In reply to: 497860420 [](ancestors = 497860420,497206778) Refers to: src/Microsoft.ML.TimeSeries/AdaptiveSingularSpectrumSequenceModeler.cs:1649 in 5a29c42. [](commit_id = 5a29c42, deletion_comment = False) |
It can't because it is used in SSABase class as well. In reply to: 497870543 [](ancestors = 497870543) Refers to: src/Microsoft.ML.TimeSeries/AdaptiveSingularSpectrumSequenceModeler.cs:135 in 47e5f22. [](commit_id = 47e5f22, deletion_comment = False) |
Question: Why is this 'Time Series Forecasting' algorithm/component not aligned to the rest of trainers in ML.NET? Here, with 'Time Series Forecasting' you do the following:
I think this 'singularity' in the API might cause some issues.. Is it possible to shape its API on a similar way that other algorithms/trainers are in ML.NET? |
@CESARDELATORRE The question you should ask yourself is if time series forecasting behaves the same way as other trainers and transforms? I'll be happy to explain the rationale behind design choices and we have a month to make any changes if needed before we make this GA. |
Yes please, I'd like you to explain the rationale behind the API design here. If possible the internal implementation shouldn't surface to the external API interfaces. For instance, why do we have a different API interface for Loading/Saving to .ZIP file?: |
@CESARDELATORRE sounds good. |
@CESARDELATORRE I found some API designs relatively questionable as well please see #3151 (comment), but as long as this is highly requested feature and we needed it a lot, for now, we are good to use this approach while keeping in mind that API surface might change in the future. |
I agree that the new APIs introduced in this PR are drastically different (such as using different terms/words for what appear to be the same operations) from the existing ML.NET framework. @codemzs - can you add a design document into the |
public struct GrowthRatio | ||
{ | ||
private int _timeSpan; | ||
private Double _growth; | ||
|
||
/// <summary> | ||
/// Time span of growth ratio. Must be strictly positive. | ||
/// </summary> | ||
public int TimeSpan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why use an int
here? Why not use a TimeSpan
type, which avoids any confusion about what unit this int
is? seconds? Minutes? days?
|
||
/// <summary> | ||
/// Growth ratio. Defined as Growth^(1/TimeSpan). | ||
/// </summary> | ||
public struct GrowthRatio |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is using a mutable struct
here the best API? Should we instead use a readonly
struct? Or possibly make this a class
.
This PR introduces forecasting framework/interface for time series. It allows the following:
fixes #929
fixes #3151