View source: R/classify_tweets.R
validate_train_ctrl_sum_fun | R Documentation |
trainControl
summary functionInternal helper to classify_tweets
validate_train_ctrl_sum_fun(fun, levs, metric)
fun |
summary function, needs to conform to |
levs |
character with two elements, specifying outcome classes |
metric |
evaluation metric expected in |
a list with elements "result" (unit-length logical) and "message" (character)
## Not run:
library(caret)
# returns "result" FALSE and a "message"
validate_train_ctrl_sum_fun(twoClassSummary, c("yes", "no"), "A")
# returns "result" TRUE and no "message"
validate_train_ctrl_sum_fun(twoClassSummary, c("yes", "no"), "ROC")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.