19#ifndef ARIMARESAMPLING_H
20#define ARIMARESAMPLING_H
29 using namespace ARIMAutils;
322 ARIMAResampling(
const std::string &i_algoname,
const std::string &i_parname,
const double &dflt_max_gap_size,
323 const std::vector<std::pair<std::string, std::string>> &vecArgs);
326 void resample(
const std::string &stationHash,
const size_t &index,
const ResamplingPosition &position,
const size_t ¶mindex,
327 const std::vector<MeteoData> &vecM,
MeteoData &md);
333 std::vector<ARIMA_GAP> gap_data;
334 std::vector<std::vector<double>> filled_data;
335 std::vector<std::vector<Date>> all_dates;
338 double before_window, after_window;
341 int max_p = 8, max_d = 3, max_q = 8;
342 int start_p = 2, start_q = 2;
343 int max_P = 2, max_D = 1, max_Q = 2;
344 int start_P = 1, start_Q = 1;
348 bool stepwise =
true, approximation =
true;
350 bool seasonal =
true, stationary =
false;
353 bool set_arima_manual =
false;
354 bool fill_backward_manual =
false;
355 int p = 0, d = 0, q = 0;
356 int P = 0, D = 0, Q = 0;
359 bool is_zero_possible =
false;
360 bool checked_vecM =
false;
361 bool gave_warning_end =
false;
362 bool gave_warning_start =
false;
363 bool gave_warning_interpol =
false;
364 std::vector<bool> is_valid_gap_data;
365 std::vector<bool> warned_about_gap;
370 std::vector<double> predictData(std::vector<double> &data,
const std::string &direction,
size_t startIdx_interpol,
371 size_t length_gap_interpol,
int sr_period);
374 void checkZeroPossibility(
const std::vector<MeteoData> &vecM,
size_t paramindex);
375 bool processKnownGaps(
const Date &resampling_date,
const size_t paramindex,
377 double interpolVecAt(
const std::vector<MeteoData> &vecM,
const size_t &idx,
const Date &date,
const size_t ¶mindex);
378 double interpolVecAt(
const std::vector<double> &data,
const std::vector<Date> &dates,
const size_t &pos,
const Date &date);
379 double interpolVecAt(std::vector<MeteoData> &vecMet,
const Date &date,
const size_t ¶mindex);
380 void resampleInterpolationData(
size_t &length_gap_interpol,
size_t &endIdx_interpol,
size_t &startIdx_interpol,
381 const ARIMA_GAP &new_gap,
const Date &data_start_date,
const Date &data_end_date,
382 std::vector<MeteoData> &data_vec_before, std::vector<MeteoData> &data_vec_after,
383 bool has_data_before,
bool has_data_after,
size_t paramindex, std::vector<double> &data,
384 std::vector<Date> &dates,
size_t length);
385 std::vector<double> getInterpolatedData(std::vector<double> &data,
size_t size_before,
size_t size_after,
size_t startIdx_interpol,
386 size_t length_gap_interpol,
int period);
387 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:320
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:470
std::string toString() const
Definition: ARIMAResampling.cc:138
ARIMAResampling(const std::string &i_algoname, const std::string &i_parname, const double &dflt_max_gap_size, const std::vector< std::pair< std::string, std::string > > &vecArgs)
Definition: ARIMAResampling.cc:27
Mode
Definition: ARIMAutils.h:57
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:104
A class to represent a singular measurement received from one station at a certain time (represented ...
Definition: MeteoData.h:108
Interface class for the temporal resampling algorithms.
Definition: ResamplingAlgorithms.h:43
ResamplingPosition
Definition: ResamplingAlgorithms.h:46
OptimizationMethod
Definition: ARIMAutils.h:41
@ BFGS
Definition: ARIMAutils.h:47
ObjectiveFunction
Definition: ARIMAutils.h:34
@ CSS_MLE
Definition: ARIMAutils.h:35
Definition: ARIMAutils.h:150