如何使用AdaBoost进行功能选择? [英] How do I use AdaBoost for feature selection?

查看:132
本文介绍了如何使用AdaBoost进行功能选择?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用AdaBoost从大量(〜100k)中选择一套好的功能. AdaBoost的工作原理是遍历功能集并根据其执行的良好程度添加功能.它选择的特征可以很好地应用于因现有特征集而误分类的样本.

I want to use AdaBoost to choose a good set features from a large number (~100k). AdaBoost works by iterating though the feature set and adding in features based on how well they preform. It chooses features that preform well on samples that were mis-classified by the existing feature set.

我目前在Open CV的CvBoost中使用.我有一个工作示例,但来自文档尚不清楚如何提取功能索引它已经使用了.

Im currently using in Open CV's CvBoost. I got an example working, but from the documentation it is not clear how to pull out the feature indexes that It has used.

使用第三方库CvBoost或自己实现它,如何使用AdaBoot从大型功能集中提取一组功能?

Using either CvBoost, a 3rd party library or implementing it myself, how can pull out a set of features from a large feature set using AdaBoot?

推荐答案

声明:我不是opencv的用户.根据文档,opencv的adaboost使用的是决策树(分类树或回归树)作为基本的弱学习者.

Claim: I am not a user of opencv. From the documentation, opencv's adaboost is using the decision tree (either classification tree or regression tree) as the fundamental weak learner.

在我看来,这是让下划线的弱学习者获得帮助:

CvBoost::get_weak_predictors
Returns the sequence of weak tree classifiers.

C++: CvSeq* CvBoost::get_weak_predictors()
The method returns the sequence of weak classifiers. 
Each element of the sequence is a pointer to the CvBoostTree class or 
to some of its derivatives.

一旦访问了CvBoostTree*的序列,就应该能够检查树中包含哪些要素以及分割值是什么等.

Once you have access to the sequence of CvBoostTree*, you should be able to inspect which features are contained in the tree and what are the split value etc.

如果每棵树只是一个决策树桩,则每个弱学习者中仅包含一个特征.但是,如果我们允许更深的树深度,则每个弱学习者中都可能存在多种功能组合.

If each tree is only a decision stump, only one feature is contained in each weak learner. But if we allow deeper depth of tree, a combination of features could exist in each individual weak learner.

我进一步查看了CvBoostTree class ;不幸的是,类本身没有提供检查所使用内部功能的公共方法.但是您可能想创建继承自CvBoostTree的子类并公开任何功能.

I further took a look at the CvBoostTree class; unfortunately the class itself does not provide a public method to check the internal features used. But you might want to create your own sub-class inheriting from CvBoostTree and expose whatever functionality.

这篇关于如何使用AdaBoost进行功能选择?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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