Class Results

java.lang.Object
unifeat.result.Results

public class Results extends Object
This java class is used to implement various methods for showing the results in the result panel.
Author:
Sina Tabakhi
  • Field Details

    • data

    • PATH_PROJECT

      private String PATH_PROJECT
    • PATH_DATA_CSV

      private String PATH_DATA_CSV
    • PATH_DATA_ARFF

      private String PATH_DATA_ARFF
    • numRuns

      private int numRuns
    • numSelectedSubsets

      private int numSelectedSubsets
    • selectedFeatureSubsets

      private String[][] selectedFeatureSubsets
    • featureSelectionMethodName

      private String featureSelectionMethodName
    • currentExecutionTime

      private double currentExecutionTime
    • currentSelectedSubset

      private int[] currentSelectedSubset
    • currentFeatureValues

      private double[] currentFeatureValues
    • selectedEvaluationClassifierPanel

      private Object selectedEvaluationClassifierPanel
    • classifierType

      private ClassifierType classifierType
    • performanceMeasures

      private PerformanceMeasures performanceMeasures
  • Constructor Details

    • Results

      public Results(DatasetInfo data, int numRuns, int numSelectedSubsets, String projectPath, Object methodName, Object classifierName, Object selectedEvaluationClassifierPanel)
      Initializes the parameters
      Parameters:
      data - the data class contains all information of the input dataset
      numRuns - numbers of runs of the feature selection method
      numSelectedSubsets - numbers of selected feature subsets
      projectPath - the path of the project
      methodName - the name of given feature selection method
      classifierName - the name of given classifier
      selectedEvaluationClassifierPanel - panel of the selected classifier contained the parameter values
  • Method Details

    • toString

      public String toString()
      This method returns an empty string
      Overrides:
      toString in class Object
      Returns:
      an empty string
    • toString

      public String toString(ResultType type)
      This method converts the obtained results over all runs to the string based on result type for showing in the result panel.
      Parameters:
      type - type of the result
      Returns:
      a string of the result
    • addTextToPanel

      private String addTextToPanel()
      This method creates the given text for showing in the results panel.
      The text is about some information of the dataset.
      Returns:
      the created message as a string
      See Also:
    • addTextToPanel

      private String addTextToPanel(int[] array)
      This method creates the given text for showing in the results panel.
      The text is about the subset of selected features.
      Parameters:
      array - an array of text to insert
      Returns:
      the created message as a string
      See Also:
    • addTextToPanel

      private String addTextToPanel(double[] array, String nameMethod)
      This method creates the given text for showing in the results panel.
      The text is about the relevance values of features computed by given feature selection method.
      Parameters:
      array - an array of text to insert
      nameMethod - the name of feature selection method
      Returns:
      the created message as a string
      See Also:
    • addTextToPanel

      private String addTextToPanel(String[][] array, String title)
      This method creates the given text for showing in the results panel.
      The text is about the final subsets of selected features.
      Parameters:
      array - an array of text to insert
      title - the name of results
      Returns:
      the created message as a string
      See Also:
    • addTextToPanel

      private String addTextToPanel(double[][] array, String title)
      This method creates the given text for showing in the results panel.
      The text is about the classification accuracy and execution time in each iteration.
      Parameters:
      array - an array of text to insert
      title - the name of results
      Returns:
      the created message as a string
      See Also:
    • addTextToPanel

      private String addTextToPanel(double[][] array, String title, boolean isAverage)
      This method creates the given text for showing in the results panel.
      The text is about the average classification accuracies and average execution times in all iteration.
      Parameters:
      array - an array of text to insert
      title - the name of results
      isAverage - shows that the average values must be displayed
      Returns:
      the created message as a string
      See Also:
    • createFeatureFiles

      public void createFeatureFiles()
      This method creates a text file of the subsets of selected features
    • setTime

      public void setTime(double value)
      Sets the execution time of the feature selection method in the current run.
      Parameters:
      value - execution time of the feature selection method
    • setCurrentSelectedSubset

      public void setCurrentSelectedSubset(int i, int j, int[] currentSelectedSubset)
      Sets the subset of selected features in the current run
      Parameters:
      i - the current run of the feature selection method
      j - the current subset of the selected features
      currentSelectedSubset - an array of the indices of the selected features
    • setCurrentFeatureValues

      public void setCurrentFeatureValues(double[] currentFeatureValues)
      Sets the values of each feature in the current run over given subset of selected features
      Parameters:
      currentFeatureValues - an array of the values of each feature
    • computePerformanceMeasures

      public void computePerformanceMeasures(int i, int j)
      Computes the performance measures based on given classifier
      Parameters:
      i - the current run of the feature selection method
      j - the current subset of the selected features
    • computeAverageValuesOfPerformanceMeasures

      public void computeAverageValuesOfPerformanceMeasures()
      Computes the average values of all criteria over number of runs
    • getPerformanceMeasures

      public PerformanceMeasures getPerformanceMeasures()
      Returns the performance measures of the obtained result
      Returns:
      measures of the PerformanceMeasures class