58 bool has_sample_index =
false,
153 const vector<Index>&,
156 int contiguous = -1)
const override;
166 const vector<Index>&,
169 int contiguous = -1)
const override;
174 Index past_time_steps = 2;
177 Index future_time_steps = 1;
180 bool multi_target =
false;
183 Index time_variable_index = 0;
Codification codification
Source-file character encoding.
Definition dataset.h:1354
bool has_header
Whether the source file's first row contains column names.
Definition dataset.h:1348
Shape target_shape
Shape of the target portion.
Definition dataset.h:1317
Codification
Source-file character encoding.
Definition dataset.h:116
@ UTF8
Definition dataset.h:116
Separator separator
Field separator used in the source file.
Definition dataset.h:1340
Dataset(const Index samples_number=0, const Shape &input_shape={0}, const Shape &target_shape={0})
Constructs an empty dataset of given dimensions.
Shape input_shape
Shape of the input portion (rank may exceed 1 for image/sequence data).
Definition dataset.h:1315
MatrixR calculate_autocorrelations(const Index maximum_lag=10) const
Computes the autocorrelation function of every variable.
TimeSeriesDataset(const filesystem::path &path, const string &separator, bool has_header=true, bool has_sample_index=false, const Codification &codification=Codification::UTF8)
Constructs a TimeSeriesDataset by loading from a CSV file.
Tensor3 calculate_cross_correlations(const Index maximum_lag=10) const
Computes the Pearson cross-correlation between every variable pair.
void set_future_time_steps(const Index)
Sets the forecast horizon.
void fill_inputs(const vector< Index > &, const vector< Index > &, float *, bool=true, int contiguous=-1) const override
Fills the input batch buffer with past-window data.
void impute_missing_values_interpolate() override
Imputes missing values via temporal interpolation.
Index get_time_variable_index() const
Column index of the time variable.
void set_multi_target(const bool)
Sets whether the dataset has more than one target variable.
void to_JSON(JsonWriter &) const override
Writes dataset metadata (windows, time variable) to JSON.
void from_JSON(const JsonDocument &) override
Loads dataset metadata (windows, time variable) from JSON.
void set_past_time_steps(const Index)
Sets the input window length.
Index get_future_time_steps() const
Number of future time steps used as targets.
void read_csv() override
Reads time-series rows from the configured CSV file.
void set_time_variable_index(const Index)
Sets the column index of the time variable.
void impute_missing_values_unuse() override
Marks rows with missing values as None (excluded from training).
Tensor3 calculate_cross_correlations_spearman(const Index maximum_lag=10) const
Computes the Spearman cross-correlation between every variable pair.
void fill_gaps()
Fills missing time steps with imputed rows so the time variable becomes evenly spaced.
TimeSeriesDataset(const Index samples_number=0, const Shape &input_shape={}, const Shape &target_shape={})
Constructs an empty TimeSeriesDataset of given dimensions.
bool get_multi_target() const
Whether the dataset has more than one target variable.
Index get_past_time_steps() const
Number of past time steps used as inputs.
void fill_targets(const vector< Index > &, const vector< Index > &, float *, bool=true, int contiguous=-1) const override
Fills the target batch buffer with future-window data.
Tensor3 get_data(const string &sample_role, const string &feature_role) const
Returns the data tensor for the given sample / feature roles.
Declares the Dataset class and the SampleRole enum.
Definition adaptive_moment_estimation.h:19
Matrix< float, Dynamic, Dynamic, Layout > MatrixR
Definition neural_network.h:152
Tensor< float, 3, Layout|AlignedMax > Tensor3
Definition neural_network.h:165
Definition tensor_utilities.h:46