简体   繁体   中英

Using Caret package with neuralnet as a method

I have created a prediction model using caret neuralnet method. Now I'm wondering which is the defualt activation function that caret is using for this method.

The caret package uses theneuralnet package when caret::train() is used with method="neuralnet" , as documented in train models by tag on the caret documentation website .

The specific function called is neuralnet::neuralnet() .

As mentioned by Len Greski method neuralnet calls neuralnet::neuralnet() . The activation function used by neuralnet::neuralnet() is act.fct = "logistic" .

Caret does not change the default which can be observed in the source . Relevant part of code:

neuralnet::neuralnet(form, data = dat, hidden = nodes, ...)

One can also supply a user defined function as part of the ellipsis in caret::train . Relevant answer on SO explaining how to create such a function.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM