generator.ontonet: Make an ontonet generator for visible neural network (VNN)...

View source: R/generator.ontonet-function.R

generator.ontonetR Documentation

Make an ontonet generator for visible neural network (VNN) modeling

Description

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.

Usage

generator.ontonet(
  tidy_set,
  path = NULL,
  init_seed = 888,
  init2_seed = 9999,
  l2_norm = 0,
  output_unit = 1,
  output_activation = "sigmoid"
)

Arguments

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.

Value

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.

Examples


## 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)

herdiantrisufriyana/divnn documentation built on July 30, 2024, 7:47 a.m.