Skip to content

NotFittedErrror while using Non-CV Permutation Importance with RFECV #35

Description

@enesok

hey, i'm trying to pair RFECV with permutation Importance, but without cross-validation. I tried several approaches but I get always a NotFittedError for the estimator_func while trying to fit the rfecv. Am i missing something?

   ``` 

estimator_funct = estimator_funct.fit(extract_relevant_features, choosen_target)

pi = PermutationImportance(estimator_funct,  scoring='r2', n_iter=10, random_state=1).fit(extract_relevant_features, choosen_target)

rfecv = RFECV(
    estimator=pi,
    step=1,
    cv=cv_func,
    scoring=score,
    min_features_to_select=min_features_to_select,
)
#
rfecv.fit(extract_relevant_features,
          choosen_target,
          groups=extract_relevant_features.index) ```python

When i pair RFECV with CV- PermutationImportance, everything works fine, but i would like to have the non-cv version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions