create_model {LDNN} | R Documentation |
Pre-defined Neural Network for Longitudinal Data
Description
Create the Neural Network model (Keras).
Usage
create_model(
rnn_inputs,
recurrent_droppout,
inputs,
layer_dropout,
n_nodes_hidden_layers,
loss_function,
opt,
metric
)
Arguments
rnn_inputs |
The number of inputs (integers) per each LSTM (vector of length 10). |
recurrent_droppout |
The dropout to be applied in the LSTMs (between 0 and 1). |
inputs |
The number of inputs (integer) to be concatenated with the output of the LSTMs. |
layer_dropout |
The dropout to be applied between the hidden layers (between 0 and 1). |
The number of nodes in the hidden layers (2 in total). | |
loss_function |
The loss function to be used. |
opt |
The optimizer to be used. |
metric |
The metric to be used. |
Value
The model object built in Keras.
Examples
inp = c(20,24,24,24,16,16,16,16,16,15)
rec_drop = rep(0.1,10)
l_drop = c(0.1,0.1)
## Not run:
create_model(inp,rec_drop,232,c(0.1,0.1),l_drop,'mean_squared_error','adam','mean_absolute_error')
## End(Not run)
# The functions require to have python installed
# As well as tensorflow, keras and reticulate package.
[Package LDNN version 1.10 Index]