find.CV.C: K-fold cross-validation to determine optimal tuning parameter

Description Usage Arguments Details Value See Also

Description

Given a corpus, divide into K-folds and do test-train spilts averaged over the folds.

Usage

1
2
find.CV.C(corpus, labeling, banned, K = 5, length.out = 10,
  max_C = NULL, verbose = FALSE, ...)

Arguments

corpus

The text

labeling

The labeling

banned

The words to drop.

K

Number of folds for K-fold cross-validation

length.out

number of values of C to examine from 0 to max_C.

max_C

upper bound for tuning parameter; if NULL, sets max_C to threshold C

verbose

Print progress

...

parameters to be passed to the original textreg() function

Details

Increments tuning parameter, performs K-fold cross-validation on each C giving a profile of predictive power for different C.

Value

a dataframe containing the mean/standard error of out-of-sample predictions under K-Fold Cross-validation

See Also

make.CV.chart


textreg documentation built on May 2, 2019, 8:34 a.m.