@ Override public double [ ] transform ( double [ ] x ) { if ( x . length != scale . length ) { throw new IllegalArgumentException ( String . format ( "Invalid vector size %d, expected %d" , x . length , scale . length ) ) ; } double [ ] y = copy ? new double [ x . length ] : x ; for ( int i = 0 ; i < x . length ; i ++ ) { y [ i ] = x [ i ] / scale [ i ] ; } return y ; }
Scales each feature by its maximum absolute value .