TJUN KIAT TEO
2015-Nov-24 00:04 UTC
[R] Ensure distribution of classes is the same as prior distribution in Cross Validation
In the caret train control function, is it possible to ensure Ensure distribution of classes is the same as prior distribution in the folds of cross validation? I know it can be done using create folds but was wondering if it is possible using train control? [[alternative HTML version deleted]]
Max Kuhn
2015-Nov-24 20:51 UTC
[R] Ensure distribution of classes is the same as prior distribution in Cross Validation
Right now, using `method = "cv"` or `method = "repeatedcv"` does stratified sampling. Depending on what you mean by "ensure" and the nature of your outcome (categorical?), it probably already does. On Mon, Nov 23, 2015 at 7:04 PM, TJUN KIAT TEO <teotjunk at hotmail.com> wrote:> In the caret train control function, is it possible to ensure Ensure > distribution of classes is the same as prior distribution in the folds of > cross > validation? I know it can be done using create folds but was wondering if > it is possible using train control? > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]