Accord.Statistics.Measures.WeightedCovariance C# (CSharp) Method

WeightedCovariance() public static method

Calculates the scatter matrix of a sample matrix.
By dividing the Scatter matrix by the sample size, we get the population Covariance matrix. By dividing by the sample size minus one, we get the sample Covariance matrix.
public static WeightedCovariance ( double matrix, double weights, double means ) : ].double[
matrix double A number multi-dimensional array containing the matrix values.
weights double An unit vector containing the importance of each sample /// in . The sum of this array elements should add up to 1.
means double The mean value of the given values, if already known.
return ].double[
        public static double[,] WeightedCovariance(double[][] matrix, double[] weights, double[] means)
        {
            return WeightedCovariance(matrix, weights, means, dimension: 0);
        }

Same methods

Measures::WeightedCovariance ( double matrix, double weights, double means, int dimension ) : ].double[
Measures::WeightedCovariance ( double matrix, double weights, int dimension ) : ].double[
Measures::WeightedCovariance ( double matrix, int weights, double means, int dimension ) : ].double[
Measures::WeightedCovariance ( double matrix, int weights, int dimension ) : ].double[