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

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

Open
enesok opened this issue Oct 18, 2022 · 0 comments
Open

Comments

@enesok
Copy link

enesok commented Oct 18, 2022

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.

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