I made a package to filter time series with python

Introduction

I didn't have a good time series filter implementation in python, so I made it myself.

Implemented

I implemented the following.

Kalman filter

Specify the following matrices $ F, G, Q, H, R $ when creating an instance.

State space representation

x_{n+1} = F x_n + G v_n, \hspace{1em} v_n \sim N(O,Q) \\
y_n = H x_n + w_n, \hspace{2em} w_n \sim N(O,R)

What you can do

--Likelihood calculation --Filtering --Fixed section smoothing

Particle filter

When creating an instance, specify the state transition method ʻupdate, the log-likelihood calculation method loglikelihood, and the state estimation method ʻestimate.

State space representation

x_{n+1} = F(x_n, v_n) \\
y_n = H(x_n) + w_n

What you can do

--Likelihood calculation --Filtering --Fixed rug smoothing

Repository

See README for how to use ryskiwt/tsfilter: Time Series Filtering

Ingenuity

--The state space model can be specified at the time of generation so that it can be used universally. ――Be careful about the speed as much as possible by allocating memory in advance and avoiding array copying. ――Instead, I eat a lot of memory --Random sampling of particle filter is faster using Numba ――I compared it with Cython, but it didn't change so much, so I chose this one.

from now on

--The signal is output, but the state is not output, so improve it.

Recommended Posts

I made a package to filter time series with python
I made a fortune with Python.
I made a daemon with Python
I made a character counter with Python
I made a Hex map with Python
I made a roguelike game with Python
I made a simple blackjack with Python
I made a configuration file with Python
I made a neuron simulator with Python
I made a package that can compare morphological analyzers with Python
I made a competitive programming glossary with Python
I made a weather forecast bot-like with Python.
I made a Twitter fujoshi blocker with Python ①
I want to make a game with Python
[Python] I made a Youtube Downloader with Tkinter.
I want to write to a file with Python
I made a bin picking game with Python
I made a Mattermost bot with Python (+ Flask)
I made a tool to automatically browse multiple sites with Selenium (Python)
I tried to discriminate a 6-digit number with a number discrimination application made with python
I made blackjack with python!
I made a python text
I made blackjack with Python.
I made wordcloud with Python.
I made a Twitter BOT with GAE (python) (with a reference)
I made a Christmas tree lighting game with Python
I tried to draw a route map with Python
I made a net news notification app with Python
I made a Python module to translate comment outs
I made a Python3 environment on Ubuntu with direnv.
I tried to implement time series prediction with GBDT
I want to work with a robot in python.
I made a LINE BOT with Python and Heroku
I tried to automatically generate a password with Python3
I made a python library to do rolling rank
I want to run a quantum computer with Python
I made a module in C language to filter images loaded by Python
A story that I was addicted to when I made SFTP communication with python
I made a simple typing game with tkinter in Python
I made a program to convert images into ASCII art with Python and OpenCV
I wrote a program quickly to study DI with Python ①
I made a simple book application with python + Flask ~ Introduction ~
I want to install a package from requirements.txt with poetry
How to build a python2.7 series development environment with Vagrant
I made a puzzle game (like) with Tkinter in Python
I want to debug with Python
How to test the current time with Go (I made a very thin library)
I made a class to get the analysis result by MeCab in ndarray with python
I made a program to collect images in tweets that I liked on twitter with Python
I made a server with Python socket and ssl and tried to access it from a browser
[5th] I tried to make a certain authenticator-like tool with python
I made a simple circuit with Python (AND, OR, NOR, etc.)
I want to use a wildcard that I want to shell with Python remove
[2nd] I tried to make a certain authenticator-like tool with python
A story about adding a REST API to a daemon made with Python
I made a web server with Raspberry Pi to watch anime
I tried to make a regular expression of "time" using Python
[3rd] I tried to make a certain authenticator-like tool with python
[Python] A memo that I tried to get started with asyncio
I made a Nyanko tweet form with Python, Flask and Heroku
I tried to create a list of prime numbers with python