Class DatasetInfo

java.lang.Object
unifeat.dataset.DatasetInfo

public class DatasetInfo extends Object
This java class is used to keep the input data, split input data to test/train sets and crate CSV file format.
Author:
Sina Tabakhi
  • Constructor Details

    • DatasetInfo

      public DatasetInfo()
  • Method Details

    • preProcessing

      public void preProcessing(String path1, String path2)
      This is used to read dataset and class label files, split datasets and set their values
      Parameters:
      path1 - the path of the datasets
      path2 - the path of the class labels
    • preProcessing

      public void preProcessing(String path1, String path2, String path3)
      This is used to read datasets and class labels, split datasets and set their values
      Parameters:
      path1 - the path of the train set
      path2 - the path of the test set
      path3 - the path of the class labels
    • isCorrectDataset

      public boolean isCorrectDataset()
      This is used to return the status of the dataset
      Returns:
      true if the dataset file is in the correct format
    • isCorrectClassLabel

      public boolean isCorrectClassLabel()
      This is used to return the status of the class label file
      Returns:
      true if the class labels file is in the correct format
    • isCorrectSamplesClass

      public boolean isCorrectSamplesClass()
      This is used to return the status of the samples' class
      Returns:
      true if the the class labels of the samples is valid
    • isCompatibleTrainTestSet

      public boolean isCompatibleTrainTestSet()
      This is used to return the status of train/test sets
      Returns:
      true if the train and test sets are compatible
    • getNumData

      public int getNumData()
      This is used to return number of samples in the dataset(train set + test set)
      Returns:
      number of samples
    • getNumFeature

      public int getNumFeature()
      This is used to return number of features in each sample
      Returns:
      number of features
    • getNumTrainSet

      public int getNumTrainSet()
      This is used to return number of samples in the train set
      Returns:
      number of samples in the train set
    • getNumTestSet

      public int getNumTestSet()
      This is used to return number of samples in the test set
      Returns:
      number of samples in the test set
    • getNumClass

      public int getNumClass()
      This is used to return number of classes in the dataset
      Returns:
      number of classes in the dataset
    • getClassLabel

      public String[] getClassLabel()
      This is used to return the names of class labels
      Returns:
      the array of class labels' names
    • getTrainSet

      public double[][] getTrainSet()
      This is used to return the train set values
      Returns:
      the matrix of train set
    • getTestSet

      public double[][] getTestSet()
      This is used to return the test set values
      Returns:
      the matrix of test set
    • getNameFeatures

      public String[] getNameFeatures()
      This is used to return the names of features
      Returns:
      the array of features' names
    • createFeatNames

      public String createFeatNames(int[] array)
      This method creates a string of the names of features in the selected feature array
      Parameters:
      array - the array of indices of the selected features
      Returns:
      a string of the integer array