当给定mfinal> 10时,adabag提升功能会引发错误 [英] adabag boosting function throws error when giving mfinal>10

查看:102
本文介绍了当给定mfinal> 10时,adabag提升功能会引发错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个奇怪的问题,每当我尝试将adabag包的boosting函数中的mfinal参数增加到10以上时,我都会得到一个错误,即使使用mfinal = 9,我也会收到警告。

I have a strange issue, whenever I try increasing the mfinal argument in boosting function of adabag package beyond 10 I get an error, Even with mfinal=9 I get warnings.

我的火车数据有7个因变量和100个因变量,以及大约22000个数据样本(使用DMwR激励为一个类别)。我的因变量位于训练数据集的末尾。

My train data has 7 class Dependant variable and 100 independant variables and around 22000 samples of data(Smoted one class using DMwR). My Dependant Variable is at the end of the training dataset in sequence.

library(adabag)
gc()
exp_recog_boo <- boosting(V1 ~ .,data=train_dataS,boos=TRUE,mfinal=9)

Error in 1:nrow(object$splits) : argument of length 0
In addition: Warning messages:
1: In acum + acum1 :
longer object length is not a multiple of shorter object length

预先感谢。

推荐答案

我的错误是我没有

尝试以下操作:

train$target <- as.factor(train$target)

并执行以下操作:

str(train$TARGET)

这篇关于当给定mfinal&gt; 10时,adabag提升功能会引发错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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