1 write to Regression
Microsoft.ML.Data (1)
MLContext.cs (1)
145Regression = new RegressionCatalog(_env);
196 references to Regression
Microsoft.ML.AutoML (22)
API\RegressionExperiment.cs (2)
400var metrics = _context.Regression.CrossValidate(datasetManager.Dataset, pipeline, fold, metricManager.LabelColumn); 430var metrics = _context.Regression.Evaluate(eval, metricManager.LabelColumn, scoreColumnName: metricManager.ScoreColumn);
AutoMLExperiment\IMetricManager.cs (1)
130var metric = context.Regression.Evaluate(eval, LabelColumn, ScoreColumn);
Experiment\MetricsAgents\RegressionMetricsAgent.cs (1)
66return _mlContext.Regression.Evaluate(data, labelColumn);
SweepableEstimator\Estimators\FastForest.cs (1)
41return context.Regression.Trainers.FastForest(option);
SweepableEstimator\Estimators\FastTree.cs (2)
51return context.Regression.Trainers.FastTree(option); 74return context.Regression.Trainers.FastTreeTweedie(option);
SweepableEstimator\Estimators\Lbfgs.cs (1)
41return context.Regression.Trainers.LbfgsPoissonRegression(option);
SweepableEstimator\Estimators\LightGbm.cs (1)
89return context.Regression.Trainers.LightGbm(option);
SweepableEstimator\Estimators\Sdca.cs (1)
23return context.Regression.Trainers.Sdca(option);
SweepableEstimator\Estimators\SentenceSimilarity.cs (1)
17return context.Regression.Trainers.SentenceSimilarity(
Sweepers\SmacSweeper.cs (1)
129var trainer = _context.Regression.Trainers.FastForest(new FastForestRegressionTrainer.Options()
TrainerExtensions\RegressionTrainerExtensions.cs (8)
27return mlContext.Regression.Trainers.FastForest(options); 49return mlContext.Regression.Trainers.FastTree(options); 71return mlContext.Regression.Trainers.FastTreeTweedie(options); 92return mlContext.Regression.Trainers.LightGbm(options); 113return mlContext.Regression.Trainers.OnlineGradientDescent(options); 135return mlContext.Regression.Trainers.Ols(options); 157return mlContext.Regression.Trainers.LbfgsPoissonRegression(options); 178return mlContext.Regression.Trainers.Sdca(options);
Tuner\SmacTuner.cs (2)
141var trainer = _context.Regression.Trainers.FastForest(new FastForestRegressionTrainer.Options() 151var eval = _context.Regression.Evaluate(test);
Microsoft.ML.AutoML.Samples (1)
AutoFit\RegressionExperiment.cs (1)
40RegressionMetrics testMetrics = mlContext.Regression.Evaluate(testDataViewWithBestScore, labelColumnName: LabelColumnName);
Microsoft.ML.AutoML.Tests (1)
Utils\TaskAgnosticAutoFit.cs (1)
153var regressionMetrics = _context.Regression.Evaluate(result.ScoredTestData, labelColumnName: label);
Microsoft.ML.Fairlearn (2)
Metrics\FairlearnMetricCatalog.cs (2)
229RegressionMetrics metrics = _context.Regression.Evaluate(data, _labelColumn, _scoreColumn); 256RegressionMetrics metrics = _context.Regression.Evaluate(_eval, _labelColumn);
Microsoft.ML.IntegrationTests (30)
Debugging.cs (2)
109.Append(mlContext.Regression.Trainers.Sdca( 176.Append(mlContext.Regression.Trainers.Sdca(
Evaluation.cs (2)
271.Append(mlContext.Regression.Trainers.FastForest(new FastForestRegressionTrainer.Options { NumberOfThreads = 1 })); 278var metrics = mlContext.Regression.Evaluate(scoredData);
Explainability.cs (9)
39.Append(mlContext.Regression.Trainers.FastTree()); 72var permutationMetrics = mlContext.Regression.PermutationFeatureImportance(linearPredictor, transformedData); 97.Append(mlContext.Regression.Trainers.Sdca()); 121.Append(mlContext.Regression.Trainers.FastTree()); 148.Append(mlContext.Regression.Trainers.FastForest()); 175.Append(mlContext.Regression.Trainers.Sdca()); 212.Append(mlContext.Regression.Trainers.FastTree()); 249.Append(mlContext.Regression.Trainers.FastForest()); 287.Append(mlContext.Regression.Trainers.Gam(numberOfIterations: 2));
IntrospectiveTraining.cs (3)
39.Append(mlContext.Regression.Trainers.FastForest( 144.Append(mlContext.Regression.Trainers.Gam( 293.Append(mlContext.Regression.Trainers.FastForest(numberOfLeaves: 5, numberOfTrees: 3));
ModelFiles.cs (2)
49.Append(mlContext.Regression.Trainers.FastTree( 96.Append(mlContext.Regression.Trainers.FastTree(
ONNX.cs (2)
43.Append(mlContext.Regression.Trainers.FastTree( 145.Append(mlContext.Regression.Trainers.Sdca(
Training.cs (2)
321var trainer = mlContext.Regression.Trainers.OnlineGradientDescent( 365var trainer = mlContext.Regression.Trainers.LbfgsPoissonRegression(
Validation.cs (8)
42.Append(mlContext.Regression.Trainers.Ols()); 45var cvResult = mlContext.Regression.CrossValidate(data, pipeline, numberOfFolds: 5); 121var trainedModel = mlContext.Regression.Trainers.FastTree(new FastTreeRegressionTrainer.Options 136var trainMetrics = mlContext.Regression.Evaluate(scoredTrainData); 137var validMetrics = mlContext.Regression.Evaluate(scoredValidData); 155.Append(mlContext.Regression.Trainers.OnlineGradientDescent()); 161var evalResultOneRow = mlContext.Regression.Evaluate(scoredDataOneRow); 167var evalResultZeroRows = mlContext.Regression.Evaluate(scoredDataZeroRows);
Microsoft.ML.Predictor.Tests (2)
TestIniModels.cs (2)
531.Append(mlContext.Regression.Trainers.Gam()); 544var results = mlContext.Regression.Evaluate(data);
Microsoft.ML.Samples (51)
Dynamic\Trainers\Recommendation\MatrixFactorization.cs (1)
64var metrics = mlContext.Regression.Evaluate(transformedData,
Dynamic\Trainers\Recommendation\MatrixFactorizationWithOptions.cs (1)
88var metrics = mlContext.Regression.Evaluate(transformedData,
Dynamic\Trainers\Regression\FastForest.cs (2)
30var pipeline = mlContext.Regression.Trainers.FastForest( 62var metrics = mlContext.Regression.Evaluate(transformedTestData);
Dynamic\Trainers\Regression\FastForestWithOptions.cs (2)
45mlContext.Regression.Trainers.FastForest(options); 75var metrics = mlContext.Regression.Evaluate(transformedTestData);
Dynamic\Trainers\Regression\FastTree.cs (2)
30var pipeline = mlContext.Regression.Trainers.FastTree( 62var metrics = mlContext.Regression.Evaluate(transformedTestData);
Dynamic\Trainers\Regression\FastTreeTweedie.cs (2)
30var pipeline = mlContext.Regression.Trainers.FastTreeTweedie( 62var metrics = mlContext.Regression.Evaluate(transformedTestData);
Dynamic\Trainers\Regression\FastTreeTweedieWithOptions.cs (2)
47mlContext.Regression.Trainers.FastTreeTweedie(options); 77var metrics = mlContext.Regression.Evaluate(transformedTestData);
Dynamic\Trainers\Regression\FastTreeWithOptions.cs (2)
48mlContext.Regression.Trainers.FastTree(options); 78var metrics = mlContext.Regression.Evaluate(transformedTestData);
Dynamic\Trainers\Regression\Gam.cs (2)
30var pipeline = mlContext.Regression.Trainers.Gam( 62var metrics = mlContext.Regression.Evaluate(transformedTestData);
Dynamic\Trainers\Regression\GamWithOptions.cs (2)
43mlContext.Regression.Trainers.Gam(options); 73var metrics = mlContext.Regression.Evaluate(transformedTestData);
Dynamic\Trainers\Regression\LbfgsPoissonRegression.cs (2)
27var pipeline = mlContext.Regression.Trainers. 60var metrics = mlContext.Regression.Evaluate(transformedTestData);
Dynamic\Trainers\Regression\LbfgsPoissonRegressionWithOptions.cs (2)
44mlContext.Regression.Trainers.LbfgsPoissonRegression(options); 74var metrics = mlContext.Regression.Evaluate(transformedTestData);
Dynamic\Trainers\Regression\LightGbm.cs (2)
30var pipeline = mlContext.Regression.Trainers. 63var metrics = mlContext.Regression.Evaluate(transformedTestData);
Dynamic\Trainers\Regression\LightGbmAdvanced.cs (2)
41.Append(mlContext.Regression.Trainers.LightGbm( 62var metrics = mlContext.Regression.Evaluate(
Dynamic\Trainers\Regression\LightGbmWithOptions.cs (2)
52mlContext.Regression.Trainers.LightGbm(options); 82var metrics = mlContext.Regression.Evaluate(transformedTestData);
Dynamic\Trainers\Regression\LightGbmWithOptionsAdvanced.cs (2)
42.Append(mlContext.Regression.Trainers.LightGbm( 71var metrics = mlContext.Regression.Evaluate(
Dynamic\Trainers\Regression\OnlineGradientDescent.cs (2)
27var pipeline = mlContext.Regression.Trainers.OnlineGradientDescent( 55var metrics = mlContext.Regression.Evaluate(transformedTestData);
Dynamic\Trainers\Regression\OnlineGradientDescentWithOptions.cs (2)
44mlContext.Regression.Trainers.OnlineGradientDescent(options); 70var metrics = mlContext.Regression.Evaluate(transformedTestData);
Dynamic\Trainers\Regression\OrdinaryLeastSquares.cs (2)
27var pipeline = mlContext.Regression.Trainers.Ols( 59var metrics = mlContext.Regression.Evaluate(transformedTestData);
Dynamic\Trainers\Regression\OrdinaryLeastSquaresAdvanced.cs (2)
53var pipeline = mlContext.Regression.Trainers.Ols(); 64var metrics = mlContext.Regression.Evaluate(dataWithPredictions);
Dynamic\Trainers\Regression\OrdinaryLeastSquaresWithOptions.cs (2)
41mlContext.Regression.Trainers.Ols(options); 71var metrics = mlContext.Regression.Evaluate(transformedTestData);
Dynamic\Trainers\Regression\OrdinaryLeastSquaresWithOptionsAdvanced.cs (2)
53var pipeline = mlContext.Regression.Trainers.Ols( 68var metrics = mlContext.Regression.Evaluate(dataWithPredictions);
Dynamic\Trainers\Regression\PermutationFeatureImportance.cs (2)
32.Append(mlContext.Regression.Trainers.Ols()); 45var permutationMetrics = mlContext.Regression
Dynamic\Trainers\Regression\PermutationFeatureImportanceLoadFromDisk.cs (2)
34.Append(mlContext.Regression.Trainers.Ols()); 52var permutationMetrics = mlContext.Regression
Dynamic\Trainers\Regression\Sdca.cs (2)
27var pipeline = mlContext.Regression.Trainers.Sdca( 59var metrics = mlContext.Regression.Evaluate(transformedTestData);
Dynamic\Trainers\Regression\SdcaWithOptions.cs (2)
45mlContext.Regression.Trainers.Sdca(options); 75var metrics = mlContext.Regression.Evaluate(transformedTestData);
Dynamic\Transforms\CalculateFeatureContribution.cs (1)
36var linearTrainer = mlContext.Regression.Trainers.Ols();
Microsoft.ML.Samples.OneDal (6)
Program.cs (6)
111var trainer = mlContext.Regression.Trainers.FastForest(options); 116var trainingMetrics = mlContext.Regression.Evaluate(trainingPredictions, labelColumnName: labelName); 118var testingMetrics = mlContext.Regression.Evaluate(testingPredictions, labelColumnName: labelName); 139var trainer = mlContext.Regression.Trainers.Ols(options); 144var trainingMetrics = mlContext.Regression.Evaluate(trainingPredictions, labelColumnName: labelName); 146var testingMetrics = mlContext.Regression.Evaluate(testingPredictions, labelColumnName: labelName);
Microsoft.ML.Tests (79)
FeatureContributionTests.cs (11)
31var model = ML.Regression.Trainers.Ols().Fit(data); 47TestFeatureContribution(ML.Regression.Trainers.Ols(), GetSparseDataset(numberOfInstances: 100), "LeastSquaresRegression"); 53TestFeatureContribution(ML.Regression.Trainers.LightGbm(), GetSparseDataset(numberOfInstances: 100), "LightGbmRegression"); 59TestFeatureContribution(ML.Regression.Trainers.LightGbm(new LightGbmRegressionTrainer.Options() { UseCategoricalSplit = true }), GetOneHotEncodedData(numberOfInstances: 100), "LightGbmRegressionWithCategoricalSplit"); 65TestFeatureContribution(ML.Regression.Trainers.FastTree(), GetSparseDataset(numberOfInstances: 100), "FastTreeRegression"); 71TestFeatureContribution(ML.Regression.Trainers.FastForest(), GetSparseDataset(numberOfInstances: 100), "FastForestRegression"); 77TestFeatureContribution(ML.Regression.Trainers.FastTreeTweedie(), GetSparseDataset(numberOfInstances: 100), "FastTreeTweedieRegression"); 83TestFeatureContribution(ML.Regression.Trainers.Sdca( 90TestFeatureContribution(ML.Regression.Trainers.OnlineGradientDescent(), GetSparseDataset(numberOfInstances: 100), "OnlineGradientDescentRegression"); 96TestFeatureContribution(ML.Regression.Trainers.LbfgsPoissonRegression( 103TestFeatureContribution(ML.Regression.Trainers.Gam(), GetSparseDataset(numberOfInstances: 100), "GAMRegression");
OnnxConversionTest.cs (10)
79.Append(mlContext.Regression.Trainers.Sdca(new SdcaRegressionTrainer.Options() 189mlContext.Regression.Trainers.OnlineGradientDescent("Target","FeatureVector"), 190mlContext.Regression.Trainers.FastForest("Target", "FeatureVector"), 191mlContext.Regression.Trainers.FastTree("Target", "FeatureVector"), 192mlContext.Regression.Trainers.FastTreeTweedie("Target", "FeatureVector"), 193mlContext.Regression.Trainers.LbfgsPoissonRegression("Target", "FeatureVector"), 197estimators.Add(mlContext.Regression.Trainers.Ols("Target", "FeatureVector")); 201estimators.Add(mlContext.Regression.Trainers.LightGbm("Target", "FeatureVector")); 575.Append(mlContext.Regression.Trainers.Sdca(new SdcaRegressionTrainer.Options() 606.Append(mlContext.Regression.Trainers.LightGbm(labelColumnName: "Target", featureColumnName: "FeatureVector", numberOfIterations: 3, numberOfLeaves: 16, minimumExampleCountPerLeaf: 100));
PermutationFeatureImportanceTests.cs (20)
38var model = ML.Regression.Trainers.OnlineGradientDescent().Fit(data); 55pfi = ML.Regression.PermutationFeatureImportance(castedModel, data); 56pfiDict = ml2.Regression.PermutationFeatureImportance(loadedModel, data); 64pfi = ML.Regression.PermutationFeatureImportance(model, data); 65pfiDict = ml2.Regression.PermutationFeatureImportance((ITransformer)model, data); 106var model = ML.Transforms.CopyColumns("Label", "Label").Append(ML.Regression.Trainers.OnlineGradientDescent()).Fit(data); 129pfi = ML.Regression.PermutationFeatureImportance(castedModel, data); 130pfiDict = ml2.Regression.PermutationFeatureImportance(loadedModel, data); 138pfi = ML.Regression.PermutationFeatureImportance(model.LastTransformer, data); 139pfiDict = ml2.Regression.PermutationFeatureImportance(model, data); 180var model = ML.Regression.Trainers.OnlineGradientDescent().Fit(data); 197pfi = ML.Regression.PermutationFeatureImportance(castedModel, data, permutationCount: 20); 198pfiDict = ml2.Regression.PermutationFeatureImportance(loadedModel, data, permutationCount: 20); 206pfi = ML.Regression.PermutationFeatureImportance(model, data, permutationCount: 20); 207pfiDict = ml2.Regression.PermutationFeatureImportance((ITransformer)model, data, permutationCount: 20); 268var model = ML.Regression.Trainers.OnlineGradientDescent().Fit(data); 285results = ML.Regression.PermutationFeatureImportance(castedModel, data); 286pfiDict = ml2.Regression.PermutationFeatureImportance(loadedModel, data); 294results = ML.Regression.PermutationFeatureImportance(model, data); 295pfiDict = ml2.Regression.PermutationFeatureImportance((ITransformer)model, data);
Scenarios\Api\CookbookSamples\CookbookSamplesDynamicApi.cs (7)
181.Append(mlContext.Regression.Trainers.Sdca(labelColumnName: "Target", featureColumnName: "FeatureVector")); 195var metrics = mlContext.Regression.Evaluate(model.Transform(testData), labelColumnName: "Target"); 353.Append(context.Regression.Trainers.FastTree()); 359var featureImportance = context.Regression.PermutationFeatureImportance(model.LastTransformer, transformedData); 393.Append(context.Regression.Trainers.Sdca()); 428.Append(context.Regression.Trainers.FastTree()); 464.Append(context.Regression.Trainers.FastTree(labelColumnName: "MedianHomeValue"));
Scenarios\RegressionTest.cs (2)
37var trainer = context.Regression.Trainers.Sdca(labelColumnName: "Label", featureColumnName: "Features"); 44var metrics = context.Regression.Evaluate(predictions);
TrainerEstimators\LbfgsTests.cs (1)
50var trainer = ML.Regression.Trainers.LbfgsPoissonRegression();
TrainerEstimators\OlsLinearRegressionTests.cs (2)
18var trainer = ML.Regression.Trainers.Ols(new OlsTrainer.Options()); 26trainer = ML.Regression.Trainers.Ols(new OlsTrainer.Options() { CalculateStatistics = false });
TrainerEstimators\OnlineLinearTests.cs (1)
29var ogdTrainer = ML.Regression.Trainers.OnlineGradientDescent();
TrainerEstimators\SdcaTests.cs (1)
39var regressionTrainer = ML.Regression.Trainers.Sdca(
TrainerEstimators\TreeEnsembleFeaturizerTest.cs (16)
456.Append(ML.Regression.Trainers.Sdca("Label", "CombinedFeatures")); 459var metrics = ML.Regression.Evaluate(prediction); 494.Append(ML.Regression.Trainers.Sdca("Label", "CombinedFeatures")); 497var metrics = ML.Regression.Evaluate(prediction); 532.Append(ML.Regression.Trainers.Sdca("Label", "CombinedFeatures")); 535var metrics = ML.Regression.Evaluate(prediction); 570.Append(ML.Regression.Trainers.Sdca("Label", "CombinedFeatures")); 573var metrics = ML.Regression.Evaluate(prediction); 608.Append(ML.Regression.Trainers.Sdca("Label", "CombinedFeatures")); 611var metrics = ML.Regression.Evaluate(prediction); 628var loadedMetrics = ML.Regression.Evaluate(loadedPrediction); 665.Append(ML.Regression.Trainers.Sdca("Label", "CombinedFeatures")); 668var metrics = ML.Regression.Evaluate(prediction); 687var loadedMetrics = ML.Regression.Evaluate(loadedPrediction); 697.Append(ML.Regression.Trainers.Sdca("Label", "CombinedFeatures")); 700var secondMetrics = ML.Regression.Evaluate(secondPrediction);
TrainerEstimators\TreeEstimators.cs (8)
216var trainer = ML.Regression.Trainers.FastTree( 234var trainer = ML.Regression.Trainers.LightGbm(new LightGbmRegressionTrainer.Options 271var trainer = ML.Regression.Trainers.FastTreeTweedie( 290var trainer = ML.Regression.Trainers.FastForest( 909var trainer = ML.Regression.Trainers.FastTree( 927var trainer = ML.Regression.Trainers.FastForest( 945var trainer = ML.Regression.Trainers.FastTreeTweedie( 966var trainer = ML.Regression.Trainers.LightGbm(
Microsoft.ML.TorchSharp.Tests (2)
TextClassificationTests.cs (2)
387var estimator = ML.Regression.Trainers.SentenceSimilarity(sentence1ColumnName: "Sentence", sentence2ColumnName: "Sentence2"); 442var estimator = ML.Regression.Trainers.SentenceSimilarity(options);