8 instantiations of LinearBinaryModelParameters
Microsoft.ML.StandardTrainers (8)
Standard\LinearModelParameters.cs (2)
486
var predictor = new
LinearBinaryModelParameters
(env, ctx);
520
return new
LinearBinaryModelParameters
(Host, in weights, bias);
Standard\LogisticRegression\LogisticRegression.cs (1)
457
new
LinearBinaryModelParameters
(Host, in weights, bias, _stats),
Standard\Online\AveragedPerceptron.cs (1)
148
return new
LinearBinaryModelParameters
(ParentHost, in weights, bias);
Standard\Online\LinearSvm.cs (1)
264
return new
LinearBinaryModelParameters
(ParentHost, Weights, Bias);
Standard\SdcaBinary.cs (3)
1536
return new
LinearBinaryModelParameters
(Host, in maybeSparseWeights, bias[0]);
1824
var predictor = new
LinearBinaryModelParameters
(Host, in maybeSparseWeights, bias[0]);
2225
return new
LinearBinaryModelParameters
(Host, in maybeSparseWeights, bias);
79 references to LinearBinaryModelParameters
Microsoft.ML.IntegrationTests (2)
IntrospectiveTraining.cs (1)
237
var
linearModel = model.LastTransformer.Model;
Prediction.cs (1)
69
var newModel = new TransformerChain<BinaryPredictionTransformer<CalibratedModelParametersBase<
LinearBinaryModelParameters
, PlattCalibrator>>>(transformers.ToArray());
Microsoft.ML.Mkl.Components (3)
SymSgdClassificationTrainer.cs (3)
32
using TPredictor = CalibratedModelParametersBase<
LinearBinaryModelParameters
, PlattCalibrator>;
258
var
predictor = new LinearBinaryModelParameters(Host, in maybeSparseWeights, bias);
259
return new ParameterMixingCalibratedModelParameters<
LinearBinaryModelParameters
, PlattCalibrator>(Host, predictor, new PlattCalibrator(Host, -1, 0));
Microsoft.ML.PerformanceTests (5)
KMeansAndLogisticRegressionBench.cs (1)
19
public CalibratedModelParametersBase<
LinearBinaryModelParameters
, PlattCalibrator> TrainKMeansAndLR()
Text\MultiClassClassification.cs (4)
40
var environment = EnvironmentFactory.CreateClassificationEnvironment<TextLoader, OneHotEncodingTransformer, AveragedPerceptronTrainer,
LinearBinaryModelParameters
>();
71
var environment = EnvironmentFactory.CreateClassificationEnvironment<TextLoader, OneHotEncodingTransformer, AveragedPerceptronTrainer,
LinearBinaryModelParameters
>();
115
var environment = EnvironmentFactory.CreateClassificationEnvironment<TextLoader, OneHotEncodingTransformer, AveragedPerceptronTrainer,
LinearBinaryModelParameters
>();
126
var environment = EnvironmentFactory.CreateClassificationEnvironment<TextLoader, OneHotEncodingTransformer, AveragedPerceptronTrainer,
LinearBinaryModelParameters
>();
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 (49)
Standard\LinearModelParameters.cs (6)
24
[assembly: LoadableClass(typeof(IPredictorProducing<float>), typeof(
LinearBinaryModelParameters
), null, typeof(SignatureLoadModel),
26
LinearBinaryModelParameters
.LoaderSignature)]
439
loaderAssemblyName: typeof(
LinearBinaryModelParameters
).Assembly.FullName);
486
var
predictor = new LinearBinaryModelParameters(env, ctx);
492
return new ParameterMixingCalibratedModelParameters<
LinearBinaryModelParameters
, ICalibrator>(env, predictor, calibrator);
493
return new SchemaBindableCalibratedModelParameters<
LinearBinaryModelParameters
, ICalibrator>(env, predictor, calibrator);
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\Online\AveragedPerceptron.cs (6)
71
public sealed class AveragedPerceptronTrainer : AveragedLinearTrainer<BinaryPredictionTransformer<
LinearBinaryModelParameters
>,
LinearBinaryModelParameters
>
129
public override
LinearBinaryModelParameters
CreatePredictor()
217
private protected override BinaryPredictionTransformer<
LinearBinaryModelParameters
> MakeTransformer(
LinearBinaryModelParameters
model, DataViewSchema trainSchema)
218
=> new BinaryPredictionTransformer<
LinearBinaryModelParameters
>(Host, model, trainSchema, FeatureColumn.Name);
Standard\Online\LinearSvm.cs (6)
65
public sealed class LinearSvmTrainer : OnlineLinearTrainer<BinaryPredictionTransformer<
LinearBinaryModelParameters
>,
LinearBinaryModelParameters
>
260
public override
LinearBinaryModelParameters
CreatePredictor()
337
private protected override BinaryPredictionTransformer<
LinearBinaryModelParameters
> MakeTransformer(
LinearBinaryModelParameters
model, DataViewSchema trainSchema)
338
=> new BinaryPredictionTransformer<
LinearBinaryModelParameters
>(Host, model, trainSchema, FeatureColumn.Name);
Standard\SdcaBinary.cs (23)
1439
/// (1) <see cref="SdcaNonCalibratedBinaryTrainer"/> supports general loss functions and returns <see cref="
LinearBinaryModelParameters
"/>.
1442
/// where <see langword="TSubModel"/> is <see cref="
LinearBinaryModelParameters
"/> and <see langword="TCalibrator "/> is <see cref="PlattCalibrator"/>.
1525
private protected
LinearBinaryModelParameters
CreateLinearBinaryModelParameters(VBuffer<float>[] weights, float[] bias)
1587
SdcaBinaryTrainerBase<CalibratedModelParametersBase<
LinearBinaryModelParameters
, PlattCalibrator>>
1613
private protected override CalibratedModelParametersBase<
LinearBinaryModelParameters
, PlattCalibrator> CreatePredictor(VBuffer<float>[] weights, float[] bias)
1615
var
linearModel = CreateLinearBinaryModelParameters(weights, bias);
1617
return new ParameterMixingCalibratedModelParameters<
LinearBinaryModelParameters
, PlattCalibrator>(Host, linearModel, calibrator);
1677
public sealed class SdcaNonCalibratedBinaryTrainer : SdcaBinaryTrainerBase<
LinearBinaryModelParameters
>
1741
/// <see cref="CreatePredictor"/> directly outputs a <see cref="
LinearBinaryModelParameters
"/> built from
1744
private protected override
LinearBinaryModelParameters
CreatePredictor(VBuffer<float>[] weights, float[] bias)
1824
var
predictor = new LinearBinaryModelParameters(Host, in maybeSparseWeights, bias[0]);
1827
return new ParameterMixingCalibratedModelParameters<
LinearBinaryModelParameters
, PlattCalibrator>(Host, predictor, new PlattCalibrator(Host, -1, 0));
2211
/// <returns>A model built upon weights and bias. It can be as simple as a <see cref="
LinearBinaryModelParameters
"/>.</returns>
2215
/// A helper function used to create <see cref="
LinearBinaryModelParameters
"/> in implementations of <see cref="CreateModel(VBuffer{float}, float)"/>.
2217
private protected
LinearBinaryModelParameters
CreateLinearBinaryModelParameters(VBuffer<float> weights, float bias)
2264
SgdBinaryTrainerBase<CalibratedModelParametersBase<
LinearBinaryModelParameters
, PlattCalibrator>>
2313
private protected override CalibratedModelParametersBase<
LinearBinaryModelParameters
, PlattCalibrator> CreateModel(VBuffer<float> weights, float bias)
2316
var
subModel = CreateLinearBinaryModelParameters(weights, bias);
2320
return new ParameterMixingCalibratedModelParameters<
LinearBinaryModelParameters
, PlattCalibrator>(Host, subModel, calibrator);
2351
SgdBinaryTrainerBase<
LinearBinaryModelParameters
>
2397
private protected override
LinearBinaryModelParameters
CreateModel(VBuffer<float> weights, float bias)
2458
var
subModel = CreateLinearBinaryModelParameters(weights, bias);
2463
return new ParameterMixingCalibratedModelParameters<
LinearBinaryModelParameters
, PlattCalibrator>(Host, subModel, calibrator);
Microsoft.ML.Tests (19)
CalibratedModelParametersTests.cs (2)
34
var castedModel = loadedModel as BinaryPredictionTransformer<CalibratedModelParametersBase<
LinearBinaryModelParameters
, PlattCalibrator>>;
38
Type expectedInternalType = typeof(ParameterMixingCalibratedModelParameters<
LinearBinaryModelParameters
, PlattCalibrator>);
PermutationFeatureImportanceTests.cs (2)
354
var castedModel = loadedModel as BinaryPredictionTransformer<CalibratedModelParametersBase<
LinearBinaryModelParameters
, PlattCalibrator>>;
428
var castedModel = loadedModel as BinaryPredictionTransformer<CalibratedModelParametersBase<
LinearBinaryModelParameters
, PlattCalibrator>>;
TrainerEstimators\CalibratorEstimators.cs (3)
114
Transformer = ((TransformerChain<BinaryPredictionTransformer<
LinearBinaryModelParameters
>>)transformer).LastTransformer as BinaryPredictionTransformer<
LinearBinaryModelParameters
>,
124
public BinaryPredictionTransformer<
LinearBinaryModelParameters
> Transformer { get; set; }
TrainerEstimators\LbfgsTests.cs (12)
64
var transformerChain = pipe.Fit(dataView) as TransformerChain<BinaryPredictionTransformer<CalibratedModelParametersBase<
LinearBinaryModelParameters
, PlattCalibrator>>>;
65
var
linearModel = transformerChain.LastTransformer.Model.SubModel as
LinearBinaryModelParameters
;
90
var transformer = pipe.Fit(dataView) as TransformerChain<BinaryPredictionTransformer<CalibratedModelParametersBase<
LinearBinaryModelParameters
, PlattCalibrator>>>;
92
var
linearModel = transformer.LastTransformer.Model.SubModel as
LinearBinaryModelParameters
;
94
Action<
LinearBinaryModelParameters
> validateStats = (modelParameters) =>
128
var lastTransformer = ((TransformerChain<ITransformer>)transformerChain).LastTransformer as BinaryPredictionTransformer<CalibratedModelParametersBase<
LinearBinaryModelParameters
, PlattCalibrator>>;
131
linearModel = model.SubModel as
LinearBinaryModelParameters
;
148
var result = ModelFileUtils.LoadPredictorOrNull(Env, fs) as CalibratedModelParametersBase<
LinearBinaryModelParameters
, PlattCalibrator>;
149
var
subPredictor = result?.SubModel as
LinearBinaryModelParameters
;