Skip to content

[MRG + 1] ENH: preprocess: adding a max-normalization option#4695

Merged
GaelVaroquaux merged 4 commits intoscikit-learn:masterfrom
perimosocordiae:patch-1
May 11, 2015
Merged

[MRG + 1] ENH: preprocess: adding a max-normalization option#4695
GaelVaroquaux merged 4 commits intoscikit-learn:masterfrom
perimosocordiae:patch-1

Conversation

@perimosocordiae
Copy link
Copy Markdown
Contributor

I've found that max-normalization is about as common as l1 or l2 normalization in my work, so I added that option to the preprocessing.normalize() function.

@perimosocordiae
Copy link
Copy Markdown
Contributor Author

Ah, older scipy versions don't have a .max() method for CSR matrices. Is there a workaround present in sklearn already, or should I write my own?

@amueller
Copy link
Copy Markdown
Member

amueller commented May 8, 2015

Column-wise max? I guess why not. I think you should use sklearn.utils.min_max_axis.

@perimosocordiae
Copy link
Copy Markdown
Contributor Author

Thanks! Travis is happy now.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I feel like we should raise a ValueError "else". If you could add that and add a test, it would be much appreciated.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Never mind, missed the check above.

@amueller amueller changed the title ENH: preprocess: adding a max-normalization option [MRG + 1] ENH: preprocess: adding a max-normalization option May 11, 2015
@amueller
Copy link
Copy Markdown
Member

lgtm.

@GaelVaroquaux
Copy link
Copy Markdown
Member

LGTM. Merging. Thanks!

GaelVaroquaux added a commit that referenced this pull request May 11, 2015
[MRG + 1] ENH: preprocess: adding a max-normalization option
@GaelVaroquaux GaelVaroquaux merged commit 36df860 into scikit-learn:master May 11, 2015
@perimosocordiae perimosocordiae deleted the patch-1 branch August 25, 2016 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants