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