1 write to _parent
Microsoft.ML.Transforms (1)
Text\NgramTransform.cs (1)
485
_parent
= parent;
35 references to _parent
Microsoft.ML.Transforms (35)
Text\NgramTransform.cs (35)
486
_types = new DataViewType[
_parent
.ColumnPairs.Length];
487
_srcTypes = new DataViewType[
_parent
.ColumnPairs.Length];
488
_srcCols = new int[
_parent
.ColumnPairs.Length];
489
for (int i = 0; i <
_parent
.ColumnPairs.Length; i++)
491
_types[i] = new VectorDataViewType(NumberDataViewType.Single,
_parent
._ngramMaps[i].Count);
492
inputSchema.TryGetColumnIndex(
_parent
.ColumnPairs[i].inputColumnName, out _srcCols[i]);
499
var result = new DataViewSchema.DetachedColumn[
_parent
.ColumnPairs.Length];
500
for (int i = 0; i <
_parent
.ColumnPairs.Length; i++)
505
result[i] = new DataViewSchema.DetachedColumn(
_parent
.ColumnPairs[i].outputColumnName, _types[i], builder.ToAnnotations());
516
GetSlotNames(iinfo,
_parent
._ngramMaps[iinfo].Count, ref dst);
519
var slotNamesType = new VectorDataViewType(TextDataViewType.Instance,
_parent
._ngramMaps[iinfo].Count);
520
builder.AddSlotNames(
_parent
._ngramMaps[iinfo].Count, getter);
527
Host.Assert(0 <= iinfo && iinfo <
_parent
.ColumnPairs.Length);
537
var pool =
_parent
._ngramMaps[iinfo];
543
uint[] ngram = new uint[
_parent
._transformInfos[iinfo].NgramLength];
559
var transformInfo =
_parent
._transformInfos[iinfo];
562
Host.Assert(0 <= iinfo && iinfo <
_parent
.ColumnPairs.Length);
570
var pool =
_parent
._ngramMaps[iinfo];
606
weights[i] =
_parent
._invDocFreqs[iinfo][i];
662
Host.Assert(lim <= Utils.Size(
_parent
._transformInfos[iinfo].NonEmptyLevels));
664
if (!
_parent
._transformInfos[iinfo].NonEmptyLevels[lim - 1])
666
return
_parent
._ngramMaps[iinfo].Get(ngram, 0, lim);
673
Contracts.Assert(0 <= iinfo && iinfo <
_parent
.ColumnPairs.Length);
678
var bldr = new NgramBufferBuilder(
_parent
._transformInfos[iinfo].NgramLength,
_parent
._transformInfos[iinfo].SkipLength,
679
_parent
._ngramMaps[iinfo].Count, GetNgramIdFinder(iinfo));
685
switch (
_parent
._transformInfos[iinfo].Weighting)
688
Host.AssertValue(
_parent
._invDocFreqs[iinfo]);
698
VBufferUtils.Apply(ref dst, (int i, ref float v) => v = (float)(v *
_parent
._invDocFreqs[iinfo][i]));
705
Host.AssertValue(
_parent
._invDocFreqs[iinfo]);
715
VBufferUtils.Apply(ref dst, (int i, ref float v) => v = v >= 1 ? (float)
_parent
._invDocFreqs[iinfo][i] : 0);
748
int numColumns =
_parent
.ColumnPairs.Length;
751
string inputColumnName =
_parent
.ColumnPairs[iinfo].inputColumnName;
755
string outputColumnName =
_parent
.ColumnPairs[iinfo].outputColumnName;
776
var transformInfo =
_parent
._transformInfos[iinfo];