Julia 机器中的SCIX类型与型号不兼容

Julia 机器中的SCIX类型与型号不兼容,julia,Julia,我试图使用MLJ来训练一些使用随机森林分类器的数据。为了做到这一点,我将强制我的分类变量设置为多类(scitype),并将连续特性设置为连续。(我还将目标变量scitype更改为多类) 但是,当我构造机器对象时,我得到以下警告: mach = machine(forest, X,y) ┌ Warning: The scitype of `X`, in `machine(model, X, ...)` is incompatible with `model=RandomForestCl

我试图使用MLJ来训练一些使用随机森林分类器的数据。为了做到这一点,我将
强制
我的分类变量设置为
多类
(scitype),并将连续特性设置为
连续
。(我还将目标变量scitype更改为
多类

但是,当我构造机器对象时,我得到以下警告:

 mach = machine(forest, X,y)

 ┌ Warning: The scitype of `X`, in `machine(model, X, ...)` is incompatible 
 with `model=RandomForestClassifier @695`:
 │ scitype(X) = Table{Union{AbstractArray{Continuous,1}, 
 AbstractArray{Multiclass{8},1}, AbstractArray{Multiclass{3},1}, 
 AbstractArray{Multiclass{14},1}, AbstractArray{Multiclass{7},1}, 
 AbstractArray{Multiclass{12},1}}}
 │ input_scitype(model) = Table{var"#s45"} where var"#s45" 
 <:Union{AbstractArray{var"#s13",1} where var"#s13"<:Count, 
 AbstractArray{var"#s13",1} where var"#s13"<:OrderedFactor, 
 AbstractArray{var"#s13",1} where var"#s13"<:Continuous}.
我用连续的特性测试了模型,效果很好。因此,分类变量(使用scitype
Muticlass
)是不正确的,但不能完全弄清楚它是什么。知道我做错了什么吗?

不支持
多类
scitype

一种可能的解决方案是将表的分类列扩展为一个热编码列,如中所示

 mach = machine(forest, X,y)

 ┌ Warning: The scitype of `X`, in `machine(model, X, ...)` is incompatible 
 with `model=RandomForestClassifier @695`:
 │ scitype(X) = Table{Union{AbstractArray{Continuous,1}, 
 AbstractArray{Multiclass{8},1}, AbstractArray{Multiclass{3},1}, 
 AbstractArray{Multiclass{14},1}, AbstractArray{Multiclass{7},1}, 
 AbstractArray{Multiclass{12},1}}}
 │ input_scitype(model) = Table{var"#s45"} where var"#s45" 
 <:Union{AbstractArray{var"#s13",1} where var"#s13"<:Count, 
 AbstractArray{var"#s13",1} where var"#s13"<:OrderedFactor, 
 AbstractArray{var"#s13",1} where var"#s13"<:Continuous}.
trainRows, testRows = partition(eachindex(y),0.7, shuffle = true)
MLJ.fit(mach, rows = trainRows)
Inputs are tables with ordinal columns. That is, the element scitype
of each column can be `Continuous`, `Count` or `OrderedFactor`.