我想将数据框转换为mldr对象,出现此错误: do.call(paste,c(dataframe [,new_mldr $ labels $ index],sep =“”))错误:第二个参数必须是列表
我的数据帧头如下:
hour P load week_day days month lable
67 13 1 12274 3 3 1 13 72 18 1 13620 3 3 1 22 73 19 1 13988 3 3 1 22 74 20 1 13748 3 3 1 22 75 21 1 13306 3 3 1 22 87 7 1 11556 4 4 1 13
答案 0 :(得分:0)
我猜测您在使用mldr_from_dataframe
函数时会遇到此错误,这很可能是因为您为labelIndices
提供了一个索引(编号7与您称为lable
的列相对应) )。多标签分类需要多个标签,而您的问题似乎是单标签分类,在这种情况下不需要mldr
。