Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.ML" Version="0.11.0" />
<PackageReference Include="Microsoft.ML" Version="1.0.0-preview" />
</ItemGroup>

<ItemGroup>
Expand Down
7 changes: 3 additions & 4 deletions machine-learning/tutorials/IrisFlowerClustering/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
// </SnippetUsingsForPaths>

// <SnippetMLUsings>
using Microsoft.Data.DataView;
using Microsoft.ML;
using Microsoft.ML.Data;
// </SnippetMLUsings>
Expand Down Expand Up @@ -32,7 +31,7 @@ static void Main(string[] args)
string featuresColumnName = "Features";
var pipeline = mlContext.Transforms
.Concatenate(featuresColumnName, "SepalLength", "SepalWidth", "PetalLength", "PetalWidth")
.Append(mlContext.Clustering.Trainers.KMeans(featuresColumnName, clustersCount: 3));
.Append(mlContext.Clustering.Trainers.KMeans(featuresColumnName, numberOfClusters: 3));
// </SnippetCreatePipeline>

// <SnippetTrainModel>
Expand All @@ -42,12 +41,12 @@ static void Main(string[] args)
// <SnippetSaveModel>
using (var fileStream = new FileStream(_modelPath, FileMode.Create, FileAccess.Write, FileShare.Write))
{
mlContext.Model.Save(model, fileStream);
mlContext.Model.Save(model, dataView.Schema, fileStream);
}
// </SnippetSaveModel>

// <SnippetPredictor>
var predictor = model.CreatePredictionEngine<IrisData, ClusterPrediction>(mlContext);
var predictor = mlContext.Model.CreatePredictionEngine<IrisData, ClusterPrediction>(model);
// </SnippetPredictor>

// <SnippetPredictionExample>
Expand Down