randomForest:如何获得 100% 的精度?
我有一个包含大约 3000 个正样本和 1500 个负样本的数据集,以及大约 1000 个特征。所有特征都是实数。我想用“randomForest”R 包训练 randomForest 分类器。
问题是我想要一个在训练数据集上具有 100% 精度 (TP / TP+FP) 的分类器。然而,我很难通过调整训练后的随机森林中的 $votes 来实现这一点。
我想知道是否有人有经验或对此类问题有任何想法?如果您有任何线索,请给我一些提示。提前致谢!
我对任何其他机器学习方法持开放态度,只要它能保证 100% 的精度。
I have a dataset of around 3000 positive and 1500 negative samples, with around 1000 features. All features are real number. I want to train a randomForest classifier with "randomForest" R package.
The problem is that I want a classifier with 100% precision (TP / TP+FP) on training dataset. However, I can hardly achieve this by adjusting the $votes in the trained random Forest.
I wonder if anybody have experience or have any idea on such kind of problem? If you have any clue, please give me some hint. Thanks in advance!
I am open to any other machine learning method, if it promise me 100% precision.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您无法通过修改投票分数阈值来做到这一点,那么您将不得不以某种方式修改树本身。
做到这一点的一种方法是实际训练加权树。不幸的是,我现在没有指针,但这与 Viola/Jones 论文在这里(但他们这样做是为了提升。)
(仔细想想,您是否查看了参数:
classwt
,其中包含注释“Priors不需要总计为 1。”)在 此页面?快速指出一点:误报率不等于
FP / (FP + TP)
。它实际上是FP / (FP + TN)
或等效的FP /“实际负数”
,因为您实际上只想考虑检测到多少误报作为实际负数的函数。If you haven't been able to do it by modifying your votes fraction threshold, then you'll have to somehow modify the trees themselves.
One way to do this is to actually train weighted trees. Unfortunately, I dont' have a pointer right now for this, but this is similar to what's done in the Viola/Jones paper here (but they do it for boosting.)
(One second thought have you looked at the parameter:
classwt
that has the comment "Priors of the classes. Need not add up to one. Ignored for regression.") on this page?One quick point: false positive rate doesn't equal
FP / (FP + TP)
. It's reallyFP / (FP + TN)
or equivalentlyFP / "actual negatives"
because you really only want to consider how many false positives are detected as functions of the actual negatives.