def entropy(term)
      denominator = @model.term_count(term).to_f
      logN = log(documents.size)
      1 + documents.reduce(0) do |sum,document|
        quotient = document.term_count(term) / denominator
        sum += quotient * log(quotient) / logN
      end
    end
def entropy(term)
      denominator = @model.term_count(term).to_f
      logN = log(documents.size)
      1 + documents.reduce(0) do |sum,document|
        quotient = document.term_count(term) / denominator
        sum += quotient * log(quotient) / logN
      end
    end
Chisholm ENPY