1 instantiation of ColumnRole
Microsoft.ML.Core (1)
Data\RoleMappedSchema.cs (1)
108=> new ColumnRole(value);
63 references to ColumnRole
Microsoft.ML.Core (58)
Data\AnnotationUtils.cs (1)
298public static void GetSlotNames(RoleMappedSchema schema, RoleMappedSchema.ColumnRole role, int vectorSize, ref VBuffer<ReadOnlyMemory<char>> slotNames)
Data\ISchemaBindableMapper.cs (1)
55IEnumerable<KeyValuePair<RoleMappedSchema.ColumnRole, string>> GetInputColumnRoles();
Data\RoleMappedSchema.cs (56)
34/// to make use of every defined mapping. Consuming components are also expected to ignore any <see cref="ColumnRole"/> 38/// <seealso cref="ColumnRole"/> 61public static ColumnRole Feature => FeatureString; 66public static ColumnRole Label => LabelString; 72public static ColumnRole Group => GroupString; 78public static ColumnRole Weight => WeightString; 84public static ColumnRole Name => NameString; 90public static ColumnRole FeatureContributions => FeatureContributionsString; 107public static implicit operator ColumnRole(string value) 117public KeyValuePair<ColumnRole, string> Bind(string name) 118=> new KeyValuePair<ColumnRole, string>(this, name); 121public static KeyValuePair<ColumnRole, string> CreatePair(ColumnRole role, string name) 122=> new KeyValuePair<ColumnRole, string>(role, name); 130/// The <see cref="ColumnRole.Feature"/> column, when there is exactly one (null otherwise). 135/// The <see cref="ColumnRole.Label"/> column, when there is exactly one (null otherwise). 140/// The <see cref="ColumnRole.Group"/> column, when there is exactly one (null otherwise). 145/// The <see cref="ColumnRole.Weight"/> column, when there is exactly one (null otherwise). 150/// The <see cref="ColumnRole.Name"/> column, when there is exactly one (null otherwise). 201private static void Add(Dictionary<string, List<DataViewSchema.Column>> map, ColumnRole role, DataViewSchema.Column column) 214private static Dictionary<string, List<DataViewSchema.Column>> MapFromNames(DataViewSchema schema, IEnumerable<KeyValuePair<ColumnRole, string>> roles, bool opt = false) 237public bool Has(ColumnRole role) 243public bool HasUnique(ColumnRole role) 249public bool HasMultiple(ColumnRole role) 256public IReadOnlyList<DataViewSchema.Column> GetColumns(ColumnRole role) 262public IEnumerable<KeyValuePair<ColumnRole, DataViewSchema.Column>> GetColumnRoles() 267yield return new KeyValuePair<ColumnRole, DataViewSchema.Column>(roleAndList.Key, info); 274public IEnumerable<KeyValuePair<ColumnRole, string>> GetColumnRoleNames() 279yield return new KeyValuePair<ColumnRole, string>(roleAndList.Key, info.Name); 287public IEnumerable<KeyValuePair<ColumnRole, string>> GetColumnRoleNames(ColumnRole role) 292yield return new KeyValuePair<ColumnRole, string>(role, info.Name); 303public DataViewSchema.Column GetUniqueColumn(ColumnRole role) 333public RoleMappedSchema(DataViewSchema schema, bool opt = false, params KeyValuePair<ColumnRole, string>[] roles) 348public RoleMappedSchema(DataViewSchema schema, IEnumerable<KeyValuePair<ColumnRole, string>> roles, bool opt = false) 354private static IEnumerable<KeyValuePair<ColumnRole, string>> PredefinedRolesHelper( 356IEnumerable<KeyValuePair<ColumnRole, string>> custom = null) 359yield return ColumnRole.Label.Bind(label); 361yield return ColumnRole.Feature.Bind(feature); 363yield return ColumnRole.Group.Bind(group); 365yield return ColumnRole.Weight.Bind(weight); 367yield return ColumnRole.Name.Bind(name); 380/// <param name="label">The column name that will be mapped to the <see cref="ColumnRole.Label"/> role</param> 381/// <param name="feature">The column name that will be mapped to the <see cref="ColumnRole.Feature"/> role</param> 382/// <param name="group">The column name that will be mapped to the <see cref="ColumnRole.Group"/> role</param> 383/// <param name="weight">The column name that will be mapped to the <see cref="ColumnRole.Weight"/> role</param> 384/// <param name="name">The column name that will be mapped to the <see cref="ColumnRole.Name"/> role</param> 391IEnumerable<KeyValuePair<RoleMappedSchema.ColumnRole, string>> custom = null, bool opt = false) 441public RoleMappedData(IDataView data, bool opt = false, params KeyValuePair<RoleMappedSchema.ColumnRole, string>[] roles) 456public RoleMappedData(IDataView data, IEnumerable<KeyValuePair<RoleMappedSchema.ColumnRole, string>> roles, bool opt = false) 466/// <param name="label">The column name that will be mapped to the <see cref="RoleMappedSchema.ColumnRole.Label"/> role</param> 467/// <param name="feature">The column name that will be mapped to the <see cref="RoleMappedSchema.ColumnRole.Feature"/> role</param> 468/// <param name="group">The column name that will be mapped to the <see cref="RoleMappedSchema.ColumnRole.Group"/> role</param> 469/// <param name="weight">The column name that will be mapped to the <see cref="RoleMappedSchema.ColumnRole.Weight"/> role</param> 470/// <param name="name">The column name that will be mapped to the <see cref="RoleMappedSchema.ColumnRole.Name"/> role</param> 477IEnumerable<KeyValuePair<RoleMappedSchema.ColumnRole, string>> custom = null, bool opt = false)
Microsoft.ML.Data (1)
Commands\TrainCommand.cs (1)
518return Enumerable.Empty<KeyValuePair<ColumnRole, string>>();
Microsoft.ML.StandardTrainers (4)
Standard\MulticlassClassification\OneVersusAllTrainer.cs (2)
212var roles = new KeyValuePair<CR, string>[1]; 213roles[0] = new KeyValuePair<CR, string>(new CR(DefaultColumnNames.Label), LabelColumn.Name);
Standard\MulticlassClassification\PairwiseCouplingTrainer.cs (2)
190var roles = new KeyValuePair<CR, string>[1]; 191roles[0] = new KeyValuePair<CR, string>(new CR(DefaultColumnNames.Label), LabelColumn.Name);