Class SubRangeEvaluation


  • public class SubRangeEvaluation
    extends AbstractPerFoldPopupMenuItem
    Generates a fake evaluation using only predictions with an actual class value that fits in the specified sub-range.
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    • Constructor Detail

      • SubRangeEvaluation

        public SubRangeEvaluation()
    • Method Detail

      • queryUser

        protected double[] queryUser​(PerFoldMultiPagePane pane,
                                     ResultItem item)
        Queries the user for the range.
        Parameters:
        item - the item to get the range from
        Returns:
        the range (min/max), null if canceled
      • addSubRangeInfo

        protected adams.data.spreadsheet.MetaData addSubRangeInfo​(adams.data.spreadsheet.MetaData info,
                                                                  double[] range)
        Adds the range information to a clone of the provided meta-data info and returns it.
        Parameters:
        info - the info to clone/extend
        range - the range to add
        Returns:
        the new meta-data
      • createSubEvaluation

        protected void createSubEvaluation​(PerFoldMultiPagePane pane,
                                           ResultItem item,
                                           weka.classifiers.Evaluation eval,
                                           int fold,
                                           double[] range)
        Creates the sub-range evaluation and adds it to the pane.
        Parameters:
        pane - the per-fold pane to add the new item to
        item - the result item, for run information
        eval - the evaluation to use as basis
        range - the new range to use
        fold - the fold (0=full, 1..=1-based CV index)
      • createSubEvaluations

        protected void createSubEvaluations​(PerFoldMultiPagePane pane,
                                            ResultItem item,
                                            weka.classifiers.Evaluation[] evals,
                                            int[] folds,
                                            double[] range)
        Creates the sub-range evaluation and adds it to the pane.
        Parameters:
        pane - the per-fold pane to add the new item to
        item - the result item, for run information
        evals - the evaluations to use as basis
        folds - the folds (0=full, 1..=1-based CV index)
        range - the new range to use
      • createMenuItem

        public JMenuItem createMenuItem​(PerFoldMultiPagePane pane,
                                        int[] indices)
        Creates the menu item to add to the pane's popup menu.
        Specified by:
        createMenuItem in class AbstractPerFoldPopupMenuItem
        Parameters:
        pane - the per-fold panel this menu is for
        indices - the selected indices
        Returns:
        the menu item, null if failed to generate