Skip to content

Releases: abuhmhai/SentimentAnalysis_KNN

Release list

first release

Choose a tag to compare

@abuhmhai abuhmhai released this 27 Jul 11:15

Release v1.0.0 - Sentiment Analysis using KNN

Overview

The first official release of the sentiment analysis project using K-Nearest Neighbors (KNN) classifier. This version includes a complete end-to-end pipeline for training, validating, and testing a sentiment analysis model on text data. The primary goal is to classify text data into positive, negative, or neutral sentiments.

Key Features

  1. Data Preprocessing:

    • Tokenization: Splitting text into words or tokens.
    • Stop Words Removal: Removing common words that do not contribute to sentiment.
    • Stemming/Lemmatization: Reducing words to their root forms.
    • Vectorization: Converting text data into numerical features using techniques like TF-IDF or Bag of Words.
  2. Model Training:

    • Implementation of the K-Nearest Neighbors algorithm.
    • Hyperparameter tuning for optimizing the number of neighbors (k).
    • Cross-validation to ensure the model's robustness.
  3. Model Evaluation:

    • Performance metrics such as accuracy, precision, recall, and F1-score.
    • Confusion matrix for visualizing the performance across different sentiment classes.
    • ROC curves and AUC scores for model evaluation.
  4. Prediction and Inference:

    • Functionality for predicting sentiment on new, unseen text data.
    • Batch processing for handling multiple text inputs simultaneously.
  5. User Interface:

    • Command-line interface for ease of use.
    • Option to load custom datasets for training and evaluation.

Improvements and Optimizations

  • Enhanced text preprocessing pipeline for better feature extraction.
  • Optimization of KNN algorithm for faster computation and reduced memory usage.
  • Comprehensive error handling and user-friendly messages for common issues.

Known Issues

  • The model's performance may vary significantly with different datasets, especially those with diverse language usage.
  • KNN, being a lazy learner, might not scale well with extremely large datasets due to increased computational requirements.

Future Enhancements

  • Incorporate advanced feature extraction techniques like word embeddings (Word2Vec, GloVe).
  • Experiment with different distance metrics and weighting schemes in KNN.
  • Explore and integrate other machine learning algorithms to compare performance.
  • Develop a web-based interface for real-time sentiment analysis.

Contributors

  • Minh Hai (Project Lead)

Full Changelog: https://github.com/abuhmhai/SentimentAnalysis_KNN/commits/v1.0.0