Open danstowell opened 8 years ago
It's been many years since we wrote this, so I'm not really sure there remains any specific intention! I guess I'd worry first about why ybar = np.mean(n[i],1)
is puking an index error. If you have a moment, can you see how big n
is and what i
is causing the problem? No worries if not, I'll try to get around to having a play at some point!
Yeah I realise the code is a little old, but I'm rather hoping it can still be useful!
It turns out that n
is a dict with keys 0, 1, 2
and each one holds a numpy array whose shapes are:
0: (99,)
1: (105,)
2: (296,)
Each of the Y
passed in via Ys
is a list
containing scalar-valued arrays, such as [array(-2.8626048450849297), array(-2.043008544196465), array(-3.752285935165192), ...
. When converted using np.array(.).T
it makes a flat 1D array - the programmer was clearly expecting to end up with 2D arrays. I wondered about changing the conversion to np.array(., ndmin=2).T
- but then there's an np.squeeze()
immediately after, deliberately dropping size-1 axes. It gives me the feeling that something is happening such as the code expects vector-valued observations and is being given scalar-valued ones?
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: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)