At this link, there is an example of finding feature ranking using RFE in SVM linear kernel.
If I want to check feature ranking in other SVM kernel (eg. rbf, poly etc).How to do it?
I have changed the kernel in the code from SVR(kernel="linear") to SVR(kernel="rbf"),
from sklearn.datasets import make_friedman1 from sklearn.feature_selection import RFE from sklearn.svm import SVR X, y = make_friedman1(n_samples=50, n_features=10, random_state=0) estimator = SVR(kernel="linear") selector = RFE(estimator, 5, step=1) selector = selector.fit(X, y) selector.ranking_
and then I get this error
ValueError: coef_ is only available when using a linear kernel
Question: How to check feature ranking in other SVM kernels eg rbf, poly etc?