有没有办法在带有scikit-learn的非线性模型中使用递归特征选择? [英] Is there a way to use recursive feature selection with non linear models with scikit-learn?

查看:128
本文介绍了有没有办法在带有scikit-learn的非线性模型中使用递归特征选择?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将RVR与rbf内核一起使用SVR来解决回归问题.我的数据集有300多个特征.我想选择更多相关功能,并使用 sequentialfs 函数matlab可以尝试每种组合(或者无论如何都从很少的变量开始,然后向后添加变量,反之亦然,例如scikit的RFE或RFECV).

I am trying to use SVR with an rbf kernel (obviously) on a regression problem. My dataset has something like 300 features. I would like to select more relevant features and use something like the sequentialfs function of matlab which would try every combination (or anyway starting with few variables and adding variables on the way, or the opposite, going backward, like the RFE or RFECV of scikit)).

现在,如前所述,对于python而言,存在RFE,但我无法将其与非线性估算器一起使用.有什么我不知道的东西可以使我将RFE与非线性估计器一起使用吗?我想编写一个可以做到这一点的算法并不难,但是如果已经有可以完成这项工作的算法,那肯定会更好.

Now, as said, for python there is the RFE but I can't use it with a non linear estimator. Is there anything I am not aware about which would allow me to use the RFE with a non linear estimator? I suppose it wouldn't be difficult to write an algorithm that does that, but if there is already something which does the job it would be definitely better.

一如既往的谢谢你;)

推荐答案

RFE必须具有确定功能重要性的某种方式,而RBF内核SVM却不能提供这些功能.快速浏览原始算法,给人的印象是内核SVM的实现必须集成到SVM学习算法中.

RFE must have some way of determining the feature importances and RBF kernel SVMs don't provide that. From a quick glance at the original algorithm, I get the impression that an implementation for kernel SVMs would have to integrated into the SVM learning algorithm.

逐步(向前或向后)特征选择将易于实现,但不能作为scikit-learn中的预构建估计器使用.

Stepwise (forward or backward) feature selection would be easy to implement, but is not available as a pre-built estimator in scikit-learn.

这篇关于有没有办法在带有scikit-learn的非线性模型中使用递归特征选择?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆