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