NeuralNetTools (version 1.5.2)

neuralskips: Get weights for the skip layer in a neural network

Description

Get weights for the skip layer in a neural network, only valid for networks created using skip = TRUE with the nnet function.

Usage

neuralskips(mod_in, ...)

# S3 method for nnet neuralskips(mod_in, rel_rsc = NULL, ...)

Arguments

mod_in

input object for which an organized model list is desired.

...

arguments passed to other methods

rel_rsc

numeric indicating the scaling range for the width of connection weights in a neural interpretation diagram. Default is NULL for no rescaling. Scaling is relative to all weights, not just those in the primary network.

Value

Returns a list of connections for each output node, where each element of the list is the connection for each input node in sequential order to the respective output node. The first weight in each element is not the bias connection, unlike the results for neuralweights.

Details

This function is similar to neuralweights except only the skip layer weights are returned.

Examples

Run this code
# NOT RUN {
data(neuraldat)
set.seed(123)

## using nnet

library(nnet)

mod <- nnet(Y1 ~ X1 + X2 + X3, data = neuraldat, size = 5, linout = TRUE, 
 skip = TRUE)
 
neuralskips(mod)  

# }

Run the code above in your browser using DataLab