Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSetting index in trainControl invalidates repeats/numbers arguments. #584
Comments
|
You are correct that there is a disconnect between the stated resampling type (based on the control arguments) and the resamples defined by the index. The issue is that there is no way to derive what type of resampling is being used based only on So right now, it is on the user to specify the type of resampling that they use when |
|
Thank you for your response. This is a perfectly reasonable explanation. Maybe it should be mentioned in a sentence in the documentation of Feel free to close this issue. |
Hello,
I am uncertain that this is "truly" a bug but it is somewhat unexpected behaviour nevertheless. If one sets the
indexargument totrainControlthe additional arguments torepeatsand ornumberare ignored. This can be misleading if you want to have a short simulation. For example in the following scripttrainwill attempt to do as many resamples as the length of the list of training indexes provided instead ofrepeats*number.The behaviour is similar when using simply
cv. If we useadaptive_cv,trainwill do the adaptive search check but it will ignore therepeats/numberarguments nevertheless.This behaviour is the same on the CRAN binary as well as the github master-branch. Maybe a warning message should be issued that
repeats/numberargs are overridden? (Or at least some mention of this intrainControl's documentation?) Thank you for checking this!All best,
Pantelis