Logo Lanfrica

Dept-of-Comp-Sci-University-of-Ghana/team-task-1---natural-language-with-disaster-tweets-cmsm_gp-11

Domain:

natural language processing

Record type:

project
Creator:
Dep
Host:
team-task-1---natural-language-with-disaster-tweets-cmsm_gp-11 created by GitHub Classroom # Natural Language Processing with Disaster Tweets ## Group 11 Report ### Group Members Ebenezer Acquah - 10885076 Eugene Cobbah – 10866103 ## Dataset The dataset includes three files: train.csv: This file contains the training set data. It is used to train a machine learning model to predict whether a tweet is about a real disaster or not. The columns in this file include: **id:** A unique identifier for each tweet. **text:** The text of the tweet. **location:** The location from where the tweet was sent (may be empty). **keyword:** A particular keyword from the tweet (may be empty). **target:** Indicates whether the tweet is about a real disaster (1) or not (0). **test.csv:** This file contains the test set data. It is used to evaluate the performance of the trained model on unseen data. The columns in this file are the same as in train.csv, except for the "target" column, which is not present since it needs to be predicted. **sample_submission.csv:** This file provides a sample submission format. It is used as a template to submit predictions for the test set. The columns in this file include: **id:** A unique identifier for each tweet. **target:** The predicted target value (0 or 1) for whether the tweet is about a real disaster. ## Exploratory Data Analysis The distribution of the target variable is plotted using a countplot, showing the distribution of disaster and non-disaster tweets. A word cloud is also generated to visualize the most common words in disaster-related tweets. ## Data Preprocessing The text data is cleaned by removing URLs, usernames, hashtags, and non-alphanumeric characters. The text is converted to lowercase, stripped of leading and trailing spaces, and stopwords are removed. ## Feature Encoding The text data is encoded into numerical vectors using the SentenceTransformer model. ## Model Training and Evaluation Three models are trained and evaluated: Random Forest Classifier, LightGBM Classifier, and Support Vector …