CombineSens: Sensitivity analysis plot over time of the data

View source: R/CombineSens.R

CombineSensR Documentation

Sensitivity analysis plot over time of the data

Description

Plot of sensitivity of the neural network output respect to the inputs over the time variable from the data provided

Usage

CombineSens(object, comb_type = "mean")

Arguments

object

SensMLP object generated by SensAnalysisMLP with several outputs (classification MLP)

comb_type

Function to combine the matrixes of the raw_sens component of object. It can be "mean", "median" or "sqmean". It can also be a function to combine the rows of the matrixes

Value

SensMLP object with the sensitivities combined

Examples


fdata <- iris
## Parameters of the NNET ------------------------------------------------------
hidden_neurons <- 5
iters <- 250
decay <- 0.1

#' ## TRAIN nnet NNET --------------------------------------------------------
# Create a formula to train NNET
form <- paste(names(fdata)[1:ncol(fdata)-1], collapse = " + ")
form <- formula(paste(names(fdata)[5], form, sep = " ~ "))

set.seed(150)
mod <- nnet::nnet(form,
                  data = fdata,
                  linear.output = TRUE,
                  size = hidden_neurons,
                  decay = decay,
                  maxit = iters)
# mod should be a neural network classification model
sens <- SensAnalysisMLP(mod, trData = fdata, output_name = 'Species')
combinesens <- CombineSens(sens, "sqmean")


NeuralSens documentation built on July 9, 2023, 6:18 p.m.