From f3079a344ba153ec4da8465da1cfb2c8bd900936 Mon Sep 17 00:00:00 2001 From: luisquintanilla Date: Wed, 28 Jul 2021 16:21:07 -0400 Subject: [PATCH 1/4] Update detectperiod signature --- .../tutorials/phone-calls-anomaly-detection.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/machine-learning/tutorials/phone-calls-anomaly-detection.md b/docs/machine-learning/tutorials/phone-calls-anomaly-detection.md index cceac2d974bfe..606e1bbd0924d 100644 --- a/docs/machine-learning/tutorials/phone-calls-anomaly-detection.md +++ b/docs/machine-learning/tutorials/phone-calls-anomaly-detection.md @@ -1,7 +1,7 @@ --- title: 'Tutorial: Detect anomalies in phone calls' description: Learn how to build an anomaly detection application for time series data. This tutorial creates a .NET Core console application using C# in Visual Studio 2019. -ms.date: 12/04/2020 +ms.date: 07/28/2021 ms.topic: tutorial ms.custom: mvc recommendations: false @@ -129,7 +129,7 @@ In the first step, we invoke the `DetectSeasonality` function to determine the p 1. Create the `DetectPeriod` method, just below the `Main` method, using the following code: ```csharp - static void DetectPeriod(MLContext mlContext, IDataView phoneCalls) + static int DetectPeriod(MLContext mlContext, IDataView phoneCalls) { } From 90d15343a3de0d73668597d30a0fa2d9d81373bb Mon Sep 17 00:00:00 2001 From: luisquintanilla Date: Wed, 28 Jul 2021 16:36:02 -0400 Subject: [PATCH 2/4] Added missing code snippet to return period. --- .../tutorials/phone-calls-anomaly-detection.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/machine-learning/tutorials/phone-calls-anomaly-detection.md b/docs/machine-learning/tutorials/phone-calls-anomaly-detection.md index 606e1bbd0924d..5f2033dbd6d0d 100644 --- a/docs/machine-learning/tutorials/phone-calls-anomaly-detection.md +++ b/docs/machine-learning/tutorials/phone-calls-anomaly-detection.md @@ -143,7 +143,11 @@ In the first step, we invoke the `DetectSeasonality` function to determine the p [!code-csharp[DisplayPeriod](./snippets/phone-calls-anomaly-detection/csharp/Program.cs#DisplayPeriod)] -4. Add the following call to the `DetectPeriod` method in the `Main` method: +4. Return the period value. + + [!code-csharp[ReturnPeriod](./snippets/phone-calls-anomaly-detection/csharp/Program.cs#L52)] + +5. Add the following call to the `DetectPeriod` method in the `Main` method: [!code-csharp[CallDetectPeriod](./snippets/phone-calls-anomaly-detection/csharp/Program.cs#CallDetectPeriod)] From cf399f770cbdfb30a02201c3d1d5258e906464e4 Mon Sep 17 00:00:00 2001 From: luisquintanilla Date: Wed, 28 Jul 2021 17:03:19 -0400 Subject: [PATCH 3/4] Specify working version to address issue 23888 --- .../tutorials/phone-calls-anomaly-detection.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/machine-learning/tutorials/phone-calls-anomaly-detection.md b/docs/machine-learning/tutorials/phone-calls-anomaly-detection.md index 5f2033dbd6d0d..abef49e49305b 100644 --- a/docs/machine-learning/tutorials/phone-calls-anomaly-detection.md +++ b/docs/machine-learning/tutorials/phone-calls-anomaly-detection.md @@ -32,11 +32,9 @@ You can find the source code for this tutorial at the [dotnet/samples](https://g 2. Create a directory named *Data* in your project to save your data set files. -3. Install the **Microsoft.ML NuGet Package**: +3. Install the **Microsoft.ML NuGet Package** version **1.5.2**: - [!INCLUDE [mlnet-current-nuget-version](../../../includes/mlnet-current-nuget-version.md)] - - In Solution Explorer, right-click on your project and select **Manage NuGet Packages**. Choose "nuget.org" as the Package source, select the Browse tab, search for **Microsoft.ML** and select the **Install** button. Select the **OK** button on the **Preview Changes** dialog and then select the **I Accept** button on the **License Acceptance** dialog if you agree with the license terms for the packages listed. Repeat these steps for **Microsoft.ML.TimeSeries**. + In Solution Explorer, right-click on your project and select **Manage NuGet Packages**. Choose "nuget.org" as the Package source, select the Browse tab, search for **Microsoft.ML** and select the **Install** button. Select the **OK** button on the **Preview Changes** dialog and then select the **I Accept** button on the **License Acceptance** dialog if you agree with the license terms for the packages listed. Repeat these steps for **Microsoft.ML.TimeSeries** version **1.5.2**. 4. Add the following `using` statements at the top of your *Program.cs* file: From 1f09972070c45952fabbfc1cae3cb2f35579a6d0 Mon Sep 17 00:00:00 2001 From: luisquintanilla Date: Tue, 3 Aug 2021 16:47:41 -0400 Subject: [PATCH 4/4] Add version-specific instructions --- .../tutorials/phone-calls-anomaly-detection.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/machine-learning/tutorials/phone-calls-anomaly-detection.md b/docs/machine-learning/tutorials/phone-calls-anomaly-detection.md index abef49e49305b..fb408d3fb4949 100644 --- a/docs/machine-learning/tutorials/phone-calls-anomaly-detection.md +++ b/docs/machine-learning/tutorials/phone-calls-anomaly-detection.md @@ -34,7 +34,15 @@ You can find the source code for this tutorial at the [dotnet/samples](https://g 3. Install the **Microsoft.ML NuGet Package** version **1.5.2**: - In Solution Explorer, right-click on your project and select **Manage NuGet Packages**. Choose "nuget.org" as the Package source, select the Browse tab, search for **Microsoft.ML** and select the **Install** button. Select the **OK** button on the **Preview Changes** dialog and then select the **I Accept** button on the **License Acceptance** dialog if you agree with the license terms for the packages listed. Repeat these steps for **Microsoft.ML.TimeSeries** version **1.5.2**. + 1. In Solution Explorer, right-click on your project and select **Manage NuGet Packages**. + 1. Choose "nuget.org" as the Package source. + 1. Select the **Browse** tab. + 1. Search for **Microsoft.ML**. + 1. Select **Microsoft.ML** from the list of packages and choose version **1.5.2** from the **Version** dropdown. + 1. Select the **Install** button. + 1. Select the **OK** button on the **Preview Changes** dialog and then select the **I Accept** button on the **License Acceptance** dialog if you agree with the license terms for the packages listed. + + Repeat these steps for **Microsoft.ML.TimeSeries** version **1.5.2**. 4. Add the following `using` statements at the top of your *Program.cs* file: