3 writes to _columns
Microsoft.ML.Transforms (3)
Text\NgramHashingTransformer.cs (3)
183_columns = columns.ToImmutableArray(); 195_columns = columns.ToImmutableArray(); 327_columns = columns.ToImmutableArray();
45 references to _columns
Microsoft.ML.Transforms (45)
Text\NgramHashingTransformer.cs (45)
184foreach (var column in _columns) 198int[] invertHashMaxCounts = new int[_columns.Length]; 201for (int i = 0; i < _columns.Length; i++) 204if (_columns[i].MaximumNumberOfInverts == -1) 207invertHashMaxCount = _columns[i].MaximumNumberOfInverts; 212for (int j = 0; j < _columns[i].InputColumnNamesArray.Length; j++) 214if (!input.Schema.TryGetColumnIndex(_columns[i].InputColumnNamesArray[j], out int srcCol)) 215throw Host.ExceptSchemaMismatch(nameof(input), "input", _columns[i].InputColumnNamesArray[j]); 218throw Host.ExceptSchemaMismatch(nameof(input), "input", _columns[i].InputColumnNamesArray[j], NgramHashingEstimator.ExpectedColumnType, columnType.ToString()); 227string[][] friendlyNames = _columns.Select(c => c.FriendlyNames).ToArray(); 263ctx.Writer.Write(_columns.Length); 264foreach (var column in _columns) 266TextModelHelper.SaveAll(Host, ctx, _columns.Length, _slotNames); 387_types = new VectorDataViewType[_parent._columns.Length]; 388_srcIndices = new int[_parent._columns.Length][]; 389_srcTypes = new DataViewType[_parent._columns.Length][]; 390for (int i = 0; i < _parent._columns.Length; i++) 392_srcIndices[i] = new int[_parent._columns[i].InputColumnNamesArray.Length]; 393_srcTypes[i] = new DataViewType[_parent._columns[i].InputColumnNamesArray.Length]; 394for (int j = 0; j < _parent._columns[i].InputColumnNamesArray.Length; j++) 396var srcName = _parent._columns[i].InputColumnNamesArray[j]; 407_types[i] = new VectorDataViewType(NumberDataViewType.Single, 1 << _parent._columns[i].NumberOfBits); 413uint mask = (1U << _parent._columns[iinfo].NumberOfBits) - 1; 414int ngramLength = _parent._columns[iinfo].NgramLength; 415bool rehash = _parent._columns[iinfo].RehashUnigrams; 416bool ordered = _parent._columns[iinfo].UseOrderedHashing; 417bool all = _parent._columns[iinfo].UseAllLengths; 418uint seed = _parent._columns[iinfo].Seed; 569var bldr = new NgramBufferBuilder(_parent._columns[iinfo].NgramLength, _parent._columns[iinfo].SkipLength, 607var result = new DataViewSchema.DetachedColumn[_parent._columns.Length]; 608for (int i = 0; i < _parent._columns.Length; i++) 612result[i] = new DataViewSchema.DetachedColumn(_parent._columns[i].Name, _types[i], builder.ToAnnotations()); 650Contracts.Assert(friendlyNames.Length == parent._columns.Length); 653Contracts.Assert(invertHashMaxCounts.Length == parent._columns.Length); 656_iinfoToCollector = new InvertHashCollector<NGram>[_parent._columns.Length]; 667_srcIndices = new int[_parent._columns.Length][]; 668for (int i = 0; i < _parent._columns.Length; i++) 670_srcIndices[i] = new int[_parent._columns[i].InputColumnNamesArray.Length]; 671for (int j = 0; j < _parent._columns[i].InputColumnNamesArray.Length; j++) 673var srcName = _parent._columns[i].InputColumnNamesArray[j]; 748Contracts.Assert(0 <= iinfo && iinfo < _parent._columns.Length); 793srcNames[i] = _parent._columns[iinfo].InputColumnNamesArray[i]; 8181 << _parent._columns[iinfo].NumberOfBits, _invertHashMaxCounts[iinfo], 851Contracts.Assert(vec.Length == 1 << _parent._columns[iinfo].NumberOfBits);