Maps a sequence of terms to their term frequencies using the hashing trick.
Currently we use Austin Appleby's MurmurHash 3 algorithm (MurmurHash3_x86_32)
to calculate the hash code value for the term object.
Since a simple modulo is used to transform the hash function to a column index,
it is advisable to use a power of two as the numFeatures parameter;
otherwise the features will not be mapped evenly to the columns.

numFeatures

binary

Binary toggle to control term frequency counts.
If true, all non-zero counts are set to 1. This is useful for discrete probabilistic
models that model binary events rather than integer counts.
(default = false)

transformSchema

Check transform validity and derive the output schema from the input schema.

We check validity for interactions between parameters during transformSchema and
raise an exception if any parameter value is invalid. Parameter value checks which
do not depend on other parameters are handled by Param.validate().