Class DefaultAnalysisPanel
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- adams.gui.core.BasePanel
-
- adams.gui.tools.wekamultiexperimenter.AbstractExperimenterPanel
-
- adams.gui.tools.wekamultiexperimenter.analysis.AbstractAnalysisPanel
-
- adams.gui.tools.wekamultiexperimenter.analysis.DefaultAnalysisPanel
-
- All Implemented Interfaces:
CloneHandler<AbstractAnalysisPanel>,ImageObserver,MenuContainer,Serializable,Accessible
public class DefaultAnalysisPanel extends AbstractAnalysisPanel
Default panel for analyzing results from experiments.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDefaultAnalysisPanel.HistoryPanelCustomized history panel.-
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
-
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
-
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
-
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
-
Field Summary
Fields Modifier and Type Field Description static StringCORRELATION_COEFFICIENTstatic StringKEY_DATASETstatic StringKEY_FOLDstatic StringKEY_RUNstatic StringKEY_SCHEMEstatic StringKEY_SCHEME_OPTIONSstatic StringKEY_SCHEME_VERSION_IDprotected BaseButtonm_ButtonAnalyzethe analyze button.protected BaseCheckBoxm_CheckBoxSwapRowsColumnsfor swapping rows/columns.protected BaseComboBox<String>m_ComboBoxMetricthe combobox with the metric to evaluate.protected BaseComboBox<AbstractResultsPanel>m_ComboBoxResultsthe combobox with the results panels.protected DateFormatm_Formatterthe formatter for the history entries.protected DefaultAnalysisPanel.HistoryPanelm_Historythe history.protected DefaultComboBoxModel<String>m_ModelMetricthe model for the metric.protected JPanelm_PanelLeftthe panel on the left.protected GenericObjectEditorPanelm_PanelMatrixthe GOE for the result matrix.protected JPanelm_PanelRightthe panel on the right.protected List<AbstractResultsPanel>m_PanelsResultsthe results panels.protected GenericObjectEditorPanelm_PanelTesterthe GOE for the tester.protected SelectOptionPanelm_SelectColumnsthe dataset keys.protected SelectOptionPanelm_SelectComparisonBasethe comparison base.protected SelectOptionPanelm_SelectRowsthe resultset keys.protected BaseSplitPanem_SplitPanethe split pane.protected NumberTextFieldm_TextSignificancethe significance.static StringPERCENT_CORRECT-
Fields inherited from class adams.gui.tools.wekamultiexperimenter.analysis.AbstractAnalysisPanel
m_Results
-
Fields inherited from class adams.gui.tools.wekamultiexperimenter.AbstractExperimenterPanel
m_Owner
-
Fields inherited from class adams.gui.core.BasePanel
m_FileChooser
-
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
Fields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
-
Constructor Summary
Constructors Constructor Description DefaultAnalysisPanel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidanalyze()Performs the analysis.StringgetAnalysisName()Returns the name to display in the GUI.protected intgetAttributeIndex(String attName)Returns the attribute index for the specified attribute name.DefaultAnalysisPanelgetClone()Returns a clone of the object.JPanelgetPanelRight()Returns the panel on the right (for the analysis display).protected StringgetRange(SelectOptionPanel select)Turns the selected attributes into a range string.weka.experiment.ResultMatrixgetResultMatrix()Returns the result matrix.weka.experiment.TestergetTester()Returns the tester.StringhandlesResults(weka.core.Instances results)Checks whether the results can be handled at all.protected voidinitGUI()For initializing the GUI.protected voidinitialize()Initializes the members.voidsetResultMatrix(weka.experiment.ResultMatrix value)Sets the matrix to use.voidsetTester(weka.experiment.Tester value)Sets the tester to use.protected voidupdate()Updates the GUI.protected voidupdateButtons()Updates the buttons.protected voidupdateComparisonBase()Updates the base of comparison.-
Methods inherited from class adams.gui.tools.wekamultiexperimenter.analysis.AbstractAnalysisPanel
finishInit, getPanels, getResults, setResults, toString
-
Methods inherited from class adams.gui.tools.wekamultiexperimenter.AbstractExperimenterPanel
getOwner, logError, logMessage, ownerChanged, setOwner
-
Methods inherited from class adams.gui.core.BasePanel
afterHide, afterShow, beforeHide, beforeShow, closeParent, getParentChild, getParentDialog, getParentFrame, getParentInternalFrame, getParentTitle, initFileChooser, main, printErrorMessage, printException, saveComponent, setEnabledCascade, setEnabledCascade, setParentTitle, setVisible
-
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
-
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
PERCENT_CORRECT
public static final String PERCENT_CORRECT
- See Also:
- Constant Field Values
-
CORRELATION_COEFFICIENT
public static final String CORRELATION_COEFFICIENT
- See Also:
- Constant Field Values
-
KEY_RUN
public static final String KEY_RUN
- See Also:
- Constant Field Values
-
KEY_FOLD
public static final String KEY_FOLD
- See Also:
- Constant Field Values
-
KEY_DATASET
public static final String KEY_DATASET
- See Also:
- Constant Field Values
-
KEY_SCHEME
public static final String KEY_SCHEME
- See Also:
- Constant Field Values
-
KEY_SCHEME_OPTIONS
public static final String KEY_SCHEME_OPTIONS
- See Also:
- Constant Field Values
-
KEY_SCHEME_VERSION_ID
public static final String KEY_SCHEME_VERSION_ID
- See Also:
- Constant Field Values
-
m_PanelTester
protected GenericObjectEditorPanel m_PanelTester
the GOE for the tester.
-
m_PanelMatrix
protected GenericObjectEditorPanel m_PanelMatrix
the GOE for the result matrix.
-
m_TextSignificance
protected NumberTextField m_TextSignificance
the significance.
-
m_SelectRows
protected SelectOptionPanel m_SelectRows
the resultset keys.
-
m_SelectColumns
protected SelectOptionPanel m_SelectColumns
the dataset keys.
-
m_CheckBoxSwapRowsColumns
protected BaseCheckBox m_CheckBoxSwapRowsColumns
for swapping rows/columns.
-
m_SelectComparisonBase
protected SelectOptionPanel m_SelectComparisonBase
the comparison base.
-
m_ComboBoxMetric
protected BaseComboBox<String> m_ComboBoxMetric
the combobox with the metric to evaluate.
-
m_ModelMetric
protected DefaultComboBoxModel<String> m_ModelMetric
the model for the metric.
-
m_ComboBoxResults
protected BaseComboBox<AbstractResultsPanel> m_ComboBoxResults
the combobox with the results panels.
-
m_PanelsResults
protected List<AbstractResultsPanel> m_PanelsResults
the results panels.
-
m_ButtonAnalyze
protected BaseButton m_ButtonAnalyze
the analyze button.
-
m_SplitPane
protected BaseSplitPane m_SplitPane
the split pane.
-
m_PanelLeft
protected JPanel m_PanelLeft
the panel on the left.
-
m_PanelRight
protected JPanel m_PanelRight
the panel on the right.
-
m_History
protected DefaultAnalysisPanel.HistoryPanel m_History
the history.
-
m_Formatter
protected DateFormat m_Formatter
the formatter for the history entries.
-
-
Method Detail
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initializein classAbstractAnalysisPanel
-
getAnalysisName
public String getAnalysisName()
Returns the name to display in the GUI.- Specified by:
getAnalysisNamein classAbstractAnalysisPanel- Returns:
- the name
-
getPanelRight
public JPanel getPanelRight()
Returns the panel on the right (for the analysis display).- Returns:
- the panel
-
setResultMatrix
public void setResultMatrix(weka.experiment.ResultMatrix value)
Sets the matrix to use.- Parameters:
value- the matrix
-
getResultMatrix
public weka.experiment.ResultMatrix getResultMatrix()
Returns the result matrix.- Returns:
- the matrix
-
setTester
public void setTester(weka.experiment.Tester value)
Sets the tester to use.- Parameters:
value- the tester
-
getTester
public weka.experiment.Tester getTester()
Returns the tester.- Returns:
- the tester
-
handlesResults
public String handlesResults(weka.core.Instances results)
Checks whether the results can be handled at all.- Specified by:
handlesResultsin classAbstractAnalysisPanel- Parameters:
results- the results to check- Returns:
- null if can handle, otherwise error message
-
getClone
public DefaultAnalysisPanel getClone()
Returns a clone of the object.- Specified by:
getClonein interfaceCloneHandler<AbstractAnalysisPanel>- Specified by:
getClonein classAbstractAnalysisPanel- Returns:
- the clone
-
update
protected void update()
Updates the GUI.- Overrides:
updatein classAbstractAnalysisPanel
-
updateButtons
protected void updateButtons()
Updates the buttons.
-
getAttributeIndex
protected int getAttributeIndex(String attName)
Returns the attribute index for the specified attribute name.- Parameters:
attName- the attribute name to look up- Returns:
- the index, -1 if not found
-
getRange
protected String getRange(SelectOptionPanel select)
Turns the selected attributes into a range string.- Parameters:
select- the panel with the selection- Returns:
- the range
-
updateComparisonBase
protected void updateComparisonBase()
Updates the base of comparison.
-
analyze
protected void analyze()
Performs the analysis.
-
-