Learn R Programming

modeval (version 0.1.3)

suggest_accuracy: Compare performance based on accuracy metrics.

Description

suggest_accuracy Compare performance for all model fits in the Summary list based on Accuracy and Kappa metrics, together with training time for a single tuning of each model fit.

Usage

suggest_accuracy(addTo, modelTag = NULL, time = FALSE)

Arguments

addTo
Summary list that contains model fits to compare.
modelTag
Select model fits that contains modelTag in their name.
time
If TRUE, calculates average time to train model for a single tuning.

Examples

Run this code
## Not run: ------------------------------------
# library(mlbench)
# data(PimaIndiansDiabetes)
# index <- sample(seq_len(nrow(PimaIndiansDiabetes)), 500)
# trainingSet <- PimaIndiansDiabetes[index, ]
# testSet <- PimaIndiansDiabetes[-index, ]
# x <- trainingSet[, -9]
# y <- trainingSet[, 9]
# x_test <- testSet[, -9]
# y_test <- testSet[, 9]
# sSummary <- list()
# sSummary <- add_model(sSummary, x, y)
# sSummary <- add_model(sSummary, x, y, model = c("C5.0Cost", "glmnet"), modelTag = "others")
#  
# suggest_accuracy(sSummary)
# suggest_accuracy(sSummary, time = TRUE)
# suggest_accuracy(sSummary, time = TRUE, modelTag = "glm|svm")
# 
# # vignette("modeval") #check a vignette for further details
## ---------------------------------------------

Run the code above in your browser using DataLab