pub struct Ordination {
pub sample_ids: Vec<String>,
pub species_ids: Vec<String>,
pub constraint_ids: Vec<String>,
pub eigvals: Vec<f64>,
pub proportion_explained: Vec<f64>,
pub sample_scores: Vec<f64>,
pub species_scores: Vec<f64>,
pub biplot_scores: Vec<f64>,
pub biplot_axes: usize,
pub sample_constraints: Vec<f64>,
}Expand description
Result of a Redundancy Analysis. Eigenvalues, proportion explained, and the
site/species scores plus biplot and site-constraint scores follow
skbio.stats.ordination.rda. The first n_constrained axes are canonical
(constrained by the explanatory variables); the rest are the unconstrained
PCA of the residuals.
Fields§
§sample_ids: Vec<String>§species_ids: Vec<String>§constraint_ids: Vec<String>§eigvals: Vec<f64>§proportion_explained: Vec<f64>§sample_scores: Vec<f64>Row-major n_samples × n_axes.
species_scores: Vec<f64>Row-major n_species × n_axes.
biplot_scores: Vec<f64>Biplot scores follow the left singular vectors of the fitted values, so
they span only the constrained axes: row-major n_constraints × biplot_axes.
biplot_axes: usize§sample_constraints: Vec<f64>Row-major n_samples × n_axes.
Implementations§
Source§impl Ordination
impl Ordination
Sourcepub fn compute(
response: &Matrix,
constraints: &Matrix,
scaling: u8,
scale_y: bool,
) -> Result<Ordination>
pub fn compute( response: &Matrix, constraints: &Matrix, scaling: u8, scale_y: bool, ) -> Result<Ordination>
RDA per Legendre & Legendre 1998 §11.1: regress centred y on centred
x (SVD least squares), SVD the fitted values for the canonical axes,
SVD the residuals for the unconstrained axes, then apply scaling 1 or 2.
§Errors
Errors when the two tables disagree on sample count or when x has more
columns than rows (an under-determined regression), matching skbio.
Auto Trait Implementations§
impl Freeze for Ordination
impl RefUnwindSafe for Ordination
impl Send for Ordination
impl Sync for Ordination
impl Unpin for Ordination
impl UnsafeUnpin for Ordination
impl UnwindSafe for Ordination
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more