Inspiration

The light is finally at the end of the tunnel in the U.S. as we are getting closer and closer to new normalcy following the pandemic. However, another issue is rising. Covid-19 not only affected people by causing the virus to spread and kill over half a million people in the US. Mental health issues rose, and are predicted to rise after we approach new normalcy. According to the National Institute of Mental Health’s Dimensional Traumatic Stress Research Program, the percentage of people reporting they felt anxious or depressed spiked and remained at high levels since the start of the pandemic in March 2020. Some of the causes include substance misuse, anxiety and uncertainty, job losses, grief, and lack of social interaction. I am sure that all of us either experienced some of these ourselves or saw others experience some of the things I have mentioned, unfortunately. As we approach a new normal, we must have more resources available to people who are suffering from mental health issues following the pandemic. So, the project that I have been working on is Medity: a smart, mental health app that serves as a mindful reflection journal that provides users with motivational messages, and resources if they need them.

What it does

Users can log onto the app and will be directed to their calendar page where they can input their reflection for the day. Research by Giada Di Stefano, Francesca Gino, Gary Pisano, and Bradley Staats in call centers demonstrated that employees who spent 15 minutes at the end of the day reflecting about lessons learned performed 23% better after 10 days than those who did not reflect. Not only does it make people more productive, but studies also show that it helps people stay happier and more cognizant of what’s bothering them. Once they input their data, the app will store this information, and I have used Natural Language Processing to decipher the sentiment of these reflections.

Once it understands how positive or negative the message is, the app will do two things. First, based on how positive or negative the tweet is, it will send a notification to the user first thing in the morning when they wake up (users set the time), and they can wake up to a motivational quote in the morning. I have compiled an open-source database of quotes and will have the app pick from these based on how the user was feeling the night before. For example, I had said that I was feeling anxious the night before because of an interview I had this morning. My program understood that it had a negative sentiment (but not seriously negative), so it gave me an uplifting quote to look at the positives and told me to go crush it today. But, had I said something more negative, the app would send me further resources. I have used the IQVIA's HealthCare Locator Software Developer Kit, to help the user locate mental health resources in their nearby area if my app predicts that they need more help than just motivation. In my reflection journal app, if the app recognizes that the user needs more help than just motivation for the day, the app will send the user mental health resources, and prompt them to check out local mental health centers (made possible by the IQVIA HealthCare Locator SDK). The Locator SDK allows users to be able to search for nearby help easily. In addition, if the app thinks that the user needs mental health help, the app will autofill nearby psychiatrists and send users a notification. I am working on improving the program to understand if the users needs more specialized care (addiction, adolescent, etc). The HealthCare Locator Software was easy to integrate into my react-native app, and their extensive physician listings provides users with a lot of options. Mental health hotlines will also be attached of course. Sometimes, it's easier to put this personal information into an inanimate object like a phone rather than sitting face to face with a human. Some people are shy, so this can be one of the first ways they can recognize they need help. This could be helpful for the mental health telehealth industry that is growing. Of course, getting treatment from a professional is always the best option, but understanding that you need help in the first place is helpful. For people suffering from less urgent issues, the quotes and motivation can be encouraging.

How we built it

I have used an open-source tweet database that has hundreds of tweets and set sentiments of these tweets (positive or negative). Using this, I was able to train my model to understand the reflections that users input into the app. I first filtered non-relevant information using Regex from the inputted text (emojis, hashtags, multiple letters in a word used to emphasize a point, HTTPS in URLs, word/punctuation repetition. Then I used lemmatization (converting the words to their root form). I then got rid of stopwords (like “a”, “the” that do not contribute much to deciphering the actual sentiment. After all of these methods were complete, I used the methods to filter out the inputted text to what is shown on the screen. Now once these words are extracted, I am comparing these words to the tweets and I am figuring out how often they show up in the positive or negative tweets. For example, the word “love” shows up more frequently in the positive tweets, but the “nervous” word shows up more frequently in the negative sentiments. I used resources from AIOutsider to learn more about regex and the purpose of omitting certain information. Using this information, I can see if the phrases are leaning towards positive or negative sentiments. Finally, once the sentiments are clarified, I am using a LogisticRegression model to see whether the overall sentiment is positive or negative. Logistic regression is great for pinpointing whether something is positive or negative, true/false, but moving forward, I would probably lean towards another model to understand more about the tweet. Rather than just positive or negative, was the user anxious, excited, or worse like depressed. But for the hackathon, this model was successful in telling me to what degree the user was feeling positive or negative.

Challenges I ran into

This is the first time that I used natural language processing in a mobile app. Learning the syntax for regex was a learning curve, but it was interesting to see how to pick out the meaningful words in a phrase/sentence. In addition, working with expo and react-native to send out notifications picking out from the correct tweet categories took a lot of testing. I decided to use a LogisticRegression model because it was more simple to use than a Random Forest Classier for this task.

Accomplishments that I am proud of

I am happy that I was able to use my react-native skills and combine that with something I have never done before: natural language processing. In just a few weeks, I was able to understand the importance of regex and learn the significance of concepts like lemmatization. This is an interesting field that I never tapped into, but I am happy that I stepped out of my comfort zone to explore. In addition, I learned more about the mental health situation in the U.S. and I hope to continue to build this app to help people facing these issues.

What we learned

I learned how to use regex to simplify text and the concept of lemmatization and stopwords. By doing this, it was easier for me to focus on the important words and compare that to my list of tweets with positive and negative tweets. In addition, I learned how to use the Logistic Regression to see how positive or negative the sentiment is. Moving forward, I would like to explore other models to categorize the sentiments into other categories that would allow to app to pick out more relevant quotes. For example, instead of or focusing on just positive and negative sentiments, was the user nervous? Anxious? Depressed? This would be more helpful and is something I plan to focus on moving forward.

What's next for Medity

As we approach a new normal, there is an urgent need for mental health resources and to find remedies to help people adjust. Not everyone needs urgent help, but I believe that everyone needs to be mindful of their mental health during this time, so assistance should be available for people from either end of the spectrum. With Medity, I am optimistic that we can use technology, NLP, and machine learning to reach a wider range of people quickly, as this pandemic nearly unfortunately touched every community in the world. I hope to integrate this technology into the growing industry of telehealth focusing on mental health. Thank you for taking the time to look at my project!

Built With

Share this project:

Updates