Skip to content

we will predict the results of election before few weeks of the elections through a machine learning model .

License

Notifications You must be signed in to change notification settings

krishna0306/ELECTION_RESULTS_PREDICTION-US

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ELECTION_RESULTS_PREDICTION-US

we will predict the results of election before few weeks of the elections through a machine learning model . Election Results Prediction - US image

Overview

This project uses Natural Language Processing (NLP) and machine learning techniques to predict election results in the United States by analyzing sentiment in tweets related to two prominent candidates: Joe Biden and Donald Trump.

image

Dataset

The project utilizes two CSV files for analysis:

Trumpall2.csv: Contains tweets related to Donald Trump.

Bidenall2.csv: Contains tweets related to Joe Biden.

Prerequisites Before running the code, make sure you have the following libraries installed:

pandas numpy seaborn matplotlib textblob plotly.graph_objects plotly.express You can install them using pip:

image

Usage

image

Ensure you have the required CSV files (Trumpall2.csv and Bidenall2.csv) in the project directory.

Run the Jupyter Notebook or Python script to perform sentiment analysis on the tweets and predict election results.

image

bash Copy code pip install pandas numpy seaborn matplotlib textblob plotly Usage Clone the repository to your local machine. bash Copy code git clone cd ELECTION_RESULTS_PREDICTION-US Ensure you have the required CSV files (Trumpall2.csv and Bidenall2.csv) in the project directory.

Run the Jupyter Notebook or Python script to perform sentiment analysis on the tweets and predict election results.

bash Copy code python election_prediction.py Sentiment Analysis Sentiment polarity is used to determine whether a tweet expresses a positive, negative, or neutral sentiment. Tweets are classified into "positive," "negative," or "neutral" categories based on their sentiment polarity. Data Cleaning Neutral tweets are removed from the dataset to balance both datasets. Prediction The project predicts election results based on the sentiment analysis of tweets. It analyzes the number of positive and negative sentiments in both candidates' accounts and presents the results in a graphical format.

Results

The project's predictions are displayed in a bar chart, comparing the percentage of positive and negative sentiments for both Joe Biden and Donald Trump.

Contributors RADHE KRISHNA License This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

I got help from @ campusx-official fpr model and accuray and bit off help from KAGGLE AND COLLAB ALSO FOR providing the test platform

About

we will predict the results of election before few weeks of the elections through a machine learning model .

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published