3 writes to Bindings
Microsoft.ML.Data (3)
Scorers\PredictedLabelScorerBase.cs (3)
298
Bindings
= BindingsImpl.Create(data.Schema, rowMapper, args.Suffix, scoreColKind, scoreColIndex, predColType, predictedLabelColumnName);
306
Bindings
= transform.Bindings.ApplyToSchema(newSource.Schema, Bindable, env);
320
Bindings
= BindingsImpl.Create(ctx, input.Schema, host, Bindable, outputTypeMatches, getPredColType);
53 references to Bindings
Microsoft.ML.Data (53)
Scorers\BinaryClassifierScorer.cs (14)
188
Host.Assert(
Bindings
.InfoCount >= 2);
191
int delta =
Bindings
.DerivedColumnCount;
195
string[] outColumnNames = new string[
Bindings
.InfoCount]; //PredictedLabel, Score, Probability.
196
for (int iinfo = 0; iinfo <
Bindings
.InfoCount; ++iinfo)
197
outColumnNames[iinfo] =
Bindings
.GetColumnName(
Bindings
.MapIinfoToCol(iinfo));
199
string scoreColumn =
Bindings
.RowMapper.OutputSchema[
Bindings
.ScoreColumnIndex].Name;
208
if (
Bindings
.PredColType is KeyDataViewType)
235
Host.Assert(output.Schema ==
Bindings
.RowMapper.OutputSchema);
236
Host.Assert(output.IsColumnActive(output.Schema[
Bindings
.ScoreColumnIndex]));
238
var scoreColumn = output.Schema[
Bindings
.ScoreColumnIndex];
252
if (
Bindings
.PredColType is KeyDataViewType)
292
if (!(
Bindings
.PredColType is KeyDataViewType))
Scorers\ClusteringScorer.cs (4)
96
Contracts.Assert(output.Schema ==
Bindings
.RowMapper.OutputSchema);
97
Contracts.Assert(output.IsColumnActive(output.Schema[
Bindings
.ScoreColumnIndex]));
99
ValueGetter<VBuffer<float>> mapperScoreGetter = output.GetGetter<VBuffer<float>>(output.Schema[
Bindings
.ScoreColumnIndex]);
103
int keyCount =
Bindings
.PredColType is KeyDataViewType key ? key.GetCountAsInt32(Host) : 0;
Scorers\MulticlassClassificationScorer.cs (5)
565
Host.Assert(output.Schema ==
Bindings
.RowMapper.OutputSchema);
566
Host.Assert(output.IsColumnActive(output.Schema[
Bindings
.ScoreColumnIndex]));
568
ValueGetter<VBuffer<float>> mapperScoreGetter = output.GetGetter<VBuffer<float>>(
Bindings
.RowMapper.OutputSchema[
Bindings
.ScoreColumnIndex]);
572
int scoreLength =
Bindings
.PredColType.GetKeyCountAsInt32(Host);
Scorers\PredictedLabelScorerBase.cs (30)
268
private protected sealed override BindingsBase GetBindings() =>
Bindings
;
299
OutputSchema =
Bindings
.AsSchema;
306
Bindings = transform.
Bindings
.ApplyToSchema(newSource.Schema, Bindable, env);
307
OutputSchema =
Bindings
.AsSchema;
321
OutputSchema =
Bindings
.AsSchema;
327
Bindings
.SaveModel(ctx);
336
var schema =
Bindings
.RowMapper.InputRoleMappedSchema;
337
int delta =
Bindings
.DerivedColumnCount;
339
string[] outColNames = new string[
Bindings
.InfoCount - delta];
340
for (int iinfo = delta; iinfo <
Bindings
.InfoCount; ++iinfo)
341
outColNames[iinfo - delta] =
Bindings
.GetColumnName(
Bindings
.MapIinfoToCol(iinfo));
348
string derivedName =
Bindings
.GetColumnName(
Bindings
.MapIinfoToCol(0));
369
var schema =
Bindings
.RowMapper.InputRoleMappedSchema;
370
int delta =
Bindings
.DerivedColumnCount;
374
string[] outVariableNames = new string[
Bindings
.InfoCount];
375
for (int iinfo = 0; iinfo <
Bindings
.InfoCount; ++iinfo)
377
int colIndex =
Bindings
.MapIinfoToCol(iinfo);
378
string colName =
Bindings
.GetColumnName(colIndex);
379
colName = ctx.AddIntermediateVariable(
Bindings
.GetColumnType(colIndex), colName, false);
395
return
Bindings
.AnyNewColumnsActive(predicate);
400
Host.Assert(
Bindings
.DerivedColumnCount == 1);
403
Host.Assert(output.Schema ==
Bindings
.RowMapper.OutputSchema);
404
Host.Assert(
Bindings
.InfoCount == output.Schema.Count + 1);
406
var getters = new Delegate[
Bindings
.InfoCount];
409
int delta =
Bindings
.DerivedColumnCount;
413
Host.Assert(output.IsColumnActive(output.Schema[
Bindings
.ScoreColumnIndex]));
421
if (iinfo == delta +
Bindings
.ScoreColumnIndex && delScore != null)
450
(
Bindings
.RowMapper as IDisposable)?.Dispose();