microsoftml.n_gram_hash:ハッシュ化されたnグラムを使ってテキストを特徴に変換します

Usage

microsoftml.n_gram_hash(hash_bits: numbers.Real = 16,
    ngram_length: numbers.Real = 1, skip_length: numbers.Real = 0,
    all_lengths: bool = True, seed: numbers.Real = 314489979,
    ordered: bool = True, invert_hash: numbers.Real = 0)

Description

テキストからNGramを抽出し、ハッシュのトリックを使ってベクターに変換します。

引数

hash_bits

ハッシュするビット数。 1 ~ 30 の範囲で指定する必要があります。 (設定)

ngram_length

Nグラムの長さ(設定)。

skip_length

nグラム構築時にスキップすべき最大トークン数(設定)。

all_lengths

ngramLengthまでのすべてのngram長を含めるか、ngramLengthのみを含めるか(設定)を決めます。

seed

シードのハッシュ化(設定)。

順序付けられた

各ソース列の位置をハッシュに含めるかどうか (複数のソース列がある場合)。 (設定)

invert_hash

スロット名を生成するキーの数をこの数に制限してください。 0は反逆ハッシュなし、-1 は制限なしを意味します。 (設定)