| deep_response_model | R Documentation |
Train response model (response variable as outcome and covariates) from all compliers (actual + predicted) in experimental data using Tensorflow.
deep_response_model(
response.formula,
exp.data,
exp.compliers,
compl.var,
algorithm = "adam",
hidden.layer = c(2, 2),
hidden_activation = "relu",
epoch = 10,
verbose = 1,
batch_size = 32,
output_units = 1,
validation_split = NULL,
patience = NULL,
output_activation = "linear",
loss = "mean_squared_error",
metrics = "mean_squared_error",
dropout_rate = NULL
)
response.formula |
formula specifying the response variable and covariates. |
exp.data |
experimental dataset. |
exp.compliers |
|
compl.var |
string specifying binary complier variable |
algorithm |
string for optimizer algorithm in response model. |
|
vector specifying hidden layers and the number of neurons in each hidden layer | |
|
string or vector for activation functions in hidden layers. | |
epoch |
integer for number of epochs |
verbose |
1 to display model training information and learning curve plot. 0 to suppress messages and plots. |
batch_size |
batch size to split training data. |
output_units |
integer for units in output layer. Defaults to 1 for continuous and binary outcome variables. In case of multinomial outcome variable, value should be set to the number of categories. |
validation_split |
double for the proportion of test data to be split as validation in response model. |
patience |
integer for number of epochs with no improvement after which training will be stopped. |
output_activation |
string for activation function in output layer. "linear" is recommended for continuous outcome variables, and "sigmoid" for binary outcome variables |
loss |
string for loss function. "mean_squared_error" recommended for linear models, "binary_crossentropy" for binary models. |
metrics |
string for metrics. "mean_squared_error" recommended for linear models, "binary_accuracy" for binary models. |
dropout_rate |
double or vector for proportion of hidden layer to drop out in response model. |
model object of trained response model.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.