Giter VIP home page Giter VIP logo

nogibjj / sentiment-prediction-project Goto Github PK

View Code? Open in Web Editor NEW
1.0 4.0 1.0 2.22 MB

This project focuses on sentiment analysis, employing two distinct methodologies for enhanced accuracy and insight: a Naive Bayes Classifier and a neural network model. This dual-approach aims to harness the strengths of both machine learning techniques to provide a comprehensive analysis of sentiment in textual data.

License: MIT License

Dockerfile 2.26% Python 97.74%

sentiment-prediction-project's Introduction

CI

Individual Project IV - A publicly accessible auto-scaling container using Azure App Services and Flask.

Project Scope

As digital platforms burgeon with user-generated content, the ability to gauge public sentiment through this data has become invaluable for businesses and researchers alike. Sentiment analysis, a cornerstone of Natural Language Processing (NLP), seeks to systematically identify, extract, and quantify the affective states and subjective information embedded within text data. Despite its potential, sentiment analysis poses inherent challenges, such as detecting nuances, sarcasm, and context-specific meanings, which often elude traditional analytical tools.

This project contributes to the field by developing a sophisticated sentiment classification system trained on an extensive corpus of Amazon user reviews. The focus is to discern positive and negative sentiments, thereby providing granular insights into consumer opinions. In aligning with ethical data use, the acquisition of the 20,000-user review dataset was conducted in strict adherence to the platform's terms of service, ensuring respect for user privacy.

The project employed two distinct models for sentiment classification:

  • Naive Bayes Classifier: Renowned for its simplicity and efficiency in text classification, this generative model assumes the independence of features and is computationally expedient.
  • Neural Network: Selected for its prowess in discerning intricate patterns, this discriminative model comprised an input layer, two hidden layers with 64 nodes each employing ReLU activation functions, and a sigmoid output layer to achieve binary classification.

Project Deliverables:

A Flask API That serves as the user entry point to the application. => Python myapp/api/sentiment_predictor.py

The project employed two distinct models for sentiment classification: • Naive Bayes Classifier: Renowned for its simplicity and efficiency in text classification, this generative model assumes the independence of features and is computationally expedient. • Neural Network: Selected for its prowess in discerning intricate patterns, this discriminative model comprised an input layer, two hidden layers with 64 nodes each employing ReLU activation functions, and a sigmoid output layer to achieve binary classification.

ingest

When subjected to real-world user input (as shown above), the Neural Network model maintained a near-perfect precision in its predictions. This high level of accuracy in identifying both positive and negative sentiments reflects the robustness of the model, which was initially indicated by the training results. The consistency in performance from training to practical application underscores the model's capability to generalize well and handle the intricacies of user-generated content effectively.

ingesta

Upon evaluation with real-world user input, the Naive Bayes model exhibited a decline in precision for the negative class (as shown above), echoing the tendencies observed earlier in the training phase. This disparity in performance, particularly for the negative sentiments, underlines the model's challenges in accurately classifying more nuanced expressions of dissatisfaction or criticism, as previously demonstrated by the training results.

Model Training Pipeline

ingest

ingestat

Project Architecture

ingestata

Youtube Link

Click Here

sentiment-prediction-project's People

Contributors

ofosu-osei avatar

Stargazers

 avatar

Watchers

Noah Gift avatar  avatar Kostas Georgiou avatar  avatar

Forkers

evinai

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.