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"/>. 118public int NgramLength = NgramHashingEstimator.Defaults.NgramLength; 123public bool UseAllLengths = NgramHashingEstimator.Defaults.UseAllLengths; 128public int SkipLength = NgramHashingEstimator.Defaults.SkipLength; 133public int NumberOfBits = NgramHashingEstimator.Defaults.NumberOfBits; 136public uint Seed = NgramHashingEstimator.Defaults.Seed; 139public bool RehashUnigrams = NgramHashingEstimator.Defaults.RehashUnigrams; 144public bool Ordered = NgramHashingEstimator.Defaults.UseOrderedHashing; 148public int MaximumNumberOfInverts = NgramHashingEstimator.Defaults.MaximumNumberOfInverts; 171private readonly ImmutableArray<NgramHashingEstimator.ColumnOptions> _columns; 180internal NgramHashingTransformer(IHostEnvironment env, params NgramHashingEstimator.ColumnOptions[] columns) : 187throw Host.ExceptParam(nameof(columns), $"Found colunm with {nameof(column.MaximumNumberOfInverts)} set to non zero value, please use {nameof(NgramHashingEstimator)} instead"); 191internal NgramHashingTransformer(IHostEnvironment env, IDataView input, params NgramHashingEstimator.ColumnOptions[] columns) : 217if (!NgramHashingEstimator.IsColumnTypeValid(input.Schema[srcCol].Type)) 218throw Host.ExceptSchemaMismatch(nameof(input), "input", _columns[i].InputColumnNamesArray[j], NgramHashingEstimator.ExpectedColumnType, columnType.ToString()); 288var columns = new NgramHashingEstimator.ColumnOptions[columnsLength]; 295columns[i] = new NgramHashingEstimator.ColumnOptions(ctx); 325columns[i] = new NgramHashingEstimator.ColumnOptions(ctx, outputs[i], inputs[i]); 339var cols = new NgramHashingEstimator.ColumnOptions[options.Column.Length]; 346cols[i] = new NgramHashingEstimator.ColumnOptions( 400if (!NgramHashingEstimator.IsColumnTypeValid(columnType)) 401throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", srcName, NgramHashingEstimator.ExpectedColumnType, columnType.ToString()); 943int ngramLength = NgramHashingEstimator.Defaults.NgramLength, 944int skipLength = NgramHashingEstimator.Defaults.SkipLength, 945bool useAllLengths = NgramHashingEstimator.Defaults.UseAllLengths, 946int numberOfBits = NgramHashingEstimator.Defaults.NumberOfBits, 947uint seed = NgramHashingEstimator.Defaults.Seed, 948bool useOrderedHashing = NgramHashingEstimator.Defaults.UseOrderedHashing, 949int maximumNumberOfInverts = NgramHashingEstimator.Defaults.MaximumNumberOfInverts, 950bool 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"/> 519public static NgramHashingEstimator ProduceHashedNgrams(this TransformsCatalog.TextTransforms catalog, 522int numberOfBits = NgramHashingEstimator.Defaults.NumberOfBits, 523int ngramLength = NgramHashingEstimator.Defaults.NgramLength, 524int skipLength = NgramHashingEstimator.Defaults.SkipLength, 525bool useAllLengths = NgramHashingEstimator.Defaults.UseAllLengths, 526uint seed = NgramHashingEstimator.Defaults.Seed, 527bool useOrderedHashing = NgramHashingEstimator.Defaults.UseOrderedHashing, 528int maximumNumberOfInverts = NgramHashingEstimator.Defaults.MaximumNumberOfInverts, 529bool rehashUnigrams = NgramHashingEstimator.Defaults.RehashUnigrams) 531new[] {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"/> 565public static NgramHashingEstimator ProduceHashedNgrams(this TransformsCatalog.TextTransforms catalog, 568int numberOfBits = NgramHashingEstimator.Defaults.NumberOfBits, 569int ngramLength = NgramHashingEstimator.Defaults.NgramLength, 570int skipLength = NgramHashingEstimator.Defaults.SkipLength, 571bool useAllLengths = NgramHashingEstimator.Defaults.UseAllLengths, 572uint seed = NgramHashingEstimator.Defaults.Seed, 573bool useOrderedHashing = NgramHashingEstimator.Defaults.UseOrderedHashing, 574int maximumNumberOfInverts = NgramHashingEstimator.Defaults.MaximumNumberOfInverts, 575bool rehashUnigrams = NgramHashingEstimator.Defaults.RehashUnigrams) 577new[] {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"/> 590internal static NgramHashingEstimator ProduceHashedNgrams(this TransformsCatalog.TextTransforms catalog, 591NgramHashingEstimator.ColumnOptions[] columns)
Text\WordHashBagProducingTransform.cs (2)
336var ngramHashColumns = new NgramHashingEstimator.ColumnOptions[options.Columns.Length]; 361new NgramHashingEstimator.ColumnOptions(column.Name, tmpColNames[iinfo],