Skip to content

RFE doesn't raise NotFittedError #9276

@sshleifer

Description

@sshleifer

Description

RFE doesnt raise NotFittedError, suspect other meta feature selectors have same issue.

Steps/Code to Reproduce

from sklearn.feature_selection import RFE
from sklearn.linear_model import LinearRegression
X = np.array([[2,2], [2,2]]))
RFE(LinearRegression()).transform(X)

Expected Results

NotFittedError

Actual Results

AttributeError: 'RFE' object has no attribute 'support_'

Versions

Darwin-16.5.0-x86_64-i386-64bit
Python 2.7.10 (default, Feb 6 2017, 23:53:20)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)]
NumPy 1.13.0
SciPy 0.19.0
Scikit-Learn 0.18.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions