Sentiment Analysis on Text | Comparative Machine Learning Project

Sentiment Analysis Project — Machine Learning on English Texts

Using AI and Machine Learning algorithms (KNN, K-Means, Random Forest), we analyze over 21,000 English texts to classify emotions with high accuracy.

In this project, I performed sentiment analysis on a large dataset of English texts. The texts were converted into numerical data using TF-IDF, and three different algorithms were applied: KNN, K-Means, and Random Forest. The performances of the algorithms were compared using accuracy, F1-score, and confusion matrix metrics. Random Forest achieved the highest accuracy of 88%. The results were also visualized using PCA and graphs. This is a comprehensive work for those interested in NLP and machine learning.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

  • Text preprocessing and TF-IDF vectorization

  • Classification using K-Nearest Neighbors (KNN)

  • Clustering with K-Means and visualization with PCA

  • Achieving high accuracy with Random Forest classifier

  • Evaluating model performances using accuracy, F1-score, and confusion matrix

  • Detailed analysis of results with graphical visualizations

The Random Forest algorithm stood out with an 88% accuracy rate. This project serves as a comprehensive example for those who want practical applications in NLP and machine learning.

Click for GitHub
▼▼▼▼▼▼▼

Scroll to Top