Skip to content

Hankel Singular Value Decomposition, Hankel Non-negative Matrix Factorization

Notifications You must be signed in to change notification settings

suzusuzu/tfilter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Hankel Singular Value Decomposition

Implementation of Smoothing Strategies Combined with ARIMA and Neural Networks to Improve the Forecasting of Traffic Accidents

Usage

import numpy as np
from tfilter import hsvd

N = 500
x = np.sin(np.arange(N) * np.pi/50.0)
x = x + np.random.normal(0, 0.3, size=N)

window = 100
rank = 2
low_freq, high_freq = hsvd(x, window, rank)

Hankel Non-negative Matrix Factorization

Replacing SVD with NMF

time series data must be non-negative

Usage

import numpy as np
from tfilter import hnmf

N = 500
x = np.sin(np.arange(N) * np.pi/50.0)
x = x + np.random.normal(0, 0.3, size=N)
x = x + 2.0
assert(np.min(x) > 0.0)

window = 100
rank = 3
low_freq, high_freq = hnmf(x, window, rank)

HSVD Example

run

python tfilter.py

raw test data

raw

decomposition

low

high

summary

summary

About

Hankel Singular Value Decomposition, Hankel Non-negative Matrix Factorization

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages