Class SpearmanCorrelationDependence

  • All Implemented Interfaces:
    Dependence

    public class SpearmanCorrelationDependence
    extends java.lang.Object
    implements Dependence
    Spearman rank-correlation coefficient, also known as Spearmans Rho.
    Since:
    0.7.0
    Author:
    Erich Schubert
    • Constructor Detail

      • SpearmanCorrelationDependence

        protected SpearmanCorrelationDependence()
        Constructor - use STATIC instance.
    • Method Detail

      • dependence

        public <A,​B> double dependence​(NumberArrayAdapter<?,​A> adapter1,
                                             A data1,
                                             NumberArrayAdapter<?,​B> adapter2,
                                             B data2)
        Description copied from interface: Dependence
        Measure the dependence of two variables.

        This is the more flexible API, which allows using different internal data representations.

        Specified by:
        dependence in interface Dependence
        Type Parameters:
        A - First array type
        B - Second array type
        Parameters:
        adapter1 - First data adapter
        data1 - First data set
        adapter2 - Second data adapter
        data2 - Second data set
        Returns:
        Dependence measure