I have a numpy array where each cell of a specific row represents a value for a feature. I store all of them in an 100*4 matrix.
A B C
1000 10 0.5
765 5 0.35
800 7 0.09
Any idea how I can normalize rows of this numpy.array where each value is between 0 and 1?
My desired output is:
A B C
1 1 1
0.765 0.5 0.7
0.8 0.7 0.18(which is 0.09/0.5)
Thanks in advance :)
set
is a particular object in Python, and you can't have a set of numpy arrays. Python doesn't have a matrix, but numpy does, and thatmatrix
type isn't the same as a numpyarray/ndarray
(which is itself different from Python'sarray
type, which is not the same as alist
). And none of these are pandasDataFrame
s.. – DSM Apr 15 at 21:58