Skip to content

Performing sentiment analysis for binary classification with neural networks.

License

Notifications You must be signed in to change notification settings

ManuelEspejo/NLP-Sentiment-Analysis-Mental-Health

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NLP-Sentiment-Analysis-Mental-Health

Open in Colab

Python

TensorFlow Keras Scikit-Learn

NumPy Pandas Matplotlib

Table of Contents

Overview

The objective of this project is to demonstrate binary classification using various algorithms and explore their performance in determining whether short text messages are related to mental health or not. Additionally, we aim to gain insights into the types of mistakes made by these models. We leverage tools such as confusion matrices to analyze these errors and evaluate the effectiveness of our models.

Installation

Clone this repository and install the required dependencies using the following command:

git clone https://github.com/ManuelEspejo/NLP-Sentiment-Analysis-Mental-Health.git

Or using the Open in Colab button.

Usage

  1. Open the sentiment_analysis.ipynb Jupyter Notebook.
  2. Follow the step-by-step instructions provided in the notebook to perform the analysis.
  3. Modify the code or experiment with different models and techniques to enhance the analysis.
  4. Execute the notebook cells to see the results and insights.

Dataset

The dataset used in this project consists of short text messages labeled as either mental health-related (1) or not considered (0). The dataset has been downloaded from kaggle. You can download it from here.

Models

We experiment with various machine learning models, including Dense model, Convolutional Neural Networks and LSTM, to perform sentiment analysis. The notebook explores the implementation and comparison of these models for the text binary classification task.

Evaluation

To evaluate the performance of the models, we use common evaluation metrics such as accuracy, precision, recall, and F1-score.

Results

The results of the sentiment analysis demonstrate the effectiveness of the applied machine learning models. We discuss the achieved accuracy and provide visualizations of evaluation metrics for a comprehensive understanding of the analysis.

Contributing

Contributions to this project are welcome. If you have any suggestions or would like to enhance the analysis, please feel free to submit a pull request.

At the end of the notebook there is also a "next steps" section, in wich I have talked about some approaches that we could take with this notebook for further improve our models performance. Anyone is welcome to try one of those approaches to see the potential improvements, it would be great to see that.

GitHub Issues GitHub Pull Request

License

This project is licensed under the MIT License.

MIT License

About

Performing sentiment analysis for binary classification with neural networks.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published