layer_lines: Plot connection weights

Description Usage Arguments

View source: R/NeuralNetTools_utils.R

Description

Plot connection weights in plotnet

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
layer_lines(
  mod_in,
  h_layer,
  layer1 = 1,
  layer2 = 2,
  out_layer = FALSE,
  nid,
  rel_rsc,
  all_in,
  pos_col,
  neg_col,
  x_range,
  y_range,
  line_stag,
  x_names,
  layer_x,
  struct,
  max_sp,
  prune_col = NULL,
  prune_lty = "dashed",
  skip
)

Arguments

mod_in

neural network model object

h_layer

numeric indicating which connections to plot for the layer

layer1

numeric indicating order of first layer (for multiple hiden layers)

layer2

numeric indicating order of second layer (for multiple hiden layers)

out_layer

logical indicating if the lines are for the output layer

nid

logical value indicating if neural interpretation diagram is plotted, default TRUE

rel_rsc

numeric indicating the scaling range for the width of connection weights in a neural interpretation diagram. Default is NULL for no rescaling.

all_in

chr string indicating names of input variables for which connections are plotted, default all

pos_col

chr string indicating color of positive connection weights, default 'black'

neg_col

chr string indicating color of negative connection weights, default 'grey'

x_range

numeric of x axis range for base plot

y_range

numeric of y axis range for base plot

line_stag

numeric value that specifies distance of connection weights from nodes

x_names

chr string for names of input variables

layer_x

numeric indicating locations of layers on x axis

struct

numeric vector for network structure

max_sp

logical indicating if space is maximized in plot

prune_col

chr string indicating color of pruned connections, otherwise not shown

prune_lty

line type for pruned connections, passed to segments

skip

logical to plot connections for skip layer


NeuralNetTools documentation built on Jan. 6, 2022, 5:06 p.m.