DNS for Noobs

We are going to be looking at DNS, especially for anyone new to DNS or is unsure about it. We will look at what DNS is, how a domain name is structured, where the DNS goes to get the information and…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Do you have anxiety?

Anxiety is something that millions of people suffer on a daily basis. I know for me I experience this every time I have to present one of these projects. But this project was different because this was the first group project I have done in a long time. I was excited and anxious about working on a team as it usually never pans out for me but my group was amazing and this was our project.

We wanted to do something within healthcare. Then the idea about analyzing text to determine if it showed signs of anxiety and further classify the degree of anxiety through sentiment analysis in hopes to create a chatbot with tailored responses for each degree of anxiety.

To start this daunting task, we scrapped two subreddits from anxiety and writing. We wanted one subreddit to be directly about anxiety and the other to be text heavy and neutral where emotions were not the center of each text. 3000 posts were collected from each subreddit totaling 6000 posts to work with. Upon some consideration, we thought that some features of text might lend itself as indicators of anxiety. These features are emoticons, the usage of punctuation, and the addition of repetition of letters in words typically used for added exaggeration. We explored the data for these features. We built three different models to classify texts to tell whether it was showing anxiety or not. These models were Logistic Regression, Multinomial Naive Bayes, and Random Forest. With the coefficients, we were able to update the lexicon so that words that were more common in texts about anxiety had more weights. We were able to use all these information to build an app for predicting a text and a chatbot.

Each one in the group focused on a feature and a model to built. The model I worked with is Logistic Regression and focusing on repeated letter in words. I found that only two words with repeated letters. With this information, it would not show any significant feature to focus on. For my model, I ran a grid search. The best parameters were C of 2, max iter of 2000, penalty of l2, and solver of saga. The accuracy was 99.5%.

The second model is Multinomial Naive Bayes with a focus on emoticons.

The third model is Random Forest with a focus on punctuations.

We found that though random forest classifier was our best model at 98% accuracy, all the models performed very well all well above the 90s. For the purposes of further classifying anxiety into different degrees, we used the coefficients from the Logistic Regression to determine the weights of words. We then updated the sentiment intensity analyzer with those weights. After some further EDA with this updated sentiment analyzer, we agreed on some thresholds to classify the degrees of anxiety. If the sentiment score of the text was below -0.85, the text shows signs of severe anxiety. If the sentiment score was between -0.85 — -0.25, this was categorized as moderate anxiety. Mild anxiety was between a sentiment score of -0.25 and 0.05. The reason for the sentiment score going above the neutral zero is that some text can still be categorized as anxiety but still have a positive sentiment. This is probably due to the fact the text is too short to give an accurate prediction.

Though the Chatbot was not giving it tailored responses based on the severity of anxiety like we set out to do. It was the basis of creating a Chatbot. With more time and research, this could potentially be something that people with anxiety can use. To train a Chatbot to give such tailored responses, the data to train this chatbot could be immense. We would also need professional expertise on the matter as we cannot simply just decide what is an appropriate response to someone with anxiety. The capabilities of the chatbot are limited right now but the possibilities could be endless.

This was an interesting project. First of all it was a group project. It was exciting to see the different perspectives and the thought processes of my other teammates. There is definitely I lot I have learned from them and hopefully be able to use that knowledge in future projects. It also gave me a sneak peek of what it might look like to work with people in projects in a job setting. I have always just worked by myself so this was an eye opening experience.

The Chatbot was by far the hardest part of the project for me. Originally we wanted to use Streamlit. It worked well in terms of just predicting but once I started to implement a chatbot, it soon became a problem. I was not able to figure out how to fully customize the Streamlit app to my liking. Remembering that we learned about Flask, I thought I would give that a shot. I had previously used html and created my own website before so I was familiar with how to implement the code I needed to customize the app to my liking. With only less than two days left, I switched to using a Flask app. Though more code was necessary and a lot more complexity to employ the app, it provided a better way to host the app we needed for our project. Luckily, I had found a code online on how to implement a chatbot in Flask. I used this as a guide to creating the chatbot.

The way they implemented and went along creating a simple chatbot gave me new insight of how neural networks work. I could not simply just implement the code without understanding what is happening in it. If I did not do that I would not be able to know how to customize it to my liking. It took me a couple hours to fully comprehend what was going on. Also for the purpose of presentation, I knew people would ask how I created the Chatbot so it was a must for me to know. I think this also gave me a new perspective. I usually look at code and get overwhelmed with it that as long as it worked, I did not need to know the how of it. But now I am understanding and figuring out what the code is doing which also helps solidify what I already know.

Add a comment

Related posts:

Why the Difference?

Two dramatic incidents have us wondering when people will — and won’t — help someone in need. Here are what I think are some answers to that question. Beachgoers saw a family in trouble and after a…

Earth Based Recovery

Pain blockers are fine to eliminate physical pain but they can’t help your mobility if your leg is too damaged to walk on. I may need stronger meds to help with the psychological pain of remembering…

Beehive Venture Partners launches Beehive Syndicate

Beehive Venture Partners announced last week the launch of the Beehive Syndicate, a program to allow more people in Utah to invest in early and growth-stage funding rounds for private Utah companies…