test_model | R Documentation |
Define, compile, and train a Keras model on the training dataset. Then, benchmark it on the test dataset and return summaries.
test_model( data, recipe, units1 = 16, units2 = 16, act1 = "relu", act2 = "relu", act3 = "sigmoid" )
data |
a matrix. |
recipe |
A |
units1 |
Number of neurons in the first layer. |
units2 |
Number of neurons in the second layer. |
act1 |
Activation function for layer 1. |
act2 |
Activation function for layer 2. |
act3 |
Activation function for layer 3. |
The first time you run Keras in an R session, TensorFlow usually prints verbose ouput such as "Your CPU supports instructions that this TensorFlow binary was not compiled to use:" and "OMP: Info #171: KMP_AFFINITY:". You can safely ignore these messages.
A data frame with one row and the following columns:
accuracy
: classification accuracy on the test dataset.
units1
: number of neurons in layer 1.
units2
: number of neurons in layer 2.
act1
: number of neurons in layer 1.
act2
: number of neurons in layer 2.
act3
: number of neurons in layer 3.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.