Class TrainTestEvaluation

java.lang.Object
unifeat.classifier.evaluation.wekaClassifier.TrainTestEvaluation

public class TrainTestEvaluation extends Object
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 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 set
      pathTestData - the path of the test set
      svmKernel - the kernel to use
      c - the complexity parameter C
      Returns:
      the different criteria values
      See Also:
    • naiveBayes

      public static Criteria naiveBayes(String pathTrainData, String pathTestData)
      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 set
      pathTestData - 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 set
      pathTestData - the path of the test set
      confidenceValue - The confidence factor used for pruning
      minNumSampleInLeaf - The minimum number of instances per leaf
      Returns:
      the different criteria values
      See Also:
    • kNN

      public static Criteria kNN(String pathTrainData, String pathTestData, int kNNValue)
      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 set
      pathTestData - the path of the test set
      kNNValue - the number of neighbours to use
      Returns:
      the different criteria values
      See Also: