2
$\begingroup$

I am running machine learning using name features to predict Y (binary 0 and 1 labels).

Using the name entity (eg: John Carter), I derive into 4 name substring features (1: first name = "John", 2: last name = "Carter, 3: first letter of last name = "c", and 4: last letter of last name = "r").

Obviously "John Carter" is just one record, and other names "Jennifer Green" and "Kyle Ferguson" will give different entries.

Before running the ML algorithm, I needed to transform the dataset into a sparse matrix via vectorization, the "new" columns will be based on the substring features found from actual cases in my data. For example for John Carter, the columns "first-name=John" and "last-name=Carter" will have the value 1, while Jennifer Green will have a value of 0 in these columns, and vice versa.

So is it correct to say that my model contains 4 name features, or should I say it contains, say, tens of thousand of features?

$\endgroup$

1 Answer 1

2
$\begingroup$

You are explicitly giving your model 4 different degrees of freedom so you would say you are using 4 features.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.