错误'名称'属性[35563]必须与向量[1]长度相同
我正在尝试使用smognregress
从ubl
package r 中的smognregress
使用smognregress
。
当我运行代码时:
SMOGNRegress(Deceased~., normalized_data, rel = "auto", thr.rel = 0.9999, C.perc = "balance", k = 2, repl = F, dist = "Euclidean", pert = 0.01)
我会收到以下错误:
'名称'属性[35563]必须与向量[1]
的长度相同
,从有关此错误的类似问题中,我看到这是一个不匹配的长度的问题,但是我无法围绕如何按顺序解决该问题围绕如何修复该问题生成新的超采样数据集。
I'm trying to oversample an imbalanced dataset with a continuous target variable using SMOGNRegress
from the UBL
package in R
.
When I run the code:
SMOGNRegress(Deceased~., normalized_data, rel = "auto", thr.rel = 0.9999, C.perc = "balance", k = 2, repl = F, dist = "Euclidean", pert = 0.01)
I get the following error:
'names' attribute [35563] must be the same length as the vector [1]
From similar questions regarding this error, I saw that it is an issue of lengths not matching, but I cannot wrap my head around how to fix that in order to generate the new oversampled data set.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保此函数知道“归一化_data”是对我有用的数据框架。
Making sure this function knows that "normalized_data" is a data frame worked for me.