85 references to ColumnPurpose
Microsoft.ML.AutoML (84)
API\AutoCatalog.cs (5)
821
var textFeatures = columnPurposes.Where(c => c.Purpose ==
ColumnPurpose
.TextFeature);
822
var numericFeatures = columnPurposes.Where(c => c.Purpose ==
ColumnPurpose
.NumericFeature
825
var booleanFeatures = columnPurposes.Where(c => c.Purpose ==
ColumnPurpose
.NumericFeature && !numericFeatures.Contains(c));
826
var catalogFeatures = columnPurposes.Where(c => c.Purpose ==
ColumnPurpose
.CategoricalFeature);
827
var imagePathFeatures = columnPurposes.Where(c => c.Purpose ==
ColumnPurpose
.ImagePath);
ColumnInference\ColumnGroupingInference.cs (11)
29
public
ColumnPurpose
Purpose;
32
public GroupingColumn(string name, DataKind kind,
ColumnPurpose
purpose, Range[] ranges)
85
private static int GetPurposeGroupId(int columnIndex,
ColumnPurpose
purpose)
87
if (purpose ==
ColumnPurpose
.CategoricalFeature ||
88
purpose ==
ColumnPurpose
.TextFeature ||
89
purpose ==
ColumnPurpose
.Ignore)
94
private static string GetName(DataKind itemKind,
ColumnPurpose
purpose, List<GroupingColumn> previousColumns)
108
private static string GetPurposeName(
ColumnPurpose
purpose, DataKind itemKind)
112
case
ColumnPurpose
.NumericFeature:
121
case
ColumnPurpose
.CategoricalFeature:
124
return Enum.GetName(typeof(
ColumnPurpose
), purpose);
ColumnInference\ColumnInferenceApi.cs (1)
72
IEnumerable<(string,
ColumnPurpose
)> purposeResults = null;
ColumnInference\ColumnInformationUtil.cs (26)
12
internal static
ColumnPurpose
? GetColumnPurpose(this ColumnInformation columnInfo, string columnName)
16
return
ColumnPurpose
.Label;
21
return
ColumnPurpose
.Weight;
26
return
ColumnPurpose
.GroupId;
31
return
ColumnPurpose
.SamplingKey;
36
return
ColumnPurpose
.CategoricalFeature;
41
return
ColumnPurpose
.NumericFeature;
46
return
ColumnPurpose
.TextFeature;
51
return
ColumnPurpose
.Ignore;
56
return
ColumnPurpose
.UserId;
61
return
ColumnPurpose
.ItemId;
66
return
ColumnPurpose
.ImagePath;
72
internal static ColumnInformation BuildColumnInfo(IEnumerable<(string name,
ColumnPurpose
purpose)> columnPurposes)
80
case
ColumnPurpose
.Label:
83
case
ColumnPurpose
.Weight:
86
case
ColumnPurpose
.SamplingKey:
89
case
ColumnPurpose
.CategoricalFeature:
92
case
ColumnPurpose
.Ignore:
95
case
ColumnPurpose
.NumericFeature:
98
case
ColumnPurpose
.UserId:
101
case
ColumnPurpose
.ItemId:
104
case
ColumnPurpose
.GroupId:
107
case
ColumnPurpose
.TextFeature:
110
case
ColumnPurpose
.ImagePath:
145
public static IDictionary<
ColumnPurpose
, int> CountColumnsByPurpose(ColumnInformation columnInformation)
147
var result = new Dictionary<
ColumnPurpose
, int>();
ColumnInference\PurposeInference.cs (15)
23
public readonly
ColumnPurpose
Purpose;
25
public Column(int columnIndex,
ColumnPurpose
purpose)
48
private
ColumnPurpose
_suggestedPurpose;
55
public
ColumnPurpose
SuggestedPurpose
69
public IntermediateColumn(IDataView data, int columnId,
ColumnPurpose
suggestedPurpose =
ColumnPurpose
.Ignore)
152
column.SuggestedPurpose =
ColumnPurpose
.CategoricalFeature;
156
column.SuggestedPurpose =
ColumnPurpose
.TextFeature;
158
column.SuggestedPurpose =
ColumnPurpose
.Ignore;
161
column.SuggestedPurpose =
ColumnPurpose
.ImagePath;
175
column.SuggestedPurpose =
ColumnPurpose
.NumericFeature;
189
column.SuggestedPurpose =
ColumnPurpose
.NumericFeature;
203
column.SuggestedPurpose =
ColumnPurpose
.TextFeature;
215
column.SuggestedPurpose =
ColumnPurpose
.Ignore;
255
intermediateCol = new IntermediateColumn(data, i,
ColumnPurpose
.Ignore);
DatasetDimensions\DatasetDimensionsApi.cs (1)
31
if (itemType.IsText() && purpose.Purpose ==
ColumnPurpose
.CategoricalFeature)
TransformInference\TransformInference.cs (22)
72
public readonly
ColumnPurpose
Purpose;
75
public IntermediateColumn(string name, DataViewType type,
ColumnPurpose
purpose, ColumnDimensions dimensions)
179
var lastLabelColId = Array.FindLastIndex(columns, x => x.Purpose ==
ColumnPurpose
.Label);
207
if (column.Purpose ==
ColumnPurpose
.UserId ||
208
column.Purpose ==
ColumnPurpose
.ItemId)
230
if (column.Purpose ==
ColumnPurpose
.GroupId && !column.Type.IsKey())
253
if (column.Purpose !=
ColumnPurpose
.CategoricalFeature)
300
if (!column.Type.GetItemType().IsBool() || column.Purpose !=
ColumnPurpose
.NumericFeature)
328
if (!column.Type.GetItemType().IsText() || column.Purpose !=
ColumnPurpose
.TextFeature)
354
&& column.Purpose ==
ColumnPurpose
.NumericFeature
380
if (!column.Type.GetItemType().IsText() || column.Purpose !=
ColumnPurpose
.ImagePath)
397
var intermediateCols = columns.Where(c => c.Purpose !=
ColumnPurpose
.Ignore)
437
if (intermediateCol.Purpose ==
ColumnPurpose
.NumericFeature &&
445
var labelColumnName = intermediateCols.FirstOrDefault(c => c.Purpose ==
ColumnPurpose
.Label)?.ColumnName;
449
var groupColumnName = intermediateCols.FirstOrDefault(c => c.Purpose ==
ColumnPurpose
.GroupId)?.ColumnName;
452
intermediateCols = intermediateCols.Where(c => c.Purpose ==
ColumnPurpose
.NumericFeature ||
453
c.Purpose ==
ColumnPurpose
.CategoricalFeature || c.Purpose ==
ColumnPurpose
.TextFeature ||
454
c.Purpose ==
ColumnPurpose
.ImagePath);
465
intermediateCols.First().Purpose ==
ColumnPurpose
.CategoricalFeature ||
466
intermediateCols.First().Purpose ==
ColumnPurpose
.TextFeature ||
467
intermediateCols.First().Purpose ==
ColumnPurpose
.ImagePath))
TransformInference\TransformPostTrainerInference.cs (1)
34
var labelColumn = columns.First(c => c.Purpose ==
ColumnPurpose
.Label);
Utils\DatasetColumnInfo.cs (2)
13
public readonly
ColumnPurpose
Purpose;
16
public DatasetColumnInfo(string name, DataViewType type,
ColumnPurpose
purpose, ColumnDimensions dimensions)
Microsoft.ML.AutoML.Tests (1)
TransformInferenceTests.cs (1)
669
foreach (
var
columnPurpose in new[] { ColumnPurpose.UserId, ColumnPurpose.ItemId })