title: Multinomial classification using neuralnet package
body: <p>This question ought to be real simple. But the documentation isn't helping.</p>
  
  <p>I am using R. I must use the <code>neuralnet</code> package for a multinomial classification problem.</p>
  
  <p>All examples are for binomial or linear output. I could do some one-vs-all implementation using binomial output. But I believe I should be able to do this by having 3 units as the output layer, where each is a binomial (ie. probability of that being the correct output). No?</p>
  
  <p>This is what I would using <code>nnet</code> (which I believe is doing what I want):</p>
  
  <pre><code>data(iris)
  library(nnet)
  m1 &lt;- nnet(Species ~ ., iris, size = 3)
  table(predict(m1, iris, type = "class"), iris$Species)
  </code></pre>
  
  <p>This is what I am trying to do using <code>neuralnet</code> (the formula hack is because <code>neuralnet</code> does not seem to support the '<code>.</code>' notation in the formula):</p>
  
  <pre><code>data(iris)
  library(neuralnet)
  formula &lt;- paste('Species ~', paste(names(iris)[-length(iris)], collapse='+'))
  m2 &lt;- neuralnet(formula, iris, hidden=3, linear.output=FALSE)
  # fails !
  </code></pre>