I have an array
data = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};
And I want map Standardize
over the column of the array. I use following code
Composition[
Transpose,
(Standardize /@ #)&,
Transpose][data]
{{-1, 0, 1}, {-1, 0, 1}, {-1, 0, 1}}
Is there a shorter way to get that result?
PS: maybe using of MapThread
, but function Standarize
takes a list as input.
EDIT
I have picked a bad example. Use this example:
data = {{-4, -8, -8}, {-9, 4, 10}, {-3, -9, 0}}
The result I desire:
{{0.4147806779,-0.5068532453,-0.9609876522},{-1.140646864,1.151939194,1.034909779},{0.7258661863,-0.6450859486,-0.0739221271}}