You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
955 B
31 lines
955 B
% Generated by roxygen2: do not edit by hand
|
|
% Please edit documentation in R/cv_generator.R
|
|
\name{cv_generator}
|
|
\alias{cv_generator}
|
|
\title{Generate CV folds for nested cross-validation}
|
|
\usage{
|
|
cv_generator(outer_k, inner_k, dfm, class_type, grid, seed)
|
|
}
|
|
\arguments{
|
|
\item{outer_k}{Number of outer CV (performance estimation) folds. If outer_k < 1 holdout sampling is used, with outer_k being the amount of test data}
|
|
|
|
\item{inner_k}{Number of inner CV (parameter optimization) folds}
|
|
|
|
\item{dfm}{DFM containing the labeled documents}
|
|
|
|
\item{class_type}{Name of the column in docvars containing the classification}
|
|
|
|
\item{grid}{Parameter grid for optimization}
|
|
|
|
\item{seed}{integer used as seed for random number generation}
|
|
}
|
|
\value{
|
|
A nested set of lists with row numbers
|
|
}
|
|
\description{
|
|
Creates a grid of models to be estimated for each outer fold, inner fold and parameter combination
|
|
}
|
|
\examples{
|
|
cv_generator(outer_k, inner_k, dfm, class_type)
|
|
}
|