I’ve imported a dataset from CSV into Ruby as an array of arrays (each row is an array). I want to normalize each column from 0 to 1. Therefore, I have to find the max and min of each column. Is there an easy way to do this? Or do I have to parse each column value out of each row?
Thanks!
You can use
Array#transposeto make the inner arrays be the columns, then useEnumerable#minand#maxto get your values.or something like this