Learn R Programming

modeval (version 0.1.3)

suggest_probPop: Compare class probability distributions based on the population.

Description

suggest_probPop Compare class probability distribution based on the population of observations, sorted by probability values. x-axis: percentile of class probability. y-axis: observation density.

Usage

suggest_probPop(addTo, outChar, predTag = "pred_test", modelTag = NULL)

Arguments

addTo
Summary list that contains model fits to compare.
outChar
A charactor value of output class name.
predTag
Select prediction results that contains predTag on their name.
modelTag
Select model fits that contains modelTag on their name.

Value

Plot indicating density distribution by observed population.

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")
# sSummary <- add_prob(sSummary, x_test, y_test, outChar = "pos")
# 
# suggest_probPop(sSummary, "pos")
# suggest_probPop(sSummary, "pos", modelTag = "glm|svm")
# 
# # vignette("modeval") #check a vignette for further details
## ---------------------------------------------

Run the code above in your browser using DataLab