2 writes to Host
Microsoft.ML.Data (2)
Evaluators\EvaluatorBase.cs (2)
484Host = env.Register("PerInstanceRowMapper"); 496Host = env.Register("PerInstanceRowMapper");
57 references to Host
Microsoft.ML.Data (57)
Evaluators\BinaryClassifierEvaluator.cs (16)
1066using (var ch = Host.Start("Finding Input Columns")) 1092throw Host.ExceptParam(nameof(schema), "Did not find the probability column '{0}'", _probCol); 1098Host.CheckDecode(!string.IsNullOrEmpty(_probCol) || _useRaw); 1099Host.CheckDecode(FloatUtils.IsFinite(_threshold)); 1144Host.Assert(_useRaw); 1150Host.Assert(LabelIndex >= 0); 1151Host.Assert(ScoreIndex >= 0); 1152Host.Assert(_probIndex >= 0 || _useRaw); 1260Host.AssertNonEmpty(ScoreCol); 1261Host.AssertValueOrNull(_probCol); 1262Host.AssertNonEmpty(LabelCol); 1266throw Host.ExceptSchemaMismatch(nameof(schema), "label", LabelCol, "Single, Double, Boolean or a Key with cardinality 2", t.ToString()); 1270throw Host.ExceptSchemaMismatch(nameof(schema), "score", ScoreCol, "Single", t.ToString()); 1274Host.Assert(!string.IsNullOrEmpty(_probCol)); 1277throw Host.ExceptSchemaMismatch(nameof(schema), "probability", _probCol, "Single", t.ToString()); 1280throw Host.Except("Cannot compute the predicted label from the probability column because it does not exist");
Evaluators\ClusteringEvaluator.cs (4)
612Host.CheckDecode(_numClusters > 0); 637Host.Assert(_numClusters > 0); 753Host.AssertNonEmpty(ScoreCol); 757throw Host.ExceptSchemaMismatch(nameof(schema), "score", ScoreCol, "known-size vector of Single", type.ToString());
Evaluators\EvaluatorBase.cs (5)
489throw Host.ExceptSchemaMismatch(nameof(schema), "label", LabelCol); 491throw Host.ExceptSchemaMismatch(nameof(schema), "score", ScoreCol); 505throw Host.ExceptSchemaMismatch(nameof(schema), "label", LabelCol); 507throw Host.ExceptSchemaMismatch(nameof(schema), "score", ScoreCol); 545throw Host.ExceptNotSupp();
Evaluators\MulticlassClassificationEvaluator.cs (9)
650Host.CheckDecode(_numClasses > 0); 679Host.CheckValue(ctx, nameof(ctx)); 689Host.Assert(_numClasses > 0); 697Host.Assert(ScoreIndex >= 0); 698Host.Assert(LabelIndex >= 0); 857Host.AssertNonEmpty(ScoreCol); 858Host.AssertNonEmpty(LabelCol); 862throw Host.ExceptSchemaMismatch(nameof(schema), "score", ScoreCol, "Vector of two or more items of type Single", schema[ScoreIndex].Type.ToString()); 865throw Host.ExceptSchemaMismatch(nameof(schema), "label", LabelCol, "Single or Key", labelType.ToString());
Evaluators\MultiOutputRegressionEvaluator.cs (6)
462Host.Assert(LabelIndex >= 0); 463Host.Assert(ScoreIndex >= 0); 546Host.AssertNonEmpty(ScoreCol); 547Host.AssertNonEmpty(LabelCol); 551throw Host.ExceptSchemaMismatch(nameof(schema), "label", LabelCol, "known-size vector of Single or Double", schema[LabelIndex].Type.ToString()); 560throw Host.ExceptSchemaMismatch(nameof(schema), "score", ScoreCol, "known-size vector of Single", schema[ScoreIndex].Type.ToString());
Evaluators\QuantileRegressionEvaluator.cs (11)
287Host.CheckParam(scoreSize > 0, nameof(scoreSize), "must be greater than 0"); 289throw Host.ExceptParam(nameof(quantiles), "buffer must be dense"); 291throw Host.ExceptParam(nameof(quantiles), "buffer must be of length '{0}'", scoreSize); 309Host.CheckDecode(_scoreSize > 0); 338Host.Assert(_scoreSize > 0); 382Host.Assert(LabelIndex >= 0); 383Host.Assert(ScoreIndex >= 0); 444Host.AssertNonEmpty(ScoreCol); 445Host.AssertNonEmpty(LabelCol); 449throw Host.ExceptSchemaMismatch(nameof(schema), "label", LabelCol, "Single", t.ToString()); 454throw Host.ExceptSchemaMismatch(nameof(schema), "score", ScoreCol, "known-size vector of Single or Double", t.ToString());
Evaluators\RegressionEvaluator.cs (6)
271Host.Assert(LabelIndex >= 0); 272Host.Assert(ScoreIndex >= 0); 325Host.AssertNonEmpty(ScoreCol); 326Host.AssertNonEmpty(LabelCol); 330throw Host.ExceptSchemaMismatch(nameof(schema), "label", LabelCol, "Single", t.ToString()); 334throw Host.ExceptSchemaMismatch(nameof(schema), "score", ScoreCol, "Single", t.ToString());