| calc_perf_metrics | R Documentation | 
Get performance metrics for test data
calc_perf_metrics(
  test_data,
  trained_model,
  outcome_colname,
  perf_metric_function,
  class_probs
)
| test_data | Held out test data: dataframe of outcome and features. | 
| trained_model | Trained model from  | 
| outcome_colname | Column name as a string of the outcome variable
(default  | 
| perf_metric_function | Function to calculate the performance metric to
be used for cross-validation and test performance. Some functions are
provided by caret (see  | 
| class_probs | Whether to use class probabilities (TRUE for categorical outcomes, FALSE for numeric outcomes). | 
Dataframe of performance metrics.
Zena Lapp, zenalapp@umich.edu
## Not run: 
results <- run_ml(otu_small, "glmnet", kfold = 2, cv_times = 2)
calc_perf_metrics(results$test_data,
  results$trained_model,
  "dx",
  multiClassSummary,
  class_probs = TRUE
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.