2 writes to ColumnPairs
Microsoft.ML.Data (2)
Transforms\OneToOneTransformerBase.cs (2)
33
ColumnPairs
= columns;
46
ColumnPairs
= new (string outputColumnName, string inputColumnName)[n];
120 references to ColumnPairs
Microsoft.ML.Data (120)
Transforms\ColumnCopying.cs (2)
102
internal IReadOnlyCollection<(string outputColumnName, string inputColumnName)> Columns =>
ColumnPairs
.AsReadOnly();
194
=> new Mapper(this, inputSchema,
ColumnPairs
);
Transforms\FeatureContributionCalculationTransformer.cs (3)
181
if (!schema.TryGetColumnIndex(_parent.
ColumnPairs
[0].inputColumnName, out _featureColumnIndex))
182
throw Host.ExceptSchemaMismatch(nameof(schema), "input", _parent.
ColumnPairs
[0].inputColumnName);
185
throw Host.ExceptSchemaMismatch(nameof(schema), "feature", _parent.
ColumnPairs
[0].inputColumnName, "vector of Single", schema[_featureColumnIndex].Type.ToString());
Transforms\Hashing.cs (12)
202
DataViewSchema.Column? srcCol = input.Schema.GetColumnOrNull(
ColumnPairs
[i].inputColumnName);
204
throw Host.ExceptSchemaMismatch(nameof(input), "input",
ColumnPairs
[i].inputColumnName);
291
var columnsLength =
ColumnPairs
.Length;
295
_columns[i] = new HashingEstimator.ColumnOptions(
ColumnPairs
[i].outputColumnName,
ColumnPairs
[i].inputColumnName, ctx);
311
Host.Assert(_columns.Length ==
ColumnPairs
.Length);
1325
_srcTypes[i] = inputSchema[_parent.
ColumnPairs
[i].inputColumnName].Type;
1331
var result = new DataViewSchema.DetachedColumn[_parent.
ColumnPairs
.Length];
1332
for (int i = 0; i < _parent.
ColumnPairs
.Length; i++)
1334
InputSchema.TryGetColumnIndex(_parent.
ColumnPairs
[i].inputColumnName, out int colIndex);
1341
result[i] = new DataViewSchema.DetachedColumn(_parent.
ColumnPairs
[i].outputColumnName, _dstTypes[i], meta.ToAnnotations());
1461
var info = _parent.
ColumnPairs
[iinfo];
Transforms\KeyToValue.cs (11)
69
internal IReadOnlyCollection<(string outputColumnName, string inputColumnName)> Columns =>
ColumnPairs
.AsReadOnly();
173
var result = new DataViewSchema.DetachedColumn[_parent.
ColumnPairs
.Length];
174
for (int i = 0; i < _parent.
ColumnPairs
.Length; i++)
178
result[i] = new DataViewSchema.DetachedColumn(_parent.
ColumnPairs
[i].outputColumnName, _types[i], meta.ToAnnotations());
190
for (int iinfo = 0; iinfo < _parent.
ColumnPairs
.Length; ++iinfo)
192
var info = _parent.
ColumnPairs
[iinfo];
223
types = new DataViewType[_parent.
ColumnPairs
.Length];
224
kvMaps = new KeyToValueMap[_parent.
ColumnPairs
.Length];
250
Host.Assert(0 <= iinfo && iinfo < _parent.
ColumnPairs
.Length);
582
for (int iinfo = 0; iinfo < _parent.
ColumnPairs
.Length; ++iinfo)
584
var info = _parent.
ColumnPairs
[iinfo];
Transforms\KeyToVector.cs (17)
119
throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input",
ColumnPairs
[col].inputColumnName, reason, type.ToString());
155
Host.Assert(_columns.Length ==
ColumnPairs
.Length);
179
var columnsLength =
ColumnPairs
.Length;
189
_columns[i] = new KeyToVectorMappingEstimator.ColumnOptions(
ColumnPairs
[i].outputColumnName,
ColumnPairs
[i].inputColumnName, bags[i]);
248
_types = new VectorDataViewType[_parent.
ColumnPairs
.Length];
255
for (int i = 0; i < _parent.
ColumnPairs
.Length; i++)
277
var infos = new ColInfo[_parent.
ColumnPairs
.Length];
278
for (int i = 0; i < _parent.
ColumnPairs
.Length; i++)
280
if (!inputSchema.TryGetColumnIndex(_parent.
ColumnPairs
[i].inputColumnName, out int colSrc))
281
throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", _parent.
ColumnPairs
[i].inputColumnName);
284
infos[i] = new ColInfo(_parent.
ColumnPairs
[i].outputColumnName, _parent.
ColumnPairs
[i].inputColumnName, type);
291
var result = new DataViewSchema.DetachedColumn[_parent.
ColumnPairs
.Length];
292
for (int i = 0; i < _parent.
ColumnPairs
.Length; i++)
294
InputSchema.TryGetColumnIndex(_parent.
ColumnPairs
[i].inputColumnName, out int colIndex);
298
result[i] = new DataViewSchema.DetachedColumn(_parent.
ColumnPairs
[i].outputColumnName, _types[i], builder.ToAnnotations());
Transforms\Normalizer.cs (11)
621
var cols = new ColumnOptions[
ColumnPairs
.Length];
623
for (int iinfo = 0; iinfo <
ColumnPairs
.Length; iinfo++)
628
cols[iinfo] = new ColumnOptions(
ColumnPairs
[iinfo].outputColumnName,
ColumnPairs
[iinfo].inputColumnName, typeSrc, function);
642
var cols = new ColumnOptions[
ColumnPairs
.Length];
644
for (int iinfo = 0; iinfo <
ColumnPairs
.Length; iinfo++)
647
var typeSrc = input.Schema[
ColumnPairs
[iinfo].inputColumnName].Type;
649
cols[iinfo] = new ColumnOptions(
ColumnPairs
[iinfo].outputColumnName,
ColumnPairs
[iinfo].inputColumnName, typeSrc, function);
708
throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input",
ColumnPairs
[col].inputColumnName, expectedType, "variable-size vector");
711
throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input",
ColumnPairs
[col].inputColumnName, expectedType, colType.ToString());
Transforms\OneToOneTransformerBase.cs (9)
51
ColumnPairs
[i] = (outputColumnName, inputColumnName);
66
ctx.Writer.Write(
ColumnPairs
.Length);
67
for (int i = 0; i <
ColumnPairs
.Length; i++)
69
ctx.SaveNonEmptyString(
ColumnPairs
[i].outputColumnName);
70
ctx.SaveNonEmptyString(
ColumnPairs
[i].inputColumnName);
77
Contracts.Assert(0 <= col && col <
ColumnPairs
.Length);
79
if (!inputSchema.TryGetColumnIndex(
ColumnPairs
[col].inputColumnName, out srcCol))
80
throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input",
ColumnPairs
[col].inputColumnName);
102
for (int i = 0; i < _parent.
ColumnPairs
.Length; i++)
Transforms\SlotsDroppingTransformer.cs (28)
277
Host.AssertNonEmpty(
ColumnPairs
);
292
Host.AssertNonEmpty(
ColumnPairs
);
293
var size =
ColumnPairs
.Length;
343
for (int i = 0; i <
ColumnPairs
.Length; i++)
473
_cols = new int[_parent.
ColumnPairs
.Length];
474
_srcTypes = new DataViewType[_parent.
ColumnPairs
.Length];
475
_dstTypes = new DataViewType[_parent.
ColumnPairs
.Length];
476
_slotDropper = new SlotDropper[_parent.
ColumnPairs
.Length];
477
_suppressed = new bool[_parent.
ColumnPairs
.Length];
478
_categoricalRanges = new int[_parent.
ColumnPairs
.Length][];
480
for (int i = 0; i < _parent.
ColumnPairs
.Length; i++)
482
if (!InputSchema.TryGetColumnIndex(_parent.
ColumnPairs
[i].inputColumnName, out _cols[i]))
483
throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", _parent.
ColumnPairs
[i].inputColumnName);
489
throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", _parent.
ColumnPairs
[i].inputColumnName);
526
Host.Assert(0 <= iinfo && iinfo < _parent.
ColumnPairs
.Length);
552
Host.Assert(0 <= iinfo && iinfo < _parent.
ColumnPairs
.Length);
570
Host.Assert(0 <= iinfo && iinfo < _parent.
ColumnPairs
.Length);
722
Host.Assert(0 <= iinfo && iinfo < _parent.
ColumnPairs
.Length);
741
Host.Assert(0 <= iinfo && iinfo < _parent.
ColumnPairs
.Length);
762
Host.Assert(0 <= iinfo && iinfo < _parent.
ColumnPairs
.Length);
783
Host.Assert(0 <= iinfo && iinfo < _parent.
ColumnPairs
.Length);
810
Host.Assert(0 <= iinfo && iinfo < _parent.
ColumnPairs
.Length);
826
var result = new DataViewSchema.DetachedColumn[_parent.
ColumnPairs
.Length];
827
for (int i = 0; i < _parent.
ColumnPairs
.Length; i++)
832
InputSchema.TryGetColumnIndex(_parent.
ColumnPairs
[iinfo].inputColumnName, out int colIndex);
872
result[iinfo] = new DataViewSchema.DetachedColumn(_parent.
ColumnPairs
[iinfo].outputColumnName, _dstTypes[iinfo], builder.ToAnnotations());
885
string inputColumnName = _parent.
ColumnPairs
[iinfo].inputColumnName;
890
string dstVariableName = ctx.AddIntermediateVariable(_dstTypes[iinfo], _parent.
ColumnPairs
[iinfo].outputColumnName);
Transforms\TypeConverting.cs (5)
253
var columnsLength =
ColumnPairs
.Length;
290
_columns[i] = new TypeConvertingEstimator.ColumnOptions(
ColumnPairs
[i].outputColumnName, kind.ToDataKind(),
ColumnPairs
[i].inputColumnName, keyCount);
400
inputSchema.TryGetColumnIndex(_parent.
ColumnPairs
[i].inputColumnName, out _srcCols[i]);
470
Contracts.Assert(0 <= iinfo && iinfo < _parent.
ColumnPairs
.Length);
Transforms\ValueMapping.cs (4)
1025
return new Mapper(this, schema, _valueMap,
ColumnPairs
);
1063
for (int iinfo = 0; iinfo < _parent.
ColumnPairs
.Length; ++iinfo)
1065
string inputColumnName = _parent.
ColumnPairs
[iinfo].inputColumnName;
1066
string outputColumnName = _parent.
ColumnPairs
[iinfo].outputColumnName;
Transforms\ValueToKeyMappingTransformer.cs (18)
231
var infos = new ColInfo[
ColumnPairs
.Length];
232
for (int i = 0; i <
ColumnPairs
.Length; i++)
234
if (!inputSchema.TryGetColumnIndex(
ColumnPairs
[i].inputColumnName, out int colSrc))
235
throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input",
ColumnPairs
[i].inputColumnName);
239
throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input",
ColumnPairs
[i].inputColumnName, reason, type.ToString());
240
infos[i] = new ColInfo(
ColumnPairs
[i].outputColumnName,
ColumnPairs
[i].inputColumnName, type);
322
var columnsLength =
ColumnPairs
.Length;
662
Host.Assert(_textMetadata.Length ==
ColumnPairs
.Length);
721
_types = new DataViewType[_parent.
ColumnPairs
.Length];
722
for (int i = 0; i < _parent.
ColumnPairs
.Length; i++)
733
_termMap = new BoundTermMap[_parent.
ColumnPairs
.Length];
734
for (int iinfo = 0; iinfo < _parent.
ColumnPairs
.Length; ++iinfo)
742
var result = new DataViewSchema.DetachedColumn[_parent.
ColumnPairs
.Length];
743
for (int i = 0; i < _parent.
ColumnPairs
.Length; i++)
745
InputSchema.TryGetColumnIndex(_parent.
ColumnPairs
[i].inputColumnName, out int colIndex);
751
result[i] = new DataViewSchema.DetachedColumn(_parent.
ColumnPairs
[i].outputColumnName, _types[i], builder.ToAnnotations());
759
Contracts.Assert(0 <= iinfo && iinfo < _parent.
ColumnPairs
.Length);