/// <summary> /// Generates the Standard Scores, also known as Z-Scores, from the given data. /// </summary> /// /// <param name="matrix">A number multi-dimensional array containing the matrix values.</param> /// /// <returns>The Z-Scores for the matrix.</returns> /// public static double[][] ZScores(this double[][] matrix) { double[] mean = Measures.Mean(matrix, dimension: 0); return(ZScores(matrix, mean, Measures.StandardDeviation(matrix, mean))); }
/// <summary> /// Centers column data, subtracting the empirical mean from each variable. /// </summary> /// /// <param name="matrix">A matrix where each column represent a variable and each row represent a observation.</param> /// <param name="inPlace">True to perform the operation in place, altering the original input matrix.</param> /// public static double[][] Center(this double[][] matrix, bool inPlace = false) { return(Center(matrix, Measures.Mean(matrix, dimension: 0), inPlace)); }
/// <summary> /// Centers column data, subtracting the empirical mean from each variable. /// </summary> /// /// <param name="matrix">A matrix where each column represent a variable and each row represent a observation.</param> /// <param name="inPlace">True to perform the operation in place, altering the original input matrix.</param> /// public static double[,] Center(this double[,] matrix, bool inPlace = false) { return(Center(matrix, Measures.Mean(matrix), inPlace)); }