- L2Norm
Return the l2 norm (Euclidean vector length) of a Counter.Implementation note:
The method name favo
- addInPlace
Sets each value of double[] target to be target[idx.indexOf(k)]+a.getCount(k)
for all keys k in arg
- multiplyInPlace
Multiplies each value in target by the count of the key in mult, in place.
Returns non zero entries
- toPriorityQueue
Returns a edu.stanford.nlp.util.PriorityQueue whose elements are the keys of
Counter c, and the scor
- toString
Pretty print a Counter. This one has more flexibility in formatting, and doesn't
sort the keys.
- argmax
Finds and returns the key in the Counter with the largest count. Returning null
if count is empty.
- average
Returns a new Counter with counts averaged from the two given Counters. The
average Counter will con
- divideInPlace
- equals
Equality comparison between two counters, allowing for a tolerance fudge factor.
- fromMap
Returns a counter view of the given map. The type parameter is the type of the
values in the map, wh
- keysBelow
Returns the set of keys whose counts are at or below the given threshold. This
set may have 0 elemen
- klDivergence
Calculates the KL divergence between the two counters. That is, it calculates
KL(from || to). This m