title: My Maxent Classifier works fine with gis algorithm but does not work with iis algorithm. It is not throwing any error, just some warnings
body: <p>I am trying to implement the Maxent Classifier but I am facing problem while using the 
  iis algorithm.The following code works fine for gis algorithm.</p>
  
  <pre><code>import nltk
  from nltk.classify import MaxentClassifier, accuracy
  from featx import split_label_feats, label_feats_from_corpus
  from nltk.corpus import movie_reviews
  from nltk.classify import megam
  from openpyxl import load_workbook
  from featx import bag_of_non_words  
  from nltk.tokenize import word_tokenize
  movie_reviews.categories()
  lfeats = label_feats_from_corpus(movie_reviews)
  
  lfeats.keys()
  train_feats, test_feats = split_label_feats(lfeats)
  me_classifier = nltk.MaxentClassifier.train(train_feats, algorithm='iis', trace=0, max_iter=3)
  print accuracy(me_classifier, test_feats)
  </code></pre>
  
  <p>I am working on a WIN32 machine and the above code is from NLTK book by Jacob Perkins.
  The warning thrown by it is </p>
  
  <pre><code>C:\Python27\lib\site-packages\nltk\classify\maxent.py:1308: RuntimeWarning: invalid value encountered in multiply
    sum1 = numpy.sum(exp_nf_delta * A, axis=0)
  C:\Python27\lib\site-packages\nltk\classify\maxent.py:1309: RuntimeWarning: invalid value encountered in multiply
    sum2 = numpy.sum(nf_exp_nf_delta * A, axis=0)
  C:\Python27\lib\site-packages\nltk\classify\maxent.py:1315: RuntimeWarning: invalid value encountered in divide
    deltas -= (ffreq_empirical - sum1) / -sum2
  </code></pre>
  
  <p>And then the computer hangs.So I have to stop the execution.</p>
  
  <p>.</p>