2 interfaces inheriting from IPredictorProducing
Microsoft.ML.Core (1)
Prediction\IPredictor.cs (1)
60internal interface IDistPredictorProducing<out TResult, out TResultDistribution> : IPredictorProducing<TResult>
Microsoft.ML.Data (1)
Dirty\PredictorInterfaces.cs (1)
165internal interface IPredictorWithFeatureWeights<out TResult> : IHaveFeatureWeights, IPredictorProducing<TResult>
4 implementations of IPredictorProducing
Microsoft.ML.Data (1)
Dirty\ModelParametersBase.cs (1)
14public abstract class ModelParametersBase<TOutput> : ICanSaveModel, IPredictorProducing<TOutput>
Microsoft.ML.Ensemble (2)
PipelineEnsemble.cs (1)
118private abstract class SchemaBindablePipelineEnsemble<T> : SchemaBindablePipelineEnsembleBase, IPredictorProducing<T>
Trainer\EnsembleModelParametersBase.cs (1)
17IPredictorProducing<TOutput>, ICanSaveInTextFormat, ICanSaveSummary
Microsoft.ML.FastTree (1)
GamClassification.cs (1)
197public sealed class GamBinaryModelParameters : GamModelParametersBase, IPredictorProducing<float>
146 references to IPredictorProducing
Microsoft.ML.Data (55)
DataLoadSave\TransformerChain.cs (12)
301pred = new BinaryPredictionTransformer<IPredictorProducing<float>>(env, predictor as IPredictorProducing<float>, chain.Schema, 304pred = new MulticlassPredictionTransformer<IPredictorProducing<VBuffer<float>>>(env, 305predictor as IPredictorProducing<VBuffer<float>>, chain.Schema, 309pred = new ClusteringPredictionTransformer<IPredictorProducing<VBuffer<float>>>(env, predictor as IPredictorProducing<VBuffer<float>>, chain.Schema, 312pred = new RegressionPredictionTransformer<IPredictorProducing<float>>(env, predictor as IPredictorProducing<float>, chain.Schema, 315pred = new AnomalyPredictionTransformer<IPredictorProducing<float>>(env, predictor as IPredictorProducing<float>, chain.Schema, 318pred = new RankingPredictionTransformer<IPredictorProducing<float>>(env, predictor as IPredictorProducing<float>, chain.Schema,
Prediction\Calibrator.cs (17)
62[assembly: LoadableClass(typeof(CalibratedModelParametersBase), typeof(ValueMapperCalibratedModelParameters<IPredictorProducing<float>, ICalibrator>), null, typeof(SignatureLoadModel), 64ValueMapperCalibratedModelParameters<IPredictorProducing<float>, ICalibrator>.LoaderSignature, "BulkCaliPredExec")] 66[assembly: LoadableClass(typeof(CalibratedModelParametersBase), typeof(FeatureWeightsCalibratedModelParameters<IPredictorProducing<float>, ICalibrator>), null, typeof(SignatureLoadModel), 70[assembly: LoadableClass(typeof(CalibratedModelParametersBase), typeof(ParameterMixingCalibratedModelParameters<IPredictorProducing<float>, ICalibrator>), null, typeof(SignatureLoadModel), 74[assembly: LoadableClass(typeof(CalibratedModelParametersBase), typeof(SchemaBindableCalibratedModelParameters<IPredictorProducing<float>, ICalibrator>), null, typeof(SignatureLoadModel), 75"Schema Bindable Calibrated Predictor", SchemaBindableCalibratedModelParameters<IPredictorProducing<float>, ICalibrator>.LoaderSignature)] 151IPredictorProducing<float> WeaklyTypedSubModel { get; } 206IPredictorProducing<float> IWeaklyTypedCalibratedModelParameters.WeaklyTypedSubModel => (IPredictorProducing<float>)SubModel; 209PredictionKind IPredictor.PredictionKind => ((IPredictorProducing<float>)SubModel).PredictionKind; 219Host.Assert(predictor is IPredictorProducing<float>); 755_bindable = ScoreUtils.GetSchemaBindableMapper(Host, SubModel as IPredictorProducing<float>); 762_bindable = ScoreUtils.GetSchemaBindableMapper(Host, SubModel as IPredictorProducing<float>); 871if (!(predictor is IPredictorProducing<float>)) 937return CreateCalibratedPredictor(env, (IPredictorProducing<float>)predictor, trainedCalibrator); 1027public static IPredictorProducing<float> CreateCalibratedPredictor<TSubPredictor, TCalibrator>(IHostEnvironment env, TSubPredictor predictor, TCalibrator cali) 1028where TSubPredictor : class, IPredictorProducing<float>
Scorers\PredictionTransformer.cs (26)
26[assembly: LoadableClass(typeof(AnomalyPredictionTransformer<IPredictorProducing<float>>), typeof(AnomalyPredictionTransformer), null, typeof(SignatureLoadModel), 29[assembly: LoadableClass(typeof(ClusteringPredictionTransformer<IPredictorProducing<VBuffer<float>>>), typeof(ClusteringPredictionTransformer), null, typeof(SignatureLoadModel), 314/// <typeparam name="TModel">An implementation of the <see cref="IPredictorProducing{TResult}"/></typeparam> 383/// <typeparam name="TModel">An implementation of the <see cref="IPredictorProducing{TResult}"/></typeparam> 475/// <typeparam name="TModel">An implementation of the <see cref="IPredictorProducing{TResult}"/></typeparam> 568/// <typeparam name="TModel">An implementation of the <see cref="IPredictorProducing{TResult}"/></typeparam> 616/// <typeparam name="TModel">An implementation of the <see cref="IPredictorProducing{TResult}"/></typeparam> 664/// <typeparam name="TModel">An implementation of the <see cref="IPredictorProducing{TResult}"/></typeparam> 722var host = Contracts.CheckRef(env, nameof(env)).Register(nameof(BinaryPredictionTransformer<IPredictorProducing<float>>)); 723ctx.LoadModel<IPredictorProducing<float>, SignatureLoadModel>(host, out IPredictorProducing<float> model, DirModel); 739var host = Contracts.CheckRef(env, nameof(env)).Register(nameof(MulticlassPredictionTransformer<IPredictorProducing<VBuffer<float>>>)); 740ctx.LoadModel<IPredictorProducing<VBuffer<float>>, SignatureLoadModel>(host, out IPredictorProducing<VBuffer<float>> model, DirModel); 756var host = Contracts.CheckRef(env, nameof(env)).Register(nameof(RegressionPredictionTransformer<IPredictorProducing<float>>)); 757ctx.LoadModel<IPredictorProducing<float>, SignatureLoadModel>(host, out IPredictorProducing<float> model, DirModel); 774var host = Contracts.CheckRef(env, nameof(env)).Register(nameof(RankingPredictionTransformer<IPredictorProducing<float>>)); 775ctx.LoadModel<IPredictorProducing<float>, SignatureLoadModel>(host, out IPredictorProducing<float> model, DirModel); 785internal static object Create(IHostEnvironment env, ModelLoadContext ctx, IHost host, IPredictorProducing<float> model, Type predictionTransformerType) 796internal static object Create(IHostEnvironment env, ModelLoadContext ctx, IHost host, IPredictorProducing<VBuffer<float>> model, Type predictionTransformerType) 861public static AnomalyPredictionTransformer<IPredictorProducing<float>> Create(IHostEnvironment env, ModelLoadContext ctx) 862=> new AnomalyPredictionTransformer<IPredictorProducing<float>>(env, ctx); 869public static ClusteringPredictionTransformer<IPredictorProducing<VBuffer<float>>> Create(IHostEnvironment env, ModelLoadContext ctx) 870=> new ClusteringPredictionTransformer<IPredictorProducing<VBuffer<float>>>(env, ctx);
Microsoft.ML.Ensemble (44)
EntryPoints\CreateEnsemble.cs (2)
158var ensemble = trainer.CombineModels(input.Models.Select(pm => pm.Predictor as IPredictorProducing<float>)); 190var ensemble = trainer.CombineModels(input.Models.Select(pm => pm.Predictor as IPredictorProducing<float>));
FeatureSubsetModel.cs (3)
14public readonly IPredictorProducing<TOutput> Predictor; 20public FeatureSubsetModel(IPredictorProducing<TOutput> predictor, BitArray features = null, 23if (!(predictor is IPredictorProducing<TOutput> predictorProducing))
OutputCombiners\BaseStacking.cs (6)
25internal abstract IComponentFactory<ITrainerEstimator<ISingleFeaturePredictionTransformer<IPredictorProducing<TOutput>>, IPredictorProducing<TOutput>>> GetPredictorFactory(); 28private protected readonly IComponentFactory<ITrainerEstimator<ISingleFeaturePredictionTransformer<IPredictorProducing<TOutput>>, IPredictorProducing<TOutput>>> BasePredictorType; 30private protected IPredictorProducing<TOutput> Meta; 64ctx.LoadModel<IPredictorProducing<TOutput>, SignatureLoadModel>(env, out Meta, "MetaPredictor");
OutputCombiners\MultiStacking.cs (2)
22using TVectorTrainer = ITrainerEstimator<ISingleFeaturePredictionTransformer<IPredictorProducing<VBuffer<float>>>, IPredictorProducing<VBuffer<float>>>;
OutputCombiners\RegressionStacking.cs (2)
20using TScalarTrainer = ITrainerEstimator<ISingleFeaturePredictionTransformer<IPredictorProducing<float>>, IPredictorProducing<float>>;
OutputCombiners\Stacking.cs (2)
18using TScalarTrainer = ITrainerEstimator<ISingleFeaturePredictionTransformer<IPredictorProducing<float>>, IPredictorProducing<float>>;
Trainer\Binary\EnsembleTrainer.cs (6)
25using TScalarPredictor = IPredictorProducing<Single>; 26using TScalarTrainer = ITrainerEstimator<ISingleFeaturePredictionTransformer<IPredictorProducing<float>>, IPredictorProducing<float>>; 87return new EnsembleModelParameters(Host, PredictionKind, CreateModels<TScalarPredictor>(models), Combiner); 103Host.CheckParam(models.All(m => m is TScalarPredictor), nameof(models)); 105models.Select(k => new FeatureSubsetModel<float>((TScalarPredictor)k)).ToArray(), combiner);
Trainer\EnsembleModelParametersBase.cs (2)
69var predictor = p as IPredictorProducing<TOutput>;
Trainer\EnsembleTrainerBase.cs (7)
53internal abstract IComponentFactory<ITrainerEstimator<ISingleFeaturePredictionTransformer<IPredictorProducing<TOutput>>, IPredictorProducing<TOutput>>>[] GetPredictorFactories(); 64private protected readonly ITrainerEstimator<ISingleFeaturePredictionTransformer<IPredictorProducing<TOutput>>, IPredictorProducing<TOutput>>[] Trainers; 97Trainers = new ITrainerEstimator<ISingleFeaturePredictionTransformer<IPredictorProducing<TOutput>>, IPredictorProducing<TOutput>>[NumModels]; 221private protected static FeatureSubsetModel<TOutput>[] CreateModels<T>(List<FeatureSubsetModel<TOutput>> models) where T : IPredictorProducing<TOutput>
Trainer\Multiclass\MulticlassDataPartitionEnsembleTrainer.cs (6)
26using TVectorPredictor = IPredictorProducing<VBuffer<Single>>; 27using TVectorTrainer = ITrainerEstimator<ISingleFeaturePredictionTransformer<IPredictorProducing<VBuffer<float>>>, IPredictorProducing<VBuffer<float>>>; 92return new EnsembleMulticlassModelParameters(Host, CreateModels<TVectorPredictor>(models), Combiner as IMulticlassOutputCombiner); 98Host.CheckParam(models.All(m => m is TVectorPredictor), nameof(models)); 102models.Select(k => new FeatureSubsetModel<VBuffer<float>>((TVectorPredictor)k)).ToArray(),
Trainer\Regression\RegressionEnsembleTrainer.cs (6)
25using TScalarPredictor = IPredictorProducing<Single>; 26using TScalarTrainer = ITrainerEstimator<ISingleFeaturePredictionTransformer<IPredictorProducing<float>>, IPredictorProducing<float>>; 80return new EnsembleModelParameters(Host, PredictionKind, CreateModels<TScalarPredictor>(models), Combiner); 86Host.CheckParam(models.All(m => m is TScalarPredictor), nameof(models)); 92models.Select(k => new FeatureSubsetModel<float>((TScalarPredictor)k)).ToArray(), combiner);
Microsoft.ML.EntryPoints (9)
ModelOperations.cs (1)
159input.ModelArray.Select(p => p.Predictor as IPredictorProducing<float>).ToArray()))
PermutationFeatureImportance.cs (8)
93var pred = new BinaryPredictionTransformer<IPredictorProducing<float>>( 94env, predictor as IPredictorProducing<float>, roleMappedData.Data.Schema, featureColumnName); 150var pred = new MulticlassPredictionTransformer<IPredictorProducing<VBuffer<float>>>( 151env, predictor as IPredictorProducing<VBuffer<float>>, roleMappedData.Data.Schema, featureColumnName, labelColumnName); 209var pred = new RegressionPredictionTransformer<IPredictorProducing<float>>( 210env, predictor as IPredictorProducing<float>, roleMappedData.Data.Schema, featureColumnName); 262var pred = new RankingPredictionTransformer<IPredictorProducing<float>>( 263env, predictor as IPredictorProducing<float>, roleMappedData.Data.Schema, featureColumnName);
Microsoft.ML.FastTree (7)
FastTreeClassification.cs (2)
35[assembly: LoadableClass(typeof(IPredictorProducing<float>), typeof(FastTreeBinaryModelParameters), null, typeof(SignatureLoadModel), 87internal static IPredictorProducing<float> Create(IHostEnvironment env, ModelLoadContext ctx)
GamClassification.cs (2)
23[assembly: LoadableClass(typeof(IPredictorProducing<float>), typeof(GamBinaryModelParameters), null, typeof(SignatureLoadModel), 234internal static IPredictorProducing<float> Create(IHostEnvironment env, ModelLoadContext ctx)
RandomForestClassification.cs (2)
28[assembly: LoadableClass(typeof(IPredictorProducing<float>), typeof(FastForestBinaryModelParameters), null, typeof(SignatureLoadModel), 106internal static IPredictorProducing<float> Create(IHostEnvironment env, ModelLoadContext ctx)
TreeEnsembleFeaturizer.cs (1)
720if (predictor is CalibratedModelParametersBase<IPredictorProducing<float>, Calibrators.ICalibrator> calibratedModelParametersBase)
Microsoft.ML.LightGbm (4)
LightGbmBinaryTrainer.cs (2)
22[assembly: LoadableClass(typeof(IPredictorProducing<float>), typeof(LightGbmBinaryModelParameters), null, typeof(SignatureLoadModel), 75internal static IPredictorProducing<float> Create(IHostEnvironment env, ModelLoadContext ctx)
LightGbmMulticlassTrainer.cs (2)
219IPredictorProducing<float>[] predictors = new IPredictorProducing<float>[_numberOfClasses];
Microsoft.ML.Predictor.Tests (1)
TestPredictors.cs (1)
671var fastTree = combiner.CombineModels(fastTrees.Select(pm => (IPredictorProducing<float>)pm.Predictor));
Microsoft.ML.StandardTrainers (26)
LdSvm\LdSvmModelParameters.cs (1)
148private static IPredictorProducing<float> Create(IHostEnvironment env, ModelLoadContext ctx)
Standard\LinearModelParameters.cs (2)
24[assembly: LoadableClass(typeof(IPredictorProducing<float>), typeof(LinearBinaryModelParameters), null, typeof(SignatureLoadModel), 481internal static IPredictorProducing<float> Create(IHostEnvironment env, ModelLoadContext ctx)
Standard\MulticlassClassification\MetaMulticlassTrainer.cs (2)
15using TScalarTrainer = ITrainerEstimator<ISingleFeaturePredictionTransformer<IPredictorProducing<float>>, IPredictorProducing<float>>;
Standard\MulticlassClassification\OneVersusAllTrainer.cs (15)
39using TScalarPredictor = IPredictorProducing<float>; 40using TScalarTrainer = ITrainerEstimator<ISingleFeaturePredictionTransformer<IPredictorProducing<float>>, IPredictorProducing<float>>; 154var predictors = new TScalarPredictor[count]; 163private ISingleFeaturePredictionTransformer<TScalarPredictor> TrainOne(IChannel ch, TScalarTrainer trainer, RoleMappedData data, int cls) 185return new BinaryPredictionTransformer<TScalarPredictor>(Host, calibratedModel, trainedData.Data.Schema, transformer.FeatureColumnName); 188return new BinaryPredictionTransformer<TScalarPredictor>(Host, transformer.Model, view.Schema, transformer.FeatureColumnName); 218var predictors = new TScalarPredictor[numClasses]; 298internal static OneVersusAllModelParameters Create(IHost host, OutputFormula outputFormula, TScalarPredictor[] predictors) 338internal static OneVersusAllModelParameters Create(IHost host, bool useProbability, TScalarPredictor[] predictors) 349internal static OneVersusAllModelParameters Create(IHost host, TScalarPredictor[] predictors) 378var predictors = new TScalarPredictor[len]; 390var predictors = new TScalarPredictor[len]; 603internal ImplRaw(TScalarPredictor[] predictors) 852internal ImplSoftmax(TScalarPredictor[] predictors)
Standard\MulticlassClassification\PairwiseCouplingTrainer.cs (2)
28using TScalarTrainer = ITrainerEstimator<ISingleFeaturePredictionTransformer<IPredictorProducing<float>>, IPredictorProducing<float>>;
StandardTrainersCatalog.cs (4)
763if (!(binaryEstimator is ITrainerEstimator<ISingleFeaturePredictionTransformer<IPredictorProducing<float>>, IPredictorProducing<float>> est)) 802if (!(binaryEstimator is ITrainerEstimator<ISingleFeaturePredictionTransformer<IPredictorProducing<float>>, IPredictorProducing<float>> est))