在提问之前请确定你已经努力阅读了文档,并且尝试自己在互联网上搜索。
请尽可能提供你的demo代码或者GitHub的gist地址。
using RDatasets
using DataFrames
using MLJ
using MLJLinearModels
boston = dataset("MASS", "Boston")
data = DataFrame(boston)
y = data.MedV
X = select(data, Not(:MedV))
train, test = partition(eachindex(y), 0.3, shuffle=true, rng=123)
lr = MLJLinearModels.LinearRegressor()
mach = machine(lr, X, y)
fit!(mach, rows=train)
y_pred = predict(mach, X[test, :])
println(y_pred)
# code
报错显示,Warning: The number and/or types of data arguments do not match what the specified model supports. Suppress this type check by specifying scitype_check_level=0
.
请问如何解决?谢谢!