trnnick / nnfor

31 stars 15 forks source link

Specification of activation function in mlp #2

Closed shanu0406 closed 6 years ago

shanu0406 commented 6 years ago

How do we specify type of activation function such as sigmoid, tanh in time series neural network function "mlp" in R?

trnnick commented 6 years ago

the ellipsis argument (...) passes further inputs to the neuralnet function that the package is built around. See ?neuralnet for the additional arguments. The following example should help: set.seed(1); fit <- mlp(AirPassengers); set.seed(1); fit2 <- mlp(AirPassengers,act.fct="tanh")

By default logistic is used.