mikedewar / edhmm Goto Github PK
View Code? Open in Web Editor NEWAn implementation of the Explicit Duration HMM using Python
An implementation of the Explicit Duration HMM using Python
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)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.