Description Usage Arguments Value
View source: R/keras_classification.R
This function can setup and compile sequential models. Please have a look at [keras_model_sequential](https://keras.rstudio.com/reference/keras_model_sequential.html), [layer_dense](https://keras.rstudio.com/reference/layer_dense.html) and [compile](https://keras.rstudio.com/reference/compile.html) for further details.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | build_the_model(
train_data,
Layer1_units,
Layer2_units,
classes,
Dropout_layer1,
Dropout_layer2,
Dense_activation_function,
Output_activation_function = NULL,
Optimizer_function,
Loss_function,
Metric,
...
)
|
train_data |
a table of training data |
Layer1_units |
integer, number of units in the first hidden layer |
Layer2_units |
integer, number of units in the second hidden layer |
classes |
integer, number of classes and therefore number of units in the output layer, set to 1 for regression |
Dropout_layer1 |
numeric, ratio of dropout nodes for layer 1 between 0 and 1 |
Dropout_layer2 |
numeric, ratio of dropout nodes for layer 2 between 0 and 1 |
Dense_activation_function |
char, activation function for the hidden layers |
Output_activation_function |
char, activation function for the output layer, (default: NULL, used for regression) |
Optimizer_function |
char, the optimizer function |
Loss_function |
char, the loss function |
Metric |
char vector, which metrics to monitor |
... |
further arguments |
a compiled keras sequential model with two hidden layers
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.