Recursive function Eliminate categorical data in sklearn?

I have a data set containing 8 parameters (4 contiguous 4 categorical), and I'm trying to eliminate functions according to the RFEC class in Scikit.

This is the formula I use:

svc = SVC(kernel="linear")
rfecv = RFECV(estimator=svc, step=1, cv=StratifiedKFold(y, 2),
          scoring='accuracy')
rfecv.fit(X, y)

Like I have categorical data, I changed it to Dummy Variable using dmatrics (Patsy).

I want to try different classification models according to data after selecting a function, in order to improve the model along with SVC.

I started RFE after data conversion, and I think I'm doing it wrong.
Do we run RFECV before categorical data conversion or after?

I cannot find a clear indication in any document.

+4
1

, . ( ) . , , , , SVC. make_pipeline(OneHotEncoder(categorical_features), SVC()), coef_ , .

+1

All Articles