简体   繁体   English

分类树可为每个观察获取超过1个预测

[英]Classification tree that can fetch more than 1 prediction per observation

I'm searching for an algorythm from the classification trees algorythm familiy, that can provide a number (more than 1) of predicitions (in some ranked order) per observation. 我正在从分类树a​​lgorythm家族中搜索algorythm,它可以为每个观察值提供一定数量(超过1个)的谓词(以某种排名顺序)。 To be more specific - I have 10 binary target models to predict a target variable with 10 levels. 更具体地说-我有10个二进制目标模型来预测具有10个级别的目标变量。 How can I combine the models in such way to fetch a predefine number of prediction with a confidence level. 如何以这种方式组合模型以获取具有置信度水平的预定义预测。 For instance, I want my "combined" model to fetch 2 predictions for each obeservation. 例如,我希望我的“组合”模型为每个观测获取2个预测。 Once possible approach is to take the 2 binary models with the highest accuracy for that specific observation and fetch them. 一种可行的方法是针对特定的观察结果采用具有最高准确度的2个二元模型并获取它们。 How do I calculate the "averaged" accuracy of this set of 2 predictions ? 如何计算这2个预测的“平均”准确性? If anyone can provide literature and R code examples from rpart package, that would be more helpful. 如果任何人都可以从rpart软件包中提供文献资料和R代码示例,那将更有帮助。 thanks 谢谢

in the rpart documentation of predict.rpart: type = c("vector", "prob", "class", "matrix") 在predict.rpart的rpart文档中:type = c(“ vector”,“ prob”,“ class”,“ matrix”)

use like: 用途像:

predict(${some r part model}, type="prob")

it will give you a vector of the probability of each class 它将为您提供每个类别的概率的向量

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM