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