CreateStratifiedPartition: Create a stratified sampling-based S3 object of class...

Description Usage Arguments Details Value


Stratified partitioning is supported for binary classification problems and it randomly partitions the modeling data, keeping the percentage of positive class observations in each partition the same as in the original dataset. Stratified partitioning is supported for either Training/Validation/Holdout ('TVH') or cross-validation ('CV') splits. In either case, the holdout percentage (holdoutPct) must be specified; for the 'CV' method, the number of cross-validation folds (reps) must also be specified, while for the 'TVH' method, the validation subset percentage (validationPct) must be specified.


CreateStratifiedPartition(validationType, holdoutPct, reps = NULL,
  validationPct = NULL)



Character string specifying the type of partition generated, either 'TVH' or 'CV'.


Integer, giving the percentage of data to be used as the holdout subset.


Integer, specifying the number of cross-validation folds to generate; only applicable when validationType = 'CV'.


Integer, giving the percentage of data to be used as the validation subset.


This function is one of several convenience functions provided to simplify the task of starting modeling projects with custom partitioning options. The other functions are CreateGroupPartition, CreateRandomPartition, and CreateUserPartition.


An S3 object of class 'partition' including the parameters required by the SetTarget function to generate a stratified partitioning of the modeling dataset.

Search within the datarobot package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.