-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Static extension work for time series. #1656
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
|
Both SsaChancePointDetector and IidChangePointDetector are complete with working unit tests. I will add the tests for SpikeDetector for SSA and IID shortly. #Resolved |
| { | ||
| private readonly int _confidence; | ||
| private readonly int _changeHistoryLength; | ||
| private readonly SequentialAnomalyDetectionTransformBase<System.Single, Microsoft.ML.Runtime.TimeSeriesProcessing.IidAnomalyDetectionBase.State>.MartingaleType _martingale; |
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.
SequentialAnomalyDetectionTransformBase<System.Single, Microsoft.ML.Runtime.TimeSeriesProcessing.IidAnomalyDetectionBase.State>.MartingaleType [](start = 29, length = 142)
I'm not sure who should change that, but that enum shouldn't depend on that enormous state class definition. (And if I correctly remember it's a different enum for each type you use in generic) #Resolved
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.
|
@ganik is added to the review. #Closed |
| PipelineColumn[] toOutput, | ||
| IReadOnlyDictionary<PipelineColumn, string> inputNames, | ||
| IReadOnlyDictionary<PipelineColumn, string> outputNames, | ||
| IReadOnlyCollection<string> usedNames) |
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.
does this need to get used? #WontFix
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.
The Reconcile method in the base class that we're overriding expects this. Maybe a dumb question, but is there a way to avoid including this as we're overriding the method?
In reply to: 236470960 [](ancestors = 236470960)
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.
no, even if it is not a required param, you still have to include it.
In reply to: 236480124 [](ancestors = 236480124,236470960)
| PipelineColumn[] toOutput, | ||
| IReadOnlyDictionary<PipelineColumn, string> inputNames, | ||
| IReadOnlyDictionary<PipelineColumn, string> outputNames, | ||
| IReadOnlyCollection<string> usedNames) |
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.
usedNames [](start = 44, length = 9)
same here. #WontFix
|
|
||
| private sealed class Prediction | ||
| { | ||
| // Note that this field must be named "Data"; we ultimately convert |
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.
must be named "Data" [](start = 35, length = 21)
would help to add why this is the case #Resolved
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.
The following lines of the comment were an attempt to explain why - is there a way I can explain this better?
The big picture is that eventually we want to look at the result as an enumerable, and since that isn't supported natively in the static API, we convert the resulting dataview to dynamic. Once we have an enumerable in the dynamic API, it requires string-named columns. In the conversion of the static dataview to the dynamic dataview, ML.NET by default names the output column "Data", thus the user must use the field name Data here. It wouldn't be hard to add a parameter to the static extension that allows the user to pick their own name, but @TomFinley was explaining that the static extensions were designed so users do not need to use custom strings.
In reply to: 236471499 [](ancestors = 236471499)
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.
make sense! I think i have seen those be specified in Attributes, rather than names, but this is fine.
In reply to: 236476972 [](ancestors = 236476972,236471499)
| { | ||
| row = enumerator.Current; | ||
|
|
||
| Assert.Equal(expectedValues[index++], row.Data[0]); |
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.
Assert.Equal [](start = 16, length = 12)
I tend to use CompareWithTolerance, for the test's stability. #Resolved
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.
Thanks! What namespace is CompareNumbersWithTolerance from? I'm having trouble with it...
In reply to: 236472062 [](ancestors = 236472062)
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.
oh! this class needs to extend the BaseTestClass :)
In reply to: 236484324 [](ancestors = 236484324,236472062)
|
@codemzs is added to the review. #Closed |
Is is okay if I make a separate PR to change the namespace title? I don't want to interrupt the work that @codemzs is doing on the time series prediction engine. In reply to: 441841856 [](ancestors = 441841856,441798417) Refers to: src/Microsoft.ML.TimeSeries/SsaSpikeDetector.cs:28 in 8f6eca5. [](commit_id = 8f6eca5, deletion_comment = False) |
|
@TomFinley is added to the review. #Closed |
Ivanidzo4ka
left a comment
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.
![]()
sfilipi
left a comment
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.
![]()
With all the latest changes, I think this PR needs to be reviewed again.
a73a355 to
2464e04
Compare
abgoswam
left a comment
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.
![]()
2464e04 to
7cd4bbb
Compare
Static extension work for time series.