title: nnet in R, 'softmax = TRUE' requires at least two response categories
body: <p>I am trying to use nnet in R, and encounter a problem for using softmax.</p>
  
  <p>I am trying to builda three layer network, with input layer have 25 neurons, hidden layer have 25 neurons, output layer only have one neuron. Here is how to reproduce the problem.</p>
  
  <pre><code>library('nnet')
  X &lt;- replicate(25, rnorm(40))
  y &lt;- sample(0:1,40,replace=T)
  
  mynnet &lt;- nnet(X, y, size = 25, 
                    softmax = T,
                    rang = 0.8, 
                    maxit = 2000, 
                    model=TRUE)
  </code></pre>
  
  <p>When I run this piece of code, I got a error:</p>
  
  <pre><code>Error in nnet.default(X, y, size = 25, 
  softmax = T, rang = 0.8, maxit = 2000,  :
  'softmax = TRUE' requires at least two response categories
  </code></pre>
  
  <p>What 'requires at least two response categories' means? And how to fix it? Thanks. </p>