Class AbstractNumericOutlierDetector

    • Constructor Detail

      • AbstractNumericOutlierDetector

        public AbstractNumericOutlierDetector()
    • Method Detail

      • extractColumn

        protected Double[] extractColumn​(SpreadSheet sheet,
                                         SpreadSheetColumnIndex col)
        Extracts the double values from the specified column.
        Parameters:
        sheet - the sheet to get the data from
        col - the column
        Returns:
        the data, null entries for non-numeric or missing values
      • diff

        protected double[] diff​(Double[] actual,
                                Double[] predicted,
                                boolean useRelative)
        Computes the difference between the two columns.
        Parameters:
        actual - the column with the actual values
        predicted - the column with the predicted values
        useRelative - whether to divide the difference by the actual value (NaN if 0)
        Returns:
        the difference, uses NaN if either column has non-numeric or missing value
      • diff

        protected double[] diff​(SpreadSheet sheet,
                                SpreadSheetColumnIndex actual,
                                SpreadSheetColumnIndex predicted,
                                boolean useRelative)
        Computes the difference between the two columns.
        Parameters:
        sheet - the sheet to get the data from
        actual - the column with the actual values
        predicted - the column with the predicted values
        useRelative - whether to divide the difference by the actual value (NaN if 0)
        Returns:
        the difference, uses NaN if either column has non-numeric or missing value