org.eclipse.january.dataset

## Class Outliers

- java.lang.Object
- - org.eclipse.january.dataset.Outliers

-     public class Outliers
      extends Object

  Estimators of the scale of a Dataset.

  A class of static methods to produce estimations of the scale of variation within a Dataset. The available estimators are:

  - Median Absolute Deviation
  - Sn of Croux and Rousseeuw (1992).

  Croux, C. and P. J. Rousseeuw, "Time-efficient algorithms for two highly robust estimators of scale", Computational Statistics, Volume 1, eds. Y. Dodge and J.Whittaker, Physica-Verlag, Heidelberg, pp411--428 (1992).

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Outliers()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static double` | `highMed(Dataset data)` Returns the himed
    `static double` | `lowMed(Dataset data)` Returns the lomed
    `static double[]` | `medianAbsoluteDeviation(Dataset data)` Returns the Median Absolute Deviation (MAD) and the median.
    `static double` | `medianOFTwoPrimitiveArrays(double[] a, double[] b)` Calculates the overall median of two double arrays
    `static double` | `snFast(Dataset data)` Returns the Sn estimator of Croux and Rousseeuw.
    `static double` | `snNaive(Dataset data)` Returns the Sn estimator of Croux and Rousseeuw.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Outliers

          public Outliers()

  - ### Method Detail

    - #### medianAbsoluteDeviation

          public static double[] medianAbsoluteDeviation(Dataset data)

      Returns the Median Absolute Deviation (MAD) and the median.
      Parameters:
        `data` - The data for which the median and the MAD are to be calculated
      Returns:
        A two-element array of doubles, consisting of the MAD and the median of the data

    - #### snNaive

          public static double snNaive(Dataset data)

      Returns the Sn estimator of Croux and Rousseeuw.

      This is the simple O(n²) version of the calculation algorithm.

      Parameters:
        `data` - The data for which the estimator is to be calculated.
      Returns:
        The value of the Sn estimator for the data

    - #### snFast

          public static double snFast(Dataset data)

      Returns the Sn estimator of Croux and Rousseeuw.

      This is the complex O(nlog n) version of the calculation algorithm.

      Parameters:
        `data` - The data for which the estimator is to be calculated.
      Returns:
        The value of the Sn estimator for the data

    - #### lowMed

          public static double lowMed(Dataset data)

      Returns the lomed

      Returns the lomed (low median) of a sorted Dataset.

      Parameters:
        `data` - A sorted Dataset for which the low median is to be calculated.
      Returns:
        The value of the lomed of the data

    - #### highMed

          public static double highMed(Dataset data)

      Returns the himed

      Returns the himed (high median) of a sorted Dataset.

      Parameters:
        `data` - A sorted Dataset for which the low median is to be calculated.
      Returns:
        The value of the himed of the data

    - #### medianOFTwoPrimitiveArrays

          public static double medianOFTwoPrimitiveArrays(double[] a,
                                                          double[] b)

      Calculates the overall median of two double arrays
      Parameters:
        `a` - first array
        `b` - second array
      Returns:
        the overall median of the two arrays

Copyright © 2014–2022 Eclipse Foundation. All rights reserved.