-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Cleaning and Fixing public API for set of learners. #2765
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2765 +/- ##
=========================================
Coverage ? 71.68%
=========================================
Files ? 808
Lines ? 142392
Branches ? 16112
=========================================
Hits ? 102074
Misses ? 35888
Partials ? 4430
|
@@ -223,7 +223,7 @@ private protected override BinaryPredictionTransformer<TPredictor> MakeTransform | |||
=> new BinaryPredictionTransformer<TPredictor>(Host, model, trainSchema, FeatureColumn.Name); | |||
|
|||
/// <summary> | |||
/// Continues the training of a <see cref="SymSgdClassificationTrainer"/> using an already trained <paramref name="modelParameters"/> | |||
/// Continues the training of a <see cref="SymbolicStochasticGradientDescentClassificationTrainer"/> using an already trained <paramref name="modelParameters"/> | |||
/// a <see cref="BinaryPredictionTransformer"/>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what a
means in this sentence? #Resolved
///<summary> The rank of the factor matrices.</summary> | ||
public readonly int ApproximationRank; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ApproximationRank [](start = 28, length = 17)
I'm not sure this one is any way better than previous code. Now you need to initialize new variable. #Resolved
// Define the columns to load | ||
var loader = mlContext.Data.CreateTextLoader( | ||
// Define the columns to read | ||
var reader = mlContext.Data.CreateTextLoader( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reader [](start = 16, length = 6)
nit: if the Name is CreateTextLoader let;s stick with Load. #Resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var loader = mlContext.Data.CreateTextLoader( | ||
// Step 1: Read the data as an IDataView. | ||
// First, we define the reader: specify the data columns and where to find them in the text file. | ||
var reader = mlContext.Data.CreateTextLoader( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reader [](start = 16, length = 6)
load. Artidoro had a whole PR to replace Read with Load.
#Resolved
|
||
// Step 2: Pipeline | ||
// Featurize the text column through the FeaturizeText API. | ||
// Then append a binary classifier, setting the "Label" column as the label of the dataset, and | ||
// the "Features" column produced by FeaturizeText as the features column. | ||
var pipeline = mlContext.Transforms.Text.FeaturizeText("Features", "SentimentText") | ||
.AppendCacheCheckpoint(mlContext) // Add a data-cache step within a pipeline. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Add a data-cache step within a pipeline. [](start = 54, length = 43)
why remove it? #Resolved
// Split it between training and test data | ||
var trainTestData = mlContext.BinaryClassification.TrainTestSplit(data); | ||
// Read the data | ||
var trainData = reader.Load(trainFile); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reader.Load [](start = 28, length = 11)
nit.: revert #Resolved
See my comments in your other PR which also touch OLS. Refers to: src/Microsoft.ML.HalLearners/OlsLinearRegression.cs:50 in 88a14c4. [](commit_id = 88a14c4, deletion_comment = False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR partially addressed #2620
The following learners are addressed in this PR.
MatrixFactorizationTrainer
PriorTrainer
RandomTrainer
SymSgdClassificationTrainer
the following tasks were performed in classes related to above learners.
internal
.