pub trait CorrelationExt<F, D>{
// 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§
Sourcefn correlation(
&self,
other: &ArrayBase<D, Ix1>,
method: CorrelationMethod,
config: Option<StatsConfig>,
) -> StatsResult<CorrelationResult<F>>
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§
Sourcefn pearson(&self, other: &ArrayBase<D, Ix1>) -> StatsResult<F>
fn pearson(&self, other: &ArrayBase<D, Ix1>) -> StatsResult<F>
Compute Pearson correlation (convenience method)
Sourcefn spearman(&self, other: &ArrayBase<D, Ix1>) -> StatsResult<F>
fn spearman(&self, other: &ArrayBase<D, Ix1>) -> StatsResult<F>
Compute Spearman correlation (convenience method)
Sourcefn kendall(&self, other: &ArrayBase<D, Ix1>) -> StatsResult<F>
fn kendall(&self, other: &ArrayBase<D, Ix1>) -> StatsResult<F>
Compute Kendall tau correlation (convenience method)