-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Creation of components through MLContext and cleanup (OneHotHash, Hash, CopyCol, KeyToVector) #2364
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
I have updated this PR with the feedback I received on the other PRs and have fixed it, so now it should be ready for review. #Resolved |
Codecov Report
@@ Coverage Diff @@
## master #2364 +/- ##
=========================================
Coverage ? 71.25%
=========================================
Files ? 785
Lines ? 140785
Branches ? 16088
=========================================
Hits ? 100320
Misses ? 36011
Partials ? 4454
|
test/Microsoft.ML.Tests/Transformers/KeyToVectorEstimatorTests.cs
Outdated
Show resolved
Hide resolved
public readonly int HashBits; | ||
/// <summary> | ||
/// Hashing seed. | ||
/// </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.
nit: we can keep those in one line. ///
Hashing seed.
#Resolved
i actually think this is fine for ctor comment; it seems like most .net ctor comments. For more info, you have already linked to the HashingEstimator, where there is more information available. #Resolved Refers to: src/Microsoft.ML.Data/Transforms/Hashing.cs:1231 in 3a752e3. [](commit_id = 3a752e3, deletion_comment = False) |
/// </summary> | ||
public readonly string Name; | ||
/// <summary> | ||
/// Name of column to transform. If set to <see langword="null"/>, the value of the <cref see="Name"/> will be used as source. |
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.
If set to , the value of the will be used as source. [](start = 45, length = 93)
this does not apply here. #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.
public IRowToRowMapper GetRowToRowMapper(Schema inputSchema) => _transformer.GetRowToRowMapper(inputSchema); | ||
} | ||
|
||
/// <summary> | ||
/// Estimator which takes set of columns and produce for each column indicator array. Use hashing to determine indicator position. | ||
/// Estimator that produces a column of indicator vectors. The mapping between a value and a corresponding index is done through hashing. |
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.
Estimator [](start = 8, length = 9)
#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.
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.
Will take care in my other PR. Here I don't go over KeyToVectorMapping closely. But thanks for looking at this. In reply to: 460774208 [](ancestors = 460774208) Refers to: src/Microsoft.ML.Transforms/KeyToVectorMapping.cs:477 in 3a752e3. [](commit_id = 3a752e3, deletion_comment = False) |
This PR is part of the work outlined in #1798, and focuses on the OneHotHash, Hash, CopyCol, KeyToVector transformers/estimators: