Class AbstractOutlierDetector

    • Field Detail

      • m_LastError

        protected String m_LastError
        the last error that occurred.
    • Constructor Detail

      • AbstractOutlierDetector

        public AbstractOutlierDetector()
    • Method Detail

      • getQuickInfo

        public String getQuickInfo()
        Returns a quick info about the object, which can be displayed in the GUI.
        Default implementation returns null.
        Specified by:
        getQuickInfo in interface QuickInfoSupporter
        Returns:
        null if no info available, otherwise short string
      • hasLastError

        public boolean hasLastError()
        Returns whether an occurred during the last detection.
        Specified by:
        hasLastError in interface ErrorProvider
        Returns:
        true if an error occurred
      • getLastError

        public String getLastError()
        Returns any error that occurred during the last detection.
        Specified by:
        getLastError in interface ErrorProvider
        Returns:
        the error, null if none occurred
      • check

        public String check​(SpreadSheet sheet,
                            SpreadSheetColumnIndex actual,
                            SpreadSheetColumnIndex predicted)
        Check method before detection.
        Parameters:
        sheet - the spreadsheet to analyze
        actual - the column with the actual values
        predicted - the column with the predicted values
        Returns:
        null if check passed, otherwise error message
      • doDetect

        protected abstract Set<Integer> doDetect​(SpreadSheet sheet,
                                                 SpreadSheetColumnIndex actual,
                                                 SpreadSheetColumnIndex predicted)
        Performs the actual detection of the outliers.
        Parameters:
        sheet - the spreadsheet to analyze
        actual - the column with the actual values
        predicted - the column with the predicted values
        Returns:
        the row indices of the outliers
      • detect

        public Set<Integer> detect​(SpreadSheet sheet,
                                   SpreadSheetColumnIndex actual,
                                   SpreadSheetColumnIndex predicted)
        For detecting outliers.
        Parameters:
        sheet - the spreadsheet to analyze
        actual - the column with the actual values
        predicted - the column with the predicted values
        Returns:
        the row indices of the outliers, null in case of an error