-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ValueError: not enough values to unpack (expected 2, got 1) in calculating the micd #24
Comments
It could be a question of which quantities it expects to be lists of vectors, and which not. I'd try modifying where the brackets are, e.g. this: |
(I'm pretty sure discrete expects just a single discrete quantity, not a vector, but continuous does expect a vector.) |
Yes!it works!thank you! |
Can you please provide a working example for micd?
Now, according to your recommendations:
C:\ProgramData\Anaconda3\lib\site-packages\npeet\entropy_estimators.py in micd(x, y, k, base, warning)
|
Oh, how annoying! The way you called it seems more natural, but at a glance it seems like it also expects "vectors" for the discrete values y = np.array([[5], [3]...]). |
mm, then I get
TypeError Traceback (most recent call last) C:\ProgramData\Anaconda3\lib\site-packages\npeet\entropy_estimators.py in micd(x, y, k, base, warning) TypeError: only integer scalar arrays can be converted to a scalar index |
Can you make x an np.array([]) too? |
oh wait. it's actually x that has to be a numpy array. now it works:
One more question if possible: |
Yes, I think so! |
I observed this ValueError: not enough values to unpack (expected 2, got 1) when I tried to calculate the mutual info between a continuous and a discrete.
Can anybody help me?
import npeet.entropy_estimators as ee
ee.micd(cont.iloc[:,1].values.tolist(),disc.iloc[:,[1]].values.tolist()))
The text was updated successfully, but these errors were encountered: