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