Skip to content

Commit 2782b52

Browse files
authored
Merge pull request #11728 from pkulikov/updated-clustering-tutorial
ML.NET: update clustering tutorial to ML.NET preview
2 parents 13e03dd + db82452 commit 2782b52

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

docs/machine-learning/tutorials/iris-clustering.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Cluster iris flowers using a clustering learner - ML.NET
33
description: Learn how to use ML.NET in a clustering scenario
44
author: pkulikov
55
ms.author: johalex
6-
ms.date: 03/18/2019
6+
ms.date: 04/08/2019
77
ms.topic: tutorial
88
ms.custom: mvc, seodec18
99
#Customer intent: As a developer, I want to use ML.NET so that I can build a model to cluster iris flowers based on its parameters.
@@ -13,7 +13,7 @@ ms.custom: mvc, seodec18
1313
> [!NOTE]
1414
> This topic refers to ML.NET, which is currently in Preview, and material may be subject to change. For more information, see the [ML.NET introduction](https://www.microsoft.com/net/learn/apps/machine-learning-and-ai/ml-dotnet).
1515
16-
This tutorial and related sample are currently using **ML.NET version 0.11**. For more information, see the release notes at the [dotnet/machinelearning GitHub repo](https://github.com/dotnet/machinelearning/tree/master/docs/release-notes).
16+
This tutorial and related sample are currently using **ML.NET 1.0 RC (Release Candidate) (version `1.0.0-preview`)**. For more information, see the release notes at the [dotnet/machinelearning GitHub repo](https://github.com/dotnet/machinelearning/tree/master/docs/release-notes).
1717

1818
This tutorial illustrates how to use ML.NET to build a [clustering model](../resources/tasks.md#clustering) for the [iris flower data set](https://en.wikipedia.org/wiki/Iris_flower_data_set).
1919

@@ -122,17 +122,16 @@ The <xref:Microsoft.ML.MLContext?displayProperty=nameWithType> class represents
122122

123123
Add the following code to the `Main` method to setup the way to load data:
124124

125-
[!code-csharp[Create text loader](~/samples/machine-learning/tutorials/IrisFlowerClustering/Program.cs#SetupTextLoader)]
125+
[!code-csharp[Create text loader](~/samples/machine-learning/tutorials/IrisFlowerClustering/Program.cs#CreateDataView)]
126126

127-
Load the data using the generic `MLContext.Data.LoadFromTextFile` wrapper for the [LoadFromTextFile method](xref:Microsoft.ML.TextLoaderSaverCatalog.LoadFromTextFile%60%601%28Microsoft.ML.DataOperationsCatalog,System.String,System.Char,System.Boolean,System.Boolean,System.Boolean,System.Boolean%29). It returns a
128-
<xref:Microsoft.Data.DataView.IDataView> which infers the dataset schema from the `IrisData` data model type, uses the dataset header and is separated by a comma.
127+
The generic [`MLContext.Data.LoadFromTextFile` extension method](xref:Microsoft.ML.TextLoaderSaverCatalog.LoadFromTextFile%60%601%28Microsoft.ML.DataOperationsCatalog,System.String,System.Char,System.Boolean,System.Boolean,System.Boolean,System.Boolean%29) infers the data set schema from the provided `IrisData` type and returns <xref:Microsoft.ML.IDataView> which can be used as input for transformers.
129128

130129
## Create a learning pipeline
131130

132131
For this tutorial, the learning pipeline of the clustering task comprises two following steps:
133132

134133
- concatenate loaded columns into one **Features** column, which is used by a clustering trainer;
135-
- use a <xref:Microsoft.ML.Trainers.KMeansPlusPlusTrainer> trainer to train the model using the k-means++ clustering algorithm.
134+
- use a <xref:Microsoft.ML.Trainers.KMeansTrainer> trainer to train the model using the k-means++ clustering algorithm.
136135

137136
Add the following code to the `Main` method:
138137

0 commit comments

Comments
 (0)