johnbachman / py-fcm

Automatically exported from code.google.com/p/py-fcm
0 stars 1 forks source link

test_hdp.py doesn't match directory structure from PLoS paper supplement #24

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install py-fcm and all prerequisites
2. Download PLoS supplement and unzip
3. On Ubuntu 12.04:
    cd "Software S1"/src
    python test_hdp.py

Output is: 
Traceback (most recent call last):
  File "test_hdp.py", line 35, in <module>
    rs = [r.average() for r in m.fit(xs, verbose=verbose)]
  File "/usr/local/lib/python2.7/dist-packages/fcm-0.9.1-py2.7-linux-x86_64.egg/fcm/statistics/cluster.py", line 307, in fit
    self.d = datasets[0].shape[1]
IndexError: list index out of range

It appears that test_hdp.py is looking for data in the "data" subfolder, which 
doesn't exist.

Here's how to fix it:
    mkdir "Software S1"/src/data
    cp ../data/CD3*npy "Software S1"/src
    cd "Software S1"/src
    python test_hdp.py

Output after fixing:
starting MCMC
-200
-190
-180
-170
-160
-150
...etc...

Original issue reported on code.google.com by erin.sim...@gmail.com on 5 Dec 2013 at 6:29

GoogleCodeExporter commented 9 years ago
I think the supplemental material was designed to be run from the 'root' 
directory and not the src directory, but Cliburn would be the one to answer 
that.

Original comment by Jacob.Frelinger@gmail.com on 5 Dec 2013 at 10:14

GoogleCodeExporter commented 9 years ago
Even if it were only looking in the root folder, it would find more files that 
match *npy than it was expecting:

~/py-fcm/samples/data$ ls -1 *.npy
CD3CD45_0.000000_0_xs.npy
CD3CD45_0.015625_1_xs.npy
CD3CD45_0.031250_2_xs.npy
CD3CD45_0.062500_3_xs.npy
CD3CD45_0.125000_4_xs.npy
CD3CD45_0.250000_5_xs.npy
gate_0_1.npy
gate_3_2.npy
gate_4_2.npy 

Original comment by erin.sim...@gmail.com on 5 Dec 2013 at 10:47

GoogleCodeExporter commented 9 years ago
Sorry about the issues - PLoS requested that we change folder names etc to 
match the journal conventions at the pre-print stage, which is probably the 
reason the scripts are broken.

Original comment by cliburn....@gmail.com on 5 Dec 2013 at 10:51