You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
after a long time, I still cannot figure out how to get
class_labels =vcat(["spam"for _ =1:3], ["not spam"for i =1:9])
ttp =train_test_pairs(kf, 1:length(class_labels), class_labels)
for (k, (ids_train, ids_test)) inenumerate(ttp)
# train on ids_train# test on ids_testend
to work. would be nice to allow train_test_pairs to accept a generic vector of class labels so that this can be used outside the context of ML workflows in this package. I'm looking for something generic like scikitlearn's stratified K-folds. thanks!
the error I get is:
ArgumentError: Supplied target has scitype AbstractVector{ScientificTypesBase.Textual} but stratified cross-validation applies only to classification problems.
train_test_pairs(::MLJBase.StratifiedCV, ::UnitRange{Int64}, ::Vector{String})@resampling.jl:407
top-level scope@[Local: 3](http://localhost:1235/edit?id=c4c85f16-4c12-11ed-3b74-134639249bb1#)[inlined]
The text was updated successfully, but these errors were encountered:
In MLJ more generally, care is taken to track all levels of categorical data, not just those seen in a give sample. However, in this particular case, the full class pool is not used (or needed) so I agree there's a good argument to make this more generic. I think the test triggering the warning can just be removed.
after a long time, I still cannot figure out how to get
to work. would be nice to allow
train_test_pairs
to accept a generic vector of class labels so that this can be used outside the context of ML workflows in this package. I'm looking for something generic like scikitlearn's stratified K-folds. thanks!the error I get is:
The text was updated successfully, but these errors were encountered: