activate: Neuron Activation Function

Description Usage Arguments Examples

Description

activation function for each neuron node, we provide the popular activation functions including 'sigmoid', 'tanh', etc.

Usage

1
activate(x, funName)

Arguments

x

input value to the activation function

funName

This package provides the most popular activation functions which can be used by setting the funName parameter to the following strings: 'sigmoid', 'tanh'.

'sigmoid' sigmoid function 1/(1 + exp(-x)).

'tanh' tanh is the hyperbolic tangent function equal to (exp(x) - exp(-x)) / (exp(x) + exp(-x)).

Examples

1
2
3
x <- c(-5:5)
y1 <- activate(x, funName = 'sigmoid')
y2 <- activate(x, funName = 'tanh')


Search within the nnetpredint package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.