19#ifndef ARIMARESAMPLING_H
20#define ARIMARESAMPLING_H
29 using namespace ARIMAutils;
315 ARIMAResampling(
const std::string &i_algoname,
const std::string &i_parname,
const double &dflt_window_size,
316 const std::vector<std::pair<std::string, std::string>> &vecArgs);
319 void resample(
const std::string &stationHash,
const size_t &index,
const ResamplingPosition &position,
const size_t ¶mindex,
320 const std::vector<MeteoData> &vecM,
MeteoData &md);
326 std::vector<ARIMA_GAP> gap_data;
327 std::vector<std::vector<double>> filled_data;
328 std::vector<std::vector<Date>> all_dates;
331 double before_window, after_window;
334 int max_p = 8, max_d = 3, max_q = 8;
335 int start_p = 2, start_q = 2;
336 int max_P = 2, max_D = 1, max_Q = 2;
337 int start_P = 1, start_Q = 1;
341 bool stepwise =
true, approximation =
true;
343 bool seasonal =
true, stationary =
false;
346 bool set_arima_manual =
false;
347 bool fill_backward_manual =
false;
348 int p = 0, d = 0, q = 0;
349 int P = 0, D = 0, Q = 0;
352 bool is_zero_possible =
false;
353 bool checked_vecM =
false;
354 bool gave_warning_end =
false;
355 bool gave_warning_start =
false;
356 bool gave_warning_interpol =
false;
357 std::vector<bool> is_valid_gap_data;
358 std::vector<bool> warned_about_gap;
363 std::vector<double> predictData(std::vector<double> &data,
const std::string &direction,
size_t startIdx_interpol,
364 size_t length_gap_interpol,
int sr_period);
367 void checkZeroPossibility(
const std::vector<MeteoData> &vecM,
size_t paramindex);
368 bool processKnownGaps(
const Date &resampling_date,
const size_t paramindex,
370 void setEndGap(
ARIMA_GAP &new_gap,
Date &data_start_date,
Date &data_end_date,
const std::vector<MeteoData> &vecM,
371 const Date &resampling_date);
372 double interpolVecAt(
const std::vector<MeteoData> &vecM,
const size_t &idx,
const Date &date,
const size_t ¶mindex);
373 double interpolVecAt(
const std::vector<double> &data,
const std::vector<Date> &dates,
const size_t &pos,
const Date &date);
374 void resampleInterpolationData(
size_t &length_gap_interpol,
size_t &endIdx_interpol,
size_t &startIdx_interpol,
375 const ARIMA_GAP &new_gap,
const Date &data_start_date,
const Date &data_end_date,
376 const std::vector<MeteoData> &data_vec_before,
const std::vector<MeteoData> &data_vec_after,
377 bool has_data_before,
bool has_data_after,
size_t paramindex, std::vector<double> &data,
378 std::vector<Date> &dates,
size_t length);
379 std::vector<double> getInterpolatedData(std::vector<double> &data,
size_t size_before,
size_t size_after,
size_t startIdx_interpol,
380 size_t length_gap_interpol,
int period);
381 void cacheGap(
const std::vector<double> &interpolated_data,
const std::vector<Date> &interpolated_dates,
const ARIMA_GAP &new_gap);
This class is designed to handle interpolation (resampling) of data using the ARIMA (AutoRegressive I...
Definition: ARIMAResampling.h:313
void resample(const std::string &stationHash, const size_t &index, const ResamplingPosition &position, const size_t ¶mindex, const std::vector< MeteoData > &vecM, MeteoData &md)
Definition: ARIMAResampling.cc:474
ARIMAResampling(const std::string &i_algoname, const std::string &i_parname, const double &dflt_window_size, const std::vector< std::pair< std::string, std::string > > &vecArgs)
Definition: ARIMAResampling.cc:27
std::string toString() const
Definition: ARIMAResampling.cc:143
Mode
Definition: ARIMAutils.h:54
A class to handle timestamps. This class handles conversion between different time display formats (I...
Definition: Date.h:87
This class is used for interpolating or predicting missing data in a time series using the Auto ARIMA...
Definition: InterpolARIMA.h:89
A class to represent a singular measurement received from one station at a certain time (represented ...
Definition: MeteoData.h:107
Interface class for the temporal resampling algorithms.
Definition: ResamplingAlgorithms.h:43
ResamplingPosition
Definition: ResamplingAlgorithms.h:46
OptimizationMethod
Definition: ARIMAutils.h:39
@ BFGS
Definition: ARIMAutils.h:45
ObjectiveFunction
Definition: ARIMAutils.h:34
@ CSS_MLE
Definition: ARIMAutils.h:35
Definition: ARIMAutils.h:147