We are used to working on text classification problem. It's generally very straightforward. However, there are cases where classes also contain some information and we may feel like we should also use this information. For example, we may want to understand user intent in a chatbot, or we may want to categorize a product given its description. In these cases, categories also have semantic meaning, i.e. some categories are related to each other, so we can also create embedding vectors for the categories.
- If you want to train on a subsample of data, first see save_subsample.py
- To preprocess data, see clean_data.py
-
Set the device in settings.py
-
Make sure you have
categories.csvfile under the./datadirectory. If not, see make_categories.py -
Now you can train either classifier or recommender models.
i. For classification, see classification/train.py
ii. For recommendation, see recommender/train.py
-
Set
test_fileandmodel_dirapropriately. (In the correspondingtrain.pyfile) -
Now you can train either classifier or recommender models.
i. For classification, see classification/evaluate.py
ii. For recommendation, see recommender/evaluate.py