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.boolean
Indicates if the dataset is out-of-date.Returns a dataset.readDataset
(int numFiles) Creates a dataset using only the specified number of files.void
removeZeroVarianceVariables
(boolean removeZeroVarianceVariable) Defines if the feature variables with no variance should be removed.void
setDatasetAsOutdated
(boolean outdated) Defines a previously read dataset as out-of-date, so it should be reloaded.void
setTimeAndClassVariables
(String nameTimeVariable, List<String> nameClassVariables) Receives the names of the time and class variables of a dataset.void
setTimeAndFeatureVariables
(String nameTimeVariable, List<String> nameFeatureVariables) Receives the names of the time and feature variables of a dataset.void
setTimeVariable
(String nameTimeVariable) Receives the name of the time variable of a dataset.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.
-
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:
true
if dataset is out-of-date;false
otherwise.
-
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
-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
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
-