Skip to content

Commit b5e7e1f

Browse files
authored
remove rule that infers column purpose as categorical if # of distinct values is < 100 (dotnet#233)
1 parent 15dd299 commit b5e7e1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Microsoft.ML.Auto/ColumnInference/PurposeInference.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public void Apply(IntermediateColumn[] columns)
145145
Double avgLength = 1.0 * sumLength / data.Length;
146146
Double cardinalityRatio = 1.0 * seen.Count / data.Length;
147147
Double avgSpaces = 1.0 * sumSpaces / data.Length;
148-
if (cardinalityRatio < 0.7 || seen.Count < 100)
148+
if (cardinalityRatio < 0.7)
149149
column.SuggestedPurpose = ColumnPurpose.CategoricalFeature;
150150
// (note: the columns.Count() == 1 condition below, in case a dataset has only
151151
// a 'name' and a 'label' column, forces what would be an 'ignore' column to become a text feature)

0 commit comments

Comments
 (0)