Package unifeat.result
Class Results
java.lang.Object
unifeat.result.Results
This java class is used to implement various methods for showing the results
in the result panel.
- Author:
- Sina Tabakhi
-
Field Summary
Modifier and TypeFieldDescriptionprivate ClassifierType
private double
private double[]
private int[]
(package private) DatasetInfo
private String
private int
private int
private String
private String
private String
private PerformanceMeasures
private Object
private String[][]
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate String
This method creates the given text for showing in the results panel.
The text is about some information of the dataset.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.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.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.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.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.void
Computes the average values of all criteria over number of runsvoid
computePerformanceMeasures
(int i, int j) Computes the performance measures based on given classifiervoid
This method creates a text file of the subsets of selected featuresReturns the performance measures of the obtained resultvoid
setCurrentFeatureValues
(double[] currentFeatureValues) Sets the values of each feature in the current run over given subset of selected featuresvoid
setCurrentSelectedSubset
(int i, int j, int[] currentSelectedSubset) Sets the subset of selected features in the current runvoid
setTime
(double value) Sets the execution time of the feature selection method in the current run.toString()
This method returns an empty stringtoString
(ResultType type) This method converts the obtained results over all runs to the string based on result type for showing in the result panel.
-
Field Details
-
data
DatasetInfo data -
PATH_PROJECT
-
PATH_DATA_CSV
-
PATH_DATA_ARFF
-
numRuns
private int numRuns -
numSelectedSubsets
private int numSelectedSubsets -
selectedFeatureSubsets
-
featureSelectionMethodName
-
currentExecutionTime
private double currentExecutionTime -
currentSelectedSubset
private int[] currentSelectedSubset -
currentFeatureValues
private double[] currentFeatureValues -
selectedEvaluationClassifierPanel
-
classifierType
-
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 datasetnumRuns
- numbers of runs of the feature selection methodnumSelectedSubsets
- numbers of selected feature subsetsprojectPath
- the path of the projectmethodName
- the name of given feature selection methodclassifierName
- the name of given classifierselectedEvaluationClassifierPanel
- panel of the selected classifier contained the parameter values
-
-
Method Details
-
toString
This method returns an empty string -
toString
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
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
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
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 insertnameMethod
- the name of feature selection method- Returns:
- the created message as a string
- See Also:
-
addTextToPanel
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 inserttitle
- the name of results- Returns:
- the created message as a string
- See Also:
-
addTextToPanel
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 inserttitle
- the name of results- Returns:
- the created message as a string
- See Also:
-
addTextToPanel
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 inserttitle
- the name of resultsisAverage
- 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 methodj
- the current subset of the selected featurescurrentSelectedSubset
- 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 methodj
- the current subset of the selected features
-
computeAverageValuesOfPerformanceMeasures
public void computeAverageValuesOfPerformanceMeasures()Computes the average values of all criteria over number of runs -
getPerformanceMeasures
Returns the performance measures of the obtained result- Returns:
- measures of the PerformanceMeasures class
-