Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task conversion fails in stratified CV when a class is smaller than number of folds #450

Open
ja-thomas opened this issue Oct 17, 2019 · 0 comments

Comments

@ja-thomas
Copy link
Member

task = convertOMLTaskToMlr(getOMLTask(2073))

Error in instantiateResampleInstance.CVDesc(desc, length(ci), task) : 
  Cannot use more folds (10) than size (5)!

The mlr task:

Browse[2]> mlr.task
Supervised task: yeast
Type: classif
Target: class_protein_localization
Observations: 1484
Features:
   numerics     factors     ordered functionals 
          8           0           0           0 
Missings: FALSE
Has weights: FALSE
Has blocking: FALSE
Has coordinates: FALSE
Classes: 10
CYT NUC MIT ME3 ME2 ME1 EXC VAC POX ERL 
463 429 244 163  51  44  35  30  20   5 
Positive class: NA

resample desc:

Browse[2]> estim.proc

Estimation Method :: crossvalidation
        Parameters:
                number_repeats = 1
                number_folds = 10
                stratified_sampling = true

On the Python side this seems to be handled (somehow)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant