/NLP-Sentiment-Analysis

NLP Sentiment Analysis using a small dataset for study purpose

Primary LanguageJupyter NotebookMIT LicenseMIT

NLP Analysis Sentiment

Sentiment Analysis using three different frameworks: Scikit-Learn, Keras, and PyTorch. Also, I use MLFlow for tracking model performance for different experiments.

Notebooks

All the code are in the Jupyter Notebooks:

  1. Download the data → 00_Data.ipynb
  2. Scikit-Learning approach → 01_ScikitLearn.ipynb
  3. TensorFlow / Keras approach → 02_TensorFlow.ipynb
  4. PyTorch approach → 03_PyTorch.ipynb

Python Dependencies

Choose one option below, 1 or 2.

NOTE: I put all packages into a one environment, and it is not the best thing to do because of the dependencies of TensorFlow and PyTorch.

1. Poetry

# project root
$ poetry install  # you need to have poetry installed

2. Virtualenv

$ python -m venv .venv
$ source .venv/bin/activate  # Unix
$ pip install -r requirements.txt

MLFLow Tracking Server (Local)

For running a MLFlow tracking server locally, execute:

$ mlflow server --host 127.0.0.1 --port 8080

You can access the MLFlow server on http://127.0.0.1:8080

Final Results

After running the experiments present on the notebooks:

Results in the UI MLFlow


🚀 Created by brenoAV