pub trait VecVecg<T, U> {
Show 21 methods fn leftmultv(self, v: &[U]) -> Result<Vec<f64>, RE>; fn rightmultv(self, v: &[U]) -> Result<Vec<f64>, RE>; fn matmult(self, m: &[Vec<U>]) -> Result<Vec<Vec<f64>>, RE>; fn wsumv(self, ws: &[U]) -> Vec<f64>; fn wacentroid(self, ws: &[U]) -> Vec<f64>; fn trend(self, eps: f64, v: Vec<Vec<U>>) -> Vec<f64>; fn translate(self, m: &[U]) -> Vec<Vec<f64>>; fn zerogm(self, gm: &[f64]) -> Vec<Vec<f64>>; fn dependencies(self, m: &[U]) -> Vec<f64>; fn correlations(self, m: &[U]) -> Vec<f64>; fn distsum(self, v: &[U]) -> f64; fn dists(self, v: &[U]) -> Vec<f64>; fn wsortedeccs(self, ws: &[U], gm: &[f64]) -> (Vec<f64>, Vec<f64>)
    where
        F64: From<T>
; fn wnxnonmember(self, ws: &[U], g: &[f64]) -> (Vec<f64>, Vec<f64>, f64); fn wgmedian(self, ws: &[U], eps: f64) -> Vec<f64>; fn wgmparts(self, ws: &[U], eps: f64) -> (Vec<f64>, Vec<f64>, f64); fn wmadgm(self, ws: &[U], wgm: &[f64]) -> f64; fn covar(self, med: &[U]) -> Vec<f64>; fn wcovar(self, ws: &[U], m: &[f64]) -> Vec<f64>; fn comed(self, m: &[U]) -> Vec<f64>; fn wcomed(self, ws: &[U], m: &[f64]) -> Vec<f64>;
}
Expand description

Methods applicable to slice of vectors of generic end type, plus one other argument of a similar kind

Required Methods

Leftmultiply (column) vector v by matrix self

Rightmultiply (row) vector v by matrix self

Matrix multiplication self * m

Weighted sum of nd points (or vectors)

Weighted Arithmetic Centre = weighted euclidian mean of a set of points

Trend between two sets

Subtract m from all points - e.g. transform to zero median form

Transform nd data to zeromedian for

Dependencies of vector m on each vector in self

(Median) correlations of m with each vector in self

Sum of distances from arbitrary point (v) to all the points in self

Individual distances from any point v (typically not in self) to all the points in self.

( wgm, sorted eccentricities magnitudes, associated cpdf )

Like wgmparts, except only does one iteration from any non-member point g

The weighted geometric median to accuracy eps

Like wgmedian but returns also the sum of unit vecs and the sum of reciprocals.

wmadgm median of weighted absolute deviations from weighted gm: stable nd data spread estimator

Flattened lower triangular part of a covariance matrix of a Vec of f64 vectors.

Flattened lower triangular part of a covariance matrix for weighted f64 vectors.

Flattened comediance matrix for f64 vectors in self. Similar to covar above but medians instead of means are returned.

Flatteened comediance matrix for weighted f64 vectors. Similar to wcovar above but medians instead of means are returned.

Implementations on Foreign Types

Leftmultiply (column) vector v by matrix self

Rightmultiply (row) vector v by matrix self

Rectangular Matrices multiplication: self * m. Returns DataError if lengths of rows of self: self[0].len() and columns of m: m.len() do not match. Result dimensions are self.len() x m[0].len()

Weighted sum of nd points (or vectors). Weights are associated with points, not coordinates

Weighted Centre

Trend computes the vector connecting the geometric medians of two sets of multidimensional points. This is a robust relationship between two unordered multidimensional sets. The two sets have to be in the same space but can have different numbers of points.

Translates the whole set by subtracting vector m. Returns Vec of Vecs. When m is set to the geometric median, this produces the zero median form. The geometric median is invariant with respect to rotation, unlike the often used mean (acentroid here), or the quasi median, both of which depend on the choice of axis.

Transforms nd data to zeromedian form essentially the same as translate but specialised to f64 gms

Dependencies of m on each vector in self m is typically a vector of outcomes. Factors out the entropy of m to save repetition of work

(Median) correlations of m with each vector in self Factors out the unit vector of m to save repetition of work

Individual distances from any point v, typically not a member, to all the members of self.

Sum of distances from any single point v, typically not a member, to all members of self.
Geometric Median (gm) is defined as the point which minimises this function. This is relatively expensive measure to compute. The radius (distance) from gm is far more efficient, once gm has been found.

Sorted eccentricities magnitudes (radii), w.r.t. weighted geometric median. associated cummulative probability density function in [0,1] of the weights.

Like wgmparts, except only does one iteration from any non-member point g

Weighted Geometric Median (gm) is the point that minimises the sum of distances to a given set of points.

Like gmedian but returns also the sum of unit vecs and the sum of reciprocals.

wmadgm median of weighted absolute deviations from weighted gm: stable nd data spread estimator

Covariance matrix for f64 vectors in self. Becomes comediance when argument m is the geometric median instead of the centroid. Since the matrix is symmetric, the missing upper triangular part can be trivially regenerated for all j>i by: c(j,i) = c(i,j). The indexing is always in this order: (row,column) (left to right, top to bottom). The items are flattened into a single vector in this order. The full 2D matrix can be reconstructed by symmatrix in the trait Stats.

Weighted covariance matrix for f64 vectors in self. Becomes comediance when argument m is the geometric median instead of the centroid. Since the matrix is symmetric, the missing upper triangular part can be trivially regenerated for all j>i by: c(j,i) = c(i,j). The indexing is always in this order: (row,column) (left to right, top to bottom). The items are flattened into a single vector in this order. The full 2D matrix can be reconstructed by symmatrix in the trait Stats.

Covariance matrix for f64 vectors in self. Becomes comediance when argument m is the geometric median instead of the centroid. Since the matrix is symmetric, the missing upper triangular part can be trivially regenerated for all j>i by: c(j,i) = c(i,j). The indexing is always in this order: (row,column) (left to right, top to bottom). The items are flattened into a single vector in this order. The full 2D matrix can be reconstructed by symmatrix in the trait Stats. Similar to covar above but instead of averaging the covariances over n points, their medians are returned.

Covariance matrix for weighted f64 vectors in self. Becomes comediance when argument m is the geometric median instead of the centroid. Since the matrix is symmetric, the missing upper triangular part can be trivially regenerated for all j>i by: c(j,i) = c(i,j). The indexing is always in this order: (row,column) (left to right, top to bottom). The items are flattened into a single vector in this order. The full 2D matrix can be reconstructed by symmatrix in the trait Stats. Similar to wcovar above but instead of averaging the covariances over n points, their median is returned.

Implementors