possible precision error in measures.py

16 views
Skip to first unread message

Stephanie Rickett

unread,
Sep 27, 2012, 9:38:51 AM9/27/12
to milk-...@googlegroups.com
Hi,

I have recently started using milk and so far I am quite pleased! Thank you so much for developing it and continuing to support it! I am not a CS person...I just pretend to be :0) However, I am getting this exception thrown that I think is simply because of precision. Issue goes like this:

nfoldcrossvalidation calls results.append(measure(labels[testingset], cur_preds)) on line 202

but then on line 122 of measures.py  predicted = map(names.index, predicted)  it throws ValueError: 9887751971.0000076 is not in list

I went in and had it print predicted --> [ 9.88775197e+09  2.47724075e+08 .....

I do not know how to fix this, but I think I have diagnosed the issue. Is this a user malfunction?

Thank you in advance

Stephanie

Luis Pedro Coelho

unread,
Sep 27, 2012, 9:57:42 AM9/27/12
to milk-...@googlegroups.com
THanks for your message.

If you can post code (and minimal data) that reproduces this (or send it by
private email to me if you don't want to post publicly), that'd be easier.

Still, I think you are trying to perform nfoldcrossvalidation on a regresssion
problem (and getting numeric results).

It works, but only if you pass it a measure function that handles it (the
default one is for classification and expects integer classes).

If you don't understand what this means, I can post some example code (just
not right now)


HTH
Luis
--
Luis Pedro Coelho | Institute for Molecular Medicine | http://luispedro.org
Reply all
Reply to author
Forward
0 new messages