hashEncoder

fun hashEncoder(numFeatures: Int, alternateSign: Boolean = true, tokenizer: (String) -> Array<String>): HashEncoder(source)

Feature hashing (the hashing trick) vectorizer.

Return

the HashEncoder.

Parameters

numFeatures

the number of features in the output space.

alternateSign

when true, an alternating sign is added to approximately conserve inner product.

tokenizer

the text tokenizer lambda.