Giter Club home page Giter Club logo

news-classifier-and-recommender's Introduction

News Classifier & Recommender

This project shows 2 Jupyter Notebooks: (1) that builds a neural network model (Bidirectional LSTM) classifying the news into its correct category and (2) that leverages the classification and subsequently recommends a similar list of news. The project used Kaggle's News Category Dataset, so feel free to explore my work that follows as well as other notebooks from Kaggle. The repository is also served as a hub of different deployment techniques using FastAPI and Unicorn: (1) manual input and (2) upload file

  • news_classifier.ipynb: for a larger volume of text needed to train the model, the notebook combined "headline" and "description" data to build the vocabulary. Then I used TextVectorization (tensorflow.keras) to create a vectorizer that helps process the text input and acts as the first layer in the neural network model. Word Embedding is also leveraged as the 2nd layer to pad the sequences of data to those of equal length for Bidrectional LSTM to be able to learn. The model achieved quite a low accuracy of 75%, which can be optimized given more text data is available for use.
  • news-recommender.ipynb: this notebook establishes the connection with the classifider model which defines functions that calculates the euclidean similarity distance between the prediction text and the existing database. TfidfVectorizer is used in these functions as a baseline for computation.
  • production_html.py: this file acts as a deployment document using Flask with HTML templates to input the news on the server and make predictions.

Requirements

  • pandas
  • numpy
  • matplotlib
  • seaborn
  • sklearn
  • tensorflow
  • flask

news-classifier-and-recommender's People

Contributors

andrewnguyen07 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.