コード例 #1
0
ファイル: Tools.Misc.cs プロジェクト: sishui198/Accord.NET
 /// <summary>
 ///   Standardizes column data, removing the empirical standard deviation from each variable.
 /// </summary>
 ///
 /// <remarks>This method does not remove the empirical mean prior to execution.</remarks>
 ///
 /// <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[][] Standardize(this double[][] matrix, bool inPlace = false)
 {
     return(Standardize(matrix, Measures.StandardDeviation(matrix), inPlace));
 }
コード例 #2
0
ファイル: Tools.Misc.cs プロジェクト: sishui198/Accord.NET
 /// <summary>
 ///   Standardizes column data, removing the empirical standard deviation from each variable.
 /// </summary>
 ///
 /// <remarks>This method does not remove the empirical mean prior to execution.</remarks>
 ///
 /// <param name="values">An array of double precision floating-point numbers.</param>
 /// <param name="inPlace">True to perform the operation in place,
 ///   altering the original input matrix.</param>
 ///
 public static double[] Standardize(this double[] values, bool inPlace = false)
 {
     return(Standardize(values, Measures.StandardDeviation(values), inPlace));
 }
コード例 #3
0
ファイル: Tools.Misc.cs プロジェクト: sishui198/Accord.NET
 /// <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)));
 }
コード例 #4
0
ファイル: Tools.Misc.cs プロジェクト: sishui198/Accord.NET
 /// <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));
 }
コード例 #5
0
ファイル: Tools.Misc.cs プロジェクト: mastercs999/fn-trading
 /// <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));
 }