pub fn spearman_corrcoef<T: OrDistElement, U: Float>(
    v1: &[T],
    v2: &[T],
) -> Result<U, OrDistError<T>> {
    let d_spear = U::from(spearman_dist(v1, v2)?).unwrap();
    let m = U::from(v1.len()).unwrap();
    let one = U::one();
    Ok(one - U::from(6).unwrap() * d_spear / (m * (m * m - one)))
}
/// Spearman correlation coefficient between 2 orders.
Spearman correlation coefficient between 2 orders.
Spearman correlation coefficient between 2 orders .
pub fn spearman_corrcoef<T: OrDistElement, U: Float>(
    v1: &[T],
    v2: &[T],
) -> Result<U, OrDistError<T>> {
    let d_spear = U::from(spearman_dist(v1, v2)?).unwrap();
    let m = U::from(v1.len()).unwrap();
    let one = U::one();
    Ok(one - U::from(6).unwrap() * d_spear / (m * (m * m - one)))
}
pub fn spearman_corrcoef < T : OrDistElement , U : Float > ( v1 : & [ T ] , v2 : & [ T ] , ) -> Result < U , OrDistError < T > > { let d_spear = U :: from ( spearman_dist ( v1 , v2 ) ? ) . unwrap ( ) ; let m = U :: from ( v1 . len ( ) ) . unwrap ( ) ; let one = U :: one ( ) ; Ok ( one - U :: from ( 6 ) . unwrap ( ) * d_spear / ( m * ( m * m - one ) ) ) }
Spearman correlation coefficient between 2 orders.
Spearman correlation coefficient between 2 orders .
v1
&[T]
v2
&[T]
v1
&[T]
v2
&[T]