MeteoIODoc 20241221.207bde49
mio::ARIMAutils Namespace Reference

Classes

struct  ARIMA_GAP
 
class  Normalization
 

Enumerations

enum  ObjectiveFunction { CSS_MLE , MLE , CSS }
 
enum  OptimizationMethod {
  Nelder_Mead , Newton_Line_Search , Newton_Trust_Region_Hook_Step , Newton_Trust_Region_Double_Dog_Leg ,
  Conjugate_Gradient , BFGS , LBFGS , BFGS_MTM
}
 

Functions

std::vector< double > slice (const std::vector< double > &vec, size_t start, size_t N)
 
std::vector< double > slice (const std::vector< double > &vec, size_t start)
 
std::vector< double > arange (size_t start, size_t N)
 
double calcVecMean (const std::vector< double > &vec)
 
double stdDev (const std::vector< double > &vec)
 
std::vector< double > toVector (const std::vector< MeteoData > &vecM, const std::string &paramname)
 
std::vector< double > toVector (const std::vector< MeteoData > &vecM, const size_t &paramindex)
 
std::vector< double > decideDirection (const std::vector< double > &data, const std::string &direction, bool forward, size_t gap_loc, size_t length)
 
size_t searchBackward (ARIMA_GAP &last_gap, const size_t &pos, const size_t &paramindex, const std::vector< MeteoData > &vecM, const Date &resampling_date, const double &i_window_size)
 
size_t searchForward (ARIMA_GAP &last_gap, const size_t &pos, const size_t &paramindex, const std::vector< MeteoData > &vecM, const Date &resampling_date, const double &i_window_size, const size_t &indexP1)
 
bool requal (const Date &date1, const Date &date2)
 
static void adjustDataStartDate (ARIMA_GAP &last_gap, const std::vector< MeteoData > &vecM, const Date &resampling_date, Date &data_start_date, Date &data_end_date)
 
static void adjustGap (const ARIMA_GAP &last_gap, const std::vector< MeteoData > &vecM, const Date &resampling_date, Date &data_start_date, Date &data_end_date, const double &window_size)
 
void computeARIMAGap (ARIMA_GAP &last_gap, const size_t &pos, const size_t &paramindex, const std::vector< MeteoData > &vecM, const Date &resampling_date, size_t &indexP1, size_t &indexP2, double &before_window, double &after_window, double &window_size, Date &data_start_date, Date &data_end_date)
 
double mostLikelyValue (const std::vector< double > &vec)
 
double computeSamplingRate (Date data_start_date, Date data_end_date, std::vector< MeteoData > vecM)
 
static Date findFirstDateWithSamplingRate (const std::vector< MeteoData > &vecM, const double sampling_rate, const Date &data_start_date, const Date &data_end_date)
 
Date adjustStartDate (const std::vector< MeteoData > &vecM, const ARIMA_GAP &last_gap, Date data_start_date, const Date &data_end_date)
 
template<typename T >
findMinMax (const std::vector< T > &vec, bool findMin)
 
template<typename T >
void reverseVector (std::vector< T > &vec)
 
template<typename T >
std::vector< T > reverseVectorReturn (const std::vector< T > &vec)
 
Date findFirstDateWithSamplingRate (const std::vector< MeteoData > &vecM, const double sampling_rate, const Date &data_start_date, Date &data_end_date)
 
template<typename T >
std::string convertVectorsToString (const std::vector< std::vector< T > > &vecs)
 
template<typename T >
void printVectors (const std::vector< std::vector< T > > &vecs)
 
template<typename T >
void printVectors (const std::vector< Date > &vec1, const std::vector< T > &vec2)
 

Variables

const std::map< ObjectiveFunction, std::string > ObjectiveFunctionMap
 
const std::map< OptimizationMethod, std::string > OptimizationMethodMap
 

Enumeration Type Documentation

◆ ObjectiveFunction

Enumerator
CSS_MLE 
MLE 
CSS 

◆ OptimizationMethod

Enumerator
Nelder_Mead 
Newton_Line_Search 
Newton_Trust_Region_Hook_Step 
Newton_Trust_Region_Double_Dog_Leg 
Conjugate_Gradient 
BFGS 
LBFGS 
BFGS_MTM 

Function Documentation

◆ adjustDataStartDate()

static void mio::ARIMAutils::adjustDataStartDate ( ARIMA_GAP last_gap,
const std::vector< MeteoData > &  vecM,
const Date resampling_date,
Date data_start_date,
Date data_end_date 
)
static

◆ adjustGap()

static void mio::ARIMAutils::adjustGap ( const ARIMA_GAP last_gap,
const std::vector< MeteoData > &  vecM,
const Date resampling_date,
Date data_start_date,
Date data_end_date,
const double &  window_size 
)
static

◆ adjustStartDate()

Date mio::ARIMAutils::adjustStartDate ( const std::vector< MeteoData > &  vecM,
const ARIMA_GAP last_gap,
Date  data_start_date,
const Date data_end_date 
)

◆ arange()

std::vector< double > mio::ARIMAutils::arange ( size_t  start,
size_t  N 
)

◆ calcVecMean()

double mio::ARIMAutils::calcVecMean ( const std::vector< double > &  vec)

◆ computeARIMAGap()

void mio::ARIMAutils::computeARIMAGap ( ARIMA_GAP last_gap,
const size_t &  pos,
const size_t &  paramindex,
const std::vector< MeteoData > &  vecM,
const Date resampling_date,
size_t &  indexP1,
size_t &  indexP2,
double &  before_window,
double &  after_window,
double &  window_size,
Date data_start_date,
Date data_end_date 
)

◆ computeSamplingRate()

double mio::ARIMAutils::computeSamplingRate ( Date  data_start_date,
Date  data_end_date,
std::vector< MeteoData vecM 
)

◆ convertVectorsToString()

template<typename T >
std::string mio::ARIMAutils::convertVectorsToString ( const std::vector< std::vector< T > > &  vecs)

◆ decideDirection()

std::vector< double > mio::ARIMAutils::decideDirection ( const std::vector< double > &  data,
const std::string &  direction,
bool  forward,
size_t  gap_loc,
size_t  length 
)

◆ findFirstDateWithSamplingRate() [1/2]

static Date mio::ARIMAutils::findFirstDateWithSamplingRate ( const std::vector< MeteoData > &  vecM,
const double  sampling_rate,
const Date data_start_date,
const Date data_end_date 
)
static

◆ findFirstDateWithSamplingRate() [2/2]

Date mio::ARIMAutils::findFirstDateWithSamplingRate ( const std::vector< MeteoData > &  vecM,
const double  sampling_rate,
const Date data_start_date,
Date data_end_date 
)

◆ findMinMax()

template<typename T >
T mio::ARIMAutils::findMinMax ( const std::vector< T > &  vec,
bool  findMin 
)

◆ mostLikelyValue()

double mio::ARIMAutils::mostLikelyValue ( const std::vector< double > &  vec)

◆ printVectors() [1/2]

template<typename T >
void mio::ARIMAutils::printVectors ( const std::vector< Date > &  vec1,
const std::vector< T > &  vec2 
)

◆ printVectors() [2/2]

template<typename T >
void mio::ARIMAutils::printVectors ( const std::vector< std::vector< T > > &  vecs)

◆ requal()

bool mio::ARIMAutils::requal ( const Date date1,
const Date date2 
)

◆ reverseVector()

template<typename T >
void mio::ARIMAutils::reverseVector ( std::vector< T > &  vec)

◆ reverseVectorReturn()

template<typename T >
std::vector< T > mio::ARIMAutils::reverseVectorReturn ( const std::vector< T > &  vec)

◆ searchBackward()

size_t mio::ARIMAutils::searchBackward ( ARIMA_GAP last_gap,
const size_t &  pos,
const size_t &  paramindex,
const std::vector< MeteoData > &  vecM,
const Date resampling_date,
const double &  i_window_size 
)

◆ searchForward()

size_t mio::ARIMAutils::searchForward ( ARIMA_GAP last_gap,
const size_t &  pos,
const size_t &  paramindex,
const std::vector< MeteoData > &  vecM,
const Date resampling_date,
const double &  i_window_size,
const size_t &  indexP1 
)

◆ slice() [1/2]

std::vector< double > mio::ARIMAutils::slice ( const std::vector< double > &  vec,
size_t  start 
)

◆ slice() [2/2]

std::vector< double > mio::ARIMAutils::slice ( const std::vector< double > &  vec,
size_t  start,
size_t  N 
)

◆ stdDev()

double mio::ARIMAutils::stdDev ( const std::vector< double > &  vec)

◆ toVector() [1/2]

std::vector< double > mio::ARIMAutils::toVector ( const std::vector< MeteoData > &  vecM,
const size_t &  paramindex 
)

◆ toVector() [2/2]

std::vector< double > mio::ARIMAutils::toVector ( const std::vector< MeteoData > &  vecM,
const std::string &  paramname 
)

Variable Documentation

◆ ObjectiveFunctionMap

const std::map< ObjectiveFunction, std::string > mio::ARIMAutils::ObjectiveFunctionMap
Initial value:
= {
{CSS_MLE, "CSS_MLE"},
{MLE, "MLE"},
{CSS, "CSS"},
}
@ MLE
Definition: ARIMAutils.h:36
@ CSS_MLE
Definition: ARIMAutils.h:35
@ CSS
Definition: ARIMAutils.h:37

◆ OptimizationMethodMap

const std::map< OptimizationMethod, std::string > mio::ARIMAutils::OptimizationMethodMap
Initial value:
= {
{Nelder_Mead, "Nelder_Mead"},
{Newton_Line_Search, "Newton_Line_Search"},
{Newton_Trust_Region_Hook_Step, "Newton_Trust_Region_Hook_Step"},
{Newton_Trust_Region_Double_Dog_Leg, "Newton_Trust_Region_Double_Dog_Leg"},
{Conjugate_Gradient, "Conjugate_Gradient"},
{BFGS, "BFGS"},
{LBFGS, "LBFGS"},
{BFGS_MTM, "BFGS_MTM"},
}
@ Conjugate_Gradient
Definition: ARIMAutils.h:46
@ LBFGS
Definition: ARIMAutils.h:48
@ Newton_Trust_Region_Hook_Step
Definition: ARIMAutils.h:44
@ Newton_Trust_Region_Double_Dog_Leg
Definition: ARIMAutils.h:45
@ BFGS_MTM
Definition: ARIMAutils.h:49
@ Nelder_Mead
Definition: ARIMAutils.h:42
@ Newton_Line_Search
Definition: ARIMAutils.h:43
@ BFGS
Definition: ARIMAutils.h:47