protlearn
protlearn copied to clipboard
Errors: dimensionality_reduction (sequential, rfe and lda)
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