Class SubRangeEvaluation
- java.lang.Object
-
- adams.gui.tools.wekainvestigator.tab.classifytab.output.perfold.AbstractPerFoldPopupMenuItem
-
- adams.gui.tools.wekainvestigator.tab.classifytab.output.perfold.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)
-
-
Field Summary
-
Fields inherited from class adams.gui.tools.wekainvestigator.tab.classifytab.output.perfold.AbstractPerFoldPopupMenuItem
m_OutputGenerator
-
-
Constructor Summary
Constructors Constructor Description SubRangeEvaluation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.JMenuItem
createMenuItem(PerFoldMultiPagePane pane, int[] indices)
Creates the menu item to add to the pane's popup menu.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.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.String
getCategory()
The category for grouping menu items.String
getTitle()
The menu item title.protected double[]
queryUser(PerFoldMultiPagePane pane, ResultItem item)
Queries the user for the range.-
Methods inherited from class adams.gui.tools.wekainvestigator.tab.classifytab.output.perfold.AbstractPerFoldPopupMenuItem
getOutputGenerator, setOutputGenerator, updatePopupMenu
-
-
-
-
Method Detail
-
getCategory
public String getCategory()
The category for grouping menu items.- Specified by:
getCategory
in classAbstractPerFoldPopupMenuItem
- Returns:
- the group
-
getTitle
public String getTitle()
The menu item title.- Specified by:
getTitle
in classAbstractPerFoldPopupMenuItem
- Returns:
- the title
-
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/extendrange
- 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 toitem
- the result item, for run informationeval
- the evaluation to use as basisrange
- the new range to usefold
- 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 toitem
- the result item, for run informationevals
- the evaluations to use as basisfolds
- 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 classAbstractPerFoldPopupMenuItem
- Parameters:
pane
- the per-fold panel this menu is forindices
- the selected indices- Returns:
- the menu item, null if failed to generate
-
-