134 references to MetricKinds
Microsoft.ML.Data (134)
Commands\CrossValidationCommand.cs (1)
321
if (!dict.TryGetValue(
MetricKinds
.OverallMetrics, out idv))
Commands\EvaluateCommand.cs (1)
248
if (!metrics.TryGetValue(
MetricKinds
.OverallMetrics, out var overall))
Commands\TestCommand.cs (1)
125
if (!metrics.TryGetValue(
MetricKinds
.OverallMetrics, out var overall))
Commands\TrainTestCommand.cs (1)
215
if (!metrics.TryGetValue(
MetricKinds
.OverallMetrics, out var overall))
Evaluators\AnomalyDetectionEvaluator.cs (11)
182
overallDvBldr.AddColumn(
MetricKinds
.ColumnNames.StratCol, GetKeyValueGetter(dictionaries), (ulong)dictionaries.Length, stratCol.ToArray());
183
overallDvBldr.AddColumn(
MetricKinds
.ColumnNames.StratVal, TextDataViewType.Instance, stratVal.ToArray());
197
topKdvBldr.AddColumn(
MetricKinds
.ColumnNames.StratCol, GetKeyValueGetter(dictionaries), (ulong)dictionaries.Length, topKStratCol.ToArray());
198
topKdvBldr.AddColumn(
MetricKinds
.ColumnNames.StratVal, TextDataViewType.Instance, topKStratVal.ToArray());
205
result.Add(
MetricKinds
.OverallMetrics, overallDvBldr.GetDataView());
602
Host.Assert(resultDict.ContainsKey(
MetricKinds
.OverallMetrics));
603
var overall = resultDict[
MetricKinds
.OverallMetrics];
712
if (!metrics.TryGetValue(
MetricKinds
.OverallMetrics, out overall))
721
var hasStrat = overall.Schema.TryGetColumnIndex(
MetricKinds
.ColumnNames.StratCol, out stratCol);
723
bool hasStratVals = overall.Schema.TryGetColumnIndex(
MetricKinds
.ColumnNames.StratVal, out stratVal);
727
(hasStrat && col.Name.Equals(
MetricKinds
.ColumnNames.StratCol)))))
Evaluators\BinaryClassifierEvaluator.cs (40)
337
overallDvBldr.AddColumn(
MetricKinds
.ColumnNames.StratCol, GetKeyValueGetter(dictionaries), (ulong)dictionaries.Length, stratCol.ToArray());
338
overallDvBldr.AddColumn(
MetricKinds
.ColumnNames.StratVal, TextDataViewType.Instance, stratVal.ToArray());
341
overallDvBldr.AddColumn(
MetricKinds
.ColumnNames.IsWeighted, BooleanDataViewType.Instance, isWeighted.ToArray());
358
confDvBldr.AddColumn(
MetricKinds
.ColumnNames.StratCol, GetKeyValueGetter(dictionaries), (ulong)dictionaries.Length, confStratCol.ToArray());
359
confDvBldr.AddColumn(
MetricKinds
.ColumnNames.StratVal, TextDataViewType.Instance, confStratVal.ToArray());
364
confDvBldr.AddColumn(
MetricKinds
.ColumnNames.Count, getSlotNames, NumberDataViewType.Double, counts.ToArray());
367
confDvBldr.AddColumn(
MetricKinds
.ColumnNames.Weight, getSlotNames, NumberDataViewType.Double, weights.ToArray());
370
result.Add(
MetricKinds
.OverallMetrics, overallDvBldr.GetDataView());
371
result.Add(
MetricKinds
.ConfusionMatrix, confDvBldr.GetDataView());
378
dvBldr.AddColumn(
MetricKinds
.ColumnNames.StratCol, GetKeyValueGetter(dictionaries), (ulong)dictionaries.Length, prStratCol.ToArray());
379
dvBldr.AddColumn(
MetricKinds
.ColumnNames.StratVal, TextDataViewType.Instance, prStratVal.ToArray());
825
Host.Assert(resultDict.ContainsKey(
MetricKinds
.OverallMetrics));
826
var overall = resultDict[
MetricKinds
.OverallMetrics];
827
var confusionMatrix = resultDict[
MetricKinds
.ConfusionMatrix];
873
Host.Assert(resultDict.ContainsKey(
MetricKinds
.PrCurve));
874
var prCurveView = resultDict[
MetricKinds
.PrCurve];
875
Host.Assert(resultDict.ContainsKey(
MetricKinds
.OverallMetrics));
876
var overall = resultDict[
MetricKinds
.OverallMetrics];
893
var confusionMatrix = resultDict[
MetricKinds
.ConfusionMatrix];
952
Host.Assert(resultDict.ContainsKey(
MetricKinds
.OverallMetrics));
953
var overall = resultDict[
MetricKinds
.OverallMetrics];
954
var confusionMatrix = resultDict[
MetricKinds
.ConfusionMatrix];
998
Host.Assert(resultDict.ContainsKey(
MetricKinds
.PrCurve));
999
var prCurveView = resultDict[
MetricKinds
.PrCurve];
1000
Host.Assert(resultDict.ContainsKey(
MetricKinds
.OverallMetrics));
1001
var overall = resultDict[
MetricKinds
.OverallMetrics];
1002
var confusionMatrix = resultDict[
MetricKinds
.ConfusionMatrix];
1360
if (!metrics.TryGetValue(
MetricKinds
.OverallMetrics, out fold))
1364
if (!metrics.TryGetValue(
MetricKinds
.ConfusionMatrix, out conf))
1382
if (fold.Schema.TryGetColumnIndex(
MetricKinds
.ColumnNames.IsWeighted, out index))
1383
colsToKeep.Add(
MetricKinds
.ColumnNames.IsWeighted);
1384
if (fold.Schema.TryGetColumnIndex(
MetricKinds
.ColumnNames.StratCol, out index))
1385
colsToKeep.Add(
MetricKinds
.ColumnNames.StratCol);
1386
if (fold.Schema.TryGetColumnIndex(
MetricKinds
.ColumnNames.StratVal, out index))
1387
colsToKeep.Add(
MetricKinds
.ColumnNames.StratVal);
1549
if (!metrics.TryGetValue(
MetricKinds
.Warnings, out warnings))
1552
schemaBuilder.AddColumn(
MetricKinds
.ColumnNames.WarningText, TextDataViewType.Instance);
1562
if (!metrics.TryGetValue(
MetricKinds
.OverallMetrics, out overallMetrics))
1577
if (!metrics.TryGetValue(
MetricKinds
.ConfusionMatrix, out confusionMatrix))
1580
schemaBuilder.AddColumn(
MetricKinds
.ColumnNames.Count, NumberDataViewType.Double);
Evaluators\ClusteringEvaluator.cs (6)
82
Host.Assert(resultDict.ContainsKey(
MetricKinds
.OverallMetrics));
83
var overall = resultDict[
MetricKinds
.OverallMetrics];
204
overallDvBldr.AddColumn(
MetricKinds
.ColumnNames.StratCol, GetKeyValueGetter(dictionaries), (ulong)dictionaries.Length, stratCol.ToArray());
205
overallDvBldr.AddColumn(
MetricKinds
.ColumnNames.StratVal, TextDataViewType.Instance, stratVal.ToArray());
208
overallDvBldr.AddColumn(
MetricKinds
.ColumnNames.IsWeighted, BooleanDataViewType.Instance, isWeighted.ToArray());
216
{
MetricKinds
.OverallMetrics, overallDvBldr.GetDataView() }
Evaluators\EvaluatorBase.cs (2)
310
dvBldr.AddColumn(
MetricKinds
.ColumnNames.WarningText, TextDataViewType.Instance,
312
dict.Add(
MetricKinds
.Warnings, dvBldr.GetDataView());
Evaluators\EvaluatorUtils.cs (31)
261
var hasWeighted = schema.TryGetColumnIndex(
MetricKinds
.ColumnNames.IsWeighted, out isWeightedCol);
267
if (hasStrats = schema.TryGetColumnIndex(
MetricKinds
.ColumnNames.StratCol, out stratCol))
269
if (!schema.TryGetColumnIndex(
MetricKinds
.ColumnNames.StratVal, out stratVal))
272
MetricKinds
.ColumnNames.StratCol,
MetricKinds
.ColumnNames.StratVal);
406
input, inputColName,
MetricKinds
.ColumnNames.FoldIndex, inputColType, $"Fold {curFold}", "FoldName");
448
input, inputColName,
MetricKinds
.ColumnNames.FoldIndex,
1077
overall = new KeyToValueMappingTransformer(env,
MetricKinds
.ColumnNames.StratCol).Transform(overall);
1084
var isWeightedColumn = data.Schema.GetColumnOrNull(
MetricKinds
.ColumnNames.IsWeighted);
1086
var hasStrats = data.Schema.TryGetColumnIndex(
MetricKinds
.ColumnNames.StratCol, out int scol);
1087
var hasStratVals = data.Schema.TryGetColumnIndex(
MetricKinds
.ColumnNames.StratVal, out int svalcol);
1089
var hasFoldCol = data.Schema.TryGetColumnIndex(
MetricKinds
.ColumnNames.FoldIndex, out int fcol);
1241
MetricKinds
.ColumnNames.StratCol);
1252
dvBldr.AddColumn(
MetricKinds
.ColumnNames.StratCol, getKeyValues, type.GetKeyCount(), keys);
1253
weightedDvBldr?.AddColumn(
MetricKinds
.ColumnNames.StratCol, getKeyValues, type.GetKeyCount(), keys);
1259
dvBldr.AddColumn(
MetricKinds
.ColumnNames.StratVal, TextDataViewType.Instance, stratVals);
1260
weightedDvBldr?.AddColumn(
MetricKinds
.ColumnNames.StratVal, TextDataViewType.Instance, stratVals);
1265
dvBldr.AddColumn(
MetricKinds
.ColumnNames.IsWeighted, BooleanDataViewType.Instance, foldCol >= 0 ? new[] { false, false } : new[] { false });
1266
weightedDvBldr.AddColumn(
MetricKinds
.ColumnNames.IsWeighted, BooleanDataViewType.Instance, foldCol >= 0 ? new[] { true, true } : new[] { true });
1271
dvBldr.AddColumn(
MetricKinds
.ColumnNames.FoldIndex, TextDataViewType.Instance, foldVals);
1272
weightedDvBldr?.AddColumn(
MetricKinds
.ColumnNames.FoldIndex, TextDataViewType.Instance, foldVals);
1362
var weightColumn = confusionDataView.Schema.GetColumnOrNull(
MetricKinds
.ColumnNames.Weight);
1386
var weightColumn = confusionDataView.Schema.GetColumnOrNull(
MetricKinds
.ColumnNames.Weight);
1391
var countColumn = confusionDataView.Schema[
MetricKinds
.ColumnNames.Count];
1475
var hasStrat = confusionDataView.Schema.TryGetColumnIndex(
MetricKinds
.ColumnNames.StratCol, out stratCol);
1734
if (metrics.TryGetValue(
MetricKinds
.Warnings, out warnings))
1736
var warningTextColumn = warnings.Schema.GetColumnOrNull(
MetricKinds
.ColumnNames.WarningText);
1739
using (var cursor = warnings.GetRowCursor(warnings.Schema[
MetricKinds
.ColumnNames.WarningText]))
1773
if (!data.Schema.TryGetColumnIndex(
MetricKinds
.ColumnNames.StratCol, out stratCol))
1778
filterArgs.Columns = new[] {
MetricKinds
.ColumnNames.StratCol };
1783
var found = data.Schema.TryGetColumnIndex(
MetricKinds
.ColumnNames.StratVal, out stratVal);
Evaluators\MamlEvaluator.cs (3)
173
if (!metrics.TryGetValue(
MetricKinds
.OverallMetrics, out fold))
238
if (perInst.Schema.Schema.TryGetColumnIndex(
MetricKinds
.ColumnNames.FoldIndex, out foldCol))
239
colsToKeep.Add(
MetricKinds
.ColumnNames.FoldIndex);
Evaluators\MulticlassClassificationEvaluator.cs (14)
211
overallDvBldr.AddColumn(
MetricKinds
.ColumnNames.StratCol, GetKeyValueGetter(dictionaries), (ulong)dictionaries.Length, stratCol.ToArray());
212
overallDvBldr.AddColumn(
MetricKinds
.ColumnNames.StratVal, TextDataViewType.Instance, stratVal.ToArray());
215
overallDvBldr.AddColumn(
MetricKinds
.ColumnNames.IsWeighted, BooleanDataViewType.Instance, isWeighted.ToArray());
235
confDvBldr.AddColumn(
MetricKinds
.ColumnNames.StratCol, GetKeyValueGetter(dictionaries), (ulong)dictionaries.Length, confStratCol.ToArray());
236
confDvBldr.AddColumn(
MetricKinds
.ColumnNames.StratVal, TextDataViewType.Instance, confStratVal.ToArray());
241
confDvBldr.AddColumn(
MetricKinds
.ColumnNames.Count, getSlotNames, NumberDataViewType.Double, counts.ToArray());
244
confDvBldr.AddColumn(
MetricKinds
.ColumnNames.Weight, getSlotNames, NumberDataViewType.Double, weights.ToArray());
248
{
MetricKinds
.OverallMetrics, overallDvBldr.GetDataView() },
249
{
MetricKinds
.ConfusionMatrix, confDvBldr.GetDataView() }
563
Host.Assert(resultDict.ContainsKey(
MetricKinds
.OverallMetrics));
564
var overall = resultDict[
MetricKinds
.OverallMetrics];
565
var confusionMatrix = resultDict[
MetricKinds
.ConfusionMatrix];
923
if (!metrics.TryGetValue(
MetricKinds
.OverallMetrics, out IDataView fold))
926
if (!metrics.TryGetValue(
MetricKinds
.ConfusionMatrix, out IDataView conf))
Evaluators\MultiOutputRegressionEvaluator.cs (8)
148
overallDvBldr.AddColumn(
MetricKinds
.ColumnNames.StratCol, GetKeyValueGetter(dictionaries), (ulong)dictionaries.Length, stratCol.ToArray());
149
overallDvBldr.AddColumn(
MetricKinds
.ColumnNames.StratVal, TextDataViewType.Instance, stratVal.ToArray());
152
overallDvBldr.AddColumn(
MetricKinds
.ColumnNames.IsWeighted, BooleanDataViewType.Instance, isWeighted.ToArray());
161
result.Add(
MetricKinds
.OverallMetrics, overallDvBldr.GetDataView());
665
if (!metrics.TryGetValue(
MetricKinds
.OverallMetrics, out fold))
668
var isWeightedCol = fold.Schema.GetColumnOrNull(
MetricKinds
.ColumnNames.IsWeighted);
671
bool hasStrats = fold.Schema.TryGetColumnIndex(
MetricKinds
.ColumnNames.StratCol, out stratCol);
673
bool hasStratVals = fold.Schema.TryGetColumnIndex(
MetricKinds
.ColumnNames.StratVal, out stratVal);
Evaluators\QuantileRegressionEvaluator.cs (1)
493
if (!metrics.TryGetValue(
MetricKinds
.OverallMetrics, out fold))
Evaluators\RankingEvaluator.cs (8)
216
overallDvBldr.AddColumn(
MetricKinds
.ColumnNames.StratCol, GetKeyValueGetter(dictionaries), (ulong)dictionaries.Length, stratCol.ToArray());
217
overallDvBldr.AddColumn(
MetricKinds
.ColumnNames.StratVal, TextDataViewType.Instance, stratVal.ToArray());
220
overallDvBldr.AddColumn(
MetricKinds
.ColumnNames.IsWeighted, BooleanDataViewType.Instance, isWeighted.ToArray());
227
groupDvBldr.AddColumn(
MetricKinds
.ColumnNames.StratCol, GetKeyValueGetter(dictionaries), (ulong)dictionaries.Length, groupStratCol.ToArray());
228
groupDvBldr.AddColumn(
MetricKinds
.ColumnNames.StratVal, TextDataViewType.Instance, groupStratVal.ToArray());
239
result.Add(
MetricKinds
.OverallMetrics, overallDvBldr.GetDataView());
265
Host.Assert(resultDict.ContainsKey(
MetricKinds
.OverallMetrics));
266
var overall = resultDict[
MetricKinds
.OverallMetrics];
Evaluators\RegressionEvaluator.cs (2)
184
Host.Assert(resultDict.ContainsKey(
MetricKinds
.OverallMetrics));
185
var overall = resultDict[
MetricKinds
.OverallMetrics];
Evaluators\RegressionEvaluatorBase.cs (4)
97
overallDvBldr.AddColumn(
MetricKinds
.ColumnNames.StratCol, GetKeyValueGetter(dictionaries), (ulong)dictionaries.Length, stratCol.ToArray());
98
overallDvBldr.AddColumn(
MetricKinds
.ColumnNames.StratVal, TextDataViewType.Instance, stratVal.ToArray());
101
overallDvBldr.AddColumn(
MetricKinds
.ColumnNames.IsWeighted, BooleanDataViewType.Instance, isWeighted.ToArray());
109
result.Add(
MetricKinds
.OverallMetrics, overallDvBldr.GetDataView());