Package unifeat.gui

Class MainPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class MainPanel extends JPanel
This java class is used to create and show the main panel of the project. The management of all panels and forms have been done in this class.
Author:
Sina Tabakhi, Shahin Salavati
See Also:
  • Field Details

    • panel_filePath

      JPanel panel_filePath
    • panel_randomSet

      JPanel panel_randomSet
    • panel_ttSet

      JPanel panel_ttSet
    • panel_featureMethod

      JPanel panel_featureMethod
    • panel_classifier

      JPanel panel_classifier
    • panel_config

      JPanel panel_config
    • bg_dataset

      ButtonGroup bg_dataset
    • rd_randSet

      JRadioButton rd_randSet
    • rd_ttset

      JRadioButton rd_ttset
    • btn_inputdst

      JButton btn_inputdst
    • btn_classlbl

      JButton btn_classlbl
    • lbl_dataset

      JLabel lbl_dataset
    • lbl_inputdst

      JLabel lbl_inputdst
    • lbl_classlbl

      JLabel lbl_classlbl
    • txt_inputdst

      JTextField txt_inputdst
    • txt_classLbl

      JTextField txt_classLbl
    • btn_trainSet

      JButton btn_trainSet
    • btn_testSet

      JButton btn_testSet
    • btn_classLabel

      JButton btn_classLabel
    • lbl_trainSet

      JLabel lbl_trainSet
    • lbl_testSet

      JLabel lbl_testSet
    • lbl_classlabel

      JLabel lbl_classlabel
    • txt_trainSet

      JTextField txt_trainSet
    • txt_testSet

      JTextField txt_testSet
    • txt_classLabel

      JTextField txt_classLabel
    • tab_pane

      JTabbedPane tab_pane
    • panel_filter

      JPanel panel_filter
    • panel_wrapper

      JPanel panel_wrapper
    • panel_embedded

      JPanel panel_embedded
    • panel_hybrid

      JPanel panel_hybrid
    • panel_numFeat

      JPanel panel_numFeat
    • cb_supervised

      JComboBox cb_supervised
    • cb_unsupervised

      JComboBox cb_unsupervised
    • cb_wrapper

      JComboBox cb_wrapper
    • cb_embedded

      JComboBox cb_embedded
    • cb_hybrid

      JComboBox cb_hybrid
    • lbl_sup

      JLabel lbl_sup
    • lbl_unsup

      JLabel lbl_unsup
    • lbl_wrapper

      JLabel lbl_wrapper
    • lbl_embedded

      JLabel lbl_embedded
    • lbl_hybrid

      JLabel lbl_hybrid
    • btn_moreOpFilter

      JButton btn_moreOpFilter
    • btn_moreOpWrapper

      JButton btn_moreOpWrapper
    • btn_moreOpEmbedded

      JButton btn_moreOpEmbedded
    • btn_moreOpHybrid

      JButton btn_moreOpHybrid
    • txtArea_feature

      JTextArea txtArea_feature
    • sc_feature

      JScrollPane sc_feature
    • cb_classifier

      JComboBox cb_classifier
    • lbl_classifier

      JLabel lbl_classifier
    • btn_moreOpClassifier

      JButton btn_moreOpClassifier
    • cb_start

      JComboBox cb_start
    • lbl_start

      JLabel lbl_start
    • btn_start

      JButton btn_start
    • btn_exit

      JButton btn_exit
    • eh

    • file

      JMenu file
    • diagram

      JMenu diagram
    • analyse

      JMenu analyse
    • help

      JMenu help
    • mi_preprocess

      JMenuItem mi_preprocess
    • mi_exit

      JMenuItem mi_exit
    • mi_exeTime

      JMenuItem mi_exeTime
    • mi_accur

      JMenuItem mi_accur
    • mi_error

      JMenuItem mi_error
    • mi_friedman

      JMenuItem mi_friedman
    • mi_help

      JMenuItem mi_help
    • mi_about

      JMenuItem mi_about
    • sep_file

      JSeparator sep_file
    • sep_help

      JSeparator sep_help
    • progressBar

      JProgressBar progressBar
    • progressValue

      int progressValue
    • runCode

      int runCode
    • PATH_PROJECT

      private final String PATH_PROJECT
    • PATH_DATA_CSV

      private final String PATH_DATA_CSV
    • PATH_DATA_ARFF

      private final String PATH_DATA_ARFF
    • simValue

      private double simValue
    • constParam

      private double constParam
    • KNearest

      private int KNearest
    • numSelection

      private int numSelection
    • sizeSubspace

      private int sizeSubspace
    • elimination

      private int elimination
    • multMethodName

      private MultivariateMethodType multMethodName
    • numIteration

      private int numIteration
    • numAnts

      private int numAnts
    • numFeatOfAnt

      private int numFeatOfAnt
    • initPheromone

      private double initPheromone
    • evRate

      private double evRate
    • alpha

      private double alpha
    • beta

      private double beta
    • q0

      private double q0
    • decisionTreeBasedMethodType

      private TreeType decisionTreeBasedMethodType
    • confidence

      private double confidence
    • minNum

      private int minNum
    • randomForestNumFeatures

      private int randomForestNumFeatures
    • maxDepth

      private int maxDepth
    • randomForestNumIterations

      private int randomForestNumIterations
    • randomTreeKValue

      private int randomTreeKValue
    • randomTreeMaxDepth

      private int randomTreeMaxDepth
    • randomTreeMinNum

      private double randomTreeMinNum
    • randomTreeMinVarianceProp

      private double randomTreeMinVarianceProp
    • svmFeatureSelectionPanel

      private SVMClassifierPanel svmFeatureSelectionPanel
    • msvmFeatureSelectionPanel

      private MSVM_RFEPanel msvmFeatureSelectionPanel
    • bpsoFeatSelectionPanel

      private BPSOPanel bpsoFeatSelectionPanel
    • cpsoFeatSelectionPanel

      private CPSOPanel cpsoFeatSelectionPanel
    • pso42FeatSelectionPanel

      private PSO42Panel pso42FeatSelectionPanel
    • hpsolsFeatSelectionPanel

      private HPSO_LSPanel hpsolsFeatSelectionPanel
    • simpleGAFeatSelectionPanel

      private SimpleGAPanel simpleGAFeatSelectionPanel
    • hgafsFeatSelectionPanel

      private HGAFSPanel hgafsFeatSelectionPanel
    • optimalACOFeatSelectionPanel

      private OptimalACOPanel optimalACOFeatSelectionPanel
    • data

      private DatasetInfo data
    • svmEvaluationPanel

      private SVMClassifierPanel svmEvaluationPanel
    • dtEvaluationPanel

      private DTClassifierPanel dtEvaluationPanel
    • knnEvaluationPanel

      private KNNClassifierPanel knnEvaluationPanel
    • selectedEvaluationClassifierPanel

      private Object selectedEvaluationClassifierPanel
    • numSelectedSubsets

      private int[] numSelectedSubsets
    • finalResults

      private Results finalResults
  • Constructor Details

    • MainPanel

      public MainPanel(String path)
      Creates new form MainPanel. This method is called from within the constructor to initialize the form.
      Parameters:
      path - the path of the project
  • Method Details

    • paint

      public void paint(Graphics g)
      Recreates MainPanel based on the updated progress bar value.
      Overrides:
      paint in class JComponent
      Parameters:
      g - the Graphics context in which to paint
    • mi_preprocessActionPerformed

      private void mi_preprocessActionPerformed(ActionEvent e)
      This method sets an action for the mi_preprocess menu item.
      Parameters:
      e - an action event
    • mi_exitActionPerformed

      private void mi_exitActionPerformed(ActionEvent e)
      This method sets an action for the mi_exit menu item.
      Parameters:
      e - an action event
    • mi_exeTimeActionPerformed

      private void mi_exeTimeActionPerformed(ActionEvent e)
      This method sets an action for the mi_exeTime menu item.
      Parameters:
      e - an action event
    • mi_accurActionPerformed

      private void mi_accurActionPerformed(ActionEvent e)
      This method sets an action for the mi_accur menu item.
      Parameters:
      e - an action event
    • mi_errorActionPerformed

      private void mi_errorActionPerformed(ActionEvent e)
      This method sets an action for the mi_error menu item.
      Parameters:
      e - an action event
    • mi_friedmanActionPerformed

      private void mi_friedmanActionPerformed(ActionEvent e)
      This method sets an action for the mi_friedman menu item.
      Parameters:
      e - an action event
    • mi_helpActionPerformed

      private void mi_helpActionPerformed(ActionEvent e)
      This method sets an action for the mi_help menu item.
      Parameters:
      e - an action event
    • mi_aboutActionPerformed

      private void mi_aboutActionPerformed(ActionEvent e)
      This method sets an action for the mi_about menu item.
      Parameters:
      e - an action event
    • btn_inputdstActionPerformed

      private void btn_inputdstActionPerformed(ActionEvent e)
      This method sets an action for the btn_inputdst button.
      Parameters:
      e - an action event
    • btn_classlblActionPerformed

      private void btn_classlblActionPerformed(ActionEvent e)
      This method sets an action for the btn_classlbl button.
      Parameters:
      e - an action event
    • btn_trainSetActionPerformed

      private void btn_trainSetActionPerformed(ActionEvent e)
      This method sets an action for the btn_trainSet button.
      Parameters:
      e - an action event
    • btn_testSetActionPerformed

      private void btn_testSetActionPerformed(ActionEvent e)
      This method sets an action for the btn_testSet button.
      Parameters:
      e - an action event
    • btn_classLabelActionPerformed

      private void btn_classLabelActionPerformed(ActionEvent e)
      This method sets an action for the btn_classLabel button.
      Parameters:
      e - an action event
    • btn_moreOpFilterActionPerformed

      private void btn_moreOpFilterActionPerformed(ActionEvent e)
      This method sets an action for the btn_moreOpFilter button.
      Parameters:
      e - an action event
    • btn_moreOpWrapperActionPerformed

      private void btn_moreOpWrapperActionPerformed(ActionEvent e)
      This method sets an action for the btn_moreOpWrapper button.
      Parameters:
      e - an action event
    • btn_moreOpEmbeddedActionPerformed

      private void btn_moreOpEmbeddedActionPerformed(ActionEvent e)
      This method sets an action for the btn_moreOpEmbedded button.
      Parameters:
      e - an action event
    • btn_moreOpHybridActionPerformed

      private void btn_moreOpHybridActionPerformed(ActionEvent e)
      This method sets an action for the btn_moreOpHybrid button.
      Parameters:
      e - an action event
    • btn_moreOpClassifierActionPerformed

      private void btn_moreOpClassifierActionPerformed(ActionEvent e)
      This method sets an action for the btn_moreOpClassifier button.
      Parameters:
      e - an action event
    • btn_startActionPerformed

      private void btn_startActionPerformed(ActionEvent e)
      This method sets an action for the btn_start button.
      Parameters:
      e - an action event
    • btn_exitActionPerformed

      private void btn_exitActionPerformed(ActionEvent e)
      This method sets an action for the btn_exit button.
      Parameters:
      e - an action event
    • rd_randSetItemStateChanged

      private void rd_randSetItemStateChanged(ItemEvent e)
      This method sets an action for the rd_randSet radio button.
      Parameters:
      e - an action event
    • rd_ttsetSetItemStateChanged

      private void rd_ttsetSetItemStateChanged(ItemEvent e)
      This method sets an action for the rd_ttsetSet radio button.
      Parameters:
      e - an action event
    • cb_supervisedItemStateChanged

      private void cb_supervisedItemStateChanged(ItemEvent e)
      This method sets an action for the cb_supervised combo box.
      Parameters:
      e - an action event
    • cb_unsupervisedItemStateChanged

      private void cb_unsupervisedItemStateChanged(ItemEvent e)
      This method sets an action for the cb_unsupervised combo box.
      Parameters:
      e - an action event
    • cb_wrapperItemStateChanged

      private void cb_wrapperItemStateChanged(ItemEvent e)
      This method sets an action for the cb_wrapper combo box.
      Parameters:
      e - an action event
    • cb_embeddedItemStateChanged

      private void cb_embeddedItemStateChanged(ItemEvent e)
      This method sets an action for the cb_embedded combo box.
      Parameters:
      e - an action event
    • cb_hybridItemStateChanged

      private void cb_hybridItemStateChanged(ItemEvent e)
      This method sets an action for the cb_hybrid combo box.
      Parameters:
      e - an action event
    • cb_classifierItemStateChanged

      private void cb_classifierItemStateChanged(ItemEvent e)
      This method sets an action for the cb_classifier combo box.
      Parameters:
      e - an action event
    • cb_startItemStateChanged

      private void cb_startItemStateChanged(ItemEvent e)
      This method sets an action for the cb_start combo box.
      Parameters:
      e - an action event
    • getFilterApproachParameters

      private Object[] getFilterApproachParameters(FilterType type, int sizeSelectedFeatureSubset)
      This method returns a list of parameters that are applied in a given filter-based feature selection method
      Parameters:
      type - type of the feature selection method
      sizeSelectedFeatureSubset - the number of selected features
      Returns:
      a list of parameters
    • getWeightedFilterApproachParameters

      private Object[] getWeightedFilterApproachParameters(FilterType type, int sizeSelectedFeatureSubset)
      This method returns a list of parameters that are applied in a given feature weighting method
      Parameters:
      type - type of the feature selection method
      sizeSelectedFeatureSubset - the number of selected features
      Returns:
      a list of parameters
    • getWrapperApproachParameters

      private Object[] getWrapperApproachParameters(WrapperType type, int numFeatures)
      This method returns a list of parameters that are applied in a given wrapper-based feature selection method
      Parameters:
      type - type of the feature selection method
      numFeatures - the number of original features
      Returns:
      a list of parameters
    • getEmbeddedApproachParameters

      private Object[] getEmbeddedApproachParameters(EmbeddedType type)
      This method returns a list of parameters that are applied in a given embedded-based feature selection method
      Parameters:
      type - type of the feature selection method
      Returns:
      a list of parameters
    • getHybridApproachParameters

      private Object[] getHybridApproachParameters(HybridType type, int sizeSelectedFeatureSubset)
      This method returns a list of parameters that are applied in a given hybrid-based feature selection method
      Parameters:
      type - type of the feature selection method
      sizeSelectedFeatureSubset - the number of selected features
      Returns:
      a list of parameters
    • weightedFilterApproachPerform

      private void weightedFilterApproachPerform(FilterType type, boolean isSupervised)
      This method performs the feature selection based on weighted filter approach
      Parameters:
      type - name of the feature selection method
      isSupervised - shows that the feature selection method is supervised
    • filterApproachPerform

      private void filterApproachPerform(FilterType type, boolean isSupervised)
      This method performs the feature selection based on filter-based approach
      Parameters:
      type - name of the feature selection method
      isSupervised - shows that the feature selection method is supervised
    • wrapperApproachPerform

      private void wrapperApproachPerform(WrapperType type)
      This method performs the feature selection based on wrapper-based approach
      Parameters:
      type - name of the feature selection method
    • embeddedApproachPerform

      private void embeddedApproachPerform(EmbeddedType type)
      This method performs the feature selection based on embedded-based approach
      Parameters:
      type - name of the feature selection method
    • hybridApproachPerform

      private void hybridApproachPerform(HybridType type)
      This method performs the feature selection based on hybrid-based approach
      Parameters:
      type - name of the feature selection method
    • setEnabledItem

      private void setEnabledItem()
      enables the status of diagrams menu item
    • isCorrectDataset

      private boolean isCorrectDataset()
      This method checks the status of the paths of the data files
      Returns:
      true if the paths are valid
    • printErrorMessages

      private boolean printErrorMessages()
      This method prints the error messages due to unselected or incorrect input values in the dataset, parameter settings, classifier, and run configuration panels
      Returns:
      true if any error have been occurred
    • upProgValue

      private int upProgValue(int totalSize, int currentRun, int currentSize)
      This method updates the value of progress bar
      Parameters:
      totalSize - the size of different values of feature subsets
      currentRun - the current runs of the algorithm
      currentSize - the index of the current subset
      Returns:
      the new value of progress bar
    • createAndShow

      public void createAndShow()
      This method create and show the main panel of the project