I am trying to solve a classification problem and am unsure of the strategy to use. I am using scikit learn and am more interested in whether I have the correct approach rather than the implementation.
I have
- set T, where each item in the set is a string
- two sets L1 and L2, that are non-overlapping controlled lists of labels
- each item in T can map to one and only one item on L1 and one and only one item in L2
- L1 and L2 are related as part of a 2 part taxonomy with which I am tagging items in T
e.g.
T = {'queen elizabeth's barnet', 'queen elizabeth's london', 'odeon leicester sq', 'odeon london', 'pizza express 189', 'piz expss 2', 'honda civic 25-jul'} L1 = {building, car, boat} L2 = {school, cinema, restaurant, honda, ford, cruise-boat}
I have trained my classifier on previous data to tag ''queen elizabeth's barnet' with L1/building, L2/school and 'odeon london' with L1/building and L2/cinema
At the moment I am approaching the problem as a multi-class classification, where I am assigning one and only one label from L1 and one label from L2 to each item in T and treating the 2 classification tasks independently i.e. I have trained a classifier to predict L1 given T and separately predict L2 given T.
I am thinking whether this method is the best approach as it doesnt make use of the dependency/constraint between L1 and L2 - and am considering predicting L1 for a given T and then using the predicted L1 in the feature vector to predict L2 (or vice versa). Unsure as to whether this is the best approach given there is error in the prediction.
Any ideas/experience on how best to approach this problem?
Thanks in advance for any help!