Class DecisionTreeBasedMethod
java.lang.Object
unifeat.featureSelection.FeatureSelection
unifeat.featureSelection.embedded.EmbeddedApproach
unifeat.featureSelection.embedded.TreeBasedMethods.TreeBasedMethods
unifeat.featureSelection.embedded.TreeBasedMethods.DecisionTreeBasedMethod
This java class is used to implement the decision tree based methods.
- Author:
- Sina Tabakhi
- See Also:
-
Field Summary
Fields inherited from class unifeat.featureSelection.embedded.TreeBasedMethods.TreeBasedMethods
TEMP_PATH, TREE_TYPEFields inherited from class unifeat.featureSelection.embedded.EmbeddedApproach
classLabel, nameFeatures, PROJECT_PATHFields inherited from class unifeat.featureSelection.FeatureSelection
numClass, numFeatures, numSelectedFeature, selectedFeatureSubset, trainSet -
Constructor Summary
ConstructorsConstructorDescriptionDecisionTreeBasedMethod(Object... arguments) Initializes the parametersDecisionTreeBasedMethod(String path, double confidence, int minNum) Initializes the parametersDecisionTreeBasedMethod(String path, int randomTreeKValue, int randomTreeMaxDepth, double randomTreeMinNum, double randomTreeMinVarianceProp) Initializes the parameters -
Method Summary
Modifier and TypeMethodDescriptionprotected StringbuildClassifier(weka.core.Instances dataTrain) Generates a classifier using input datavoidStarts the feature selection process by Decision Tree based methodsprotected voidselectedFeatureSubset(String tree) Finds the feature subset from the nodes of the created tree (Used for C4.5 and Random Tree)Methods inherited from class unifeat.featureSelection.embedded.EmbeddedApproach
loadDataSet, loadDataSet, newMethod, originalFeatureSetMethods inherited from class unifeat.featureSelection.FeatureSelection
getSelectedFeatureSubset, setNumSelectedFeature, validate
-
Constructor Details
-
DecisionTreeBasedMethod
Initializes the parameters- Parameters:
arguments- array of parameter containsif the type of tree is C4.5 (
path,tree type,confidenceValue,minNumSampleInLeaf) in whichpathis the path of the project,tree typeis the type of tree,confidenceValueis the confidence factor used for pruning,minNumSampleInLeafis the minimum number of samples per leafif the type of tree is random tree (
path,tree type,KValue,MaxDepth,MinNum,,MinVarianceProp) in whichpathis the path of the project,tree typeis the type of tree,KValueis the number of randomly chosen attributes,MaxDepthis the maximum depth of the tree,MinNumis the minimum total weight of the instances in a leaf,MinVariancePropis the minimum proportion of the total variance
-
DecisionTreeBasedMethod
Initializes the parameters- Parameters:
path- the path of the projectconfidence- the confidence factor used for pruningminNum- the minimum number of samples per leaf
-
DecisionTreeBasedMethod
public DecisionTreeBasedMethod(String path, int randomTreeKValue, int randomTreeMaxDepth, double randomTreeMinNum, double randomTreeMinVarianceProp) Initializes the parameters- Parameters:
path- the path of the projectrandomTreeKValue- the number of randomly chosen attributesrandomTreeMaxDepth- the maximum depth of the treerandomTreeMinNum- the minimum total weight of the instances in a leafrandomTreeMinVarianceProp- the minimum proportion of the total variance (over all the data) required for split
-
-
Method Details
-
selectedFeatureSubset
Finds the feature subset from the nodes of the created tree (Used for C4.5 and Random Tree)- Specified by:
selectedFeatureSubsetin classTreeBasedMethods- Parameters:
tree- the generated tree based on the train set
-
buildClassifier
Generates a classifier using input data- Specified by:
buildClassifierin classTreeBasedMethods- Parameters:
dataTrain- the data to train the classifier- Returns:
- the output of the generated classifier
-
evaluateFeatures
public void evaluateFeatures()Starts the feature selection process by Decision Tree based methods- Specified by:
evaluateFeaturesin classFeatureSelection
-