-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Conversion of Whitening Transform to estimator with pigstensions #1452
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
Merged
Merged
Changes from 35 commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
371c802
opening new pr
artidoro 72a2d69
moving file
artidoro d6cb65f
return back
artidoro 61774cb
move it
artidoro 49ca333
moving it back
artidoro 0d8220a
fixing some issues
artidoro 1eda6d2
added more tests
artidoro ce7553f
adding summary comments
artidoro 201225c
unused usings
artidoro 4dce5ba
Merge branch 'master' of https://github.com/dotnet/machinelearning in…
artidoro cfa256f
merging with master required a small change
artidoro a677d0c
correcting comments
artidoro dc6cb96
change precision for x86
artidoro 7b86ad5
merge
artidoro 7d7ae63
fixing review comments
artidoro 652ab2d
fixing review comments and making training into static method
artidoro 8434722
renaming to vectorwhiteningestimator and adding it to mlcontext
artidoro 3f622df
merge
artidoro 0e82095
prevent training on empty data
artidoro adaa7cd
turn on hosted mac
artidoro fb3be27
remove wine quality dataset from build download
artidoro 80481ff
remove the hosted mac change as that will come in another pr
artidoro c4c004f
remove winequality change as this will come in another pr
artidoro f0157ac
Update src/Microsoft.ML.Transforms/WhiteningTransform.cs
wschin 3b9e385
Update src/Microsoft.ML.Transforms/WhiteningTransform.cs
wschin 6eed55a
Update src/Microsoft.ML.Transforms/WhiteningTransform.cs
wschin f9441b4
Update src/Microsoft.ML.Transforms/WhiteningTransform.cs
wschin 4e38239
review comments
artidoro a51f016
Merge branch 'whitening' of https://github.com/artidoro/machinelearni…
artidoro 609d4c2
review comments
artidoro 143ebfb
Merge branch 'master' of https://github.com/dotnet/machinelearning in…
artidoro 23eb3b1
completed merge
artidoro 51c2fde
Update src/Microsoft.ML.Transforms/WhiteningTransform.cs
wschin 4bb83fe
Merge branch 'master' of https://github.com/dotnet/machinelearning in…
artidoro 44f8891
updating code
artidoro 180f715
review comments
artidoro 9931da8
Merge branch 'master' of https://github.com/dotnet/machinelearning in…
artidoro d8c2d30
Merge branch 'master' of https://github.com/dotnet/machinelearning in…
artidoro 4ea9c7a
review comment
artidoro c8488a7
reduce precision
artidoro cd1ea46
adjusting precision
artidoro 39dbcb7
adjusting precision
artidoro e98ca69
merge
artidoro 528aa74
adjust precision to initial value 4
artidoro f8c39d4
review comments
artidoro File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,5 +32,30 @@ public static RandomFourierFeaturizingEstimator CreateRandomFourierFeatures(this | |
/// <param name="columns">The input columns to use for the transformation.</param> | ||
public static RandomFourierFeaturizingEstimator CreateRandomFourierFeatures(this TransformsCatalog.ProjectionTransforms catalog, params RffTransform.ColumnInfo[] columns) | ||
=> new RandomFourierFeaturizingEstimator(CatalogUtils.GetEnvironment(catalog), columns); | ||
|
||
/// <include file='doc.xml' path='doc/members/member[@name="Whitening"]/*'/> | ||
/// <param name="catalog">The transform's catalog.</param> | ||
/// <param name="env">The environment.</param> | ||
/// <param name="inputColumn">Name of the input column.</param> | ||
/// <param name="outputColumn">Name of the column resulting from the transformation of <paramref name="inputColumn"/>. Null means <paramref name="inputColumn"/> is replaced. </param> | ||
/// <param name="kind">Whitening kind (PCA/ZCA).</param> | ||
/// <param name="eps">Whitening constant, prevents division by zero.</param> | ||
/// <param name="maxRows">Maximum number of rows used to train the transform.</param> | ||
/// <param name="saveInverse">Whether to save inverse (recovery) matrix.</param> | ||
/// <param name="pcaNum">In case of PCA whitening, indicates the number of components to retain.</param> | ||
public static VectorWhiteningEstimator VectorWhiten(this TransformsCatalog.ProjectionTransforms catalog, IHostEnvironment env, string inputColumn, string outputColumn, | ||
WhiteningKind kind = VectorWhiteningTransform.Defaults.Kind, | ||
float eps = VectorWhiteningTransform.Defaults.Eps, | ||
int maxRows = VectorWhiteningTransform.Defaults.MaxRows, | ||
bool saveInverse = VectorWhiteningTransform.Defaults.SaveInverse, | ||
int pcaNum = VectorWhiteningTransform.Defaults.PcaNum) | ||
=> new VectorWhiteningEstimator(CatalogUtils.GetEnvironment(catalog), inputColumn, outputColumn, kind, eps, maxRows, saveInverse, pcaNum); | ||
|
||
/// <include file='doc.xml' path='doc/members/member[@name="Whitening"]/*'/> | ||
/// <param name="catalog">The transform's catalog.</param> | ||
/// <param name="env">The environment.</param> | ||
/// <param name="columns"> Describes the parameters of the whitening process for each column pair.</param> | ||
public static VectorWhiteningEstimator VectorWhiten(this TransformsCatalog.ProjectionTransforms catalog, IHostEnvironment env, params VectorWhiteningTransform.ColInfo[] columns) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
drop it. Use |
||
=> new VectorWhiteningEstimator(env, columns); | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
167 changes: 0 additions & 167 deletions
167
src/Microsoft.ML.Transforms/WrappedWhiteningTransformer.cs
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#@ TextLoader{ | ||
#@ sep=tab | ||
#@ col=whitened1:R4:0-10 | ||
#@ col=whitened2:R4:11-15 | ||
#@ } | ||
-2.604605 0.829638362 -0.5992434 0.19860521 1.33247662 0.369197041 -0.5760094 -0.5490271 -1.94509208 -0.393351972 0.507488966 1.75005662 -0.546613038 2.462052 1.32538271 -0.57087183 | ||
-0.5923902 -0.324390084 -0.114805378 0.6855182 -1.055579 0.8767955 -0.0392023772 1.21807373 -0.160801888 -0.47570774 -2.22817 0.7284955 -0.8200103 0.4638015 -1.0152092 0.3444226 | ||
-0.9132714 -0.911281645 1.814283 0.07471426 -0.8969923 -1.44387519 -1.19571114 -0.6542767 0.887983143 -0.4604767 -0.17543222 0.0112341344 0.913079262 -0.134250313 -0.118262529 -1.16476536 | ||
0.236966148 1.004758 -0.233154371 0.3862052 -1.02724624 0.240614042 0.299898773 -1.03102541 -1.13852251 -0.6675951 0.766793966 0.490669161 -0.489173561 -0.5981086 1.18466234 1.05758965 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
you don't need this. you use catalog to get it. #Closed