CorrelationExt

Trait CorrelationExt 

Source
pub trait CorrelationExt<F, D>
where F: Float + Display + Sum + Send + Sync, D: Data<Elem = F>,
{ // Required method fn correlation( &self, other: &ArrayBase<D, Ix1>, method: CorrelationMethod, config: Option<StatsConfig>, ) -> StatsResult<CorrelationResult<F>>; // Provided methods fn pearson(&self, other: &ArrayBase<D, Ix1>) -> StatsResult<F> { ... } fn spearman(&self, other: &ArrayBase<D, Ix1>) -> StatsResult<F> { ... } fn kendall(&self, other: &ArrayBase<D, Ix1>) -> StatsResult<F> { ... } }
Expand description

Improved correlation API that unifies pearson_r and pearsonr

Required Methods§

Source

fn correlation( &self, other: &ArrayBase<D, Ix1>, method: CorrelationMethod, config: Option<StatsConfig>, ) -> StatsResult<CorrelationResult<F>>

Compute correlation with optional p-value based on configuration

Provided Methods§

Source

fn pearson(&self, other: &ArrayBase<D, Ix1>) -> StatsResult<F>

Compute Pearson correlation (convenience method)

Source

fn spearman(&self, other: &ArrayBase<D, Ix1>) -> StatsResult<F>

Compute Spearman correlation (convenience method)

Source

fn kendall(&self, other: &ArrayBase<D, Ix1>) -> StatsResult<F>

Compute Kendall tau correlation (convenience method)

Implementors§