1
$\begingroup$

In machine learning training data, if a sub-category column is available, in THEORY is there any use to include the category column?

For example, now given that the Item variable is there, should I exclude the Group variable?

Price   Group   Item    Response
--------------------------------
12      Fruit   Apple   Y
4       Fruit   Banana  N
545     Veg     Carrot  N
7       Fruit   Banana  Y
21      Fruit   Banana  N
111     Veg     Onion   N
5       Veg     Onion   Y
78      Fruit   Apple   Y
65      Fruit   Orange  Y
47      Veg     Carrot  N
112     Veg     Tomato  Y

Think about this:

Apple, Banana and Orange belong to Fruit;

Carrot, Onion and Tomato belong to Vegetable.

This piece of information will be discarded if I discard the Group variable. Does this information not help prediction at all?

$\endgroup$
1
  • 1
    $\begingroup$ It depends on the specific algorithm used to fit the model and also on the data situation (a lot of small subcategories or not) etc. $\endgroup$
    – Michael M
    Commented Jun 24, 2017 at 12:30

1 Answer 1

1
$\begingroup$

Very often it is helpful in various ways. One immediate idea which comes to my mind would be to provide context for missing information. In your example, you can try to predict some observation without knowing the item value, but knowing only the group. This is better than not using the group. The same happens when you try to predict something for a fruit which you did not saw in your training data.

There are many ways in which that might help. However, how much information it carries, this is another question. It depends on your problem.

$\endgroup$

Your Answer

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