question: public static double [ ] normalizeZscore ( double [ ] x ) { double mn = mean ( x , 0 ) ; double sd = standardDeviation ( x , 0 ) ; for ( int i = 0 ; i < x . length ; i ++ ) if ( ! Double . isNaN ( x [ i ] ) ) x [ i ] = ( x [ i ] - mn ) / sd ; return x ; }
target:  Calcualtes x_i = (x_i - mean(x)) / std(x) This function can deal with NaNs