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 MetaDataaddSubRangeInfo(MetaData info, double[] range)Adds the range information to a clone of the provided meta-data info and returns it.JMenuItemcreateMenuItem(PerFoldMultiPagePane pane, int[] indices)Creates the menu item to add to the pane's popup menu.protected voidcreateSubEvaluation(PerFoldMultiPagePane pane, ResultItem item, weka.classifiers.Evaluation eval, int fold, double[] range)Creates the sub-range evaluation and adds it to the pane.protected voidcreateSubEvaluations(PerFoldMultiPagePane pane, ResultItem item, weka.classifiers.Evaluation[] evals, int[] folds, double[] range)Creates the sub-range evaluation and adds it to the pane.StringgetCategory()The category for grouping menu items.StringgetTitle()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:
getCategoryin classAbstractPerFoldPopupMenuItem- Returns:
- the group
-
getTitle
public String getTitle()
The menu item title.- Specified by:
getTitlein 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 MetaData addSubRangeInfo(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:
createMenuItemin classAbstractPerFoldPopupMenuItem- Parameters:
pane- the per-fold panel this menu is forindices- the selected indices- Returns:
- the menu item, null if failed to generate
-
-