简体   繁体   中英

When using the multinom function from the nnet package, how can I control the architecture of the neural networks?

In other words, when I do nnet(...) I can use the size parameter to control the number of units in the hidden layer. My particular model requires outputting probabilities so I wanted logistic units and so I turned to multinom from the nnet package to output type='probs' in my predict function. How can I pass down a size argument? When I call it with, say, size=5 or something I get an error:

 formal argument "size" matched by multiple actual arguments

multinom适合线性多项逻辑模型,这就是为什么size参数被硬编码为0.如果你想要一个具有多项输出的实际神经网络,只需使用nnet ,响应超过2级,并设置softmax=TRUE

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