Description Usage Arguments Examples
The ggClasPred
function generates a barplot with the per class accuracies (%) for all the correctly classified and misclassified samples in the classification ensemble.
1 2 |
ensObj |
The classification ensemble (in the form of an R list) as generated by |
position |
The position may be equal to either "stack" or "dodge". |
displayAll |
Boolean value, by default set to |
showText |
Boolean value, by default set to |
xlabel |
A sub title for the x axis (optional field). |
ylabel |
A sub title for the y axis (optional field). |
cbPalette |
If TRUE, enable a color-blind-friendly palette. |
fillBrewer |
If TRUE, enable a color scale taken from the RColorBrewer package. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | ## Not run:
data(iris)
irisClass <- iris[,5]
irisData <- iris[,-5]
ens <- cfBuild(irisData, irisClass, bootNum = 100, ensNum = 100, parallel = TRUE,
cpus = 4, type = "SOCK")
# Show the percentages of correctly classified samples in
# a barplot with or without text respectively
ggClassPred(ens)
ggClassPred(ens, showText = TRUE)
# Show the percentages of classified and missclassified samples
# in a barplot simultaneously with and without text
ggClassPred(ens, displayAll = TRUE)
ggClassPred(ens, position="stack", displayAll = TRUE)
ggClassPred(ens, position="stack", displayAll = TRUE, showText = TRUE)
# Alernatively, using a dodge position
ggClassPred(ens, position = "dodge", displayAll = TRUE)
ggClassPred(ens, position = "dodge", displayAll = TRUE, showText = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.