View source: R/generator.ontonet-function.R
generator.ontonet | R Documentation |
This function creates a function that generate a Keras Convolutional Neural Network (CNN) model with a specific layer architecture for each path in the hierarchy of the given ontology.
generator.ontonet(
tidy_set,
path = NULL,
init_seed = 888,
init2_seed = 9999,
l2_norm = 0,
output_unit = 1,
output_activation = "sigmoid"
)
tidy_set |
TidySet, an ExpressionSet with three tables. |
path |
A character of file path if the model json file is saved. |
init_seed |
An integer of random seed for ReLU initializer. |
init2_seed |
An integer of random seed for tanh initializer. |
l2_norm |
A numeric of L2-norm regularization factor. |
output_unit |
An integer of how many node for every output layer. |
output_activation |
A character of activation function name for all nodes in every output layer, i.e. sigmoid, softmax, tanh, relu, exponential, softplus, softsign, selu, elu. If linear, set this value as NULL. |
output Keras model object, a pointer to Keras model object in python environment, which will be an input to train VNN model using Keras R package.
## Create input example
input=utils.example()
## Compile input to a TidySet
tidy_set=
TidySet.compile(
value=input$value
,outcome=input$outcome
,similarity=input$similarity
,mapping=input$mapping
,ontology=input$ontology
)
## Create ontonet (Keras model object) generator function
ontonet=generator.ontonet(tidy_set)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.