1 write to _host
Microsoft.ML.Transforms (1)
Dracula\CountTableTransformer.cs (1)
121_host = env.Register(nameof(CountTableEstimator));
22 references to _host
Microsoft.ML.Transforms (22)
Dracula\CountTableTransformer.cs (22)
122_host.CheckParam(columns.All(col => col.PriorCoefficient > 0), nameof(ColumnOptionsBase.PriorCoefficient), "Must be greater than zero"); 123_host.CheckParam(columns.All(col => col.LaplaceScale >= 0), nameof(ColumnOptionsBase.LaplaceScale), "Must be greater than or equal to zero."); 133throw _host.ExceptUserArg(nameof(_labelColumnName), "Label column '{0}' not found", _labelColumnName); 138var labelClassNames = InitLabelClassNames(_host, labelCol.GetValueOrDefault(), labelCardinality); 147throw _host.Except($"Could not find column {_columns[i].InputColumnName} in input schema"); 151_host.Assert(_initialCounts != null || _sharedBuilder != null || _builders != null); 154multiBuilder = _initialCounts.Featurizer.MultiCountTable.ToBuilder(_host, inputColumns, labelCardinality); 156multiBuilder = new ParallelMultiCountTableBuilder(_host, inputColumns, _builders, labelCardinality); 158multiBuilder = new BagMultiCountTableBuilder(_host, inputColumns, _sharedBuilder, labelCardinality); 164_host.Assert(col.HasValue); 172var featurizer = new CountTargetEncodingFeaturizer(_host, _columns.Select(col => col.PriorCoefficient).ToArray(), _columns.Select(col => col.LaplaceScale).ToArray(), labelCardinality, multiCountTable); 174return new CountTableTransformer(_host, featurizer, labelClassNames, 209_host.Check(srcBuffer.Length == cols[i].Type.GetVectorSize(), "value count mismatch"); 226_host.Assert(type is KeyDataViewType || type is NumberDataViewType || type is BooleanDataViewType); 244_host.Assert(type.GetKeyCount() > 0); 298_host.Assert(data.Schema.Label.HasValue); 305_host.CheckUserArg(labelCardinality > 1, nameof(_labelColumnName), "Label column type must have known cardinality more than 1"); 322_host.CheckValue(inputSchema, nameof(inputSchema)); 326throw _host.ExceptSchemaMismatch(nameof(inputSchema), "label", _labelColumnName); 331throw _host.ExceptSchemaMismatch(nameof(inputSchema), "input", colInfo.InputColumnName); 333throw _host.ExceptSchemaMismatch(nameof(inputSchema), "input", colInfo.InputColumnName, "known-size vector or scalar", col.GetTypeString()); 336throw _host.ExceptSchemaMismatch(nameof(inputSchema), "input", colInfo.InputColumnName, "vector or scalar of U4 key type", col.GetTypeString());