246 references to PredictionKind
Microsoft.ML.Core (2)
Prediction\IPredictor.cs (1)
43PredictionKind PredictionKind { get; }
Prediction\ITrainer.cs (1)
54PredictionKind PredictionKind { get; }
Microsoft.ML.Data (23)
DataLoadSave\TransformerChain.cs (6)
300if (predictor.PredictionKind == PredictionKind.BinaryClassification) 303else if (predictor.PredictionKind == PredictionKind.MulticlassClassification) 308else if (predictor.PredictionKind == PredictionKind.Clustering) 311else if (predictor.PredictionKind == PredictionKind.Regression) 314else if (predictor.PredictionKind == PredictionKind.AnomalyDetection) 317else if (predictor.PredictionKind == PredictionKind.Ranking)
Dirty\ModelParametersBase.cs (2)
69PredictionKind IPredictor.PredictionKind => PredictionKind; 72private protected abstract PredictionKind PredictionKind { get; }
Prediction\Calibrator.cs (1)
209PredictionKind IPredictor.PredictionKind => ((IPredictorProducing<float>)SubModel).PredictionKind;
Prediction\IModelCombiner.cs (1)
10internal delegate void SignatureModelCombiner(PredictionKind kind);
Scorers\FeatureContributionCalculation.cs (1)
117public PredictionKind PredictionKind => Predictor.PredictionKind;
Scorers\SchemaBindablePredictorWrapper.cs (9)
364case PredictionKind.BinaryClassification: 366case PredictionKind.MulticlassClassification: 368case PredictionKind.Regression: 370case PredictionKind.MultiOutputRegression: 372case PredictionKind.Ranking: 374case PredictionKind.AnomalyDetection: 376case PredictionKind.Clustering: 494if (Predictor.PredictionKind != PredictionKind.BinaryClassification) 495ch.Warning("Scoring predictor of kind '{0}' as '{1}'.", Predictor.PredictionKind, PredictionKind.BinaryClassification);
Training\TrainerEstimatorBase.cs (2)
52PredictionKind ITrainer.PredictionKind => PredictionKind; 55private protected abstract PredictionKind PredictionKind { get; }
Training\TrainerUtils.cs (1)
403public PredictionKind PredictionKind { get; }
Microsoft.ML.Ensemble (53)
PipelineEnsemble.cs (8)
236public override PredictionKind PredictionKind 241return PredictionKind.Regression; 243return PredictionKind.AnomalyDetection; 264public override PredictionKind PredictionKind 269return PredictionKind.MulticlassClassification; 296public override PredictionKind PredictionKind { get { return PredictionKind.BinaryClassification; } } 399public abstract PredictionKind PredictionKind { get; }
Selector\SubModelSelector\AllSelector.cs (2)
21protected override PredictionKind PredictionKind => PredictionKind.BinaryClassification;
Selector\SubModelSelector\AllSelectorMulticlass.cs (2)
23protected override PredictionKind PredictionKind => PredictionKind.MulticlassClassification;
Selector\SubModelSelector\BaseSubModelSelector.cs (7)
19protected abstract PredictionKind PredictionKind { get; } 61case PredictionKind.BinaryClassification: 63case PredictionKind.Regression: 65case PredictionKind.MulticlassClassification: 107case PredictionKind.BinaryClassification: 118case PredictionKind.Regression: 124case PredictionKind.MulticlassClassification:
Selector\SubModelSelector\BestDiverseSelectorBinary.cs (2)
48protected override PredictionKind PredictionKind => PredictionKind.BinaryClassification;
Selector\SubModelSelector\BestDiverseSelectorMulticlass.cs (2)
40protected override PredictionKind PredictionKind => PredictionKind.MulticlassClassification;
Selector\SubModelSelector\BestDiverseSelectorRegression.cs (2)
46protected override PredictionKind PredictionKind => PredictionKind.Regression;
Selector\SubModelSelector\BestPerformanceRegressionSelector.cs (2)
51protected override PredictionKind PredictionKind => PredictionKind.Regression;
Selector\SubModelSelector\BestPerformanceSelector.cs (2)
51protected override PredictionKind PredictionKind => PredictionKind.BinaryClassification;
Selector\SubModelSelector\BestPerformanceSelectorMulticlass.cs (2)
47protected override PredictionKind PredictionKind => PredictionKind.MulticlassClassification;
Trainer\Binary\EnsembleTrainer.cs (4)
75private EnsembleTrainer(IHostEnvironment env, Arguments args, PredictionKind predictionKind) 78Host.CheckParam(predictionKind == PredictionKind.BinaryClassification, nameof(PredictionKind)); 81private protected override PredictionKind PredictionKind => PredictionKind.BinaryClassification;
Trainer\EnsembleDistributionModelParameters.cs (3)
53private protected override PredictionKind PredictionKind { get; } 63internal EnsembleDistributionModelParameters(IHostEnvironment env, PredictionKind kind, 76PredictionKind = (PredictionKind)ctx.Reader.ReadInt32();
Trainer\EnsembleModelParameters.cs (3)
47private protected override PredictionKind PredictionKind { get; } 57internal EnsembleModelParameters(IHostEnvironment env, PredictionKind kind, 68PredictionKind = (PredictionKind)ctx.Reader.ReadInt32();
Trainer\EnsembleTrainerBase.cs (2)
72PredictionKind ITrainer.PredictionKind => PredictionKind; 73private protected abstract PredictionKind PredictionKind { get; }
Trainer\Multiclass\EnsembleMulticlassModelParameters.cs (2)
108private protected override PredictionKind PredictionKind => PredictionKind.MulticlassClassification;
Trainer\Multiclass\MulticlassDataPartitionEnsembleTrainer.cs (4)
82private MulticlassDataPartitionEnsembleTrainer(IHostEnvironment env, Arguments args, PredictionKind predictionKind) 85Host.CheckParam(predictionKind == PredictionKind.MulticlassClassification, nameof(PredictionKind)); 88private protected override PredictionKind PredictionKind => PredictionKind.MulticlassClassification;
Trainer\Regression\RegressionEnsembleTrainer.cs (4)
70private RegressionEnsembleTrainer(IHostEnvironment env, Arguments args, PredictionKind predictionKind) 73Host.CheckParam(predictionKind == PredictionKind.Regression, nameof(PredictionKind)); 76private protected override PredictionKind PredictionKind => PredictionKind.Regression;
Microsoft.ML.EntryPoints (5)
PermutationFeatureImportance.cs (4)
68if (predictor.PredictionKind == PredictionKind.BinaryClassification) 70else if (predictor.PredictionKind == PredictionKind.MulticlassClassification) 72else if (predictor.PredictionKind == PredictionKind.Regression) 74else if (predictor.PredictionKind == PredictionKind.Ranking)
ScoreColumnSelector.cs (1)
73if (input.PredictorModel.Predictor.PredictionKind == PredictionKind.BinaryClassification)
Microsoft.ML.FastTree (58)
FastTree.cs (13)
897private protected readonly PredictionKind PredictionKind; 930PredictionKind kind, int[] categoricalFeatureIndices, bool categoricalSplit) 956float maxLabel, bool diskTranspose, bool noFlocks, int minDocsPerLeaf, PredictionKind kind, 975float maxLabel, bool diskTranspose, bool noFlocks, PredictionKind kind, int[] categoricalFeatureIndices, bool categoricalSplit) 1266public DiskImpl(RoleMappedData data, IHost host, int maxBins, float maxLabel, PredictionKind kind, 1276double[][] binUpperBounds, float maxLabel, PredictionKind kind, int[] categoricalFeatureIndices, bool categoricalSplit) 1605if (PredictionKind == PredictionKind.Ranking) 1760bool noFlocks, PredictionKind kind, int[] categoricalFeatureIndices, bool categoricalSplit) 1782PredictionKind kind, IParallelTraining parallelTraining, int[] categoricalFeatureIndices, bool categoricalSplit) 1792bool noFlocks, PredictionKind kind, int[] categoricalFeatureIndices, bool categoricalSplit) 1822if (PredictionKind == PredictionKind.Ranking) 2744public Dataset FindBinsAndReturnDataset(RoleMappedData data, PredictionKind kind, IParallelTraining parallelTraining, 2762public Dataset GetCompatibleDataset(RoleMappedData data, PredictionKind kind, int[] categoricalFeatures, bool categoricalSplit)
FastTreeClassification.cs (4)
100private protected override PredictionKind PredictionKind => PredictionKind.BinaryClassification; 182private protected override PredictionKind PredictionKind => PredictionKind.BinaryClassification;
FastTreeRanking.cs (4)
82private protected override PredictionKind PredictionKind => PredictionKind.Ranking; 1074private protected override PredictionKind PredictionKind => PredictionKind.Ranking;
FastTreeRegression.cs (4)
73private protected override PredictionKind PredictionKind => PredictionKind.Regression; 525private protected override PredictionKind PredictionKind => PredictionKind.Regression;
FastTreeTweedie.cs (4)
75private protected override PredictionKind PredictionKind => PredictionKind.Regression; 561private protected override PredictionKind PredictionKind => PredictionKind.Regression;
GamClassification.cs (4)
79private protected override PredictionKind PredictionKind => PredictionKind.BinaryClassification; 200private protected override PredictionKind PredictionKind => PredictionKind.BinaryClassification;
GamModelParameters.cs (2)
902case PredictionKind.BinaryClassification: 904case PredictionKind.Regression:
GamRegression.cs (4)
75private protected override PredictionKind PredictionKind => PredictionKind.Regression; 150private protected override PredictionKind PredictionKind => PredictionKind.Regression;
RandomForestClassification.cs (4)
89private protected override PredictionKind PredictionKind => PredictionKind.BinaryClassification; 175private protected override PredictionKind PredictionKind => PredictionKind.BinaryClassification;
RandomForestRegression.cs (4)
216private protected override PredictionKind PredictionKind => PredictionKind.Regression; 310private protected override PredictionKind PredictionKind => PredictionKind.Regression;
TreeEnsemble\TreeEnsembleCombiner.cs (11)
19private readonly PredictionKind _kind; 21public TreeEnsembleCombiner(IHostEnvironment env, PredictionKind kind) 26case PredictionKind.BinaryClassification: 27case PredictionKind.Regression: 28case PredictionKind.Ranking: 32throw _host.ExceptUserArg(nameof(kind), $"Tree ensembles can be either of type {nameof(PredictionKind.BinaryClassification)}, " + 33$"{nameof(PredictionKind.Regression)} or {nameof(PredictionKind.Ranking)}"); 102case PredictionKind.BinaryClassification: 109case PredictionKind.Regression: 111case PredictionKind.Ranking:
Microsoft.ML.KMeansClustering (4)
KMeansModelParameters.cs (2)
51private protected override PredictionKind PredictionKind => PredictionKind.Clustering;
KMeansPlusPlusTrainer.cs (2)
163private protected override PredictionKind PredictionKind => PredictionKind.Clustering;
Microsoft.ML.LightGbm (18)
LightGbmBinaryTrainer.cs (4)
57private protected override PredictionKind PredictionKind => PredictionKind.BinaryClassification; 123private protected override PredictionKind PredictionKind => PredictionKind.BinaryClassification;
LightGbmMulticlassTrainer.cs (3)
69private protected override PredictionKind PredictionKind => PredictionKind.MulticlassClassification; 337ch.Assert(PredictionKind == PredictionKind.MulticlassClassification);
LightGbmRankingTrainer.cs (4)
54private protected override PredictionKind PredictionKind => PredictionKind.Ranking; 112private protected override PredictionKind PredictionKind => PredictionKind.Ranking;
LightGbmRegressionTrainer.cs (4)
52private protected override PredictionKind PredictionKind => PredictionKind.Regression; 115private protected override PredictionKind PredictionKind => PredictionKind.Regression;
LightGbmTrainerBase.cs (3)
554if (PredictionKind == PredictionKind.Ranking) 728ch.Assert(((ITrainer)this).PredictionKind != PredictionKind.MulticlassClassification || GbmOptions.ContainsKey("num_class"), 773if (PredictionKind == PredictionKind.Ranking)
Microsoft.ML.Mkl.Components (4)
OlsLinearRegression.cs (2)
110private protected override PredictionKind PredictionKind => PredictionKind.Regression;
SymSgdClassificationTrainer.cs (2)
235private protected override PredictionKind PredictionKind => PredictionKind.BinaryClassification;
Microsoft.ML.OnnxConverter (2)
SaveOnnxCommand.cs (2)
359if (rawPred.PredictionKind == PredictionKind.BinaryClassification || rawPred.PredictionKind == PredictionKind.MulticlassClassification)
Microsoft.ML.PCA (4)
PcaTrainer.cs (4)
127private protected override PredictionKind PredictionKind => PredictionKind.AnomalyDetection; 443private protected override PredictionKind PredictionKind => PredictionKind.AnomalyDetection;
Microsoft.ML.Predictor.Tests (14)
TestPredictors.cs (14)
669IModelCombiner combiner = new TreeEnsembleCombiner(Env, PredictionKind.BinaryClassification); 795CombineAndTestEnsembles(dataView, "pe", "oc=average", PredictionKind.BinaryClassification, predictors); 832CombineAndTestEnsembles(dataView, "weightedensemblemulticlass", "oc=multiaverage", PredictionKind.MulticlassClassification, predictors); 835private void CombineAndTestEnsembles(IDataView idv, string name, string options, PredictionKind predictionKind, 852if (predictionKind == PredictionKind.BinaryClassification) 868if (predictionKind == PredictionKind.BinaryClassification) 890var scoreGetter = predictionKind == PredictionKind.MulticlassClassification ? 893var vectorScoreGetter = predictionKind == PredictionKind.MulticlassClassification ? 896var probGetter = predictionKind == PredictionKind.BinaryClassification ? 899var predGetter = predictionKind == PredictionKind.BinaryClassification ? 909scoreGetters[i] = predictionKind == PredictionKind.MulticlassClassification ? 912vectorScoreGetters[i] = predictionKind == PredictionKind.MulticlassClassification ? 915probGetters[i] = predictionKind == PredictionKind.BinaryClassification ? 918predGetters[i] = predictionKind == PredictionKind.BinaryClassification ?
Microsoft.ML.Recommender (4)
MatrixFactorizationPredictor.cs (2)
85PredictionKind IPredictor.PredictionKind => PredictionKind.Recommendation;
MatrixFactorizationTrainer.cs (2)
304PredictionKind ITrainer.PredictionKind => PredictionKind.Recommendation;
Microsoft.ML.StandardTrainers (51)
FactorizationMachine\FactorizationMachineTrainer.cs (2)
180PredictionKind ITrainer.PredictionKind => PredictionKind.BinaryClassification;
FactorizationMachine\FieldAwareFactorizationMachineModelParameters.cs (2)
30private protected override PredictionKind PredictionKind => PredictionKind.BinaryClassification;
LdSvm\LdSvmModelParameters.cs (2)
156private protected override PredictionKind PredictionKind { get { return PredictionKind.BinaryClassification; } }
LdSvm\LdSvmTrainer.cs (2)
178private protected override PredictionKind PredictionKind => PredictionKind.BinaryClassification;
Standard\LinearModelParameters.cs (4)
510private protected override PredictionKind PredictionKind => PredictionKind.BinaryClassification; 586private protected override PredictionKind PredictionKind => PredictionKind.Regression;
Standard\LogisticRegression\LogisticRegression.cs (2)
161private protected override PredictionKind PredictionKind => PredictionKind.BinaryClassification;
Standard\LogisticRegression\MulticlassLogisticRegression.cs (4)
167private protected override PredictionKind PredictionKind => PredictionKind.MulticlassClassification; 447private protected override PredictionKind PredictionKind => PredictionKind.MulticlassClassification;
Standard\MulticlassClassification\MetaMulticlassTrainer.cs (3)
47PredictionKind ITrainer.PredictionKind => PredictionKind; 48private protected PredictionKind PredictionKind => PredictionKind.MulticlassClassification;
Standard\MulticlassClassification\MulticlassNaiveBayesTrainer.cs (4)
78private protected override PredictionKind PredictionKind => PredictionKind.MulticlassClassification; 252private protected override PredictionKind PredictionKind => PredictionKind.MulticlassClassification;
Standard\MulticlassClassification\OneVersusAllTrainer.cs (2)
278private protected override PredictionKind PredictionKind => PredictionKind.MulticlassClassification;
Standard\MulticlassClassification\PairwiseCouplingTrainer.cs (2)
256private protected override PredictionKind PredictionKind => PredictionKind.MulticlassClassification;
Standard\Online\AveragedPerceptron.cs (2)
192private protected override PredictionKind PredictionKind => PredictionKind.BinaryClassification;
Standard\Online\LinearSvm.cs (2)
303private protected override PredictionKind PredictionKind => PredictionKind.BinaryClassification;
Standard\Online\OnlineGradientDescent.cs (2)
166private protected override PredictionKind PredictionKind => PredictionKind.Regression;
Standard\PoissonRegression\PoissonRegression.cs (2)
111private protected override PredictionKind PredictionKind => PredictionKind.Regression;
Standard\SdcaBinary.cs (4)
1457private protected override PredictionKind PredictionKind => PredictionKind.BinaryClassification; 1951private protected override PredictionKind PredictionKind => PredictionKind.BinaryClassification;
Standard\SdcaMulticlass.cs (2)
113private protected override PredictionKind PredictionKind => PredictionKind.MulticlassClassification;
Standard\SdcaRegression.cs (2)
98private protected override PredictionKind PredictionKind => PredictionKind.Regression;
Standard\Simple\SimpleTrainers.cs (6)
61private protected override PredictionKind PredictionKind => PredictionKind.BinaryClassification; 209PredictionKind ITrainer.PredictionKind => PredictionKind.BinaryClassification; 438private protected override PredictionKind PredictionKind => PredictionKind.BinaryClassification;
Microsoft.ML.Vision (4)
ImageClassificationTrainer.cs (4)
460private protected override PredictionKind PredictionKind => PredictionKind.MulticlassClassification; 1380private protected override PredictionKind PredictionKind => PredictionKind.MulticlassClassification;