GithubHelp home page GithubHelp logo

rnaimehaom / rfssa Goto Github PK

View Code? Open in Web Editor NEW

This project forked from haghbinh/rfssa

0.0 0.0 0.0 22.9 MB

Description: Develop functional singular spectrum analysis tools and plots

C++ 7.26% C 0.02% R 92.72%

rfssa's Introduction

Rfssa

CRAN_Status_Badge License: GPL v2 License: GPL v3

The Rfssa package provides the collection of necessary functions to implement functional singular spectrum analysis (FSSA)-based methods for analyzing univariate and multivariate functional time series (FTS). Univariate and multivariate FSSA are novel, non-parametric methods used to perform decomposition and reconstruction of univariate and multivariate FTS respectively. In addition, the FSSA-based routines may be performed on FTS whose variables are observed over a one or two-dimensional domain. Finally, one may perform FSSA recurrent or FSSA vector forecasting of univariate or multivariate FTS observed over one-dimensional domains. Forecasting of FTS whose variables are observed over domains of dimension greater than one is under development.

Summary

The use of the package begins by defining an fts object by providing the constructor with the raw data, basis specifications, and grid specifications. We note that the FTS object may be univariate or multivariate and variables may be observed over one (curves) or two-dimensional (images) domains. Validity checking of the S4 object constructor inputs is included to help guide the user. The user may leverage the plot.fts method to visualize the fts object. A variety of plotting options are available for variables observed over a one-dimensional domain and a visuanimation is offered for variables observed over a two-dimensional domain. Next, the user provides the fts objectand a chosen lag parameter to the FSSA routine (fssa) to obtain the decomposition. We note that the decomposition function leverages the RSpectra and RcppEigen R packages, and the Eigen C++ package to speed up the routine. The plot.fssa method may be used to visualize the results of the decomposition and to choose an appropriate grouping of the eigentriples for reconstruction (freconstruct) or forecasting (fforecast). The freconstruct routine can be used to reconstruct a list of fts objects specified by the grouping while the fforecast function returns a list of fts objects that contain predictions of the signals specified by the grouping. We note that when forecasting is performed, usually the user specifies one group that captures the assumed deterministic, extracted signal that is found within the FTS and all other modes of variation are excluded. We also note that currently, forecasting only supports FTS whose variables are observed over a one-dimensional domain with two-dimensional domain forecasting to be added in the future.

Other functionalities offered by the package include:

  • FTS arithmetic - Allows the user to perform FTS-FTS arithmetic and FTS-scalar arithmetic (such as addition, subtraction, etc.).
  • eval.fts - Allows the user to evaluate the FTS object over a new specified grid.
  • load_github_data - Allows the user to load any .RData file hosted on GitHub including the Callcenter, Jambi, and Montana datasets.
  • fwcor - Returns the weighted correlation matrix corresponding to the decomposition of an FTS.
  • cor.fts - Returns the correlation between two fts objects.
  • launchApp - Launches the built-in R Shiny app that can be used to interactively explore the FSSA-based routines on various datasets.

Updates

The first update we include in this version of the Rfssa R package, is the eval.fts method used to evaluate an fts object over a new, specified grid. We updated the plot.fts method to allow for custom tick labels and new choices in visuanimation colors (for variables observed over two-dimensional domains) that are offered by the ggplot2 package. We have also updated the plot.fssa method to allow for new choices in visuanimation colors offered by the ggplot2 package when plotting left singular functions that correspond with variables observed over two-dimensional domains. A user may now specify a character vector that contains the time when each observation is made when building an fts object and we improved various plot fonts for readability. Finally, we include many other small updates that further improve plotting quality, code readability, documentation improvements, and other details that add to the professionalism of the package.

README Notes

The reader should note that we do not utilize FTS plotting options in this README because of the large size of the resulting files. The reader should refer to the examples offered at the end of this README to see examples of how to apply the methodologies to real data.

Installation

You can install Rfssa from github with:

# install.packages("devtools")
devtools::install_github("haghbinh/Rfssa")

Examples

The following links provide examples of how to run FSSA-related methods on real data:

rfssa's People

Contributors

haghbinh avatar jtrinka avatar mmadoliat avatar smnajibi 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.