-
Notifications
You must be signed in to change notification settings - Fork 1.9k
adding some trainer extensions on the StandardLearners catalog. Correcting namespace, and names #1682
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
…cting namespace, and names.
I see lot of tests failing with different issues, can you take a look on them? #Closed |
/// <param name="labelColumn">The name of the label column.</param> | ||
/// <param name="advancedSettings">A delegate to apply all the advanced arguments to the algorithm.</param> | ||
/// <param name="context">The <see cref="TrainerEstimatorContext"/> for additional input data to training.</param> | ||
public static MatrixFactorizationTrainer MatrixFactorization(this RegressionContext.RegressionTrainers ctx, |
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.
RegressionContext [](start = 74, length = 17)
I don't like this to be part of regression context. #Resolved
WhiteningKind kind = VectorWhiteningTransformer.Defaults.Kind, | ||
float eps = VectorWhiteningTransformer.Defaults.Eps, | ||
int maxRows = VectorWhiteningTransformer.Defaults.MaxRows, | ||
int pcaNum = VectorWhiteningTransformer.Defaults.PcaNum) |
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.
fix indentation #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.
…per classes. Addressing dotnet#1685
@@ -249,7 +250,7 @@ private string GetBuildPrefix() | |||
#endif | |||
} | |||
|
|||
[Fact(Skip = "Execute this test if you want to regenerate the core_manifest and core_ep_list files")] | |||
[Fact] |
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.
[Fact] [](start = 5, length = 9)
revert #Resolved
…o swap names. Adding the Recommendation context.
|
||
/// <summary> | ||
/// Initializes a new instance of <see cref="ValueToKeyMappingEstimator"/>. | ||
/// </summary> |
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.
I think we want to have proper comment with explanation what this extension for other than this. #Closed
|
||
/// <summary> | ||
/// Initializes a new instance of <see cref="ValueToKeyMappingEstimator"/> loading the terms to use from <paramref name="file"/>. | ||
/// </summary> |
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.
same as above. #Closed
|
||
namespace Microsoft.ML | ||
{ | ||
public static class ProjectionCatalog |
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.
out of curiosity, why? #Closed
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.
Thy said "one per assembly" so moved it to the HalLearners catalog.
In reply to: 235497897 [](ancestors = 235497897)
src/Microsoft.ML.PCA/PcaTransform.cs
Outdated
@@ -691,6 +692,10 @@ internal static class Defaults | |||
{ | |||
} | |||
|
|||
/// <summary>Initializes a new instance of <see cref="PrincipalComponentAnalysisEstimator"/>.</summary> |
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.
///
Initializes a new instance of .
[](start = 8, length = 103)
ugh, formating. #Closed
|
||
/// <summary> | ||
/// Initializing a new instance of <see cref="MatrixFactorizationTrainer"/>. | ||
/// </summary> |
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.
can we have better comment for user facing api? #Closed
|
||
/// <summary> | ||
/// Initializes a new instance of <see cref="MultiClassNaiveBayesTrainer"/> | ||
/// </summary> |
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.
Can we have slightly better comments for user facing api? #Closed
/// </summary> | ||
/// <param name="catalog">The transform's catalog.</param> | ||
/// <param name="args">The <see cref="TensorFlowTransform.Arguments"/> specifying the inputs and the settings of the <see cref="TensorFlowEstimator"/>.</param> | ||
/// <param name="tensorFlowModel"></param> |
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.
/// [](start = 8, length = 42)
/// The pre-trained TensorFlow model. #Closed
/// <returns></returns> | ||
public static KeyToBinaryVectorMappingEstimator MapKeyToBinaryVector(this TransformsCatalog.ConversionTransforms catalog, | ||
params KeyToBinaryVectorMappingTransformer.ColumnInfo[] columns) | ||
=> new KeyToBinaryVectorMappingEstimator(CatalogUtils.GetEnvironment(catalog), columns); |
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.
=> new [](start = 8, length = 6)
That difference in => position here and in other method drives my OCD nuts. #Closed
/// </summary> | ||
/// <param name="catalog">The categorical transform's catalog.</param> | ||
/// <param name="columns">The input column.</param> | ||
/// <returns></returns> |
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.
/// [](start = 8, length = 23)
omit #Closed
/// <param name="catalog">The categorical transform's catalog.</param> | ||
/// <param name="inputColumn">The name of the input column of the transformation.</param> | ||
/// <param name="outputColumn">The name of the column produced by the transformation.</param> | ||
/// <returns></returns> |
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.
/// [](start = 8, length = 23)
omit #Closed
|
||
public static class MissingValueReplacerCatalog | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of <see cref="MissingValueReplacingEstimator"/> | ||
/// </summary> |
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.
we need better summary for user facing api. #Closed
this description look odd across all methods in this file. Why it's Refers to: src/Microsoft.ML.Transforms/ExtensionsCatalog.cs:17 in 1c44ea2. [](commit_id = 1c44ea2, deletion_comment = False) |
/// </summary> | ||
/// <param name="catalog">The transform's catalog.</param> | ||
/// <param name="columns"> Describes the parameters of LDA for each column pair.</param> | ||
public static LatentDirichletAllocationEstimator LatentDirichletAllocation(this TransformsCatalog.TextTransforms catalog, params LatentDirichletAllocationTransformer.ColumnInfo[] columns) |
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.
LatentDirichletAllocationEstimator [](start = 22, length = 34)
I think Abhishek moved LDA to separate file yesterday, can you merge and wipe it as well? #Closed
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 is post Abishek's merge. By the way, do we want LDA in text or projections?
In reply to: 235500231 [](ancestors = 235500231)
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.
Sorry, got confused between catalog and static extensions. LDA doesn't make much sense outside of text, we use terminology as words, topics, etc. so Text.
In reply to: 235501427 [](ancestors = 235501427,235500231)
@@ -62,7 +63,7 @@ public void MatrixFactorizationSimpleTrainAndPredict() | |||
var data = reader.Read(new MultiFileSource(GetDataPath(TestDatasets.trivialMatrixFactorization.trainFilename))); | |||
|
|||
// Create a pipeline with a single operator. | |||
var pipeline = new MatrixFactorizationTrainer(mlContext, userColumnName, itemColumnName, labelColumnName, | |||
var pipeline = mlContext.Recommendation().Trainers.MatrixFactorization(userColumnName, itemColumnName, labelColumnName, |
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.
mlContext.Recommendation().Trainers.MatrixFactorization( [](start = 27, length = 56)
why I can do
mlContext.BinaryClassification.Trainers.FastTree
but for recommendaion i need to do
mlContext.Recommendation().Trainers
I'm talking about braces. #Closed
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.
Because RecommendationContext lives in a different assembly and nuget. So it is an extension method to MLContext, rather than a property.
there are no recommendation trainers in ml.net core nuget, no point on having it there and empty. Time series will be the same.
In reply to: 235502233 [](ancestors = 235502233)
@@ -16,7 +15,7 @@ public static class ImageEstimatorsCatalog | |||
/// </summary> | |||
/// <param name="catalog">The transform's catalog.</param> | |||
/// <param name="columns">The name of the columns containing the image paths(first item of the tuple), and the name of the resulting output column (second item of the tuple).</param> | |||
public static ImageGrayscalingEstimator Grayscale(this TransformsCatalog catalog, params (string input, string output)[] columns) | |||
public static ImageGrayscalingEstimator ConvertToGrayscale(this TransformsCatalog catalog, params (string input, string output)[] columns) |
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.
ConvertToGrayscale [](start = 48, length = 18)
Why are we changing the name here? Are we not using the same name as the estimator?
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.
The names of the methods are usually PerformAction. ConvertToGrayscale" felt more informative than "Grayscale"
In reply to: 235503615 [](ancestors = 235503615)
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.
I mean why are we not using ImageGrayScalingEstimator? These are calling the dynamic API, so I don't see why we should change names.
In reply to: 235504239 [](ancestors = 235504239,235503615)
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 is a broader discussion for it here: #1690
I do see your point. As @CESARDELATORRE pointed out, the most correct thing to do would be to call those CreateActionPerformingEstimator.
We chose to go with just the ActionPerforming verb.
In reply to: 235504834 [](ancestors = 235504834,235504239,235503615)
/// </summary> | ||
/// <param name="catalog">The categorical transform's catalog.</param> | ||
/// <param name="catalog">The transform extensions' catalog.</param> |
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.
' [](start = 58, length = 1)
sneaky apostrophe is sneaky.
across whole file. #Closed
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 is fine, no? The extensions are transform extensions; there are many of them. Possession on plural is followed by apos.
In reply to: 236449673 [](ancestors = 236449673)
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.
-Doctor, everyone ignores me, please tell me what to do? In reply to: 441821968 [](ancestors = 441821968) Refers to: docs/code/MlNetCookBook.md:264 in 437e367. [](commit_id = 437e367, deletion_comment = False) |
The last PR addressing #1318.
Closes #1318