Coder Social home page Coder Social logo

teagum / chainsaddiction Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 14.01 MB

Discrete-time, finite state space, stationary Hidden Markov Model for Python3.

License: BSD 3-Clause "New" or "Revised" License

Makefile 5.03% Python 2.94% C 91.42% OpenEdge ABL 0.61%
c hmm python3 time-series-analysis

chainsaddiction's Issues

Fix MANIFEST.in

  • fix typo on line 6
  • explicitly including headers is probably not necessary. Check and remove those eventually.

State-dependent means in [0, 1]

Currently, the Forward/Backward algorithm fails if a state-dependent mean is initialized to a value between 0 and 1. The current workaround introduced in d81e375 is to simply restrict the initialization range to [1, +inf].

Missing test in vmath

Some of the functions in vmath are not tested. Here is a list:

  • poisson_pmf
  • poisson_logpmf
  • v_poisson_logpmf

Wrong error messages in `vmath.c`

Fix these error messages:

Memory leaks in hmm.c

The functions ca_ph_NewParams and ca_ph_NewProbs can potentially cause a memory leak. Each function features three consecutive calls the MA_SCALAR_ZEROS. In case, the second or third of these calls fails due to an allocation error the memory successfully allocated by the previous calls is not correctly deallocated.

This is because MA_SCALAR_ZEROS checks for allocation failures internally. A possible fix is, hence, to directly use malloc.

Unordered random guess for lambda

The random function in PoisHmm_InitRandom generates random samples as expected. For later comparability, however, the variates should be in increasing order.

Setter for PoisParams as API function

The HMM has to have a convenient setter, which allows to set/reset the parameters in an PoisParam object.

Should these setters live in the big PoisHmm namespace or should it better have it's own PoisParams namespace, like:

PoisHmm_SetXXX or PoisParams_SetXXX?

The second approach seems more versatile since it would allow to change init and training params. The fist approch would have to be hard coded to set either init or training params.

`PoisParams_NewFromFile` misleading error message

If the number of states does not match the size of the remaining parameters, the error message is misleading. It reports, that the next header could not be read, which is technically true, but does nevertheless point the user in the wrong direction. Since the actual cause of the problem is the wrong number of states.

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.