Skip to content

implement auto featurizer - #6205

Merged
michaelgsharp merged 7 commits into
dotnet:mainfrom
LittleLittleCloud:u/xiaoyun/implementAutoFeaturizer
Jun 17, 2022
Merged

implement auto featurizer#6205
michaelgsharp merged 7 commits into
dotnet:mainfrom
LittleLittleCloud:u/xiaoyun/implementAutoFeaturizer

Conversation

@LittleLittleCloud

Copy link
Copy Markdown
Member

We are excited to review your PR.

So we can do the best job, please check:

  • There's a descriptive title that will make sense to other developers some time from now.
  • There's associated issues. All PR's should have issue(s) associated - unless a trivial self-evident change such as fixing a typo. You can use the format Fixes #nnnn in your description to cause GitHub to automatically close the issue(s) when your PR is merged.
  • Your change description explains what the change does, why you chose your approach, and anything else that reviewers should know.
  • You have included any necessary tests in the same PR.

@codecov

codecov Bot commented May 25, 2022

Copy link
Copy Markdown

Codecov Report

Merging #6205 (ff9d47e) into main (a2ad53c) will increase coverage by 0.11%.
The diff coverage is 85.00%.

@@            Coverage Diff             @@
##             main    #6205      +/-   ##
==========================================
+ Coverage   68.32%   68.43%   +0.11%     
==========================================
  Files        1101     1141      +40     
  Lines      242236   244678    +2442     
  Branches    25172    25396     +224     
==========================================
+ Hits       165505   167451    +1946     
- Misses      70163    70589     +426     
- Partials     6568     6638      +70     
Flag Coverage Δ
Debug 68.43% <85.00%> (+0.11%) ⬆️
production 62.89% <0.00%> (+0.12%) ⬆️
test 88.99% <89.47%> (+0.16%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/Microsoft.ML.Data/Transforms/Hashing.cs 81.42% <0.00%> (ø)
...soft.ML.Transforms/Text/NgramHashingTransformer.cs 88.35% <0.00%> (ø)
.../Microsoft.ML.AutoML.Tests/GridSearchTunerTests.cs 84.00% <ø> (ø)
...t/Microsoft.ML.AutoML.Tests/AutoFeaturizerTests.cs 85.18% <85.18%> (ø)
test/Microsoft.ML.AutoML.Tests/DatasetUtil.cs 98.98% <100.00%> (+1.26%) ⬆️
src/Microsoft.ML.Maml/MAML.cs 24.36% <0.00%> (-2.54%) ⬇️
...Microsoft.ML.Data/Transforms/MetadataDispatcher.cs 62.32% <0.00%> (-0.84%) ⬇️
...rc/Microsoft.ML.Data/Scorers/RowToRowScorerBase.cs 85.94% <0.00%> (-0.01%) ⬇️
src/Microsoft.ML.TorchSharp/Utils/FileUtils.cs 24.61% <0.00%> (ø)
test/Microsoft.ML.Tests/TextClassificationTests.cs 100.00% <0.00%> (ø)
... and 141 more

@LittleLittleCloud

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 2 pipeline(s).

internal SweepableEstimator[] NumericFeaturizer(string[] outputColumnNames, string[] inputColumnNames)
{
throw new NotImplementedException();
Contracts.Check(outputColumnNames.Count() == inputColumnNames.Count() && outputColumnNames.Count() > 0, "outputColumnNames and inputColumnNames must have the same length and greater than 0");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will blow up if either of those inputs are null. Make sure they aren't null first.


if (overallColumns != null)
{
Contracts.Assert(overallColumns.Count() == overallColumns.Distinct().Count(), "detect overlapping among catalogColumns, numericColumns, textColumns and excludedColumns");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: changed detect overlapping to detected overlapping.

I'm also personally a fan of the oxford comma.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved

}

return pipeline;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: remove extra blank line.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved

/// <param name="columnInformation">column information.</param>
/// <param name="outputColumnName">output feature column.</param>
/// <param name="excludeColumns">columns that won't be included when featurizing, like label</param>
/// <returns></returns>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment for what it returns.

@michaelgsharp
michaelgsharp merged commit b9f8a0a into dotnet:main Jun 17, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Jul 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants