Git Product home page Git Product logo

vishwapardeshi / text_classification_us_presidential_nominees_2020 Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 900 KB

Supervised and semi-supervised text classification of quotes from Democratic Presidential Nominee for US 2020. Used Regularized Logistic Regression, XGBoost, Random Forest

License: MIT License

Jupyter Notebook 91.33% Python 8.67%
nlp nltk python lasso lasso-regression xgboost random-forest

text_classification_us_presidential_nominees_2020's Introduction

Which US Democratic Presidential Nominee said this? Warren? Biden? Sanders?

Text Classification of quotes from candidates vying to be the Democratic presidential nominee for the 2020 US presidential election.

Here, all data has been extracted from debates between candidates. I have built a NLP classification model to identify who said what for a subset of unlabeled data.

Methodology

The quotes are subjected to basic text-preprocessing steps such as

  1. Stopword removal

  2. Punctuation removal

  3. Lemmatization

  4. Tokenization using unigram

To prepare data for modeling, I performed feature engineering. Here, I engineered features which utilize count of various components of the text such as character, word, punctuation etc.

The text classification is done using Supervised & Semi-Supervised techniques. The following models were explored:

  1. Regularized Logistic Regression

  2. Random Forest

  3. XGBoost

Tools & Technology

1. NLP: nltk, TfidfVectorizer, CountVectorizer
2. ML: sklearn, xgboost, scipy
3. Visualization: Seaborn, Matplotlib
4. Exploration: Jupyter Notebooks

text_classification_us_presidential_nominees_2020's People

Contributors

vishwapardeshi avatar

Stargazers

 avatar

Watchers

 avatar

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.