0
$\begingroup$

I am doing sentiment analysis with GloVe and Fast Text word embeddings on a tweet dataset (using tensorflow & keras). I am trying to compare two models in terms of 'accuracy'. But each time, I run the Jupyter notebook, the accuracy keeps on varying. Sometimes the GloVe model gives better accuracy and sometimes the Fast Text model. What is the reason behind it? Is there any way to keep the accuracy of the two models constant.

$\endgroup$
8
  • $\begingroup$ Have you set a seed for both the scripts? $\endgroup$ Aug 26, 2021 at 13:50
  • $\begingroup$ No, I have not set a seed. How is it done? Any example please let me know. $\endgroup$
    – cris2019
    Aug 26, 2021 at 14:06
  • $\begingroup$ tensorflow.org/api_docs/python/tf/random/set_seed $\endgroup$ Aug 26, 2021 at 19:20
  • $\begingroup$ Something else is also changing with each run e.g. seed, splits of test/train etc. Share your code. $\endgroup$
    – 10xAI
    Aug 27, 2021 at 4:28
  • $\begingroup$ I have already used random state =42. $\endgroup$
    – cris2019
    Aug 27, 2021 at 9:36

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.