Skip to content

Commit bfcd661

Browse files
Update Program.cs
1 parent ed7eaa0 commit bfcd661

File tree

1 file changed

+5
-2
lines changed
  • samples/csharp/getting-started/MulticlassClassification_Iris/IrisClassification/IrisClassificationConsoleApp

1 file changed

+5
-2
lines changed

samples/csharp/getting-started/MulticlassClassification_Iris/IrisClassification/IrisClassificationConsoleApp/Program.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ private static void BuildTrainEvaluateAndSaveModel(MLContext mlContext)
4646
var dataProcessPipeline = mlContext.Transforms.Concatenate("Features", "SepalLength",
4747
"SepalWidth",
4848
"PetalLength",
49-
"PetalWidth").AppendCacheCheckpoint(mlContext);
49+
"PetalWidth")
50+
.AppendCacheCheckpoint(mlContext);
51+
// Use in-memory cache for small/medium datasets to lower training time.
52+
// Do NOT use it (remove .AppendCacheCheckpoint()) when handling very large datasets.
5053

5154
// STEP 3: Set the training algorithm, then append the trainer to the pipeline
5255
var trainer = mlContext.MulticlassClassification.Trainers.StochasticDualCoordinateAscent(labelColumn: "Label", featureColumn: "Features");
@@ -119,4 +122,4 @@ private static void TestSomePredictions(MLContext mlContext)
119122

120123
}
121124
}
122-
}
125+
}

0 commit comments

Comments
 (0)