0
$\begingroup$

We have a supervised multi-class classification problem where we need to predict two targets for each sample: 'brand' and 'category'. Our features are 'shop_name' which can be any proper noun and several categorical features ('shop_type', 'building_type').

In the training data, 'brand' is not always present, but 'category' is always present. When brand is present, the category is directly dependent on it. For e.g. If the brand is 'Snickers', the category is already known to be 'Foodstuff'. In other cases, the category has to be determined from the input features.

Here is a representative example of our training data:

shop_name shop_type building_type brand category
Snickers Ltd huge Snickers Foodstuff
Acme Intl office stationary medium Office Equipment
Davidoff cigars cigarette big Davidoff Smoking
Sample Company car repair small Automobile

Features: shop_name (free text), shop_type (categorical - 100 types), building_type (categorical - 20 types)

Target: brand (categorical - 2500 brands), category (categorical - 250 categories)

How should we structure our classification algorithm to determine brand and category? We have a well known list of about 2500 brands that we are interested in.

$\endgroup$
3
  • $\begingroup$ Welcome to DataScienceSE. I'm a bit skeptical: do you expect a model to learn the brand and category from the shop name and shop type? What kind of predictor would it use? In your example I can only see one case where a model could generalize something: the word "cigars" in "Davidoff cigars" implies the category "smoking". Most of the other cases are just proper names, so imho the model will just learn to associate a known name with its category but it won't be able to generaize. $\endgroup$
    – Erwan
    Apr 28 at 14:16
  • $\begingroup$ The example shown is simplified and we have a couple of more categorical features. I guess you are right that the model cant be generalized when using 'name' as a feature. What do you reckon is the best approach then? Does it make sense for e.g. to use edit distance between the 'name' and the list of known names as feature? $\endgroup$
    – Prithvi
    Apr 28 at 14:40
  • $\begingroup$ Well it depends what is the context/goal of the task: a very simple approach is to just store the names and their corresponding category in a dict, but this works only assuming that most of the shops to predict are known and exist in the training set. You could try a distance measure indeed, but it totally depends if the shop names actually contain indications about the category, with proper names like "Snickers" it can't work. My general first impression is that it's not to sure that the problem is solvable. $\endgroup$
    – Erwan
    Apr 29 at 20:16
0
$\begingroup$

You might want to visit the definition of multi-class and multi-label problem. In this case looks like are aiming to solve a multi-label problem. Refer to the following problem, this might help you better understand your situation. https://stats.stackexchange.com/a/11866/286349

$\endgroup$
2
  • 1
    $\begingroup$ Yes, it could be a multi-label. In my case, on closer reading I think it is a multi-class multi-output problem. $\endgroup$
    – Prithvi
    May 4 at 14:30
  • $\begingroup$ You are right, I was thinking along the same lines, you still have missing labels in one of the multi-class problem, which might make it difficult to translate as a pure multi-class multi-output problem $\endgroup$
    – drew_psy
    May 4 at 20:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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