Learn R Programming

MLwrap (version 0.1.0)

plot_graph_nn: Plot Neural Network Architecture

Description

Plots a graph visualization of the Neural Network's architecture along with its optimized hyperparameters.

Usage

plot_graph_nn(analysis_object)

Value

analysis_object

Arguments

analysis_object

Fitted analysis_object with 'fine_tuning()'.

Examples

Run this code
# Note: For obtaining the Neural Network architecture graph plot the user needs to
# complete till the fine_tuning( ) function of the MLwrap pipeline.

if (requireNamespace("torch", quietly = TRUE)) {

  # \donttest{

  wrap_object <- preprocessing(df = sim_data,
                             formula = psych_well ~ depression + emot_intel + resilience,
                             task = "regression")
  wrap_object <- build_model(wrap_object, "Neural Network")
  wrap_object <- fine_tuning(wrap_object, "Bayesian Optimization")

  # And then, you can obtain the Neural Network architecture graph plot.

  plot_graph_nn(wrap_object)

  # }

}

Run the code above in your browser using DataLab