GithubHelp home page GithubHelp logo

fagan2888 / econsieve Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gboehl/econsieve

0.0 0.0 0.0 713 KB

Collection of linear & nonlinear (Kalman) Filters for economic DSGE models

License: MIT License

Python 100.00%

econsieve's Introduction

EconSieve - Kalman Filter, Unscented Kalman filter, Ensemble Filter and Nonlinear Path-Adjusting Smoother (NPAS)


Apart from the smoother, I literally stole most of the code from these two projects:

* https://github.com/rlabbe/filterpy
* https://github.com/pykalman/pykalman

They deserve most of the merits. I just made everything look way more complicated. Sometimes filterpy was more efficient, sometimes pykalman. Unfortunately the pykalman project is orphaned. I tweaked something here and there:

  • treating numerical errors in the UKF covariance matrix by looking for the nearest positive semi-definite matrix
  • eliminating identical sigma points (yields speedup assuming that evaluation of each point is costly)
  • extracting functions from classes and compile them using the @njit flag (speedup)
  • major cleanup

NPAS is build from scratch. I barely did any testing as a standalone filter and just always used it in combination with the 'pydsge', where it works very well.

Some very rudimentary documentation can be found here.

Installation with pip (elegant via git)

First install git. Linux users just use their respective repos.

Windows users probably use anaconda and can do

conda install -c anaconda git

in the conda shell as they kindly tell us here. Otherwise you can probably get it here.

Then you can simply do

pip install git+https://github.com/gboehl/econsieve

If you run it and it complains about missing packages, please let me know so that I can update the setup.py!

Installation with pip (simple)

First, be sure that you are on Python 3.x. Then:

The simplest way is to clone the repository and then from within the cloned folder run (Windows user from the Anaconda Prompt):

pip install .

Updating

The package is updated very frequently (find the history of latest commits here). I hence recommend pulling and reinstalling whenever something is not working right. Run:

pip install --upgrade git+https://github.com/gboehl/econsieve

econsieve's People

Contributors

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