title: Cons of setting MaxNWts in R nnet to a very large number
body: <p>I am using the <strong>nnet</strong> function package from the nnet package in R. I am trying to set the <strong>MaxNWts</strong> parameter and was wondering if there is any disadvantage to setting this number to a large value like 10^8 etc. The documentation says</p>
  
  <blockquote>
    <p>"The maximum allowable number of weights. There is no intrinsic limit
    in the code, but increasing MaxNWts will probably allow fits that are
    very slow and time-consuming."</p>
  </blockquote>
  
  <p>I also calculate the size parameter by the following calculation</p>
  
  <blockquote>
    <p>size = Math.Sqrt(%No of Input Nodes% * %No of Output Nodes%)</p>
  </blockquote>
  
  <p>The problem is that if I set "MaxNWts" to a value like 10000 , it fails sometimes because the number of coefficients is > 10000 when working with huge data sets. </p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Is there a way to calculate the number of wts( to the get the same number calculated by R nnet) somehow so that I can explicitly set it every time without worrying about the failures?</p>
  
  <p>Suggestions?</p>