85 references to BinaryClassificationMetric
Microsoft.ML.AutoML (53)
API\AutoMLExperimentExtension.cs (1)
86public static AutoMLExperiment SetBinaryClassificationMetric(this AutoMLExperiment experiment, BinaryClassificationMetric metric, string labelColumn = "label", string predictedColumn = "PredictedLabel")
API\BinaryClassificationExperiment.cs (12)
30/// <value>The default value is <see cref="BinaryClassificationMetric.Accuracy"/>.</value> 31public BinaryClassificationMetric OptimizingMetric { get; set; } 49OptimizingMetric = BinaryClassificationMetric.Accuracy; 470private double GetMetric(BinaryClassificationMetric metric, BinaryClassificationMetrics metrics) 474BinaryClassificationMetric.PositivePrecision => metrics.PositivePrecision, 475BinaryClassificationMetric.Accuracy => metrics.Accuracy, 476BinaryClassificationMetric.AreaUnderRocCurve => metrics.AreaUnderRocCurve, 477BinaryClassificationMetric.AreaUnderPrecisionRecallCurve => metrics.AreaUnderPrecisionRecallCurve, 478BinaryClassificationMetric.PositiveRecall => metrics.PositiveRecall, 479BinaryClassificationMetric.NegativePrecision => metrics.NegativePrecision, 480BinaryClassificationMetric.NegativeRecall => metrics.NegativeRecall, 481BinaryClassificationMetric.F1Score => metrics.F1Score,
AutoMLExperiment\IMetricManager.cs (18)
26public BinaryMetricManager(BinaryClassificationMetric metric, string labelColumn, string predictedColumn) 33public BinaryClassificationMetric Metric { get; set; } 41BinaryClassificationMetric.Accuracy => true, 42BinaryClassificationMetric.AreaUnderPrecisionRecallCurve => true, 43BinaryClassificationMetric.AreaUnderRocCurve => true, 44BinaryClassificationMetric.PositivePrecision => true, 45BinaryClassificationMetric.NegativePrecision => true, 46BinaryClassificationMetric.NegativeRecall => true, 47BinaryClassificationMetric.PositiveRecall => true, 48BinaryClassificationMetric.F1Score => true, 60BinaryClassificationMetric.Accuracy => metric.Accuracy, 61BinaryClassificationMetric.AreaUnderPrecisionRecallCurve => metric.AreaUnderPrecisionRecallCurve, 62BinaryClassificationMetric.AreaUnderRocCurve => metric.AreaUnderRocCurve, 63BinaryClassificationMetric.PositivePrecision => metric.PositivePrecision, 64BinaryClassificationMetric.NegativePrecision => metric.NegativePrecision, 65BinaryClassificationMetric.NegativeRecall => metric.NegativeRecall, 66BinaryClassificationMetric.PositiveRecall => metric.PositivePrecision, 67BinaryClassificationMetric.F1Score => metric.F1Score,
Experiment\MetricsAgents\BinaryMetricsAgent.cs (18)
12private readonly BinaryClassificationMetric _optimizingMetric; 15BinaryClassificationMetric optimizingMetric) 30case BinaryClassificationMetric.Accuracy: 32case BinaryClassificationMetric.AreaUnderRocCurve: 34case BinaryClassificationMetric.AreaUnderPrecisionRecallCurve: 36case BinaryClassificationMetric.F1Score: 38case BinaryClassificationMetric.NegativePrecision: 40case BinaryClassificationMetric.NegativeRecall: 42case BinaryClassificationMetric.PositivePrecision: 44case BinaryClassificationMetric.PositiveRecall: 60case BinaryClassificationMetric.Accuracy: 62case BinaryClassificationMetric.AreaUnderRocCurve: 64case BinaryClassificationMetric.AreaUnderPrecisionRecallCurve: 66case BinaryClassificationMetric.F1Score: 68case BinaryClassificationMetric.NegativePrecision: 70case BinaryClassificationMetric.NegativeRecall: 72case BinaryClassificationMetric.PositivePrecision: 74case BinaryClassificationMetric.PositiveRecall:
Experiment\OptimizingMetricInfo.cs (3)
20private static readonly BinaryClassificationMetric[] _minimizingBinaryMetrics = new BinaryClassificationMetric[] 34public OptimizingMetricInfo(BinaryClassificationMetric binaryMetric)
Utils\BestResultUtil.cs (1)
14BinaryClassificationMetric metric)
Microsoft.ML.AutoML.Samples (2)
AutoMLExperiment.cs (1)
47.SetBinaryClassificationMetric(BinaryClassificationMetric.Accuracy, "Label")
Sweepable\SweepableLightGBMBinaryExperiment.cs (1)
73.SetBinaryClassificationMetric(BinaryClassificationMetric.Accuracy, "Label")
Microsoft.ML.AutoML.Tests (30)
AutoMLExperimentTests.cs (3)
109.SetBinaryClassificationMetric(BinaryClassificationMetric.AreaUnderRocCurve, DatasetUtil.UciAdultLabel) 226.SetBinaryClassificationMetric(BinaryClassificationMetric.AreaUnderRocCurve, DatasetUtil.UciAdultLabel) 276.SetBinaryClassificationMetric(BinaryClassificationMetric.AreaUnderRocCurve, DatasetUtil.UciAdultLabel)
MetricsAgentsTests.cs (27)
23Assert.Equal(0.1, GetScore(metrics, BinaryClassificationMetric.AreaUnderRocCurve)); 24Assert.Equal(0.2, GetScore(metrics, BinaryClassificationMetric.Accuracy)); 25Assert.Equal(0.3, GetScore(metrics, BinaryClassificationMetric.PositivePrecision)); 26Assert.Equal(0.4, GetScore(metrics, BinaryClassificationMetric.PositiveRecall)); 27Assert.Equal(0.5, GetScore(metrics, BinaryClassificationMetric.NegativePrecision)); 28Assert.Equal(0.6, GetScore(metrics, BinaryClassificationMetric.NegativeRecall)); 29Assert.Equal(0.7, GetScore(metrics, BinaryClassificationMetric.F1Score)); 30Assert.Equal(0.8, GetScore(metrics, BinaryClassificationMetric.AreaUnderPrecisionRecallCurve)); 37Assert.False(IsPerfectModel(metrics, BinaryClassificationMetric.Accuracy)); 38Assert.False(IsPerfectModel(metrics, BinaryClassificationMetric.AreaUnderRocCurve)); 39Assert.False(IsPerfectModel(metrics, BinaryClassificationMetric.AreaUnderPrecisionRecallCurve)); 40Assert.False(IsPerfectModel(metrics, BinaryClassificationMetric.F1Score)); 41Assert.False(IsPerfectModel(metrics, BinaryClassificationMetric.NegativePrecision)); 42Assert.False(IsPerfectModel(metrics, BinaryClassificationMetric.NegativeRecall)); 43Assert.False(IsPerfectModel(metrics, BinaryClassificationMetric.PositivePrecision)); 44Assert.False(IsPerfectModel(metrics, BinaryClassificationMetric.PositiveRecall)); 51Assert.True(IsPerfectModel(metrics, BinaryClassificationMetric.Accuracy)); 52Assert.True(IsPerfectModel(metrics, BinaryClassificationMetric.AreaUnderRocCurve)); 53Assert.True(IsPerfectModel(metrics, BinaryClassificationMetric.AreaUnderPrecisionRecallCurve)); 54Assert.True(IsPerfectModel(metrics, BinaryClassificationMetric.F1Score)); 55Assert.True(IsPerfectModel(metrics, BinaryClassificationMetric.NegativePrecision)); 56Assert.True(IsPerfectModel(metrics, BinaryClassificationMetric.NegativeRecall)); 57Assert.True(IsPerfectModel(metrics, BinaryClassificationMetric.PositivePrecision)); 58Assert.True(IsPerfectModel(metrics, BinaryClassificationMetric.PositiveRecall)); 163var ex = MetricsAgentUtil.BuildMetricNotSupportedException(BinaryClassificationMetric.Accuracy); 167private static double GetScore(BinaryClassificationMetrics metrics, BinaryClassificationMetric metric) 187private static bool IsPerfectModel(BinaryClassificationMetrics metrics, BinaryClassificationMetric metric)