89 bool parallelize =
true,
90 int contiguous = -1)
const override;
97 bool parallelize =
true,
98 int contiguous = -1)
const override;
105 Index past_time_steps = 2;
107 Index future_time_steps = 1;
109 bool multi_target =
false;
111 Index time_variable_index = 0;
Codification
Text encoding of the source data file.
Definition dataset.h:66
@ UTF8
Definition dataset.h:66
TabularDataset(const Index=0, const Shape &={0}, const Shape &={0})
Creates a tabular dataset with the given sample count and input/target shapes.
TimeSeriesDataset(const filesystem::path &, const string &, bool=true, bool=false, const Codification &=Codification::UTF8)
Creates a time series dataset by reading the given file with the given separator.
void set_future_time_steps(const Index)
Sets the number of future time steps used as prediction horizon.
void fill_inputs(const vector< Index > &, const vector< Index > &, float *, bool is_training, bool parallelize=true, int contiguous=-1) const override
Copies the past-window input features of the selected samples into the destination buffer.
void impute_missing_values_interpolate() override
Interpolates missing values along the time axis.
Index get_time_variable_index() const
Returns the index of the variable acting as the time axis.
TimeSeriesDataset(const Index=0, const Shape &={}, const Shape &={})
Creates a time series dataset with the given sample count and input/target shapes.
void set_multi_target(const bool)
Sets whether the dataset is configured for multi-target forecasting.
void to_JSON(JsonWriter &) const override
Writes dataset state to a JSON writer.
void from_JSON(const JsonDocument &) override
Loads dataset state from a JSON document.
void set_past_time_steps(const Index)
Sets the number of past time steps used as input context.
Index get_future_time_steps() const
Returns the number of future time steps used as prediction horizon.
void set_time_variable_index(const Index)
Sets the index of the variable acting as the time axis.
void impute_missing_values_unuse() override
Marks samples around missing values as unused (time-series aware).
void fill_gaps()
Fills missing rows between time stamps so the series has a uniform cadence.
void fill_targets(const vector< Index > &, const vector< Index > &, float *, bool is_training, bool parallelize=true, int contiguous=-1) const override
Copies the future-window target features of the selected samples into the destination buffer.
bool get_multi_target() const
Returns whether the dataset is configured for multi-target forecasting.
Tensor3 calculate_cross_correlations_spearman(const Index=10) const
Returns the Spearman cross-correlations between variables up to the given lag.
MatrixR calculate_autocorrelations(const Index=10) const
Returns the autocorrelation matrix up to the given maximum lag.
void resize_input_shape(Index) override
Resizes the input shape, accounting for the configured past/future windows.
Index get_past_time_steps() const
Returns the number of past time steps used as input context.
Tensor3 get_data(const string &sample_role, const string &feature_role) const
Returns the windowed 3D tensor for the given sample and feature roles.
void read_csv()
Reads the configured CSV file into the time series dataset.
Tensor3 calculate_cross_correlations(const Index=10) const
Returns the Pearson cross-correlations between variables up to the given lag.
Definition adaptive_moment_estimation.h:14
Tensor< float, 3, Layout|AlignedMax > Tensor3
Definition pch.h:190
Matrix< float, Dynamic, Dynamic, Layout > MatrixR
Definition pch.h:177
Fixed-capacity small-vector describing tensor dimensions (rank up to MaxRank).
Definition tensor_utilities.h:42