SMILX
1.01
|
Common statistical functions. More...
Functions | |
static Type | milx::Math< Type >::Centroid (const vnl_vector< Type > &data) |
Compute the centroid (or the mean) of a data vector. More... | |
static vnl_vector< Type > | milx::Math< Type >::Centroid (const vnl_matrix< Type > &data) |
Compute the centroid (or the mean vector) of a data matrix. More... | |
static Type | milx::Math< Type >::CentroidSize (const vnl_matrix< Type > &data, const vnl_vector< Type > ¢roid, bool norm=false) |
Compute the centroid size or scale for a series of points. More... | |
static vnl_vector< Type > | milx::Math< Type >::Centroid (vtkPoints *points) |
Compute the centroid (or the mean vector) of a data matrix. More... | |
static Type | milx::Math< Type >::CentroidSize (vtkPoints *points, const vnl_vector< Type > ¢roid, bool norm=false) |
Compute the centroid size or scale for a series of points. More... | |
static vnl_matrix< Type > | milx::Math< Type >::CovarianceMatrix (vnl_vector< Type > sourceVector) |
Compute the covariance matrix from a vector. EXPERIMENTAL. More... | |
static vnl_matrix< Type > | milx::Math< Type >::CovarianceMatrix (vnl_vector< Type > sourceVector, vnl_vector< Type > targetVector) |
Compute the covariance matrix between two vectors. EXPERIMENTAL. More... | |
static vnl_matrix< Type > | milx::Math< Type >::CovarianceMatrix (const vnl_matrix< Type > &data, const vnl_vector< Type > ¢roid) |
Compute the covariance matrix from a datamatrix. More... | |
static vnl_matrix< Type > | milx::Math< Type >::CovarianceMatrix (const vnl_matrix< Type > &data) |
Compute the covariance matrix from a datamatrix. More... | |
static vnl_matrix< Type > | milx::Math< Type >::CovarianceMatrix (vtkPoints *points, const vnl_vector< Type > ¢roid) |
Compute the covariance matrix from a datamatrix. More... | |
static Type | milx::Math< Type >::MahalanobisDistance (const vnl_vector< Type > &source, const vnl_vector< Type > &target) |
Compute the Mahalanobis distance between two vectors with an unknown covariance matrix. EXPERIMENTAL. More... | |
static Type | milx::Math< Type >::MahalanobisDistance (const vnl_vector< Type > &target, const vnl_vector< Type > &mean, const vnl_matrix< Type > &invCovMatrix) |
Compute the Mahalanobis distance of a vector to a population. EXPERIMENTAL. More... | |
static Type | milx::Math< Type >::MahalanobisDistance (const vnl_vector< Type > &target, const vnl_vector< Type > &mean, const vnl_matrix< Type > &covMatrix, vnl_matrix< Type > &invCovMatrix) |
Compute the Mahalanobis distance of a vector to a population. EXPERIMENTAL. More... | |
Common statistical functions.
|
static |
Compute the centroid (or the mean) of a data vector.
Sum
then average
Definition at line 177 of file milxMath.h.
|
static |
Compute the centroid (or the mean vector) of a data matrix.
Assumes that the rows contain the observations and the columns contain the variables
Sum
then average
Definition at line 190 of file milxMath.h.
|
static |
Compute the centroid (or the mean vector) of a data matrix.
Assumes that the data matrix rows contain the observations and the columns contain the variables Overloaded for points, which are common in vtkPolyData
Sum
then average
Definition at line 227 of file milxMath.h.
|
static |
Compute the centroid size or scale for a series of points.
norm allows the scale to be average scale per point
Accumulate the squared distance from centroid
Norm and return
Definition at line 206 of file milxMath.h.
|
static |
Compute the centroid size or scale for a series of points.
Overloaded for points, which are common in vtkPolyData norm allows the scale to be average scale per point
Accumulate the squared distance from centroid
Norm and return
Definition at line 244 of file milxMath.h.
|
static |
Compute the covariance matrix from a vector. EXPERIMENTAL.
Use with caution, this member computes the inter-component covariance matrix for the given vector
take outer product and add to matrix
Definition at line 310 of file milxMath.h.
|
static |
Compute the covariance matrix between two vectors. EXPERIMENTAL.
Use with caution, this member computes the inter-component covariance matrix for the given vectors
take outer product and add to matrix
Definition at line 323 of file milxMath.h.
|
static |
Compute the covariance matrix from a datamatrix.
Assumes that the data matrix rows contain the observations and the columns contain the variables. Centroid is removed from each row. The result is a nxn matrix where n is the number of variables The diagonal should contain the variances of the variables
Subtract centroid
take outer product and add to matrix
Definition at line 343 of file milxMath.h.
|
static |
Compute the covariance matrix from a datamatrix.
Assumes that the data matrix rows contain the observations and the columns contain the variables. Centroid is assumed to have removed already. The result is a nxn matrix where n is the number of variables The diagonal should contain the variances of the variables
take outer product and add to matrix
Definition at line 371 of file milxMath.h.
|
static |
Compute the covariance matrix from a datamatrix.
Assumes that the data matrix rows contain the observations and the columns contain the variables. Centroid is removed from each row. The result is a nxn matrix where n is the number of variables The diagonal should contain the variances of the variables Overloaded for points, which are common in vtkPolyData
Subtract centroid
take outer product and add to matrix
Definition at line 393 of file milxMath.h.
|
static |
Compute the Mahalanobis distance between two vectors with an unknown covariance matrix. EXPERIMENTAL.
Mahalanobis distance takes into account the covariance between vectors in estimating the separation between them. Returns squared distance. This version assumes you do not know the covariance matrix, so an approximate one is constructed for matching purposes Vectors should be of the same length
Type 1 Computation (row wise)
Type 3 (column wise)
Type 4 (Cov Mat is 1x1)
Type 5
Type 6
Type 7
Definition at line 423 of file milxMath.h.
|
static |
Compute the Mahalanobis distance of a vector to a population. EXPERIMENTAL.
Mahalanobis distance takes into account the covariance between the population and the vector in estimating the separation between them, so its more robust to outlyers. Returns squared distance. This version assumes you know the inverse covariance matrix of a population. The result of this member depends solely on the order of your covariance matrix
Definition at line 510 of file milxMath.h.
|
static |
Compute the Mahalanobis distance of a vector to a population. EXPERIMENTAL.
Mahalanobis distance takes into account the covariance between the population and the vector in estimating the separation between them, so its more robust to outlyers. Returns squared distance. This version assumes you know the covariance matrix of a population and the inverse covariance matrix is assigned to invCovMatrix The result of this member depends solely on the order of your covariance matrix
Definition at line 530 of file milxMath.h.