get_cv_folds: Add a cv folds column to a data frame.

Description Usage Arguments Value Examples

Description

Add a cv folds column to a data frame.

Usage

1
get_cv_folds(training_frame, n_folds = 5)

Arguments

training_frame

data frame, the frame to which to append the cv folds column

n_folds

integer, number of folds

Value

A data frame identical to training frame with one extra column called "fold_id" that gives the fold of each column. Also, the attributes "cv_column" and "n_folds" are added to indicate that a cv column has been defined. If the "cv_column" attribute is already present, training_frame is returned unchanged.

Examples

1

josh-whitney/stacker documentation built on May 19, 2019, 8:51 p.m.