Learn R Programming

NeuralNetTools (version 1.3.1)

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 class 'nnet':
neuralskips(mod_in, ...)

Arguments

mod_in
input object for which an organized model list is desired.
...
arguments passed to other methods

Value

  • return a numeric vector in sequential order of the weights for the direct connection between input and output layers

Details

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

Examples

Run this code
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