Interface DatasetReader

All Known Implementing Classes:
AbstractCSVReader, MultipleCSVReader, SingleCSVReader

public interface DatasetReader
Interface for classes that read datasets.
  • Method Details

    • getNameClassVariables

      List<String> getNameClassVariables()
      Returns the name of the class variables.
      Returns:
      name of the class variables.
    • getNameFeatureVariables

      List<String> getNameFeatureVariables()
      Returns the name of the feature variables.
      Returns:
      name of the feature variables.
    • getNameTimeVariable

      String getNameTimeVariable()
      Returns the name of the time variable.
      Returns:
      name of the time variable.
    • getNameVariables

      List<String> getNameVariables()
      Returns the names of all the variables of the dataset, including those that are not used.
      Returns:
      names of the variables
    • isDatasetOutdated

      boolean isDatasetOutdated()
      Indicates if the dataset is out-of-date.
      Returns:
      true if dataset is out-of-date; false otherwise.
    • readDataset

      Dataset readDataset() throws UnreadDatasetException
      Returns a dataset.
      Returns:
      a Dataset
      Throws:
      UnreadDatasetException - if the provided dataset could not be read
    • readDataset

      Dataset readDataset(int numFiles) throws UnreadDatasetException
      Creates a dataset using only the specified number of files. This method allows reading datasets using batches.
      Parameters:
      numFiles - number of files
      Returns:
      a Dataset
      Throws:
      UnreadDatasetException - thrown if the dataset could not be read
    • removeZeroVarianceVariables

      void removeZeroVarianceVariables(boolean removeZeroVarianceVariable)
      Defines if the feature variables with no variance should be removed.
      Parameters:
      removeZeroVarianceVariable - true to remove zero variance feature variables, false
    • setDatasetAsOutdated

      void setDatasetAsOutdated(boolean outdated)
      Defines a previously read dataset as out-of-date, so it should be reloaded.
      Parameters:
      outdated - true to set dataset as out-of-date; false otherwise.
    • setTimeAndClassVariables

      void setTimeAndClassVariables(String nameTimeVariable, List<String> nameClassVariables)
      Receives the names of the time and class variables of a dataset. All the other variables are considered feature variables.
      Parameters:
      nameTimeVariable - name of the time variable
      nameClassVariables - name of the class variables
    • setTimeAndFeatureVariables

      void setTimeAndFeatureVariables(String nameTimeVariable, List<String> nameFeatureVariables)
      Receives the names of the time and feature variables of a dataset. This method can be used, for example, when reading datasets to be classified.
      Parameters:
      nameTimeVariable - name of the time variable
      nameFeatureVariables - name of the feature variables
    • setTimeVariable

      void setTimeVariable(String nameTimeVariable)
      Receives the name of the time variable of a dataset.
      Parameters:
      nameTimeVariable - name of the time variable
    • setVariables

      void setVariables(String nameTimeVariable, List<String> nameClassVariables, List<String> nameFeatureVariables)
      Receives the names of the time variable, feature variables and class variables of a dataset. This method can be used, for example, when read training datasets.
      Parameters:
      nameTimeVariable - name of the time variable
      nameClassVariables - names of the class variables
      nameFeatureVariables - names of the feature variables