1 write to Host
Microsoft.ML.Data (1)
Transforms\RowToRowTransformerBase.cs (1)
22
Host
= host;
105 references to Host
Microsoft.ML.Data (105)
Prediction\CalibratorCatalog.cs (2)
250
base(parent.
Host
, inputSchema, parent)
258
parent.
Host
.Check(_scoreColIndex >= 0, "The data to calibrate contains no \'" + scoreColumnName + "\' column.");
Transforms\ColumnConcatenatingTransformer.cs (2)
265
Host
.CheckValue(ctx, nameof(ctx));
286
Host
.CheckValue(ctx, nameof(ctx));
Transforms\ColumnCopying.cs (1)
207
: base(parent.
Host
.Register(nameof(Mapper)), parent, inputSchema)
Transforms\FeatureContributionCalculationTransformer.cs (8)
92
Host
.CheckValue(modelParameters, nameof(modelParameters));
93
Host
.CheckNonEmpty(featureColumnName, nameof(featureColumnName));
95
throw
Host
.Except($"Number of top contribution must be non negative");
97
throw
Host
.Except($"Number of bottom contribution must be non negative");
102
Host
.AssertValue(_predictor);
112
Host
.AssertValue(ctx);
131
Host
.CheckValue(ctx, nameof(ctx));
176
: base(parent.
Host
, parent, schema)
Transforms\Hashing.cs (26)
152
throw
Host
.ExceptParam(nameof(inputSchema), HashingEstimator.ExpectedColumnType);
185
throw
Host
.ExceptParam(nameof(columns), $"Found column with {nameof(column.MaximumNumberOfInverts)} set to non zero value, please use {nameof(HashingEstimator)} instead");
188
throw
Host
.ExceptParam(nameof(HashingEstimator.ColumnOptions.Combine), "When the 'Combine' option is specified, ordered hashing is not supported.");
204
throw
Host
.ExceptSchemaMismatch(nameof(input), "input", ColumnPairs[i].inputColumnName);
229
using (var ch =
Host
.Start("Invert hash building"))
236
Host
.Assert(types[iinfo].GetItemType().GetKeyCount() > 0);
238
Host
.Assert(disposer == null);
253
Host
.Assert(_keyValues[invertIinfos[i]].Length == types[invertIinfos[i]].GetItemType().GetKeyCountAsInt32(
Host
));
263
Host
.AssertValue(input);
264
Host
.Assert(0 <= iinfo && iinfo < _columns.Length);
296
TextModelHelper.LoadAll(
Host
, ctx, columnsLength, out _keyValues, out _kvTypes);
301
Host
.CheckValue(ctx, nameof(ctx));
311
Host
.Assert(_columns.Length == ColumnPairs.Length);
315
TextModelHelper.SaveAll(
Host
, ctx, _columns.Length, _keyValues);
352
Host
.Assert(HashingEstimator.IsColumnTypeValid(srcType));
369
Host
.Assert(srcType.RawType == typeof(byte));
398
Host
.Assert(srcType.RawType == typeof(bool));
404
Host
.Assert(HashingEstimator.IsColumnTypeValid(srcType.ItemType));
416
Host
.Assert(rawType == typeof(ulong));
445
Host
.Assert(srcType.ItemType == TextDataViewType.Instance);
452
Host
.Assert(srcType.ItemType.RawType == typeof(T));
466
Host
.Assert(HashingEstimator.IsColumnTypeValid(srcType));
481
Host
.Assert(rawType == typeof(byte));
510
Host
.Assert(rawType == typeof(bool));
1317
: base(parent.
Host
.Register(nameof(Mapper)), parent, inputSchema)
Transforms\KeyToValue.cs (2)
144
Host
.CheckValue(ctx, nameof(ctx));
163
: base(parent.
Host
.Register(nameof(Mapper)), parent, inputSchema)
Transforms\KeyToVector.cs (4)
119
throw
Host
.ExceptSchemaMismatch(nameof(inputSchema), "input", ColumnPairs[col].inputColumnName, reason, type.ToString());
146
Host
.CheckValue(ctx, nameof(ctx));
155
Host
.Assert(_columns.Length == ColumnPairs.Length);
244
: base(parent.
Host
.Register(nameof(Mapper)), parent, inputSchema)
Transforms\Normalizer.cs (8)
627
ctx.LoadModel<IColumnFunction, SignatureLoadColumnFunction>(
Host
, out var function, dir,
Host
, typeSrc);
648
ctx.LoadModel<IColumnFunction, SignatureLoadColumnFunction>(
Host
, out var function, dir,
Host
, typeSrc);
681
Host
.CheckValue(ctx, nameof(ctx));
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());
728
: base(parent.
Host
.Register(nameof(Mapper)), parent, schema)
Transforms\OneToOneTransformerBase.cs (2)
58
Host
.CheckValue(ctx, nameof(ctx));
80
throw
Host
.ExceptSchemaMismatch(nameof(inputSchema), "input", ColumnPairs[col].inputColumnName);
Transforms\RowToRowTransformerBase.cs (6)
33
Host
.CheckValue(inputSchema, nameof(inputSchema));
34
return new RowToRowMapperTransform(
Host
, new EmptyDataView(
Host
, inputSchema), MakeRowMapper(inputSchema), MakeRowMapper);
42
Host
.CheckValue(inputSchema, nameof(inputSchema));
52
Host
.CheckValue(input, nameof(input));
53
return new RowToRowMapperTransform(
Host
, input, MakeRowMapper(input.Schema), MakeRowMapper);
Transforms\SlotsDroppingTransformer.cs (11)
277
Host
.AssertNonEmpty(ColumnPairs);
279
Host
.CheckUserArg(AreRangesValid(SlotsMin, SlotsMax), nameof(columns), "The range min and max must be non-negative and min must be less than or equal to max.");
285
Host
.AssertValue(ctx);
292
Host
.AssertNonEmpty(ColumnPairs);
299
Host
.CheckDecode(Utils.Size(SlotsMin[i]) > 0);
302
Host
.Assert(AreRangesValid(SlotsMin, SlotsMax));
330
Host
.CheckValue(ctx, nameof(ctx));
342
Host
.Assert(AreRangesValid(SlotsMin, SlotsMax));
345
Host
.Assert(SlotsMin[i].Length == SlotsMax[i].Length);
358
Host
.CheckUserArg(range.IsValid(), nameof(col.Slots), "The range min and max must be non-negative and min must be less than or equal to max.");
470
: base(parent.
Host
.Register(nameof(Mapper)), parent, inputSchema)
Transforms\TypeConverting.cs (7)
208
Host
.CheckValue(ctx, nameof(ctx));
222
Host
.Assert((InternalDataKind)(byte)_columns[i].OutputKind.ToInternalDataKind() == _columns[i].OutputKind.ToInternalDataKind());
266
Host
.CheckDecode(Enum.IsDefined(typeof(InternalDataKind), kind));
276
Host
.CheckDecode(min == 0);
281
Host
.CheckDecode(contiguous);
286
Host
.CheckDecode(0 < count);
393
: base(parent.
Host
.Register(nameof(Mapper)), parent, inputSchema)
Transforms\ValueMapping.cs (13)
438
_dataView = GetBytesFromDataView(
Host
, lookupMap, lookupKeyColumn.Name, lookupValueColumn.Name);
447
Host
.Check(column.HasValue, "The selected column " + nameof(keyColumn) + " is not included in the targeted IDataView " + nameof(dataView));
449
Host
.Check(retrievedKeyColumn.Index == keyColumn.Index, nameof(keyColumn) + "'s column index doesn't match that of the associated column in " + nameof(dataView));
450
Host
.Check(retrievedKeyColumn.Type == keyColumn.Type, nameof(keyColumn) + "'s column type doesn't match that of the associated column in " + nameof(dataView));
451
Host
.Check(retrievedKeyColumn.Annotations == keyColumn.Annotations, nameof(keyColumn) + "'s column annotations don't match those of the associated column in " + nameof(dataView));
455
Host
.Check(column.HasValue, "The selected column " + nameof(valueColumn) + " is not included in the targeted IDataView " + nameof(dataView));
457
Host
.Check(retrievedValueColumn.Index == valueColumn.Index, nameof(valueColumn) + "'s column index doesn't match that of the associated column in " + nameof(dataView));
458
Host
.Check(retrievedValueColumn.Type == valueColumn.Type, nameof(valueColumn) + "'s column type doesn't match that of the associated column in " + nameof(dataView));
459
Host
.Check(retrievedValueColumn.Annotations == valueColumn.Annotations, nameof(valueColumn) + "'s column annotations don't match those of the associated column in " + nameof(dataView));
464
valueMap.Train(
Host
, cursor);
785
Host
.CheckValue(ctx, nameof(ctx));
1040
: base(transform.
Host
.Register(nameof(Mapper)), transform, inputSchema)
1284
throw _parent.
Host
.ExceptNotSupp("Column '{0}' cannot be mapped to values when the column and the map values are both vector type.", _columns[i].inputColumnName);
Transforms\ValueToKeyMappingTransformer.cs (13)
190
Interlocked.CompareExchange(ref _codecFactory, new CodecFactory(
Host
, _codecFactoryPool), null);
192
Host
.Assert(_codecFactory != null);
230
Host
.AssertValue(inputSchema);
235
throw
Host
.ExceptSchemaMismatch(nameof(inputSchema), "input", ColumnPairs[i].inputColumnName);
239
throw
Host
.ExceptSchemaMismatch(nameof(inputSchema), "input", ColumnPairs[i].inputColumnName, reason, type.ToString());
254
using (var ch =
Host
.Start("Training"))
257
_unboundMaps = Train(
Host
, ch, infos, keyData, columns, input, autoConvert);
654
Host
.CheckValue(ctx, nameof(ctx));
661
Host
.Assert(_unboundMaps.Length == _textMetadata.Length);
662
Host
.Assert(_textMetadata.Length == ColumnPairs.Length);
676
Host
.CheckValue(c, nameof(ctx));
681
term.Save(c,
Host
, CodecFactory);
717
: base(parent.
Host
.Register(nameof(Mapper)), parent, inputSchema)