Skip to content

Conversation

@montebhoover
Copy link
Contributor

Static extension work for time series.

@montebhoover montebhoover requested a review from codemzs November 16, 2018 22:42
@montebhoover montebhoover changed the title [WIP] Static extension work for time series. Static extension work for time series. Nov 26, 2018
@montebhoover
Copy link
Contributor Author

montebhoover commented Nov 26, 2018

Both SsaChancePointDetector and IidChangePointDetector are complete with working unit tests. I will add the tests for SpikeDetector for SSA and IID shortly. #Resolved

@Ivanidzo4ka
Copy link
Contributor

Ivanidzo4ka commented Nov 26, 2018

namespace Microsoft.ML.Runtime.TimeSeriesProcessing

Can we change namespace to something not containing Runtime word?
Microsoft.ML.TimeSeries maybe? #WontFix


Refers to: src/Microsoft.ML.TimeSeries/SsaSpikeDetector.cs:28 in 8f6eca5. [](commit_id = 8f6eca5, deletion_comment = False)

{
private readonly int _confidence;
private readonly int _changeHistoryLength;
private readonly SequentialAnomalyDetectionTransformBase<System.Single, Microsoft.ML.Runtime.TimeSeriesProcessing.IidAnomalyDetectionBase.State>.MartingaleType _martingale;
Copy link
Contributor

@Ivanidzo4ka Ivanidzo4ka Nov 26, 2018

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be happy to make the change but my powers are not yet great enough to do so. @ganik, would you be able to help with that?


In reply to: 236427677 [](ancestors = 236427677)

@montebhoover
Copy link
Contributor Author

@ganik is added to the review. #Closed

@sfilipi
Copy link
Member

sfilipi commented Nov 26, 2018

namespace Microsoft.ML.Runtime.TimeSeriesProcessing

in the other files as well.


In reply to: 441798417 [](ancestors = 441798417)


Refers to: src/Microsoft.ML.TimeSeries/SsaSpikeDetector.cs:28 in 8f6eca5. [](commit_id = 8f6eca5, deletion_comment = False)

PipelineColumn[] toOutput,
IReadOnlyDictionary<PipelineColumn, string> inputNames,
IReadOnlyDictionary<PipelineColumn, string> outputNames,
IReadOnlyCollection<string> usedNames)
Copy link
Member

@sfilipi sfilipi Nov 26, 2018

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

Copy link
Contributor Author

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)

Copy link
Member

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)
Copy link
Member

@sfilipi sfilipi Nov 26, 2018

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
Copy link
Member

@sfilipi sfilipi Nov 26, 2018

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

Copy link
Contributor Author

@montebhoover montebhoover Nov 27, 2018

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)

Copy link
Member

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]);
Copy link
Member

@sfilipi sfilipi Nov 26, 2018

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

Copy link
Contributor Author

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)

Copy link
Member

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)

@montebhoover
Copy link
Contributor Author

@codemzs is added to the review. #Closed

@montebhoover
Copy link
Contributor Author

namespace Microsoft.ML.Runtime.TimeSeriesProcessing

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)

@montebhoover
Copy link
Contributor Author

@TomFinley is added to the review. #Closed

Copy link
Contributor

@Ivanidzo4ka Ivanidzo4ka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

sfilipi
sfilipi previously approved these changes Nov 29, 2018
Copy link
Member

@sfilipi sfilipi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@shauheen shauheen dismissed sfilipi’s stale review December 6, 2018 09:46

With all the latest changes, I think this PR needs to be reviewed again.

@montebhoover montebhoover requested a review from Anipik December 10, 2018 22:14
@shauheen shauheen removed request for Anipik and codemzs January 10, 2019 18:12
Copy link
Member

@abgoswam abgoswam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

…ability between Core 3.0 Intrinsics and SSE.
…ability between Core 3.0 Intrinsics and SSE.
@montebhoover montebhoover merged commit 638d4f4 into dotnet:master Jan 10, 2019
@ghost ghost locked as resolved and limited conversation to collaborators Mar 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants