Giter Site home page Giter Site logo

edhmm's People

Contributors

mikedewar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

edhmm's Issues

experiments all fail due to sample_mean_prec() mean calculation

Hi. I read the paper, I wanted to try the code!

I'm using python 2.7. If I run any of the experiments (i.e. cd experiments; python experiment_1.py) I get something like this:

../transition.py:25: RuntimeWarning: divide by zero encountered in log
  return np.log(self.A[i,j])
../log_space.py:7: RuntimeWarning: underflow encountered in exp
  return lny + log(1 + exp(lnx - lny))
Traceback (most recent call last):
  File "experiment_1.py", line 70, in 
    online=True, sample_U = True
  File "../edhmm.py", line 537, in beam
    self.O.update(Z_samples, Y)
  File "../emission.py", line 140, in update
    mu, tau = self.sample_mean_prec(Z, Y)
  File "../emission.py", line 59, in sample_mean_prec
    ybar = np.mean(n[i],1)
  File "/usr/local/lib/python2.7/dist-packages/numpy/core/fromnumeric.py", line 2885, in mean
    out=out, keepdims=keepdims)
  File "/usr/local/lib/python2.7/dist-packages/numpy/core/_methods.py", line 56, in _mean
    rcount = _count_reduce_items(arr, axis)
  File "/usr/local/lib/python2.7/dist-packages/numpy/core/_methods.py", line 50, in _count_reduce_items
    items *= arr.shape[ax]
IndexError: tuple index out of range
zsh: exit 1     python experiment_1.py

I notice that the line that chokes is protected by an except ValueError. Maybe this should, or should also, guard against IndexError, but I don't know the code so I don't know the intention.

(In case it matters, on my system I also had to mildly rearrange the order of imports)

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.