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)
298
public static void GetSlotNames(RoleMappedSchema schema, RoleMappedSchema.
ColumnRole
role, int vectorSize, ref VBuffer<ReadOnlyMemory<char>> slotNames)
Data\ISchemaBindableMapper.cs (1)
55
IEnumerable<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
"/>
61
public static
ColumnRole
Feature => FeatureString;
66
public static
ColumnRole
Label => LabelString;
72
public static
ColumnRole
Group => GroupString;
78
public static
ColumnRole
Weight => WeightString;
84
public static
ColumnRole
Name => NameString;
90
public static
ColumnRole
FeatureContributions => FeatureContributionsString;
107
public static implicit operator
ColumnRole
(string value)
117
public KeyValuePair<
ColumnRole
, string> Bind(string name)
118
=> new KeyValuePair<
ColumnRole
, string>(this, name);
121
public 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).
201
private static void Add(Dictionary<string, List<DataViewSchema.Column>> map,
ColumnRole
role, DataViewSchema.Column column)
214
private static Dictionary<string, List<DataViewSchema.Column>> MapFromNames(DataViewSchema schema, IEnumerable<KeyValuePair<
ColumnRole
, string>> roles, bool opt = false)
237
public bool Has(
ColumnRole
role)
243
public bool HasUnique(
ColumnRole
role)
249
public bool HasMultiple(
ColumnRole
role)
256
public IReadOnlyList<DataViewSchema.Column> GetColumns(
ColumnRole
role)
262
public IEnumerable<KeyValuePair<
ColumnRole
, DataViewSchema.Column>> GetColumnRoles()
267
yield return new KeyValuePair<
ColumnRole
, DataViewSchema.Column>(roleAndList.Key, info);
274
public IEnumerable<KeyValuePair<
ColumnRole
, string>> GetColumnRoleNames()
279
yield return new KeyValuePair<
ColumnRole
, string>(roleAndList.Key, info.Name);
287
public IEnumerable<KeyValuePair<
ColumnRole
, string>> GetColumnRoleNames(
ColumnRole
role)
292
yield return new KeyValuePair<
ColumnRole
, string>(role, info.Name);
303
public DataViewSchema.Column GetUniqueColumn(
ColumnRole
role)
333
public RoleMappedSchema(DataViewSchema schema, bool opt = false, params KeyValuePair<
ColumnRole
, string>[] roles)
348
public RoleMappedSchema(DataViewSchema schema, IEnumerable<KeyValuePair<
ColumnRole
, string>> roles, bool opt = false)
354
private static IEnumerable<KeyValuePair<
ColumnRole
, string>> PredefinedRolesHelper(
356
IEnumerable<KeyValuePair<
ColumnRole
, string>> custom = null)
359
yield return
ColumnRole
.Label.Bind(label);
361
yield return
ColumnRole
.Feature.Bind(feature);
363
yield return
ColumnRole
.Group.Bind(group);
365
yield return
ColumnRole
.Weight.Bind(weight);
367
yield 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>
391
IEnumerable<KeyValuePair<RoleMappedSchema.
ColumnRole
, string>> custom = null, bool opt = false)
441
public RoleMappedData(IDataView data, bool opt = false, params KeyValuePair<RoleMappedSchema.
ColumnRole
, string>[] roles)
456
public 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>
477
IEnumerable<KeyValuePair<RoleMappedSchema.
ColumnRole
, string>> custom = null, bool opt = false)
Microsoft.ML.Data (1)
Commands\TrainCommand.cs (1)
518
return Enumerable.Empty<KeyValuePair<
ColumnRole
, string>>();
Microsoft.ML.StandardTrainers (4)
Standard\MulticlassClassification\OneVersusAllTrainer.cs (2)
212
var roles = new KeyValuePair<
CR
, string>[1];
213
roles[0] = new KeyValuePair<
CR
, string>(new CR(DefaultColumnNames.Label), LabelColumn.Name);
Standard\MulticlassClassification\PairwiseCouplingTrainer.cs (2)
190
var roles = new KeyValuePair<
CR
, string>[1];
191
roles[0] = new KeyValuePair<
CR
, string>(new CR(DefaultColumnNames.Label), LabelColumn.Name);