find.CV.C {textreg} | R Documentation |
Given a corpus, divide into K-folds and do test-train spilts averaged over the folds.
find.CV.C(corpus, labeling, banned, K = 5, length.out = 10,
max_C = NULL, verbose = FALSE, ...)
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 |
Increments tuning parameter, performs K-fold cross-validation on each C giving a profile of predictive power for different C.
a dataframe containing the mean/standard error of out-of-sample predictions under K-Fold Cross-validation
make.CV.chart