plot_confusion: plot_confusion

Description Usage Arguments Value Examples

Description

plot_confusion

Usage

1
2
plot_confusion(..., display = TRUE, return_ggplot = FALSE, title = "",
  subtitle = "")

Arguments

...

kms_fit objects. (For each, object$y_test must be binary or categorical.)

display

Logical: display ggplot comparing confusion matrices? (Default TRUE.)

return_ggplot

Default FALSE (if TRUE, returns the ggplot object for further customization, etc.).

title

ggplot title

subtitle

ggplot subtitle

Value

(optional) ggplot. set return_ggplot=TRUE

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
if(is_keras_available()){

   model_tanh <- kms(Species ~ ., iris, 
                     activation = "tanh", Nepochs=5, 
                     units=4, seed=1, verbose=0)
   model_softmax <- kms(Species ~ ., iris, 
                        activation = "softmax", Nepochs=5, 
                        units=4, seed=1, verbose=0)
   model_relu <- kms(Species ~ ., iris, 
                     activation = "relu", Nepochs=5, 
                     units=4, seed=1, verbose=0)
                     
   plot_confusion(model_tanh, model_softmax, model_relu, 
                  title="Species", 
                  subtitle="Activation Function Comparison")
   
}

kerasformula documentation built on May 2, 2019, 9:44 a.m.