[scikit-learn] Normalizer, l1 and l2 norms

Sole Galli solegalli1 at gmail.com
Tue Sep 24 08:02:25 EDT 2019


Sorry, ignore my question, I got it right now.

It is calculating the norm of the observation vector (across variables),
and its distance varies obs per obs, that is why it needs to be
re-calculated, and therefore not stored.

I would appreciate some articles / links with successful implementations of
this technique and why it adds value to ML. Would you be able to point me
to any?

Cheers

Sole





On Tue, 24 Sep 2019 at 12:39, Sole Galli <solegalli1 at gmail.com> wrote:

> Hello team,
>
> Quick question respect to the Normalizer().
>
> My understanding is that this transformer divides the values (rows) of a
> vector by the vector euclidean (l2) or manhattan distances (l1).
>
> From the sklearn docs, I understand that the Normalizer() does not learn
> the distances from the train set and stores them. It rathers normalises the
> data according to distance the data set presents, which could be or not,
> the same in test and train.
>
> Am I understanding this correctly?
>
> If so, what is the reason not to store these parameters in the Normalizer
> and use them to scale future data?
>
> If not getting it right, what am I missing?
>
> Many thanks and I will appreciate if you have an article on this to share.
>
> Cheers
>
> Sole
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20190924/61a8181f/attachment.html>


More information about the scikit-learn mailing list