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

Errors: dimensionality_reduction (sequential, rfe and lda) #31

Open
lcscs12345 opened this issue Oct 14, 2021 · 0 comments
Open

Errors: dimensionality_reduction (sequential, rfe and lda) #31

lcscs12345 opened this issue Oct 14, 2021 · 0 comments

Comments

@lcscs12345
Copy link

Hi,

I find protlearn very handy in extracting protein sequence features. All functions of dimensionality_reduction work except for sequential, rfe and lda. I hope you will be able to reproduce the errors using the examples in the documentation (https://protlearn.readthedocs.io/en/latest/dimensionality_reduction.html).

Both sequential and rfe produce the same error.

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-19-9d14144907fa> in <module>
      1 rf = RandomForestClassifier()
----> 2 reduced, _ = rfe(features, labels, rf, n_features=10, step=5)
      3 reduced.shape

TypeError: rfe() takes 2 positional arguments but 3 positional arguments (and 2 keyword-only arguments) were given

For lda

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-16-719b2dba39a5> in <module>
----> 1 reduced = lda(features, labels, n_components=1)
      2 reduced.shape

TypeError: 'module' object is not callable

Versions
Python 3.7.6, protlearn 2.1, sklearn 0.23.1, numpy 1.19.5

Many thanks,
CS Lim

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

1 participant