Skip to content

wanaalif/student-feedback-sentiment-analysis

Repository files navigation

Student Feedback Sentiment Analysis

A deep learning project comparing BiLSTM and Multi-Filter CNN architectures for sentiment classification of student feedback. Built as a group assignment for SAIA 2153 – Deep Learning, Universiti Teknologi Malaysia.

Overview

Two models are trained and evaluated across two datasets:

  • BiLSTM – Bidirectional LSTM with spatial dropout and learned embeddings
  • Multi-Filter CNN – Kim (2014)-inspired CNN with parallel convolutional filters and optional pre-trained GloVe embeddings

Sentiments are classified into three categories: Negative, Neutral, and Positive.

Results Summary

Model Dataset Val Accuracy
BiLSTM Synthetic (Dataset A) 92.50%
BiLSTM Real-world (Dataset B) 67.57%
CNN (GloVe) Synthetic (Dataset A) 75.00%
CNN (GloVe) Real-world (Dataset B) 89.19%

The CNN with GloVe transfer learning generalises better on noisy real-world data, while BiLSTM excels on clean, structured synthetic data.

Project Structure

sentiment-analysis/
├── SentimentAnalysis.ipynb                  # BiLSTM & CNN Notebook
├── student-feedback-sentiment-analysis.csv  # Dataset A (upload manually)
├── glove.2024.wikigiga.100d/             # GloVe embeddings folder (see setup)
│   └── wiki_giga_2024_100_MFT20_vectors_seed_2024_alpha_0.75_eta_0.05.050_combined.txt
├── requirements.txt
└── README.md

Dataset B (brarajit18/student-feedback-dataset) is downloaded automatically via kagglehub — no manual upload needed.

Setup

1. Clone the repo

git clone https://github.com/wanaalif/student-feedback-sentiment-analysis.git
cd student-feedback-sentiment-analysis

2. Install dependencies

pip install -r requirements.txt

3. Add Dataset A

Place student-feedback-sentiment-analysis.csv in the root of the project directory.
It is sourced from GoMask.ai Marketplace and is not included in this repo.

4. Add GloVe Embeddings

Download the GloVe file and place it under glove.2024.wikigiga.100d/. Update GLOVE_PATH in the notebook if your path differs. If the file is not found, the CNN will fall back to learning embeddings from scratch.

5. Set up Kaggle credentials

Dataset B is fetched via kagglehub. Make sure your Kaggle API key is configured:

# Place kaggle.json in ~/.kaggle/
# or set environment variables:
export KAGGLE_USERNAME=your_username
export KAGGLE_KEY=your_api_key

6. Run the notebooks

Open and run either notebook top-to-bottom in Jupyter or any compatible environment.

Dependencies

See requirements.txt. Main libraries: TensorFlow 2.x, scikit-learn, pandas, numpy, matplotlib, seaborn, kagglehub.

References

License

MIT

About

Student Feedback Sentiment Analysis for Synthetic and Real-World Dataset Using Multi-Filter CNN and BiLSTM

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors