Skip to content

Commit a6ab8a1

Browse files
Iskriyana VasilevaIskriyana Vasileva
authored andcommitted
201221_final_test
1 parent e72886b commit a6ab8a1

File tree

5 files changed

+1131
-1251
lines changed

5 files changed

+1131
-1251
lines changed

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ It included 3 phases. In the first 2 the models for the text and non-text inputs
7575
* a "homegrown" embeddings layer with Conv1D
7676
* a pre-trained embeddings layer with Conv1D
7777
* the top 2 models were then regularised in order for them to generalise better on unseen data
78-
* at the end the best performing model with regularisation on the test data was the bag-of-words with both l2 & dropout
78+
* at the end the best performing model with regularisation was the bag-of-words with dropout
7979

8080
[Product Type Model](https://github.com/Iskriyana/nlp-product-sentiment-classification/blob/master/notebooks/02_processing/02_2_Product_Type_Model.ipynb) - a simple fully connected neural network was used for this part
8181

@@ -86,22 +86,21 @@ It included 3 phases. In the first 2 the models for the text and non-text inputs
8686
* The main metric was the F1-score due to the imbalanced nature of the data set.
8787

8888
#### Text Part (NLP)
89-
* The bag-of-words with both l2 regularisation and dropout turned out to be the best model when it comes to F1 62% on the test data.
89+
* The bag-of-words with dropout turned out to be the best model. It achieved 64% F1 score on the test data.
9090
* My expectations were that a model with pre-trained embeddings in combination with an LSTM or Conv1D will outperform the rest.
9191
* My reasoning was that the pre-trained embeddings will enforce the generalisation while an LSTM or Conv1D will help capture the text sequence.
9292
* However, it turned out:
9393
* that for this particular data set "homegrown" embeddings are better than pre-trained. This can be explained by the small amount of data and the tech concentrated nature of the text descriptions. These "specificities" were better captured by training the data's own embeddings (that is why also "homegrown").
9494
* that bag-of-words is better than any model with embeddings. This for me was the biggest surprise. After a discussion with a mentor of mine an explanation can be that due to the short length of the text descriptions and relatively "loose" way of writing them, semantics and text structure do not play a significant role. Much more important is, if a word is present, which is what bag-of-words captures.
9595

9696
#### Non-Text Part
97-
* The Model achieves 72% F1 on test data
97+
* The Model achieved 44% F1 on the test data
9898
* This is not a very good result and is to be explained mostly by the fact that there is only one feature and little data
9999
* However, it is still much better than the baseline model
100100
* Therefore, the model was picked to be used in the multi-input model
101101

102102
#### Multi-Input Model
103-
* A F1-score of 64% was achieved on the test data.
104-
* Furthermore the graphs visualising the training and validation loss show that it generalises well - no significant gap between them
103+
* A F1-score of 62% was achieved on the test data.
105104
* The results on the final test set show a room for improvement.
106105
* Given all the limitations, however, it is still a good enough performance (and better than the baseline)
107106

notebooks/01_exploration/01_1_Data_Exploration.ipynb

Lines changed: 14 additions & 19 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)