简体   繁体   English

使用带有神经网络的 Caret 包作为方法

[英]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.现在我想知道 caret 用于此方法的默认激活函数是哪个。

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 .caret::train()method="neuralnet"一起使用时,caret 包使用神经网络包,如caret 文档网站上的标签训练模型中所述。

The specific function called is neuralnet::neuralnet() .调用的特定函数是neuralnet::neuralnet()

As mentioned by Len Greski method neuralnet calls neuralnet::neuralnet() .正如莱恩Greski方法提到neuralnet调用neuralnet::neuralnet() The activation function used by neuralnet::neuralnet() is act.fct = "logistic" . act.fct = "logistic" neuralnet::neuralnet()使用的激活函数是act.fct = "logistic"

Caret does not change the default which can be observed in the source . Caret 不会更改可以在源中观察到的默认值。 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 .还可以提供用户定义的函数作为caret::train省略号的一部分。 Relevant answer on SO explaining how to create such a function. 关于 SO 的相关答案解释了如何创建这样一个函数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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