pub trait VecVecg<T, U> {
Show 18 methods 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>); fn wsortedcos(
        self,
        medmed: &[U],
        unitzmed: &[U],
        ws: &[U]
    ) -> (Vec<f64>, Vec<f64>); fn wnxnonmember(self, ws: &[U], p: &[f64]) -> Vec<f64>; fn weccnonmember(self, ws: &[U], p: &[f64]) -> Vec<f64>; fn wgmedian(self, ws: &[U], eps: f64) -> Vec<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 vector of vectors of generic end type and one argument of a similar kind.

Required Methods

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.

Medoid and Outlier (by distance) of a set of points ( wgm, sorted eccentricities magnitudes, associated cpdf )

Sorted cosines magnitudes and cpdf, needs central median

Estimated weighted gm computed at a non member point

Estimated weighted eccentricity for a non-member point

The weighted geometric median to accuracy eps

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

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.

Sorted cosines magnitudes, associated cummulative probability density function in [0,1] of the weights. Needs central median

Next approximate weighted median, from a non member point.

Estimated (computed) eccentricity vector for a non member point The true geometric median is as yet unknown. Returns the weighted eccentricity vector. The true geometric median would return zero vector. This function is suitable for a single non-member point.

Secant method with recovery from divergence for finding the weighted geometric median

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