Class CrossValidation
java.lang.Object
unifeat.classifier.evaluation.wekaClassifier.CrossValidation
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 k-fold cross validation 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, int kFold) This method builds and evaluates the naiveBayes(NB) classifier.static Criteria
SVM
(String pathTrainData, SVMKernelType svmKernel, double c, int kFold) This method builds and evaluates the support vector machine(SVM) classifier.
-
Constructor Details
-
CrossValidation
public CrossValidation()
-
-
Method Details
-
SVM
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 setsvmKernel
- the kernel to usec
- the complexity parameter CkFold
- the number of equal sized subsamples- 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 setkFold
- the number of equal sized subsamples- Returns:
- the different criteria values
- See Also:
-
dTree
public static Criteria dTree(String pathTrainData, double confidenceValue, int minNumSampleInLeaf, int kFold) 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 setconfidenceValue
- The confidence factor used for pruningminNumSampleInLeaf
- The minimum number of instances per leafkFold
- the number of equal sized subsamples- 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 setkNNValue
- the number of neighbours to usekFold
- the number of equal sized subsamples- Returns:
- the different criteria values
- See Also:
-