makekWayCrossValidationGroupedByColumn: Build a k-fold cross validation splitter, respecting (never...

Description Usage Arguments Value Examples

Description

Build a k-fold cross validation splitter, respecting (never splitting) groupingColumn.

Usage

1

Arguments

groupingColumnName

name of column to group by.

Value

splitting function in the sense of vtreat::buildEvalSets.

Examples

1
2
3
4
5
6
d <- data.frame(y=sin(1:100))
d$group <- floor(seq_len(nrow(d))/5)
splitter <- makekWayCrossValidationGroupedByColumn('group')
split <- splitter(nrow(d),5,d,d$y)
d$splitLabel <- vtreat::getSplitPlanAppLabels(nrow(d),split)
rowSums(table(d$group,d$splitLabel)>0)


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

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

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

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