Skip to content
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

Question: Effect of Normalizaing Data wrt L1/L2 norm (sklearn.preprocessing.Normalizer() ) #210

Open
ArshChhabra opened this issue Dec 10, 2024 · 0 comments

Comments

@ArshChhabra
Copy link
Contributor

I was not super sure about normalizing the data wrt L1 and L2 norm (normalize = sklearn.preprocessing.Normalizer(norm='l1'))

The output is x_i/norm(x)^2 for each i \in d. (with L1 norm being absolute sum and L2 norm being euclidean distance) so normalizing data is the same as scaling wrt norm(x)^2. Hence it should have the same effects as scaling and not affect statistical properties nor runtime. Ie we keep it if it helps and remove it if it doesnt. But the problem I see here is that each data point is being scaled by a different value and it is not the same scalar that multiplies every x \in \mathcal(X). Hence, do the regularization effects apply as given below?

Screenshot 2024-12-09 at 7 13 30 PM

My understanding is that the above image holds true and I just wanted to see if it was correct/incorrect. Thank you!!

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

No branches or pull requests

1 participant