Class TrainTestEvaluation
java.lang.Object
unifeat.classifier.evaluation.wekaClassifier.TrainTestEvaluation
This java class is used to apply the classifiers for computing the
performance of the feature selection methods. The classifiers have been
implemented as the Weka software. The training-test sets method is used for
evaluating classifiers.
- Author:
- Sina Tabakhi
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Criteria
This method builds and evaluates the decision tree(DT) classifier.static Criteria
This method builds and evaluates the k-nearest neighbours(knn) classifier.static Criteria
naiveBayes
(String pathTrainData, String pathTestData) This method builds and evaluates the naiveBayes(NB) classifier.static Criteria
SVM
(String pathTrainData, String pathTestData, SVMKernelType svmKernel, double c) This method builds and evaluates the support vector machine(SVM) classifier.
-
Constructor Details
-
TrainTestEvaluation
public TrainTestEvaluation()
-
-
Method Details
-
SVM
public static Criteria SVM(String pathTrainData, String pathTestData, SVMKernelType svmKernel, double c) This method builds and evaluates the support vector machine(SVM) classifier. The SMO is used as the SVM classifier implemented in the Weka software.- Parameters:
pathTrainData
- the path of the train setpathTestData
- the path of the test setsvmKernel
- the kernel to usec
- the complexity parameter C- Returns:
- the different criteria values
- See Also:
-
naiveBayes
This method builds and evaluates the naiveBayes(NB) classifier. The naiveBayes is used as the NB classifier implemented in the Weka software.- Parameters:
pathTrainData
- the path of the train setpathTestData
- the path of the test set- Returns:
- the different criteria values
- See Also:
-
dTree
public static Criteria dTree(String pathTrainData, String pathTestData, double confidenceValue, int minNumSampleInLeaf) This method builds and evaluates the decision tree(DT) classifier. The j48 is used as the DT classifier implemented in the Weka software.- Parameters:
pathTrainData
- the path of the train setpathTestData
- the path of the test setconfidenceValue
- The confidence factor used for pruningminNumSampleInLeaf
- The minimum number of instances per leaf- Returns:
- the different criteria values
- See Also:
-
kNN
This method builds and evaluates the k-nearest neighbours(knn) classifier. The IBk is used as the knn classifier implemented in the Weka software.- Parameters:
pathTrainData
- the path of the train setpathTestData
- the path of the test setkNNValue
- the number of neighbours to use- Returns:
- the different criteria values
- See Also:
-