Skip to content
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

If original features are found by FEW, transform() method fails with TypeError #34

Closed
jay-reynolds opened this issue Jan 16, 2018 · 3 comments

Comments

@jay-reynolds
Copy link

jay-reynolds commented Jan 16, 2018

If original features are found by FEW, transform() method fails with TypeError

eg:

print('Model: {}'.format(learner.print_model()))

Model: original features

Phi = learner.transform(X_test.values)


TypeError Traceback (most recent call last)
in ()
----> 1 Phi = learner.transform(X_test.values)

~/anaconda3/envs/ml/lib/python3.6/site-packages/FEW-0.0.38-py3.6-macosx-10.7-x86_64.egg/few/few.py in transform(self, x, inds, labels)
395 # return np.asarray(Parallel(n_jobs=10)(delayed(self.out)(I,x,labels,self.otype) for I in self._best_inds)).transpose()
396 return np.asarray(
--> 397 [self.out(I,x,labels,self.otype) for I in self._best_inds]).transpose()
398
399

TypeError: 'NoneType' object is not iterable

@lacava
Copy link
Owner

lacava commented Jan 17, 2018

looks like you're using an old version of FEW (0.0.38). (Did that get installed when you ran pip install few? It shouldn't.) The latest version is 0.0.46 (0.0.48 on github), and fixes this issue.

@jay-reynolds
Copy link
Author

You're right. Not sure how I managed that.
I built & installed it from source from this repo (or so I thought) using:
CC=gcc-7 python setup.py install

Investigating...

@jay-reynolds
Copy link
Author

Ok, I must've been doing too many things at once yesterday.
Started fresh.

few version is now 0.0.48
Thank you again for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants