Professional Documents
Culture Documents
A-17 Paper
A-17 Paper
A-17 Paper
Nihal Pradhan
Computer Science Engineering
JSS Science And Technology University
Mysuru, India
nihalpradhan10@gmail.com
Abstract—The digital age has witnessed many people turning post or comments on the Twitter platform, sometimes their
to social media to influence society with their views and express posts and comments refer to as emotional state such as ‘joy’,
their feelings. This makes social media a huge reservoir of ‘sadness’, ‘fear’, ‘anger’, or ‘surprise’. We analyze various
unstructured data. In this paper, we try to leverage a small chunk
of the plethora of information social media hosts. We find the features of Twitter comments by collecting data through an
best possible algorithm that has the ability to extract accurate effective method of machine learning classification techniques
sentimental information from a large tweets dataset based on and to make overall judgments regarding their various parts.
various parameters. The pandemic that has disrupted everything [2]
from the economy to our lifestyles has had a significant impact Many researchers have demonstrated that utilizing user-created
on our stress levels. We use the best algorithm to gain valuable
insights on tweets during the COVID19 pandemic, before the content accurately may help decide individuals’ psychological
pandemic, and during certain other disasters. We compare our wellness levels. For instance, Aldarwish and Ahmad [3] ex-
results and give a possible explanation as to why it is so. amined that the utilization of Social Network Sites (SNS) is
Index Terms—COVID19, Natural Language Processing, De- expanding these days, particularly by the more youthful eras.
pression detection Because the accessibility of SNS enables clients to express
their interests, sentiments and offer day by day schedule [4]
I. I NTRODUCTION [5].
The proliferation of internet and communication technolo- In this paper, we first extract a dataset of tweets with
gies, especially the online social networks have rejuvenated depressive keywords. We then use different algorithms like
how people interact and communicate with each other elec- Logistic Regression, K-Nearest Neighbors, Decision Trees,
tronically. The applications such as Twitter, Twitter, Instagram Support Vector Machine, and CNN + LSTM neural network
and alike not only host the written and multimedia contents over this dataset to find out the best algorithm. We then
but also offer their users to express their feelings, emotions use this model to run on more contextual datasets such
and sentiments about a topic, subject or an issue online. On as COVID related datasets, disaster-related datasets to gain
one hand, this is great for users of social networking site to valuable insights.
openly and freely contribute and respond to any topic online;
II. M ETHODOLOGY
on the other hand, it creates opportunities for people working
in the health sector to get insight of what might be happening A. Procuring the Dataset
at mental state of someone who reacted to a topic in a specific The Dataset consists of labeled data i.e., an equal number
manner. [1] of depression indicative tweets and random tweets (non-
In order to provide such insight, machine learning techniques negative). There is no publicly available dataset for depressive
could potentially offer some unique features that can assist tweets. So, we had to gather our own dataset. We used a tool
in examining the unique patterns hidden in online communi- called TWINT [6] which is an advanced Twitter scraping tool
cation and process them to reveal the mental state (such as written in Python that allows for scraping Tweets from Twitter
‘happiness’, ‘sadness’, ‘anger’, ‘anxiety’, depression) among profiles without using Twitter’s API. We used TWINT with
social networks’ users. As users express their feeling as a appropriate keywords that depict negative stressful emotions
such as “depressed”, “suicidal”, “distraught”, “pathetic”, etc. C. Logistic Regression
Then random tweets were obtained from the Kaggle dataset In statistics, the logistic model is used to model the prob-
twitter sentiment. We mix these two datasets in equal propor- ability of a certain class. This can be extended to model
tions to get an evenly distributed dataset of both negative and several classes of events such as determining whether an image
non-negative tweets. This dataset forms the basis for training, contains a cat, dog, lion, etc. Each object being detected in the
validating and testing all our models. We use 60% of the image would be assigned a probability between 0 and 1, with
dataset for training, 20% for validation and the rest 20% for a sum of one. In order to map predicted values to probabilities,
testing the accuracy. we use the Sigmoid function. The function maps any real value
into another value between 0 and 1. In machine learning, we
use sigmoid to map predictions to probabilities. We use this
to predict whether the tweet is a depressed/negative tweet or
B. Data Processing
not.