Skip to content

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

@lcscs12345

Description

@lcscs12345

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions