GithubHelp home page GithubHelp logo

giswlh / mssa Goto Github PK

View Code? Open in Web Editor NEW

This project forked from abdullaho/mssa

0.0 0.0 0.0 14.36 MB

Multivariate Singular Spectrum Analysis (mSSA): Forecasting and Imputation algorithm for multivariate time series

License: Apache License 2.0

Python 1.41% Jupyter Notebook 98.59%

mssa's Introduction

Multivariate Singular Spectrum Analysis (mSSA)

Multivariate Singular Spectrum (mSSA) is an algorithm for multivariate time series forecasting and imputation. Specifically, mSSA allows you to predict entries that are:

  1. At a future time step (i.e. forecasting);

  2. Missing/corrupted by noise (i.e. imputation)

This repository is the implementation of the paper: On Multivariate Singular Spectrum Analysis. Refer to the paper for more information about the theory and the algorithm of mSSA. ย 

Installation

This work has the following dependencies:

  • Python 3.5+ with the libraries: (numpy, pandas, scipy, sklearn)

To install the mSSA package form the source, simply clone this repository and then install the package using pip as follows:

pip3 install .

Getting Started

To get started, first load the time series example we have provided in ../mSSA/examples/testdata/tables/mixturets_var.csv using pandas.

import pandas as pd
df = pd.read_csv("mssa/examples/testdata/tables/mixturets_var.csv")

Then initialise and fit your mSSA model on the time series named ts as follows:

from mssa.mssa import mSSA
model = mSSA()
model.update_model(df.loc[:,['ts']]) 

Then you can impute or forecast any entry using the predict function. For example:

prediction = model.predict('ts',1000)

will impute the 1000th entry, while

prediction = model.predict('ts', 100001,100100)

will forecast the entries between 100001 to 100100.

API

Refer to the documentation of the mSSA class in here.

Example

We provide a running example for both synthetic and real-world datasets in a python notebook in the mssa/examples folder. Here.

License

This work is licensed under the Apache 2.0 License.

mssa's People

Contributors

abdullaho 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.