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