val | R Documentation |
Evaluate an algorithm with one dfm
val( x, y, set = "training", alg = NULL, pred = stats::predict, as_matrix = FALSE, positive = TRUE, pb = NULL, what = NULL, write_out = FALSE )
x |
A dfm to evaluate. |
y |
A variable in docvars of the dfms with the class (must be logical for now). |
set |
A variable in docvars indicating membership to training or test set. |
alg |
A functions containing the algorithm to be evaluated (see example) |
pred |
A function used for prediction (most packages use predict(), which is the default). |
as_matrix |
Logical. Indicating if alg needs the dfm converted to a matrix. |
positive |
value for the positive class. |
pb, what |
Used to display status bar when used in batch mode. |
write_out |
Should intermediate results be written to the working directory. |
A confusion matrix object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.