NAME

get_matrix_row_stats_2 - Computes mean, and covariance matrix rows

SYNOPSIS

#include "m/m_mat_stat.h"

Example compile flags (system dependent):
  -DLINUX_X86_64 -DLINUX_X86_64_OPTERON  -DGNU_COMPILER 
   -I/home/kobus/include
   -L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
  -lKJB                               -lfftw3  -lgsl -lgslcblas -ljpeg  -lSVM -lstdc++                    -lpthread -lSLATEC -lg2c    -lacml -lacml_mv -lblas -lg2c      -lncursesw 


int get_matrix_row_stats_2
(
	const Matrix *mp,
	Vector **mean_vpp,
	Matrix **cov_mpp
);

DESCRIPTION

This routine computes the means and covariance of the rows of a matrix and puts the result into the vectors pointed to by *mean_vpp and *cov_mpp respetively. If we are respecting missing values, then they are excluded from the average. If all values for a colum are missing then the average is set to DBL_MISSING. If either the maean or the covariance is not needed, then mean_vpp or cov_mpp can be NULL. If *mean_vpp is not NULL then a vector of the appropriate size is created. If it is the wrong size, it is resized. Finally, if it is the right size, then the storage is recycled, as is. If *cov_mpp is NULL, then a matrix of the appropriate size is created. If it is the wrong size, it is resized. Finally, if it is the right size, then the storage is recycled, as is.

RETURNS

NO_ERROR on success, and ERROR on failure, with an error message being set.

DISCLAIMER

This software is not adequatedly tested. It is recomended that results are checked independantly where appropriate.

AUTHOR

Kobus Barnard

DOCUMENTER

Kobus Barnard

SEE ALSO

average_matrix_vector_rows , average_matrix_rows , average_matrix_rows_without_missing , average_matrix_rows_without_negatives , sum_matrix_rows , ow_sum_matrix_rows , sum_matrix_rows_without_missing , sum_matrix_rows_without_negatives , get_matrix_row_stats , average_matrix_cols , average_matrix_cols_without_missing , average_matrix_cols_without_negatives , sum_matrix_cols , sum_matrix_cols_without_missing , sum_matrix_cols_without_negatives , get_fixed_clustering_of_3D_data , get_fixed_cluster_average_of_3D_data , average_matrix_vector_elements , is_matrix_row_stochastic