Reputation: 163
Is there a function in any python library by which I can normalize certain columns of a matrix independently? For instance:
1 2 3
1 2 4
1 2 5
if I want a transformation of the above matrix to
1 1 3
1 1 4
1 1 5
i.e normalize the values in the 2nd column.
Thanks in advance.
Upvotes: 0
Views: 50
Reputation: 440
Yes,
You can use np.linalg.norm
https://docs.scipy.org/doc/numpy/reference/generated/numpy.linalg.norm.html
Upvotes: 1