From b106fa1e3abb4deec16b6e876a787a717ae8c573 Mon Sep 17 00:00:00 2001 From: Zeeshan Siddiqui Date: Sun, 3 Mar 2019 14:31:04 -0800 Subject: [PATCH] PR feedback. --- .../Dynamic/PermutationFeatureImportance/PFIHelper.cs | 1 - .../SymbolicStochasticGradientDescentWithOptions.cs | 2 +- .../Trainers/Regression/OrdinaryLeastSquaresWithOptions.cs | 2 +- .../ComputeLRTrainingStdThroughHal.cs | 2 +- src/Microsoft.ML.Mkl.Components/MklComponentsCatalog.cs | 2 +- src/Microsoft.ML.Mkl.Components/OlsLinearRegression.cs | 4 ++-- .../SymSgdClassificationTrainer.cs | 4 ++-- test/BaselineOutput/Common/EntryPoints/core_ep-list.tsv | 4 ++-- test/Microsoft.ML.Core.Tests/UnitTests/TestEntryPoints.cs | 1 - test/Microsoft.ML.Functional.Tests/Validation.cs | 2 +- test/Microsoft.ML.Predictor.Tests/TestPredictors.cs | 1 - .../Scenarios/Api/Estimators/SimpleTrainAndPredict.cs | 1 - .../TrainerEstimators/OlsLinearRegressionTests.cs | 2 +- .../TrainerEstimators/SymSgdClassificationTests.cs | 2 +- 14 files changed, 13 insertions(+), 17 deletions(-) diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/PermutationFeatureImportance/PFIHelper.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/PermutationFeatureImportance/PFIHelper.cs index 0c1003632ef..8245a76d6eb 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/PermutationFeatureImportance/PFIHelper.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/PermutationFeatureImportance/PFIHelper.cs @@ -3,7 +3,6 @@ using Microsoft.Data.DataView; using Microsoft.ML.Trainers; using Microsoft.ML.SamplesUtils; -using Microsoft.ML.Trainers.Mkl; namespace Microsoft.ML.Samples.Dynamic.PermutationFeatureImportance { diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/SymbolicStochasticGradientDescentWithOptions.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/SymbolicStochasticGradientDescentWithOptions.cs index c8926b6a309..aaa4d637a45 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/SymbolicStochasticGradientDescentWithOptions.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/SymbolicStochasticGradientDescentWithOptions.cs @@ -20,7 +20,7 @@ public static void Example() var split = mlContext.BinaryClassification.TrainTestSplit(data, testFraction: 0.1); // Create data training pipeline var pipeline = mlContext.BinaryClassification.Trainers.SymbolicStochasticGradientDescent( - new ML.Trainers.Mkl.SymSgdClassificationTrainer.Options() + new ML.Trainers.SymSgdClassificationTrainer.Options() { LearningRate = 0.2f, NumberOfIterations = 10, diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/OrdinaryLeastSquaresWithOptions.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/OrdinaryLeastSquaresWithOptions.cs index 0b033cfb409..83c15d700de 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/OrdinaryLeastSquaresWithOptions.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/OrdinaryLeastSquaresWithOptions.cs @@ -1,7 +1,7 @@ using System; using Microsoft.ML.Data; using Microsoft.ML.SamplesUtils; -using Microsoft.ML.Trainers.Mkl; +using Microsoft.ML.Trainers; namespace Microsoft.ML.Samples.Dynamic.Trainers.Regression { diff --git a/src/Microsoft.ML.Mkl.Components/ComputeLRTrainingStdThroughHal.cs b/src/Microsoft.ML.Mkl.Components/ComputeLRTrainingStdThroughHal.cs index df32d632ede..db9cee50a20 100644 --- a/src/Microsoft.ML.Mkl.Components/ComputeLRTrainingStdThroughHal.cs +++ b/src/Microsoft.ML.Mkl.Components/ComputeLRTrainingStdThroughHal.cs @@ -5,7 +5,7 @@ using System; using Microsoft.ML.Data; using Microsoft.ML.Internal.Utilities; -using Microsoft.ML.Trainers.Mkl; +using Microsoft.ML.Trainers; namespace Microsoft.ML.Trainers { diff --git a/src/Microsoft.ML.Mkl.Components/MklComponentsCatalog.cs b/src/Microsoft.ML.Mkl.Components/MklComponentsCatalog.cs index b9e2b691a44..633231505cc 100644 --- a/src/Microsoft.ML.Mkl.Components/MklComponentsCatalog.cs +++ b/src/Microsoft.ML.Mkl.Components/MklComponentsCatalog.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using Microsoft.ML.Data; -using Microsoft.ML.Trainers.Mkl; +using Microsoft.ML.Trainers; using Microsoft.ML.Transforms; namespace Microsoft.ML diff --git a/src/Microsoft.ML.Mkl.Components/OlsLinearRegression.cs b/src/Microsoft.ML.Mkl.Components/OlsLinearRegression.cs index 6e9f82d2997..243aed18fc3 100644 --- a/src/Microsoft.ML.Mkl.Components/OlsLinearRegression.cs +++ b/src/Microsoft.ML.Mkl.Components/OlsLinearRegression.cs @@ -15,7 +15,7 @@ using Microsoft.ML.Internal.Internallearn; using Microsoft.ML.Internal.Utilities; using Microsoft.ML.Model; -using Microsoft.ML.Trainers.Mkl; +using Microsoft.ML.Trainers; [assembly: LoadableClass(OlsLinearRegressionTrainer.Summary, typeof(OlsLinearRegressionTrainer), typeof(OlsLinearRegressionTrainer.Options), new[] { typeof(SignatureRegressorTrainer), typeof(SignatureTrainer), typeof(SignatureFeatureScorerTrainer) }, @@ -29,7 +29,7 @@ [assembly: LoadableClass(typeof(void), typeof(OlsLinearRegressionTrainer), null, typeof(SignatureEntryPointModule), OlsLinearRegressionTrainer.LoadNameValue)] -namespace Microsoft.ML.Trainers.Mkl +namespace Microsoft.ML.Trainers { /// public sealed class OlsLinearRegressionTrainer : TrainerEstimatorBase, OlsLinearRegressionModelParameters> diff --git a/src/Microsoft.ML.Mkl.Components/SymSgdClassificationTrainer.cs b/src/Microsoft.ML.Mkl.Components/SymSgdClassificationTrainer.cs index e58810c83a3..326db9d2839 100644 --- a/src/Microsoft.ML.Mkl.Components/SymSgdClassificationTrainer.cs +++ b/src/Microsoft.ML.Mkl.Components/SymSgdClassificationTrainer.cs @@ -16,7 +16,7 @@ using Microsoft.ML.Internal.Internallearn; using Microsoft.ML.Internal.Utilities; using Microsoft.ML.Model; -using Microsoft.ML.Trainers.Mkl; +using Microsoft.ML.Trainers; using Microsoft.ML.Transforms; [assembly: LoadableClass(typeof(SymSgdClassificationTrainer), typeof(SymSgdClassificationTrainer.Options), @@ -27,7 +27,7 @@ [assembly: LoadableClass(typeof(void), typeof(SymSgdClassificationTrainer), null, typeof(SignatureEntryPointModule), SymSgdClassificationTrainer.LoadNameValue)] -namespace Microsoft.ML.Trainers.Mkl +namespace Microsoft.ML.Trainers { using TPredictor = CalibratedModelParametersBase; diff --git a/test/BaselineOutput/Common/EntryPoints/core_ep-list.tsv b/test/BaselineOutput/Common/EntryPoints/core_ep-list.tsv index 8826efd2693..65318e7b6cf 100644 --- a/test/BaselineOutput/Common/EntryPoints/core_ep-list.tsv +++ b/test/BaselineOutput/Common/EntryPoints/core_ep-list.tsv @@ -62,14 +62,14 @@ Trainers.LogisticRegressionBinaryClassifier Logistic Regression is a method in s Trainers.LogisticRegressionClassifier Logistic Regression is a method in statistics used to predict the probability of occurrence of an event and can be used as a classification algorithm. The algorithm predicts the probability of occurrence of an event by fitting data to a logistical function. Microsoft.ML.Trainers.LogisticRegression TrainMultiClass Microsoft.ML.Trainers.MulticlassLogisticRegression+Options Microsoft.ML.EntryPoints.CommonOutputs+MulticlassClassificationOutput Trainers.NaiveBayesClassifier Train a MultiClassNaiveBayesTrainer. Microsoft.ML.Trainers.MultiClassNaiveBayesTrainer TrainMultiClassNaiveBayesTrainer Microsoft.ML.Trainers.MultiClassNaiveBayesTrainer+Options Microsoft.ML.EntryPoints.CommonOutputs+MulticlassClassificationOutput Trainers.OnlineGradientDescentRegressor Train a Online gradient descent perceptron. Microsoft.ML.Trainers.OnlineGradientDescentTrainer TrainRegression Microsoft.ML.Trainers.OnlineGradientDescentTrainer+Options Microsoft.ML.EntryPoints.CommonOutputs+RegressionOutput -Trainers.OrdinaryLeastSquaresRegressor Train an OLS regression model. Microsoft.ML.Trainers.Mkl.OlsLinearRegressionTrainer TrainRegression Microsoft.ML.Trainers.Mkl.OlsLinearRegressionTrainer+Options Microsoft.ML.EntryPoints.CommonOutputs+RegressionOutput +Trainers.OrdinaryLeastSquaresRegressor Train an OLS regression model. Microsoft.ML.Trainers.OlsLinearRegressionTrainer TrainRegression Microsoft.ML.Trainers.OlsLinearRegressionTrainer+Options Microsoft.ML.EntryPoints.CommonOutputs+RegressionOutput Trainers.PcaAnomalyDetector Train an PCA Anomaly model. Microsoft.ML.Trainers.RandomizedPcaTrainer TrainPcaAnomaly Microsoft.ML.Trainers.RandomizedPcaTrainer+Options Microsoft.ML.EntryPoints.CommonOutputs+AnomalyDetectionOutput Trainers.PoissonRegressor Train an Poisson regression model. Microsoft.ML.Trainers.PoissonRegression TrainRegression Microsoft.ML.Trainers.PoissonRegression+Options Microsoft.ML.EntryPoints.CommonOutputs+RegressionOutput Trainers.StochasticDualCoordinateAscentBinaryClassifier Train an SDCA binary model. Microsoft.ML.Trainers.Sdca TrainBinary Microsoft.ML.Trainers.LegacySdcaBinaryTrainer+Options Microsoft.ML.EntryPoints.CommonOutputs+BinaryClassificationOutput Trainers.StochasticDualCoordinateAscentClassifier The SDCA linear multi-class classification trainer. Microsoft.ML.Trainers.Sdca TrainMultiClass Microsoft.ML.Trainers.SdcaMultiClassTrainer+Options Microsoft.ML.EntryPoints.CommonOutputs+MulticlassClassificationOutput Trainers.StochasticDualCoordinateAscentRegressor The SDCA linear regression trainer. Microsoft.ML.Trainers.Sdca TrainRegression Microsoft.ML.Trainers.SdcaRegressionTrainer+Options Microsoft.ML.EntryPoints.CommonOutputs+RegressionOutput Trainers.StochasticGradientDescentBinaryClassifier Train an Hogwild SGD binary model. Microsoft.ML.Trainers.LegacySgdBinaryTrainer TrainBinary Microsoft.ML.Trainers.LegacySgdBinaryTrainer+Options Microsoft.ML.EntryPoints.CommonOutputs+BinaryClassificationOutput -Trainers.SymSgdBinaryClassifier Train a symbolic SGD. Microsoft.ML.Trainers.Mkl.SymSgdClassificationTrainer TrainSymSgd Microsoft.ML.Trainers.Mkl.SymSgdClassificationTrainer+Options Microsoft.ML.EntryPoints.CommonOutputs+BinaryClassificationOutput +Trainers.SymSgdBinaryClassifier Train a symbolic SGD. Microsoft.ML.Trainers.SymSgdClassificationTrainer TrainSymSgd Microsoft.ML.Trainers.SymSgdClassificationTrainer+Options Microsoft.ML.EntryPoints.CommonOutputs+BinaryClassificationOutput Transforms.ApproximateBootstrapSampler Approximate bootstrap sampling. Microsoft.ML.Transforms.BootstrapSample GetSample Microsoft.ML.Transforms.BootstrapSamplingTransformer+Options Microsoft.ML.EntryPoints.CommonOutputs+TransformOutput Transforms.BinaryPredictionScoreColumnsRenamer For binary prediction, it renames the PredictedLabel and Score columns to include the name of the positive class. Microsoft.ML.EntryPoints.ScoreModel RenameBinaryPredictionScoreColumns Microsoft.ML.EntryPoints.ScoreModel+RenameBinaryPredictionScoreColumnsInput Microsoft.ML.EntryPoints.CommonOutputs+TransformOutput Transforms.BinNormalizer The values are assigned into equidensity bins and a value is mapped to its bin_number/number_of_bins. Microsoft.ML.Data.Normalize Bin Microsoft.ML.Transforms.NormalizeTransform+BinArguments Microsoft.ML.EntryPoints.CommonOutputs+TransformOutput diff --git a/test/Microsoft.ML.Core.Tests/UnitTests/TestEntryPoints.cs b/test/Microsoft.ML.Core.Tests/UnitTests/TestEntryPoints.cs index 8d77152661a..401d2ec545f 100644 --- a/test/Microsoft.ML.Core.Tests/UnitTests/TestEntryPoints.cs +++ b/test/Microsoft.ML.Core.Tests/UnitTests/TestEntryPoints.cs @@ -22,7 +22,6 @@ using Microsoft.ML.Trainers; using Microsoft.ML.Trainers.Ensemble; using Microsoft.ML.Trainers.FastTree; -using Microsoft.ML.Trainers.Mkl; using Microsoft.ML.Transforms; using Microsoft.ML.Transforms.Text; using Microsoft.ML.Transforms.TimeSeries; diff --git a/test/Microsoft.ML.Functional.Tests/Validation.cs b/test/Microsoft.ML.Functional.Tests/Validation.cs index 3a1ec2862f0..68049e0010c 100644 --- a/test/Microsoft.ML.Functional.Tests/Validation.cs +++ b/test/Microsoft.ML.Functional.Tests/Validation.cs @@ -7,7 +7,7 @@ using Microsoft.ML.RunTests; using Microsoft.ML.TestFramework; using Microsoft.ML.Trainers.FastTree; -using Microsoft.ML.Trainers.Mkl; +using Microsoft.ML.Trainers; using Xunit; namespace Microsoft.ML.Functional.Tests diff --git a/test/Microsoft.ML.Predictor.Tests/TestPredictors.cs b/test/Microsoft.ML.Predictor.Tests/TestPredictors.cs index 1caf8cee46f..9b55ff98c78 100644 --- a/test/Microsoft.ML.Predictor.Tests/TestPredictors.cs +++ b/test/Microsoft.ML.Predictor.Tests/TestPredictors.cs @@ -20,7 +20,6 @@ namespace Microsoft.ML.RunTests using Microsoft.ML.TestFramework; using Microsoft.ML.Trainers; using Microsoft.ML.Trainers.FastTree; - using Microsoft.ML.Trainers.Mkl; using Xunit; using Xunit.Abstractions; using TestLearners = TestLearnersBase; diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/SimpleTrainAndPredict.cs b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/SimpleTrainAndPredict.cs index 0cd860975cd..a20354de701 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/SimpleTrainAndPredict.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/SimpleTrainAndPredict.cs @@ -6,7 +6,6 @@ using Microsoft.ML.Data; using Microsoft.ML.RunTests; using Microsoft.ML.Trainers; -using Microsoft.ML.Trainers.Mkl; using Xunit; namespace Microsoft.ML.Tests.Scenarios.Api diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/OlsLinearRegressionTests.cs b/test/Microsoft.ML.Tests/TrainerEstimators/OlsLinearRegressionTests.cs index 10e6fcc493a..f55c6be5691 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/OlsLinearRegressionTests.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/OlsLinearRegressionTests.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Collections.Generic; -using Microsoft.ML.Trainers.Mkl; +using Microsoft.ML.Trainers; using Xunit; namespace Microsoft.ML.Tests.TrainerEstimators diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/SymSgdClassificationTests.cs b/test/Microsoft.ML.Tests/TrainerEstimators/SymSgdClassificationTests.cs index ac56a0e2375..f07f0f180ac 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/SymSgdClassificationTests.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/SymSgdClassificationTests.cs @@ -4,7 +4,7 @@ using System.Linq; using Microsoft.ML.Data; -using Microsoft.ML.Trainers.Mkl; +using Microsoft.ML.Trainers; using Xunit; namespace Microsoft.ML.Tests.TrainerEstimators