Trait rstats::VecVecg [−][src]
pub trait VecVecg<T, U> {
Show 15 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 distsum(self, v: &[U]) -> f64;
fn dists(self, v: &[U]) -> Vec<f64>;
fn wsortedeccs(self, ws: &[U], eps: f64) -> (Vec<f64>, Vec<f64>, Vec<f64>);
fn wsortedcos(
self,
medmed: &[U],
med: &[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 wsmedian(self, ws: &[U], eps: f64) -> Vec<f64>;
fn covar(self, med: &[U]) -> Vec<f64>;
fn comed(self, m: &[U], eps: f64) -> Vec<f64>;
fn wcovar(self, ws: &[U], m: &[f64]) -> Vec<f64>;
fn wcomed(self, ws: &[U], m: &[f64], eps: f64) -> Vec<f64>;
}
Expand description
Methods applicable to vector of vectors of generic end type and one argument of a similar kind.
Required methods
fn wacentroid(self, ws: &[U]) -> Vec<f64>
fn wacentroid(self, ws: &[U]) -> Vec<f64>
Weighted Arithmetic Centre = weighted euclidian mean of a set of points
Subtract m from all points - e.g. transform to zero median form
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
Flattened lower triangular part of a covariance matrix of a Vec of f64 vectors.
Flattened lower triangular part of a comediance matrix of a Vec of f64 vectors.
Flattened lower triangular part of a covariance matrix for weighted f64 vectors.
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.
Individual distances from any point v, typically not a member, to all the members of self.
The sum of distances from any single point v, typically not a member, to all the members of self.
Geometric Median is defined as the point which minimises this function.
Sorted eccentricities magnitudes, 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
Secant recovery from divergence for finding the weighted geometric median.
Flattened lower triangular part of a covariance matrix for f64 vectors in self. Since covariance matrix is symmetric (positive semi definite), the upper triangular part can be trivially generated for all j>i by: c(j,i) = c(i,j). N.b. the indexing is always assumed to be in this order: row,column. The items of the resulting lower triangular array c[i][j] are here flattened into a single vector in this double loop order: left to right, top to bottom
Flattened lower triangular part of a comediance matrix for f64 vectors in self. Since comediance matrix is symmetric (positive semi definite), the upper triangular part can be trivially generated for all j>i by: c(j,i) = c(i,j). N.b. the indexing is always assumed to be in this order: row,column. The items of the resulting lower triangular array c[i][j] are here flattened into a single vector in this double loop order: left to right, top to bottom. Instead of averaging these vectors over n points, their median is returned. Warning: may run out of memory for large number of points and high dimensionality.
Flattened lower triangular part of a covariance matrix for weighted f64 vectors in self. Since covariance matrix is symmetric (positive semi definite), the upper triangular part can be trivially generated for all j>i by: c(j,i) = c(i,j). N.b. the indexing is always assumed to be in this order: row,column. The items of the resulting lower triangular array c[i][j] are here flattened into a single vector in this double loop order: left to right, top to bottom
Flattened lower triangular part of a comediance matrix for weighted f64 vectors in self. Since comediance matrix is symmetric (positive semi definite), the upper triangular part can be trivially generated for all j>i by: c(j,i) = c(i,j). N.b. the indexing is always assumed to be in this order: row,column. The items of the resulting lower triangular array c[i][j] are here flattened into a single vector in this double loop order: left to right, top to bottom. Instead of averaging these vectors over n points, their median is returned. Warning: may run out of memory for large number of points and high dimensionality.