-
Notifications
You must be signed in to change notification settings - Fork 1.9k
SSA time series samples #1788
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
SSA time series samples #1788
Conversation
// 4 0 2.16 0.00 0.24 | ||
// 100 0 86.23 0.00 2076098.24 | ||
// 200 0 171.38 0.00 809668524.21 | ||
// 300 1 256.83 0.01 22130423541.93 <-- alert is on, note that delay is expected |
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.
93 <-- alert is on, note that delay is expected [](start = 59, length = 50)
Can you please add the indicator when the mode was saved/loaded? Same for other test. #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.
|
||
// Setup SsaChangePointDetector arguments | ||
string outputColumnName = "Prediction"; | ||
string inputColumnName = "Value"; |
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.
"Value"; [](start = 37, length = 8)
nameof(SsaChangePointData.Value) and same for Prediction as well for both the files. #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.
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.
🕐
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.
var data = new List<SsaSpikeData>(); | ||
for (int i = 0; i < TrainingSeasons; i++) | ||
for (int j = 0; j < SeasonalitySize; j++) | ||
data.Add(new SsaSpikeData(j)); |
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.
Data generation used accross samples consider moving them in the Microsoft.ML.SamplesUtils.DatasetUtils.
// 100 1 98.21 0.00 <-- alert is on, predicted spike | ||
// 0 0 - 13.83 0.29 | ||
// 1 0 - 1.74 0.44 | ||
// 2 0 - 0.47 0.46 |
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.
doe it make sense to limit the preview/data to something smaller,maybe like 7 rows ?
foreach (var prediction in predictionColumn) | ||
Console.WriteLine("{0}\t{1:0.00}\t{2:0.00}", prediction.Prediction[0], prediction.Prediction[1], prediction.Prediction[2]); | ||
Console.WriteLine("{0}\t{1}\t{2:0.00}\t{3:0.00}", data[k++].Value, prediction.Prediction[0], prediction.Prediction[1], prediction.Prediction[2]); | ||
Console.WriteLine(""); |
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.
Console.WriteLine(""); [](start = 11, length = 23)
remove, and include the newline in the above.
foreach (var prediction in predictionColumn) | ||
Console.WriteLine("{0}\t{1:0.00}\t{2:0.00}", prediction.Prediction[0], prediction.Prediction[1], prediction.Prediction[2]); | ||
Console.WriteLine("{0}\t{1}\t{2:0.00}\t{3:0.00}", data[k++].Value, prediction.Prediction[0], prediction.Prediction[1], prediction.Prediction[2]); |
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.
"{0}\t{1}\t{2:0.00}\t{3:0.00}" [](start = 34, length = 30)
think we prefer interpolation.
|
||
// This example shows spike detection as above, but demonstrates how to train a model | ||
// that can run predictions on streaming data, and how to persist the trained model and then re-load it. | ||
public static void SsaSpikeDetectorPrediction() |
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.
same comment as in the other PR; maybe the end-to-end should go on tutorials. The API call usage should go here.
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.
Samples for SsaChangePointDetectorPrediction and SsaSpikeDetectorPrediction.