5 instantiations of PlattCalibrator
Microsoft.ML.Data (5)
Prediction\Calibrator.cs (5)
1502return new PlattCalibrator(Host, slope, offset); 1627return new PlattCalibrator(Host, slope, offset); 1669ICalibrator ICalibratorTrainer.FinishTraining(IChannel ch) => new PlattCalibrator(_host, _slope, _offset); 1736return new PlattCalibrator(env, ctx); 1832PlattCalibrator newCal = new PlattCalibrator(_host, a / calibrators.Count, b / calibrators.Count);
104 references to PlattCalibrator
Microsoft.ML.AutoML (2)
TrainerExtensions\BinaryTrainerExtensions.cs (2)
118LightGbmBinaryTrainer.Options options = TrainerExtensionUtil.CreateLightGbmOptions<LightGbmBinaryTrainer.Options, float, BinaryPredictionTransformer<CalibratedModelParametersBase<LightGbmBinaryModelParameters, PlattCalibrator>>, CalibratedModelParametersBase<LightGbmBinaryModelParameters, PlattCalibrator>>(sweepParams, columnInfo);
Microsoft.ML.Data (21)
Dirty\IniFileUtils.cs (1)
47public static string GetCalibratorEvaluatorIni(string originalIni, PlattCalibrator calibrator)
Prediction\Calibrator.cs (11)
48[assembly: LoadableClass(typeof(PlattCalibrator), null, typeof(SignatureLoadModel), 50PlattCalibrator.LoaderSignature)] 1583var p = PlattCalibrator.PredictProbability(d_i.Score, slope, offset); 1674/// P(x) = 1 / (1 + exp(<see cref="PlattCalibrator.Slope"/> * x + <see cref="PlattCalibrator.Offset"/>) 1688loaderAssemblyName: typeof(PlattCalibrator).Assembly.FullName); 1705/// Initializes a new instance of <see cref="PlattCalibrator"/>. 1731internal static PlattCalibrator Create(IHostEnvironment env, ModelLoadContext ctx) 1826PlattCalibrator cal = calibrator as PlattCalibrator; 1832PlattCalibrator newCal = new PlattCalibrator(_host, a / calibrators.Count, b / calibrators.Count);
Prediction\CalibratorCatalog.cs (9)
15[assembly: LoadableClass(typeof(CalibratorTransformer<PlattCalibrator>), typeof(PlattCalibratorTransformer), null, 337public sealed class PlattCalibratorEstimator : CalibratorEstimatorBase<PlattCalibrator> 357private protected override CalibratorTransformer<PlattCalibrator> Create(IHostEnvironment env, PlattCalibrator calibrator, string scoreColumnName) 366public sealed class FixedPlattCalibratorEstimator : CalibratorEstimatorBase<PlattCalibrator> 394private protected override CalibratorTransformer<PlattCalibrator> Create(IHostEnvironment env, PlattCalibrator calibrator, string scoreColumnName) 401public sealed class PlattCalibratorTransformer : CalibratorTransformer<PlattCalibrator> 405internal PlattCalibratorTransformer(IHostEnvironment env, PlattCalibrator calibrator, string scoreColumnName)
Microsoft.ML.FastTree (27)
FastTreeClassification.cs (9)
131BinaryPredictionTransformer<CalibratedModelParametersBase<FastTreeBinaryModelParameters, PlattCalibrator>>, 132CalibratedModelParametersBase<FastTreeBinaryModelParameters, PlattCalibrator>> 184private protected override CalibratedModelParametersBase<FastTreeBinaryModelParameters, PlattCalibrator> TrainModelCore(TrainContext context) 212var cali = new PlattCalibrator(Host, -1 * _sigmoidParameter, 0); 213return new FeatureWeightsCalibratedModelParameters<FastTreeBinaryModelParameters, PlattCalibrator>(Host, pred, cali); 301private protected override BinaryPredictionTransformer<CalibratedModelParametersBase<FastTreeBinaryModelParameters, PlattCalibrator>> MakeTransformer( 302CalibratedModelParametersBase<FastTreeBinaryModelParameters, PlattCalibrator> model, DataViewSchema trainSchema) 303=> new BinaryPredictionTransformer<CalibratedModelParametersBase<FastTreeBinaryModelParameters, PlattCalibrator>>(Host, model, trainSchema, FeatureColumn.Name); 309public BinaryPredictionTransformer<CalibratedModelParametersBase<FastTreeBinaryModelParameters, PlattCalibrator>> Fit(IDataView trainData, IDataView validationData)
GamClassification.cs (9)
57BinaryPredictionTransformer<CalibratedModelParametersBase<GamBinaryModelParameters, PlattCalibrator>>, 58CalibratedModelParametersBase<GamBinaryModelParameters, PlattCalibrator>> 137private protected override CalibratedModelParametersBase<GamBinaryModelParameters, PlattCalibrator> TrainModelCore(TrainContext context) 142var calibrator = new PlattCalibrator(Host, -1.0 * _sigmoidParameter, 0); 143return new ValueMapperCalibratedModelParameters<GamBinaryModelParameters, PlattCalibrator>(Host, predictor, calibrator); 172private protected override BinaryPredictionTransformer<CalibratedModelParametersBase<GamBinaryModelParameters, PlattCalibrator>> 173MakeTransformer(CalibratedModelParametersBase<GamBinaryModelParameters, PlattCalibrator> model, DataViewSchema trainSchema) 174=> new BinaryPredictionTransformer<CalibratedModelParametersBase<GamBinaryModelParameters, PlattCalibrator>>(Host, model, trainSchema, FeatureColumn.Name); 180public BinaryPredictionTransformer<CalibratedModelParametersBase<GamBinaryModelParameters, PlattCalibrator>> Fit(IDataView trainData, IDataView validationData)
GamModelParameters.cs (2)
882var calibrated = rawPred as CalibratedModelParametersBase<GamBinaryModelParameters, PlattCalibrator>; 887calibrated = rawPred as CalibratedModelParametersBase<GamBinaryModelParameters, PlattCalibrator>;
TreeEnsemble\TreeEnsembleCombiner.cs (4)
55_host.Check(calibrated.WeaklyTypedCalibrator is PlattCalibrator, 59paramA = -((PlattCalibrator)calibrated.WeaklyTypedCalibrator).Slope; 106var cali = new PlattCalibrator(_host, -1, 0); 108return new FeatureWeightsCalibratedModelParameters<FastTreeBinaryModelParameters, PlattCalibrator>(_host, fastTreeModel, cali);
TreeEnsembleFeaturizer.cs (1)
415if (predictor is CalibratedModelParametersBase<FastTreeBinaryModelParameters, PlattCalibrator> calibrated)
Utils\FastTreeIniFileUtils.cs (2)
39if (calibrator is PlattCalibrator) 41string calibratorEvaluatorIni = IniFileUtils.GetCalibratorEvaluatorIni(ini, calibrator as PlattCalibrator);
Microsoft.ML.IntegrationTests (1)
Prediction.cs (1)
69var newModel = new TransformerChain<BinaryPredictionTransformer<CalibratedModelParametersBase<LinearBinaryModelParameters, PlattCalibrator>>>(transformers.ToArray());
Microsoft.ML.LightGbm (11)
LightGbmBinaryTrainer.cs (9)
115BinaryPredictionTransformer<CalibratedModelParametersBase<LightGbmBinaryModelParameters, PlattCalibrator>>, 116CalibratedModelParametersBase<LightGbmBinaryModelParameters, PlattCalibrator>> 253private protected override CalibratedModelParametersBase<LightGbmBinaryModelParameters, PlattCalibrator> CreatePredictor() 258var cali = new PlattCalibrator(Host, -LightGbmTrainerOptions.Sigmoid, 0); 259return new FeatureWeightsCalibratedModelParameters<LightGbmBinaryModelParameters, PlattCalibrator>(Host, pred, cali); 292private protected override BinaryPredictionTransformer<CalibratedModelParametersBase<LightGbmBinaryModelParameters, PlattCalibrator>> 293MakeTransformer(CalibratedModelParametersBase<LightGbmBinaryModelParameters, PlattCalibrator> model, DataViewSchema trainSchema) 294=> new BinaryPredictionTransformer<CalibratedModelParametersBase<LightGbmBinaryModelParameters, PlattCalibrator>>(Host, model, trainSchema, FeatureColumn.Name); 300public BinaryPredictionTransformer<CalibratedModelParametersBase<LightGbmBinaryModelParameters, PlattCalibrator>> Fit(IDataView trainData, IDataView validationData)
LightGbmMulticlassTrainer.cs (2)
223var cali = new PlattCalibrator(Host, -LightGbmTrainerOptions.Sigmoid, 0); 224predictors[i] = new FeatureWeightsCalibratedModelParameters<LightGbmBinaryModelParameters, PlattCalibrator>(Host, pred, cali);
Microsoft.ML.Mkl.Components (2)
SymSgdClassificationTrainer.cs (2)
32using TPredictor = CalibratedModelParametersBase<LinearBinaryModelParameters, PlattCalibrator>; 259return new ParameterMixingCalibratedModelParameters<LinearBinaryModelParameters, PlattCalibrator>(Host, predictor, new PlattCalibrator(Host, -1, 0));
Microsoft.ML.PerformanceTests (1)
KMeansAndLogisticRegressionBench.cs (1)
19public CalibratedModelParametersBase<LinearBinaryModelParameters, PlattCalibrator> TrainKMeansAndLR()
Microsoft.ML.Samples (1)
Dynamic\Trainers\BinaryClassification\PermutationFeatureImportanceLoadFromDisk.cs (1)
41var linearPredictor = (model as TransformerChain<ITransformer>).LastTransformer as BinaryPredictionTransformer<CalibratedModelParametersBase<LinearBinaryModelParameters, PlattCalibrator>>;
Microsoft.ML.StandardTrainers (25)
Standard\LinearModelParameters.cs (1)
565schema, calibrator as PlattCalibrator));
Standard\LinearPredictorUtils.cs (2)
97RoleMappedSchema schema = null, PlattCalibrator calibrator = null) 179RoleMappedSchema schema = null, PlattCalibrator calibrator = null)
Standard\LogisticRegression\LogisticRegression.cs (8)
83BinaryPredictionTransformer<CalibratedModelParametersBase<LinearBinaryModelParameters, PlattCalibrator>>, 84CalibratedModelParametersBase<LinearBinaryModelParameters, PlattCalibrator>> 179private protected override BinaryPredictionTransformer<CalibratedModelParametersBase<LinearBinaryModelParameters, PlattCalibrator>> 180MakeTransformer(CalibratedModelParametersBase<LinearBinaryModelParameters, PlattCalibrator> model, DataViewSchema trainSchema) 181=> new BinaryPredictionTransformer<CalibratedModelParametersBase<LinearBinaryModelParameters, PlattCalibrator>>(Host, model, trainSchema, FeatureColumn.Name); 187public BinaryPredictionTransformer<CalibratedModelParametersBase<LinearBinaryModelParameters, PlattCalibrator>> Fit(IDataView trainData, LinearModelParameters modelParameters) 446private protected override CalibratedModelParametersBase<LinearBinaryModelParameters, PlattCalibrator> CreatePredictor() 456return new ParameterMixingCalibratedModelParameters<LinearBinaryModelParameters, PlattCalibrator>(Host,
Standard\SdcaBinary.cs (14)
1442/// where <see langword="TSubModel"/> is <see cref="LinearBinaryModelParameters"/> and <see langword="TCalibrator "/> is <see cref="PlattCalibrator"/>. 1557/// linear function to a <see cref="PlattCalibrator"/>. 1587SdcaBinaryTrainerBase<CalibratedModelParametersBase<LinearBinaryModelParameters, PlattCalibrator>> 1613private protected override CalibratedModelParametersBase<LinearBinaryModelParameters, PlattCalibrator> CreatePredictor(VBuffer<float>[] weights, float[] bias) 1616var calibrator = new PlattCalibrator(Host, -1, 0); 1617return new ParameterMixingCalibratedModelParameters<LinearBinaryModelParameters, PlattCalibrator>(Host, linearModel, calibrator); 1827return new ParameterMixingCalibratedModelParameters<LinearBinaryModelParameters, PlattCalibrator>(Host, predictor, new PlattCalibrator(Host, -1, 0)); 2238/// linear function to a <see cref="PlattCalibrator"/>. 2264SgdBinaryTrainerBase<CalibratedModelParametersBase<LinearBinaryModelParameters, PlattCalibrator>> 2313private protected override CalibratedModelParametersBase<LinearBinaryModelParameters, PlattCalibrator> CreateModel(VBuffer<float> weights, float bias) 2318var calibrator = new PlattCalibrator(Host, -1, 0); 2320return new ParameterMixingCalibratedModelParameters<LinearBinaryModelParameters, PlattCalibrator>(Host, subModel, calibrator); 2461var calibrator = new PlattCalibrator(Host, -1, 0); 2463return new ParameterMixingCalibratedModelParameters<LinearBinaryModelParameters, PlattCalibrator>(Host, subModel, calibrator);
Microsoft.ML.Tests (13)
CalibratedModelParametersTests.cs (6)
34var castedModel = loadedModel as BinaryPredictionTransformer<CalibratedModelParametersBase<LinearBinaryModelParameters, PlattCalibrator>>; 38Type expectedInternalType = typeof(ParameterMixingCalibratedModelParameters<LinearBinaryModelParameters, PlattCalibrator>); 56var castedModel = loadedModel as BinaryPredictionTransformer<CalibratedModelParametersBase<GamBinaryModelParameters, PlattCalibrator>>; 60Type expectedInternalType = typeof(ValueMapperCalibratedModelParameters<GamBinaryModelParameters, PlattCalibrator>); 79var castedModel = loadedModel as BinaryPredictionTransformer<CalibratedModelParametersBase<FastTreeBinaryModelParameters, PlattCalibrator>>; 83Type expectedInternalType = typeof(FeatureWeightsCalibratedModelParameters<FastTreeBinaryModelParameters, PlattCalibrator>);
PermutationFeatureImportanceTests.cs (2)
354var castedModel = loadedModel as BinaryPredictionTransformer<CalibratedModelParametersBase<LinearBinaryModelParameters, PlattCalibrator>>; 428var castedModel = loadedModel as BinaryPredictionTransformer<CalibratedModelParametersBase<LinearBinaryModelParameters, PlattCalibrator>>;
TrainerEstimators\LbfgsTests.cs (4)
64var transformerChain = pipe.Fit(dataView) as TransformerChain<BinaryPredictionTransformer<CalibratedModelParametersBase<LinearBinaryModelParameters, PlattCalibrator>>>; 90var transformer = pipe.Fit(dataView) as TransformerChain<BinaryPredictionTransformer<CalibratedModelParametersBase<LinearBinaryModelParameters, PlattCalibrator>>>; 128var lastTransformer = ((TransformerChain<ITransformer>)transformerChain).LastTransformer as BinaryPredictionTransformer<CalibratedModelParametersBase<LinearBinaryModelParameters, PlattCalibrator>>; 148var result = ModelFileUtils.LoadPredictorOrNull(Env, fs) as CalibratedModelParametersBase<LinearBinaryModelParameters, PlattCalibrator>;
TrainerEstimators\TreeEstimators.cs (1)
378((FeatureWeightsCalibratedModelParameters<LightGbmBinaryModelParameters, PlattCalibrator>)predictor).Calibrator.Slope == -sigmoid));