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