Giter VIP home page Giter VIP logo

time_series_functions's Introduction

Residual Hybrid Systems

In src.hybrid_systems methods there are training and test procedures for Residual Hybrid Systems


There are Hybrid Systems that performs:

  • Linear Combination based on Zhang [1], which is available on additive_hybrid_model method;
  • Nonlinear Combination based on Santos Jr et al. [2], which is available on nolic_model method;

In example_of_usage.py there are examples of usage of the methods. This file do not perform parameter optimization. The functions with parameter optimization will be added in the future.

Time Series Functions

The src.time_series_functions.py has methods that can help the development of time series forecast models.


Create Windowing

Create a time lag of univariate series. Parameters:

  • df:one column time series (pandas data frame);
  • lag_size: size of the time lag.

Returns:

  • Lagged time series (pandas data frame).

Usage:

import pandas as pd
import time_series_functions as tsf
ts = pd.read_csv(time_series_path,sep=',',names = ['actual'],dtype='float64') # open univariate time series
ts_windowed = tsf.create_windowing(df=ts,lag_size=3)

Time series metrics calculation

Generate time series metrics.

The metrics are:

  • MSE - Mean Square Error:
  • RMSE - Root Mean Square Error :
  • MAPE - Mean Absolute Percentage Error:
  • SMAPE - Symmetric Mean Absolute Percentage Error:
  • MAE - Mean Absolute Error:
  • theil - U of Theil Statistics:
  • ARV - Average Relative Variance:
  • IA - Index of Agreement:
  • POCID - Prediction of Change in Direction:

More details about the metrics implementation are available in [3], [4], and [5].

Parameters:

  • y_true: target value (numpy array);
  • y_pred: predicted value (numpy array).

Returns:

  • The dictionary of metrics

Usage:

import time_series_functions as tsf
gerenerate_metric_results(y_true, y_pred)

References

  1. Zhang, G. Peter. "Time series forecasting using a hybrid ARIMA and neural network model." Neurocomputing 50 (2003): 159-175. $\hookleftarrow$

  2. Domingos, S. de O., João FL de Oliveira, and Paulo SG de Mattos Neto. "An intelligent hybridization of ARIMA with machine learning models for time series forecasting." Knowledge-Based Systems 175 (2019): 72-86. $\hookleftarrow$

  3. Silva, David A., et al. "Measurement of fitness function efficiency using data envelopment analysis." Expert Systems with Applications 41.16 (2014): 7147-7160. $\hookleftarrow$

  4. de Mattos Neto, Paulo SG, George DC Cavalcanti, and Francisco Madeiro. "Nonlinear combination method of forecasters applied to PM time series." Pattern Recognition Letters 95 (2017): 65-72. $\hookleftarrow$

  5. Silva, Eraylson G., et al. "Improving the accuracy of intelligent forecasting models using the Perturbation Theory." 2018 International Joint Conference on Neural Networks (IJCNN). IEEE, 2018. $\hookleftarrow$

time_series_functions's People

Contributors

domingos108 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.