Module es.upm.fi.cig.multictbnc
Interface DatasetReader
- All Known Implementing Classes:
AbstractCSVReader,MultipleCSVReader,SingleCSVReader
public interface DatasetReader
Interface for classes that read datasets.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the name of the class variables.Returns the name of the feature variables.Returns the name of the time variable.Returns the names of all the variables of the dataset, including those that are not used.booleanIndicates if the dataset is out-of-date.Returns a dataset.readDataset(int numFiles) Creates a dataset using only the specified number of files.voidremoveZeroVarianceVariables(boolean removeZeroVarianceVariable) Defines if the feature variables with no variance should be removed.voidsetDatasetAsOutdated(boolean outdated) Defines a previously read dataset as out-of-date, so it should be reloaded.voidsetTimeAndClassVariables(String nameTimeVariable, List<String> nameClassVariables) Receives the names of the time and class variables of a dataset.voidsetTimeAndFeatureVariables(String nameTimeVariable, List<String> nameFeatureVariables) Receives the names of the time and feature variables of a dataset.voidsetTimeVariable(String nameTimeVariable) Receives the name of the time variable of a dataset.voidsetVariables(String nameTimeVariable, List<String> nameClassVariables, List<String> nameFeatureVariables) Receives the names of the time variable, feature variables and class variables of a dataset.
-
Method Details
-
getNameClassVariables
Returns the name of the class variables.- Returns:
- name of the class variables.
-
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
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:
trueif dataset is out-of-date;falseotherwise.
-
readDataset
Returns a dataset.- Returns:
- a
Dataset - Throws:
UnreadDatasetException- if the provided dataset could not be read
-
readDataset
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-trueto 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-trueto set dataset as out-of-date;falseotherwise.
-
setTimeAndClassVariables
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 variablenameClassVariables- name of the class variables
-
setTimeAndFeatureVariables
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 variablenameFeatureVariables- name of the feature variables
-
setTimeVariable
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 variablenameClassVariables- names of the class variablesnameFeatureVariables- names of the feature variables
-