1 instantiation of MulticlassClassificationMetrics
Microsoft.ML.Data (1)
Evaluators\MulticlassClassificationEvaluator.cs (1)
572result = new MulticlassClassificationMetrics(Host, cursor, _outputTopKAcc ?? 0, confusionMatrix);
155 references to MulticlassClassificationMetrics
Microsoft.ML.AutoML (46)
API\MulticlassClassificationExperiment.cs (35)
55/// See <see cref="MulticlassClassificationMetrics.MicroAccuracy"/>. 60/// See <see cref="MulticlassClassificationMetrics.MacroAccuracy"/>. 65/// See <see cref="MulticlassClassificationMetrics.LogLoss"/>. 70/// See <see cref="MulticlassClassificationMetrics.LogLossReduction"/>. 75/// See <see cref="MulticlassClassificationMetrics.TopKAccuracy"/>. 125public sealed class MulticlassClassificationExperiment : ExperimentBase<MulticlassClassificationMetrics, MulticlassExperimentSettings> 148public override ExperimentResult<MulticlassClassificationMetrics> Execute(IDataView trainData, ColumnInformation columnInformation, IEstimator<ITransformer> preFeaturizer = null, IProgress<RunDetail<MulticlassClassificationMetrics>> progressHandler = null) 175TrialResultMonitor<MulticlassClassificationMetrics> monitor = null; 180monitor = new TrialResultMonitor<MulticlassClassificationMetrics>(channel, pipeline); 195var result = new ExperimentResult<MulticlassClassificationMetrics>(runDetails, bestRun); 199public override ExperimentResult<MulticlassClassificationMetrics> Execute(IDataView trainData, IDataView validationData, ColumnInformation columnInformation, IEstimator<ITransformer> preFeaturizer = null, IProgress<RunDetail<MulticlassClassificationMetrics>> progressHandler = null) 210TrialResultMonitor<MulticlassClassificationMetrics> monitor = null; 215monitor = new TrialResultMonitor<MulticlassClassificationMetrics>(channel, pipeline); 230var result = new ExperimentResult<MulticlassClassificationMetrics>(runDetails, bestRun); 235public override ExperimentResult<MulticlassClassificationMetrics> Execute(IDataView trainData, IDataView validationData, string labelColumnName = "Label", IEstimator<ITransformer> preFeaturizer = null, IProgress<RunDetail<MulticlassClassificationMetrics>> progressHandler = null) 245public override ExperimentResult<MulticlassClassificationMetrics> Execute(IDataView trainData, string labelColumnName = "Label", string samplingKeyColumn = null, IEstimator<ITransformer> preFeaturizer = null, IProgress<RunDetail<MulticlassClassificationMetrics>> progressHandler = null) 256public override CrossValidationExperimentResult<MulticlassClassificationMetrics> Execute(IDataView trainData, uint numberOfCVFolds, ColumnInformation columnInformation = null, IEstimator<ITransformer> preFeaturizer = null, IProgress<CrossValidationRunDetail<MulticlassClassificationMetrics>> progressHandler = null) 267TrialResultMonitor<MulticlassClassificationMetrics> monitor = null; 272monitor = new TrialResultMonitor<MulticlassClassificationMetrics>(channel, pipeline); 288var result = new CrossValidationExperimentResult<MulticlassClassificationMetrics>(runDetails, bestResult); 293public override CrossValidationExperimentResult<MulticlassClassificationMetrics> Execute(IDataView trainData, uint numberOfCVFolds, string labelColumnName = "Label", string samplingKeyColumn = null, IEstimator<ITransformer> preFeaturizer = null, IProgress<CrossValidationRunDetail<MulticlassClassificationMetrics>> progressHandler = null) 304private protected override CrossValidationRunDetail<MulticlassClassificationMetrics> GetBestCrossValRun(IEnumerable<CrossValidationRunDetail<MulticlassClassificationMetrics>> results) 309private protected override RunDetail<MulticlassClassificationMetrics> GetBestRun(IEnumerable<RunDetail<MulticlassClassificationMetrics>> results) 384return new TrialResult<MulticlassClassificationMetrics>() 403var metrics = _context.MulticlassClassification.Evaluate(eval, metricManager.LabelColumn, predictedLabelColumnName: metricManager.PredictedColumn); 410return new TrialResult<MulticlassClassificationMetrics>() 448private double GetMetric(MulticlassClassificationMetric metric, MulticlassClassificationMetrics metrics)
AutoMLExperiment\IMetricManager.cs (1)
95var metric = context.MulticlassClassification.Evaluate(eval, labelColumnName: LabelColumn, predictedLabelColumnName: PredictedColumn);
Experiment\MetricsAgents\MultiMetricsAgent.cs (3)
9internal class MultiMetricsAgent : IMetricsAgent<MulticlassClassificationMetrics> 21public double GetScore(MulticlassClassificationMetrics metrics) 69public MulticlassClassificationMetrics EvaluateMetrics(IDataView data, string labelColumn, string groupIdColumn)
Experiment\Runners\CrossValSummaryRunner.cs (5)
115if (typeof(TMetrics) == typeof(MulticlassClassificationMetrics)) 117var newMetrics = metrics.Select(x => x as MulticlassClassificationMetrics); 120var result = new MulticlassClassificationMetrics( 127perClassLogLoss: (metricsClosestToAvg as MulticlassClassificationMetrics).PerClassLogLoss.ToArray(), 128confusionMatrix: (metricsClosestToAvg as MulticlassClassificationMetrics).ConfusionMatrix);
Utils\BestResultUtil.cs (2)
29public static RunDetail<MulticlassClassificationMetrics> GetBestRun(IEnumerable<RunDetail<MulticlassClassificationMetrics>> results,
Microsoft.ML.AutoML.Samples (4)
AutoFit\MulticlassClassificationExperiment.cs (4)
27ExperimentResult<MulticlassClassificationMetrics> experimentResult = mlContext.Auto() 32RunDetail<MulticlassClassificationMetrics> bestRun = experimentResult.BestRun; 40MulticlassClassificationMetrics testMetrics = mlContext.MulticlassClassification.Evaluate(testDataViewWithBestScore, labelColumnName: LabelColumnName); 63private static void PrintMetrics(MulticlassClassificationMetrics metrics)
Microsoft.ML.AutoML.Tests (11)
MetricsAgentsTests.cs (5)
64var metrics = MetricsUtil.CreateMulticlassClassificationMetrics(0.1, 0.2, 0.3, 0.4, 0, new double[] { 0.5 }, new double[] { }); 75var metrics = MetricsUtil.CreateMulticlassClassificationMetrics(0.1, 0.2, 0.3, 0.4, 0, new double[] { 0.5 }, new double[] { }); 86var metrics = MetricsUtil.CreateMulticlassClassificationMetrics(1, 1, 0, 1, 0, new double[] { 1 }, new double[] { }); 172private static double GetScore(MulticlassClassificationMetrics metrics, MulticlassClassificationMetric metric) 193private static bool IsPerfectModel(MulticlassClassificationMetrics metrics, MulticlassClassificationMetric metric)
MetricsUtil.cs (2)
22public static MulticlassClassificationMetrics CreateMulticlassClassificationMetrics( 27return CreateInstance<MulticlassClassificationMetrics>(accuracyMicro,
Utils\TaskAgnosticAutoFit.cs (2)
28internal interface IUniversalProgressHandler : IProgress<RunDetail<RegressionMetrics>>, IProgress<RunDetail<MulticlassClassificationMetrics>> 143var classificationMetrics = _context.MulticlassClassification.Evaluate(result.ScoredTestData, labelColumnName: label);
Utils\TaskAgnosticIterationResult.cs (2)
61public TaskAgnosticIterationResult(RunDetail<MulticlassClassificationMetrics> runDetail, string primaryMetricName = "MicroAccuracy") 74var supportedTypes = new[] { typeof(MulticlassClassificationMetrics), typeof(RegressionMetrics) };
Microsoft.ML.Data (6)
Evaluators\MulticlassClassificationEvaluator.cs (2)
550public MulticlassClassificationMetrics Evaluate(IDataView data, string label, string score, string predictedLabel) 567MulticlassClassificationMetrics result;
TrainCatalog.cs (4)
518/// <param name="topKPredictionCount">If given a positive value, the <see cref="MulticlassClassificationMetrics.TopKAccuracy"/> will be filled with 522public MulticlassClassificationMetrics Evaluate(IDataView data, string labelColumnName = DefaultColumnNames.Label, string scoreColumnName = DefaultColumnNames.Score, 553public IReadOnlyList<CrossValidationResult<MulticlassClassificationMetrics>> CrossValidate( 559return result.Select(x => new CrossValidationResult<MulticlassClassificationMetrics>(x.Model,
Microsoft.ML.IntegrationTests (5)
Common.cs (2)
221/// Check that a <see cref="MulticlassClassificationMetrics"/> object is valid. 224public static void AssertMetrics(MulticlassClassificationMetrics metrics)
Evaluation.cs (1)
162var metrics = mlContext.MulticlassClassification.Evaluate(scoredData);
Training.cs (2)
467var binaryClassificationMetrics = mlContext.MulticlassClassification.Evaluate(binaryClassificationPredictions); 499var binaryClassificationMetrics = mlContext.MulticlassClassification.Evaluate(binaryClassificationPredictions);
Microsoft.ML.PerformanceTests (3)
StochasticDualCoordinateAscentClassifierBench.cs (3)
39private MulticlassClassificationMetrics _metrics; 48nameof(MulticlassClassificationMetrics.MicroAccuracy), 51nameof(MulticlassClassificationMetrics.MacroAccuracy),
Microsoft.ML.Samples (27)
Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (1)
160var metrics = mlContext.MulticlassClassification.Evaluate(predictions);
Dynamic\Trainers\MulticlassClassification\ImageClassification\LearningRateSchedulingCifarResnetTransferLearning.cs (1)
186var metrics = mlContext.MulticlassClassification.Evaluate(predictions);
Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (1)
184var metrics = mlContext.MulticlassClassification.Evaluate(predictions);
Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (1)
169var metrics = mlContext.MulticlassClassification.Evaluate(predictions);
Dynamic\Trainers\MulticlassClassification\LbfgsMaximumEntropy.cs (2)
64var metrics = mlContext.MulticlassClassification 130public static void PrintMetrics(MulticlassClassificationMetrics metrics)
Dynamic\Trainers\MulticlassClassification\LbfgsMaximumEntropyWithOptions.cs (2)
72var metrics = mlContext.MulticlassClassification 138public static void PrintMetrics(MulticlassClassificationMetrics metrics)
Dynamic\Trainers\MulticlassClassification\LightGbm.cs (2)
67var metrics = mlContext.MulticlassClassification 133public static void PrintMetrics(MulticlassClassificationMetrics metrics)
Dynamic\Trainers\MulticlassClassification\LightGbmWithOptions.cs (2)
77var metrics = mlContext.MulticlassClassification 143public static void PrintMetrics(MulticlassClassificationMetrics metrics)
Dynamic\Trainers\MulticlassClassification\LogLossPerClass.cs (1)
47var metrics = mlContext.MulticlassClassification
Dynamic\Trainers\MulticlassClassification\NaiveBayes.cs (2)
70var metrics = mlContext.MulticlassClassification 138public static void PrintMetrics(MulticlassClassificationMetrics metrics)
Dynamic\Trainers\MulticlassClassification\OneVersusAll.cs (2)
65var metrics = mlContext.MulticlassClassification 131public static void PrintMetrics(MulticlassClassificationMetrics metrics)
Dynamic\Trainers\MulticlassClassification\PairwiseCoupling.cs (2)
65var metrics = mlContext.MulticlassClassification 131public static void PrintMetrics(MulticlassClassificationMetrics metrics)
Dynamic\Trainers\MulticlassClassification\SdcaMaximumEntropy.cs (2)
72var metrics = mlContext.MulticlassClassification 137public static void PrintMetrics(MulticlassClassificationMetrics metrics)
Dynamic\Trainers\MulticlassClassification\SdcaMaximumEntropyWithOptions.cs (2)
81var metrics = mlContext.MulticlassClassification 147public static void PrintMetrics(MulticlassClassificationMetrics metrics)
Dynamic\Trainers\MulticlassClassification\SdcaNonCalibrated.cs (2)
72var metrics = mlContext.MulticlassClassification 138public static void PrintMetrics(MulticlassClassificationMetrics metrics)
Dynamic\Trainers\MulticlassClassification\SdcaNonCalibratedWithOptions.cs (2)
81var metrics = mlContext.MulticlassClassification 147public static void PrintMetrics(MulticlassClassificationMetrics metrics)
Microsoft.ML.Samples.GPU (4)
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (1)
160var metrics = mlContext.MulticlassClassification.Evaluate(predictions);
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\LearningRateSchedulingCifarResnetTransferLearning.cs (1)
186var metrics = mlContext.MulticlassClassification.Evaluate(predictions);
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (1)
184var metrics = mlContext.MulticlassClassification.Evaluate(predictions);
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (1)
169var metrics = mlContext.MulticlassClassification.Evaluate(predictions);
Microsoft.ML.TensorFlow.Tests (11)
TensorflowTests.cs (11)
161var metrics = _mlContext.MulticlassClassification.Evaluate(predictions); 675var metrics = _mlContext.MulticlassClassification.Evaluate(predicted); 729var metrics = _mlContext.MulticlassClassification.Evaluate(predicted, labelColumnName: "KeyLabel"); 851var metrics = _mlContext.MulticlassClassification.Evaluate(predicted); 899var metrics = _mlContext.MulticlassClassification.Evaluate(predicted); 1172var metrics = _mlContext.MulticlassClassification.Evaluate(transformedData); 1434var metrics = _mlContext.MulticlassClassification.Evaluate(predictions); 1537var metrics = _mlContext.MulticlassClassification.Evaluate(predictions); 1696var metrics = _mlContext.MulticlassClassification.Evaluate(predictions); 1826var metrics = _mlContext.MulticlassClassification.Evaluate(predictions); 1897var metrics = _mlContext.MulticlassClassification.Evaluate(predictions);
Microsoft.ML.Tests (19)
EvaluateTests.cs (2)
48var metrics = mlContext.MulticlassClassification.Evaluate(inputDV, topKPredictionCount: 4); 65var metrics2 = mlContext.MulticlassClassification.Evaluate(inputDV2, topKPredictionCount: 4);
Scenarios\Api\CookbookSamples\CookbookSamplesDynamicApi.cs (1)
660var metrics = mlContext.MulticlassClassification.Evaluate(model.Transform(split.TestSet, TransformerScope.Everything));
Scenarios\Api\Estimators\PredictAndMetadata.cs (2)
89var metrics = mlContext.MulticlassClassification.Evaluate(scoredData); 123var metrics2 = mlContext.MulticlassClassification.Evaluate(scoredData2);
Scenarios\IrisPlantClassificationTests.cs (1)
88var metrics = mlContext.MulticlassClassification.Evaluate(predicted, topKPredictionCount: 3);
Scenarios\IrisPlantClassificationWithStringLabelTests.cs (1)
90var metrics = mlContext.MulticlassClassification.Evaluate(predicted, topKPredictionCount: 3);
Scenarios\OvaTest.cs (4)
43var metrics = mlContext.MulticlassClassification.Evaluate(predictions); 79var metrics = mlContext.MulticlassClassification.Evaluate(predictions); 114var metrics = mlContext.MulticlassClassification.Evaluate(predictions); 148var metrics = mlContext.MulticlassClassification.Evaluate(predictions);
ScenariosWithDirectInstantiation\IrisPlantClassificationTests.cs (2)
48var metrics = mlContext.MulticlassClassification.Evaluate(predicted); 93private void CompareMetrics(MulticlassClassificationMetrics metrics)
TrainerEstimators\SdcaTests.cs (4)
189var metrics1 = mlContext.MulticlassClassification.Evaluate(prediction1, labelColumnName: "LabelIndex", topKPredictionCount: 1); 190var metrics2 = mlContext.MulticlassClassification.Evaluate(prediction2, labelColumnName: "LabelIndex", topKPredictionCount: 1); 285var metrics = mlContext.MulticlassClassification.Evaluate(prediction, labelColumnName: "LabelIndex", topKPredictionCount: 1); 319var metrics = mlContext.MulticlassClassification.Evaluate(prediction, labelColumnName: "LabelIndex", topKPredictionCount: 1);
TrainerEstimators\TreeEnsembleFeaturizerTest.cs (1)
811var metrics = ML.MulticlassClassification.Evaluate(prediction, labelColumnName: "KeyLabel");
TrainerEstimators\TreeEstimators.cs (1)
784var metrics = ML.MulticlassClassification.Evaluate(model.Transform(dataView));
Microsoft.ML.TorchSharp.Tests (2)
TextClassificationTests.cs (2)
156var metrics = ML.MulticlassClassification.Evaluate(transformer.Transform(dataView, TransformerScope.Everything), predictedLabelColumnName: "outputColumn"); 182var metrics = mlContext.MulticlassClassification.Evaluate(predictionIdv);
Microsoft.ML.Transforms (17)
MetricStatistics.cs (10)
215/// statistics over multiple observations of <see cref="MulticlassClassificationMetrics"/>. 217public sealed class MulticlassClassificationMetricsStatistics : IMetricsStatistics<MulticlassClassificationMetrics> 220/// Summary statistics for <see cref="MulticlassClassificationMetrics.MacroAccuracy"/>. 225/// Summary statistics for <see cref="MulticlassClassificationMetrics.MicroAccuracy"/>. 230/// Summary statistics for <see cref="MulticlassClassificationMetrics.LogLoss"/>. 235/// Summary statistics for <see cref="MulticlassClassificationMetrics.LogLossReduction"/>. 240/// Summary statistics for <see cref="MulticlassClassificationMetrics.TopKAccuracy"/>. 245/// Summary statistics for <see cref="MulticlassClassificationMetrics.PerClassLogLoss"/>. 262void IMetricsStatistics<MulticlassClassificationMetrics>.Add(MulticlassClassificationMetrics metrics)
PermutationFeatureImportanceExtensions.cs (7)
349/// <see cref="ImmutableArray"/> of <see cref="MulticlassClassificationMetrics"/> objects is returned. See the sample below for an 378return PermutationFeatureImportance<TModel, MulticlassClassificationMetrics, MulticlassClassificationMetricsStatistics>.GetImportanceMetricsMatrix( 412/// <see cref="ImmutableArray"/> of <see cref="MulticlassClassificationMetrics"/> objects is returned. See the sample below for an 450MulticlassClassificationMetrics evaluationFunc(IDataView idv) => catalog.Evaluate(idv, labelColumnName); 465private static MulticlassClassificationMetrics MulticlassClassificationDelta( 466MulticlassClassificationMetrics a, MulticlassClassificationMetrics b)