1 write to Host
Microsoft.ML.Data (1)
Evaluators\MamlEvaluator.cs (1)
99
Host
= env.Register(registrationName);
105 references to Host
Microsoft.ML.Data (105)
Evaluators\AnomalyDetectionEvaluator.cs (15)
661
_evaluator = new AnomalyDetectionEvaluator(
Host
, evalArgs);
668
throw
Host
.Except("Did not find the top-k results data view");
674
throw
Host
.ExceptSchemaMismatch(nameof(top.Schema), "instance", AnomalyDetectionEvaluator.TopKResultsColumns.Instance);
679
throw
Host
.ExceptSchemaMismatch(nameof(top.Schema), "anomaly score", AnomalyDetectionEvaluator.TopKResultsColumns.AnomalyScore);
684
throw
Host
.ExceptSchemaMismatch(nameof(top.Schema), "label", AnomalyDetectionEvaluator.TopKResultsColumns.Label);
713
throw
Host
.Except("No overall metrics found");
718
throw
Host
.ExceptSchemaMismatch(nameof(overall.Schema), "number of anomalies", AnomalyDetectionEvaluator.OverallMetrics.NumAnomalies);
745
throw
Host
.Except("Found multiple non-stratified rows in overall results data view");
772
overall = new ColumnCopyingTransformer(
Host
, cols).Transform(overall);
773
IDataView fold = ColumnSelectingTransformer.CreateKeep(
Host
, overall, colsToKeep.ToArray());
776
ch.Info(MetricWriter.GetPerFoldResults(
Host
, fold, out weightedFold));
781
return ColumnSelectingTransformer.CreateDrop(
Host
,
791
Host
.CheckValue(schema, nameof(schema));
792
Host
.CheckParam(schema.Label.HasValue, nameof(schema), "Data must contain a label column");
796
var scoreCol = EvaluateUtils.GetScoreColumn(
Host
, schema.Schema, ScoreCol, nameof(Arguments.ScoreColumn),
Evaluators\BinaryClassifierEvaluator.cs (18)
1325
Host
.CheckValue(args, nameof(args));
1337
_evaluator = new BinaryClassifierEvaluator(
Host
, evalArgs);
1344
var scoreCol = EvaluateUtils.GetScoreColumn(
Host
, schema.Schema, ScoreCol, nameof(Arguments.ScoreColumn),
1348
var probCol = EvaluateUtils.GetOptAuxScoreColumn(
Host
, schema.Schema, _probCol, nameof(Arguments.ProbabilityColumn),
1389
fold = new ColumnCopyingTransformer(
Host
, cols).Transform(fold);
1392
fold = ColumnSelectingTransformer.CreateKeep(
Host
, fold, colsToKeep.ToArray());
1395
var unweightedConf = MetricWriter.GetConfusionTableAsFormattedString(
Host
, conf, out weightedConf);
1397
var unweightedFold = MetricWriter.GetPerFoldResults(
Host
, fold, out weightedFold);
1410
return ColumnSelectingTransformer.CreateDrop(
Host
, overall, BinaryClassifierEvaluator.Entropy);
1426
pr = MetricWriter.GetNonStratifiedMetrics(
Host
, pr);
1427
MetricWriter.SavePerInstance(
Host
, ch, _prFileName, pr);
1451
Host
.AssertNonEmpty(metrics);
1461
idv = EvaluateUtils.AddFoldIndex(
Host
, idv, i, metrics.Length);
1467
pr = AppendRowsDataView.Create(
Host
, prList[0].Schema, prList.ToArray());
1474
Host
.CheckValue(schema, nameof(schema));
1475
Host
.CheckParam(schema.Label.HasValue, nameof(schema), "Schema must contain a label column");
1479
var scoreCol = EvaluateUtils.GetScoreColumn(
Host
, schema.Schema, ScoreCol, nameof(Arguments.ScoreColumn),
1482
var probCol = EvaluateUtils.GetOptAuxScoreColumn(
Host
, schema.Schema, _probCol, nameof(Arguments.ProbabilityColumn),
Evaluators\ClusteringEvaluator.cs (7)
787
Host
.CheckValue(args, nameof(args));
788
Host
.CheckUserArg(1 <= args.NumTopClustersToOutput, nameof(args.NumTopClustersToOutput));
798
_evaluator = new ClusteringEvaluator(
Host
, evalArgs);
815
throw
Host
.ExceptUserArg(nameof(Arguments.FeatureColumn), "Features column '{0}' not found", feat);
823
Host
.CheckValue(schema, nameof(schema));
842
perInst = new SlotsDroppingTransformer(
Host
, ClusteringPerInstanceEvaluator.SortedClusters, min: _numTopClusters).Transform(perInst);
849
perInst = new SlotsDroppingTransformer(
Host
, ClusteringPerInstanceEvaluator.SortedClusterScores, min: _numTopClusters).Transform(perInst);
Evaluators\MamlEvaluator.cs (14)
116
Host
.CheckValue(schema, nameof(schema));
137
var scoreCol = EvaluateUtils.GetScoreColumn(
Host
, schema.Schema, ScoreCol, nameof(ArgumentsBase.ScoreColumn),
157
Host
.CheckValue(ch, nameof(ch));
158
Host
.CheckValue(metrics, nameof(metrics));
177
string unweightedMetrics = MetricWriter.GetPerFoldResults(
Host
, fold, out weightedMetrics);
185
Host
.CheckNonEmpty(metrics, nameof(metrics));
193
return EvaluateUtils.ConcatenateOverallMetrics(
Host
, metrics);
204
Host
.CheckValue(ch, nameof(ch));
205
Host
.CheckNonEmpty(metrics, nameof(metrics));
220
Host
.AssertValue(scoredData);
252
idv = new GenerateNumberTransform(
Host
, args, idv);
264
idv = new ColumnCopyingTransformer(
Host
, cols.ToArray()).Transform(idv);
265
idv = ColumnSelectingTransformer.CreateKeep(
Host
, idv, colsToKeep.ToArray());
283
Host
.CheckValue(perInstance, nameof(perInstance));
Evaluators\MulticlassClassificationEvaluator.cs (22)
900
Host
.CheckValue(args, nameof(args));
902
Host
.CheckUserArg(2 <= args.NumTopClassesToOutput, nameof(args.NumTopClassesToOutput));
903
Host
.CheckUserArg(2 <= args.NumClassesConfusionMatrix, nameof(args.NumClassesConfusionMatrix));
904
Host
.CheckUserArg(args.OutputTopKAcc == null || args.OutputTopKAcc > 0, nameof(args.OutputTopKAcc));
905
Host
.CheckUserArg(2 <= args.NumClassesConfusionMatrix, nameof(args.NumClassesConfusionMatrix));
916
_evaluator = new MulticlassClassificationEvaluator(
Host
, evalArgs);
921
Host
.AssertValue(metrics);
940
var unweightedConf = MetricWriter.GetConfusionTableAsFormattedString(
Host
, conf, out string weightedConf, false, _numConfusionTableClasses);
941
var unweightedFold = MetricWriter.GetPerFoldResults(
Host
, fold, out string weightedFold);
976
EvaluateUtils.ReconcileSlotNames<double>(
Host
, views, MulticlassClassificationEvaluator.PerClassLogLoss, NumberDataViewType.Double,
988
idv = new ChooseColumnsByIndexTransform(
Host
,
1001
input = new ColumnCopyingTransformer(
Host
, (string.Format(TopKAccuracyFormat, _outputTopKAcc), MulticlassClassificationEvaluator.TopKAccuracy)).Transform(input);
1002
return ColumnSelectingTransformer.CreateDrop(
Host
, input, MulticlassClassificationEvaluator.TopKAccuracy);
1007
input = new ColumnCopyingTransformer(
Host
, (TopKAccuracyFormat, MulticlassClassificationEvaluator.AllTopKAccuracy)).Transform(input);
1008
return ColumnSelectingTransformer.CreateDrop(
Host
, input, MulticlassClassificationEvaluator.AllTopKAccuracy);
1015
input = ColumnSelectingTransformer.CreateDrop(
Host
, input, columnToDrop);
1038
Host
.CheckValue(schema, nameof(schema));
1039
Host
.CheckParam(schema.Label.HasValue, nameof(schema), "Schema must contain a label column");
1058
throw
Host
.ExceptSchemaMismatch(nameof(schema), "label", labelName);
1063
perInst = LambdaColumnMapper.Create(
Host
, "ConvertToDouble", perInst, labelName,
1074
perInst = new SlotsDroppingTransformer(
Host
, MulticlassPerInstanceEvaluator.SortedClasses, min: _numTopClasses).Transform(perInst);
1082
perInst = new SlotsDroppingTransformer(
Host
, MulticlassPerInstanceEvaluator.SortedScores, min: _numTopClasses).Transform(perInst);
Evaluators\MultiOutputRegressionEvaluator.cs (5)
632
Host
.CheckUserArg(args.LossFunction != null, nameof(args.LossFunction), "Loss function must be specified");
637
_evaluator = new MultiOutputRegressionEvaluator(
Host
, evalArgs);
642
Host
.CheckValue(schema, nameof(schema));
643
Host
.CheckParam(schema.Label != null, nameof(schema), "Schema must contain a label column");
650
var scoreCol = EvaluateUtils.GetScoreColumn(
Host
, schema.Schema, ScoreCol, nameof(Arguments.ScoreColumn),
Evaluators\QuantileRegressionEvaluator.cs (8)
481
Host
.CheckUserArg(args.LossFunction != null, nameof(args.LossFunction), "Loss function must be specified.");
485
_evaluator = new QuantileRegressionEvaluator(
Host
, evalArgs);
500
string unweightedMetrics = MetricWriter.GetPerFoldResults(
Host
, fold, out weightedMetrics);
521
output = LambdaColumnMapper.Create(
Host
, "Quantile Regression", output, name, name, type, NumberDataViewType.Double,
523
output = new ChooseColumnsByIndexTransform(
Host
,
541
Host
.CheckValue(schema, nameof(schema));
542
Host
.CheckParam(schema.Label.HasValue, nameof(schema), "Must contain a label column");
546
var scoreCol = EvaluateUtils.GetScoreColumn(
Host
, schema.Schema, ScoreCol, nameof(Arguments.ScoreColumn),
Evaluators\RankingEvaluator.cs (11)
880
Host
.CheckValue(args, nameof(args));
888
_evaluator = new RankingEvaluator(
Host
, evalOpts);
913
gs = MetricWriter.GetNonStratifiedMetrics(
Host
, gs);
914
MetricWriter.SavePerInstance(
Host
, ch, _groupSummaryFilename, gs);
920
Host
.AssertNonEmpty(metrics);
933
idv = EvaluateUtils.AddFoldIndex(
Host
, idv, i, metrics.Length);
936
gs = AppendRowsDataView.Create(
Host
, gsList[0].Schema, gsList.ToArray());
942
Host
.CheckValue(schema, nameof(schema));
943
Host
.CheckParam(schema.Label.HasValue, nameof(schema), "Data must contain a label column");
944
Host
.CheckParam(schema.Group.HasValue, nameof(schema), "Data must contain a group column");
949
var scoreCol = EvaluateUtils.GetScoreColumn(
Host
, schema.Schema, ScoreCol, nameof(Arguments.ScoreColumn),
Evaluators\RegressionEvaluator.cs (5)
354
Host
.CheckUserArg(args.LossFunction != null, nameof(args.LossFunction), "Loss function must be specified.");
358
_evaluator = new RegressionEvaluator(
Host
, evalArgs);
363
Host
.CheckValue(schema, nameof(schema));
364
Host
.CheckParam(schema.Label.HasValue, nameof(schema), "Schema must contain a label column");
368
var scoreCol = EvaluateUtils.GetScoreColumn(
Host
, schema.Schema, ScoreCol, nameof(Arguments.ScoreColumn),