- first set path to the 'Train_set' to the train data
- second set path to the glove word2vec text library which you can download from here.http://nlp.stanford.edu/data/glove.twitter.27B.zip. please take care you choose 100 dimension text file which I have previously set 100D in 'word hidden size'.
- Third give the path 'saved_path' to save the model.
- Fourth, there is 'metric_Id' option which is for three different loss function , Negative log likelihood, Hinge an Hinge square loss as 1, 2, 3 number respectively.
- So for three loss function you have to run the train file three times and you will get three models for three losses.
- First set 'pre-trained model' to any one of the path of the model.
- Second provide path to 'train-set' and 'test-set' to path to the train and test datafile respectively.
- Third set path to glove word2vec path library as done in train model section.
- Fourth provide prediction result path as path to predition which would be required in .npy extension.
agian repeat for three other loss function. This way you wiil get three .npy files for three model respectively
- Just provide test dataset path to 'test' and run it. :)
- please specify the path of BERT folder and not the file in DATA_PATH varible in Bert_model ipynb file so it automatically uses the data(some changed) given in BERT folder.
- https://github.com/uvipen/Hierarchical-attention-networks-pytorch
- https://github.com/kaushaltrivedi/bert-toxic-comments-multilabel
- https://towardsdatascience.com/multi-label-text-classification-with-scikit-learn-30714b7819c5
- https://towardsdatascience.com/multi-label-text-classification-5c505fdedca8