1 instantiation of NgramHashingEstimator
Microsoft.ML.Transforms (1)
Text\WordHashBagProducingTransform.cs (1)
374
.Append(new
NgramHashingEstimator
(h, ngramHashColumns).Fit(hashing.Transform(input)))
73 references to NgramHashingEstimator
Microsoft.ML.Transforms (73)
Text\NgramHashingTransformer.cs (37)
32
/// <see cref="ITransformer"/> resulting from fitting a <see cref="
NgramHashingEstimator
"/>.
118
public int NgramLength =
NgramHashingEstimator
.Defaults.NgramLength;
123
public bool UseAllLengths =
NgramHashingEstimator
.Defaults.UseAllLengths;
128
public int SkipLength =
NgramHashingEstimator
.Defaults.SkipLength;
133
public int NumberOfBits =
NgramHashingEstimator
.Defaults.NumberOfBits;
136
public uint Seed =
NgramHashingEstimator
.Defaults.Seed;
139
public bool RehashUnigrams =
NgramHashingEstimator
.Defaults.RehashUnigrams;
144
public bool Ordered =
NgramHashingEstimator
.Defaults.UseOrderedHashing;
148
public int MaximumNumberOfInverts =
NgramHashingEstimator
.Defaults.MaximumNumberOfInverts;
171
private readonly ImmutableArray<
NgramHashingEstimator
.ColumnOptions> _columns;
180
internal NgramHashingTransformer(IHostEnvironment env, params
NgramHashingEstimator
.ColumnOptions[] columns) :
187
throw Host.ExceptParam(nameof(columns), $"Found colunm with {nameof(column.MaximumNumberOfInverts)} set to non zero value, please use {nameof(
NgramHashingEstimator
)} instead");
191
internal NgramHashingTransformer(IHostEnvironment env, IDataView input, params
NgramHashingEstimator
.ColumnOptions[] columns) :
217
if (!
NgramHashingEstimator
.IsColumnTypeValid(input.Schema[srcCol].Type))
218
throw Host.ExceptSchemaMismatch(nameof(input), "input", _columns[i].InputColumnNamesArray[j],
NgramHashingEstimator
.ExpectedColumnType, columnType.ToString());
288
var columns = new
NgramHashingEstimator
.ColumnOptions[columnsLength];
295
columns[i] = new
NgramHashingEstimator
.ColumnOptions(ctx);
325
columns[i] = new
NgramHashingEstimator
.ColumnOptions(ctx, outputs[i], inputs[i]);
339
var cols = new
NgramHashingEstimator
.ColumnOptions[options.Column.Length];
346
cols[i] = new
NgramHashingEstimator
.ColumnOptions(
400
if (!
NgramHashingEstimator
.IsColumnTypeValid(columnType))
401
throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", srcName,
NgramHashingEstimator
.ExpectedColumnType, columnType.ToString());
943
int ngramLength =
NgramHashingEstimator
.Defaults.NgramLength,
944
int skipLength =
NgramHashingEstimator
.Defaults.SkipLength,
945
bool useAllLengths =
NgramHashingEstimator
.Defaults.UseAllLengths,
946
int numberOfBits =
NgramHashingEstimator
.Defaults.NumberOfBits,
947
uint seed =
NgramHashingEstimator
.Defaults.Seed,
948
bool useOrderedHashing =
NgramHashingEstimator
.Defaults.UseOrderedHashing,
949
int maximumNumberOfInverts =
NgramHashingEstimator
.Defaults.MaximumNumberOfInverts,
950
bool rehashUnigrams =
NgramHashingEstimator
.Defaults.RehashUnigrams)
1102
/// <see cref="
NgramHashingEstimator
"/> is different from <see cref="WordHashBagEstimator"/> in a way that <see cref="
NgramHashingEstimator
"/>
1136
/// <see cref="
NgramHashingEstimator
"/> is different from <see cref="WordHashBagEstimator"/> in a way that <see cref="
NgramHashingEstimator
"/>
1170
/// <see cref="
NgramHashingEstimator
"/> is different from <see cref="WordHashBagEstimator"/> in a way that <see cref="
NgramHashingEstimator
"/>
1178
_host = env.Register(nameof(
NgramHashingEstimator
));
Text\TextCatalog.cs (34)
424
/// <see cref="WordHashBagEstimator"/> is different from <see cref="
NgramHashingEstimator
"/> in that the former
462
/// <see cref="WordHashBagEstimator"/> is different from <see cref="
NgramHashingEstimator
"/> in that the former
496
/// Create a <see cref="
NgramHashingEstimator
"/>, which copies the data from the column specified in <paramref name="inputColumnName"/>
500
/// <see cref="
NgramHashingEstimator
"/> is different from <see cref="WordHashBagEstimator"/> in a way that <see cref="
NgramHashingEstimator
"/>
519
public static
NgramHashingEstimator
ProduceHashedNgrams(this TransformsCatalog.TextTransforms catalog,
522
int numberOfBits =
NgramHashingEstimator
.Defaults.NumberOfBits,
523
int ngramLength =
NgramHashingEstimator
.Defaults.NgramLength,
524
int skipLength =
NgramHashingEstimator
.Defaults.SkipLength,
525
bool useAllLengths =
NgramHashingEstimator
.Defaults.UseAllLengths,
526
uint seed =
NgramHashingEstimator
.Defaults.Seed,
527
bool useOrderedHashing =
NgramHashingEstimator
.Defaults.UseOrderedHashing,
528
int maximumNumberOfInverts =
NgramHashingEstimator
.Defaults.MaximumNumberOfInverts,
529
bool rehashUnigrams =
NgramHashingEstimator
.Defaults.RehashUnigrams)
531
new[] {new
NgramHashingEstimator
.ColumnOptions(outputColumnName, new[] { inputColumnName }, ngramLength: ngramLength, skipLength: skipLength,
535
/// Create a <see cref="
NgramHashingEstimator
"/>, which takes the data from the multiple columns specified in <paramref name="inputColumnNames"/>
539
/// <see cref="
NgramHashingEstimator
"/> is different from <see cref="WordHashBagEstimator"/> in a way that <see cref="
NgramHashingEstimator
"/>
565
public static
NgramHashingEstimator
ProduceHashedNgrams(this TransformsCatalog.TextTransforms catalog,
568
int numberOfBits =
NgramHashingEstimator
.Defaults.NumberOfBits,
569
int ngramLength =
NgramHashingEstimator
.Defaults.NgramLength,
570
int skipLength =
NgramHashingEstimator
.Defaults.SkipLength,
571
bool useAllLengths =
NgramHashingEstimator
.Defaults.UseAllLengths,
572
uint seed =
NgramHashingEstimator
.Defaults.Seed,
573
bool useOrderedHashing =
NgramHashingEstimator
.Defaults.UseOrderedHashing,
574
int maximumNumberOfInverts =
NgramHashingEstimator
.Defaults.MaximumNumberOfInverts,
575
bool rehashUnigrams =
NgramHashingEstimator
.Defaults.RehashUnigrams)
577
new[] {new
NgramHashingEstimator
.ColumnOptions(outputColumnName, inputColumnNames, ngramLength: ngramLength, skipLength: skipLength,
582
/// <see cref="
NgramHashingEstimator
.ColumnOptions.InputColumnNames"/> are the input columns of the output column named as <see cref="
NgramHashingEstimator
.ColumnOptions.Name"/>.
584
/// <see cref="
NgramHashingEstimator
"/> is different from <see cref="WordHashBagEstimator"/> in a way that <see cref="
NgramHashingEstimator
"/>
590
internal static
NgramHashingEstimator
ProduceHashedNgrams(this TransformsCatalog.TextTransforms catalog,
591
NgramHashingEstimator
.ColumnOptions[] columns)
Text\WordHashBagProducingTransform.cs (2)
336
var ngramHashColumns = new
NgramHashingEstimator
.ColumnOptions[options.Columns.Length];
361
new
NgramHashingEstimator
.ColumnOptions(column.Name, tmpColNames[iinfo],