diff --git a/samples/csharp/end-to-end-apps/AnomalyDetection-Sales/README.md b/samples/csharp/end-to-end-apps/AnomalyDetection-Sales/README.md index cc4ccd75e..fd9093782 100644 --- a/samples/csharp/end-to-end-apps/AnomalyDetection-Sales/README.md +++ b/samples/csharp/end-to-end-apps/AnomalyDetection-Sales/README.md @@ -2,7 +2,7 @@ | ML.NET version | API type | Status | App Type | Data type | Scenario | ML Task | Algorithms | |----------------|-------------------|-------------------------------|-------------|-----------|---------------------|---------------------------|-----------------------------| -| v1.4 | Dynamic API | Up-to-date | WinForms app | .csv files | Spike and Change Point Detection of Product Sales | Anomaly Detection | IID Spike Detection and IID Change point Detection | +| v2.0.1 | Dynamic API | Up-to-date | WinForms app | .csv files | Spike and Change Point Detection of Product Sales | Anomaly Detection | IID Spike Detection and IID Change point Detection | ![Alt Text](./SpikeDetectionE2EApp/SpikeDetection.WinForms/images/productsales.gif) diff --git a/samples/csharp/end-to-end-apps/AnomalyDetection-Sales/SpikeDetectionE2EApp/MLModels/ProductSalesChangePointModel.zip b/samples/csharp/end-to-end-apps/AnomalyDetection-Sales/SpikeDetectionE2EApp/MLModels/ProductSalesChangePointModel.zip index 109cf7a21..a437fb42d 100644 Binary files a/samples/csharp/end-to-end-apps/AnomalyDetection-Sales/SpikeDetectionE2EApp/MLModels/ProductSalesChangePointModel.zip and b/samples/csharp/end-to-end-apps/AnomalyDetection-Sales/SpikeDetectionE2EApp/MLModels/ProductSalesChangePointModel.zip differ diff --git a/samples/csharp/end-to-end-apps/AnomalyDetection-Sales/SpikeDetectionE2EApp/MLModels/ProductSalesSpikeModel.zip b/samples/csharp/end-to-end-apps/AnomalyDetection-Sales/SpikeDetectionE2EApp/MLModels/ProductSalesSpikeModel.zip index 54c89095c..f2e64b609 100644 Binary files a/samples/csharp/end-to-end-apps/AnomalyDetection-Sales/SpikeDetectionE2EApp/MLModels/ProductSalesSpikeModel.zip and b/samples/csharp/end-to-end-apps/AnomalyDetection-Sales/SpikeDetectionE2EApp/MLModels/ProductSalesSpikeModel.zip differ diff --git a/samples/csharp/end-to-end-apps/AnomalyDetection-Sales/SpikeDetectionE2EApp/SpikeDetection.ModelTrainer/SpikeDetectionModelTrainer.csproj b/samples/csharp/end-to-end-apps/AnomalyDetection-Sales/SpikeDetectionE2EApp/SpikeDetection.ModelTrainer/SpikeDetectionModelTrainer.csproj index 2db6d57df..0135967a1 100644 --- a/samples/csharp/end-to-end-apps/AnomalyDetection-Sales/SpikeDetectionE2EApp/SpikeDetection.ModelTrainer/SpikeDetectionModelTrainer.csproj +++ b/samples/csharp/end-to-end-apps/AnomalyDetection-Sales/SpikeDetectionE2EApp/SpikeDetection.ModelTrainer/SpikeDetectionModelTrainer.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.1 + net7.0 @@ -16,8 +16,8 @@ - - + + diff --git a/samples/csharp/end-to-end-apps/AnomalyDetection-Sales/SpikeDetectionE2EApp/SpikeDetection.WinForms/App.config b/samples/csharp/end-to-end-apps/AnomalyDetection-Sales/SpikeDetectionE2EApp/SpikeDetection.WinForms/App.config index ef58ce2b6..4bfa00561 100644 --- a/samples/csharp/end-to-end-apps/AnomalyDetection-Sales/SpikeDetectionE2EApp/SpikeDetection.WinForms/App.config +++ b/samples/csharp/end-to-end-apps/AnomalyDetection-Sales/SpikeDetectionE2EApp/SpikeDetection.WinForms/App.config @@ -1,6 +1,6 @@ - + - + diff --git a/samples/csharp/end-to-end-apps/AnomalyDetection-Sales/SpikeDetectionE2EApp/SpikeDetection.WinForms/Form1.cs b/samples/csharp/end-to-end-apps/AnomalyDetection-Sales/SpikeDetectionE2EApp/SpikeDetection.WinForms/Form1.cs index 8a1507181..7ecef2ea5 100644 --- a/samples/csharp/end-to-end-apps/AnomalyDetection-Sales/SpikeDetectionE2EApp/SpikeDetection.WinForms/Form1.cs +++ b/samples/csharp/end-to-end-apps/AnomalyDetection-Sales/SpikeDetectionE2EApp/SpikeDetection.WinForms/Form1.cs @@ -16,7 +16,7 @@ public partial class Form1 : Form private string filePath = ""; Tuple tup = null; Dictionary> dict = new Dictionary>(); - private static string BaseModelsRelativePath = @"../../../../MLModels"; + private static string BaseModelsRelativePath = @"../../../MLModels"; private static string ModelRelativePath1 = $"{BaseModelsRelativePath}/ProductSalesSpikeModel.zip"; private static string ModelRelativePath2 = $"{BaseModelsRelativePath}/ProductSalesChangePointModel.zip"; @@ -112,8 +112,8 @@ private void displayDataTableAndGraph() // Update y axis min and max values. double yMax = Convert.ToDouble(dataTable.Compute($"max([{yAxis}])", string.Empty)); - double yMin = Convert.ToDouble(dataTable.Compute($"min([{yAxis}])", string.Empty)); - + //double yMin = Convert.ToDouble(dataTable.Compute($"min([{yAxis}])", string.Empty)); + double yMin = Convert.ToDouble(0); // Set graph source. graph.DataSource = dataTable; diff --git a/samples/csharp/end-to-end-apps/AnomalyDetection-Sales/SpikeDetectionE2EApp/SpikeDetection.WinForms/Properties/Resources.Designer.cs b/samples/csharp/end-to-end-apps/AnomalyDetection-Sales/SpikeDetectionE2EApp/SpikeDetection.WinForms/Properties/Resources.Designer.cs index 209cf4f30..5fa022e56 100644 --- a/samples/csharp/end-to-end-apps/AnomalyDetection-Sales/SpikeDetectionE2EApp/SpikeDetection.WinForms/Properties/Resources.Designer.cs +++ b/samples/csharp/end-to-end-apps/AnomalyDetection-Sales/SpikeDetectionE2EApp/SpikeDetection.WinForms/Properties/Resources.Designer.cs @@ -1,25 +1,8 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace AnomalyDetectionSample.Properties { +namespace AnomalyDetectionSample.Properties { using System; - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { @@ -32,9 +15,7 @@ internal class Resources { internal Resources() { } - /// - /// Returns the cached ResourceManager instance used by this class. - /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Resources.ResourceManager ResourceManager { get { @@ -46,10 +27,6 @@ internal Resources() { } } - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Globalization.CultureInfo Culture { get { diff --git a/samples/csharp/end-to-end-apps/AnomalyDetection-Sales/SpikeDetectionE2EApp/SpikeDetection.WinForms/Properties/Settings.Designer.cs b/samples/csharp/end-to-end-apps/AnomalyDetection-Sales/SpikeDetectionE2EApp/SpikeDetection.WinForms/Properties/Settings.Designer.cs index 24a086761..b0d56874c 100644 --- a/samples/csharp/end-to-end-apps/AnomalyDetection-Sales/SpikeDetectionE2EApp/SpikeDetection.WinForms/Properties/Settings.Designer.cs +++ b/samples/csharp/end-to-end-apps/AnomalyDetection-Sales/SpikeDetectionE2EApp/SpikeDetection.WinForms/Properties/Settings.Designer.cs @@ -1,28 +1,14 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace ProductSalesAnomalyDetection.Properties -{ - - +namespace AnomalyDetectionSample.Properties { + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.7.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default - { - get - { + + public static Settings Default { + get { return defaultInstance; } } diff --git a/samples/csharp/end-to-end-apps/AnomalyDetection-Sales/SpikeDetectionE2EApp/SpikeDetection.WinForms/SpikeDetection.WinForms.csproj b/samples/csharp/end-to-end-apps/AnomalyDetection-Sales/SpikeDetectionE2EApp/SpikeDetection.WinForms/SpikeDetection.WinForms.csproj index a0b84d14c..023f199b2 100644 --- a/samples/csharp/end-to-end-apps/AnomalyDetection-Sales/SpikeDetectionE2EApp/SpikeDetection.WinForms/SpikeDetection.WinForms.csproj +++ b/samples/csharp/end-to-end-apps/AnomalyDetection-Sales/SpikeDetectionE2EApp/SpikeDetection.WinForms/SpikeDetection.WinForms.csproj @@ -8,11 +8,12 @@ WinExe AnomalyDetectionSample AnomalyDetectionSample - v4.6.1 + v4.8 512 true + x64 @@ -90,6 +91,7 @@ True Resources.resx + True SettingsSingleFileGenerator @@ -106,43 +108,43 @@ - $(MicrosoftMLVersion) + 2.0.1 - $(MicrosoftMLVersion) + 2.0.1 - $(MicrosoftMLVersion) + 2.0.1 - $(MicrosoftMLVersion) + 2.0.1 - 12.0.2 + 13.0.3 - 4.5.0 + 4.5.1 - 4.6.0 + 7.0.0 - 1.6.0 + 7.0.0 - 4.5.3 + 4.5.5 4.5.0 - 4.6.0 + 4.7.0 - 4.6.0 + 6.0.0 - 4.10.0 + 7.0.0