Home

Awesome

Twitter Sentiment Analysis Model


What is this repo?!

I was set the task to try and make a sentiment analysis model for Twitter for my dissertation even though the due by date is long past I still wanted to accomplish this task.

For my dissertation I was set the task to predict stock prices for a single company on the stock market using Twitter and sentiment analysis. I tried to see if you could predict if the stock market would go up or down given the sentiment of the Tweets.

Dependancies

This model uses a number of open source projects to work properly:

Training Info

I used a Cuda on a Nvidia 960M it took about 4 hours/ish for 10 epochs of 900,000 Tweets, Every 100,000 Tweets testing using 10,000 Tweets is done.

Model Info

This model is 79% accurate and has 0.41 loss. If you want to use remember to deseralise the Keras tokenier which is the *.p file the tokenizer ahs a 100,000 unique word count, the predict.py has an example. Here is a small example of the model output:

TweetScore
"fuck you, you are an asshole"0.3316856
"I love you"0.81485116
"yes! I cant wait to go"0.60499549
"I don't want to be here"0.11294857
"is the best person ever"0.74768722

Free Software, Hell Yeah!