statcpp
C++17 Header-Only Statistics Library
Loading...
Searching...
No Matches
Namespaces | Functions
time_series.hpp File Reference

Time series analysis. More...

#include <cmath>
#include <cstddef>
#include <iterator>
#include <stdexcept>
#include <utility>
#include <vector>
#include "statcpp/basic_statistics.hpp"
Include dependency graph for time_series.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  statcpp
 

Functions

template<typename Iterator >
double statcpp::autocorrelation (Iterator first, Iterator last, std::size_t lag)
 Calculate autocorrelation coefficient (lag k)
 
template<typename Iterator >
std::vector< double > statcpp::acf (Iterator first, Iterator last, std::size_t max_lag)
 Calculate autocorrelation function (ACF) (from lag 0 to max_lag)
 
template<typename Iterator >
std::vector< double > statcpp::pacf (Iterator first, Iterator last, std::size_t max_lag)
 Calculate partial autocorrelation function (PACF) (Durbin-Levinson algorithm)
 
template<typename Iterator1 , typename Iterator2 >
double statcpp::mae (Iterator1 first1, Iterator1 last1, Iterator2 first2)
 Mean Absolute Error (MAE)
 
template<typename Iterator1 , typename Iterator2 >
double statcpp::mse (Iterator1 first1, Iterator1 last1, Iterator2 first2)
 Mean Squared Error (MSE)
 
template<typename Iterator1 , typename Iterator2 >
double statcpp::rmse (Iterator1 first1, Iterator1 last1, Iterator2 first2)
 Root Mean Squared Error (RMSE)
 
template<typename Iterator1 , typename Iterator2 >
double statcpp::mape (Iterator1 first1, Iterator1 last1, Iterator2 first2)
 Mean Absolute Percentage Error (MAPE)
 
template<typename Iterator >
std::vector< double > statcpp::moving_average (Iterator first, Iterator last, std::size_t window)
 Simple moving average.
 
template<typename Iterator >
std::vector< double > statcpp::exponential_moving_average (Iterator first, Iterator last, double alpha)
 Exponential moving average.
 
template<typename Iterator >
std::vector< double > statcpp::diff (Iterator first, Iterator last, std::size_t order=1)
 Difference series (first-order or d-th order differencing)
 
template<typename Iterator >
std::vector< double > statcpp::seasonal_diff (Iterator first, Iterator last, std::size_t period)
 Seasonal differencing.
 
template<typename Iterator >
std::vector< double > statcpp::lag (Iterator first, Iterator last, std::size_t k)
 Generate lag series.
 

Detailed Description

Time series analysis.

Definition in file time_series.hpp.