I am working on a product classification problem (E-Commerce) in which I have to identify product category based on keywords.
Say for example, if input is given as 'Samsung Galaxy On Nxt 3 GB RAM 16 GB ROM Expandable Upto 256 GB 5.5 inch Full HD Display' , It should correctly identify it as 'Mobile'.
The problem here is that I have certain key-value pairs on which I have to train the model. Previously, I was doing the same problem by training model on product level using LinearSVC and it was giving satisfactory results.
Details about data:
I have 39 classes/ categories currently, which might increase in future.
I am using a csv file which is of around 10 MB and it has around 7000 rows.(Refer below structure)
- I am using LinearSVC from sklearn.svm
I have the following structure for training now:
--------------------------------------------------------------
| Attribute_Names | Attribute_Values | Category |
--------------------------------------------------------------
| Brand | Samsung, Nokia, OnePlus | Mobile |
| RAM, Memory | 2 GB, 4 GB, 3 GB, 6GB | Mobile |
| Color,Colour | Black, Golden, White | Mobile |
--------------------------------------------------------------
| Fabric, Material | Cloth, Synthetic, Silk | Ethnic Wear |
| Pattern, Design | Digital, floral print | Ethnic Wear |
--------------------------------------------------------------
I have the following queries:
1 - Which Model to use for this problem ?
2 - How would you handle such problem ?
3 - Any similar problem you have seen.
Any help is much appreciated.
EDIT:
step 1) - merge column(attribute_names, attribute_values)
step 2) - Cleaned the data(removing stopwords,special characters, steming)
step 3) - Feature extraction using TfidfVectorizer(stop_words='english',lowecase=True)
step 4) - OneVsRestClassifier(LinearSVC(loss='hinge',penalty='l2'))
This are the steps we have performed till now,and the results are not good enough (miss-classification still exist)
format/structure of data is same as we mentioned above.