All Projects → saurabhmathur96 → Clickbait Detector

saurabhmathur96 / Clickbait Detector

Licence: gpl-3.0
Detects clickbait headlines using deep learning.

Projects that are alternatives of or similar to Clickbait Detector

Fastquant
fastquant — Backtest and optimize your trading strategies with only 3 lines of code!
Stars: ✭ 457 (-2.35%)
Mutual labels:  jupyter-notebook
Neural Turing Machines
Attempt at implementing system described in "Neural Turing Machines." by Graves, Alex, Greg Wayne, and Ivo Danihelka. (http://arxiv.org/abs/1410.5401)
Stars: ✭ 462 (-1.28%)
Mutual labels:  jupyter-notebook
Python3 In One Pic
Learn python3 in one picture.
Stars: ✭ 4,514 (+864.53%)
Mutual labels:  jupyter-notebook
Pba
Efficient Learning of Augmentation Policy Schedules
Stars: ✭ 461 (-1.5%)
Mutual labels:  jupyter-notebook
Instcolorization
Stars: ✭ 461 (-1.5%)
Mutual labels:  jupyter-notebook
Udacity Deep Learning
Udacity Deep Learning MOOC assignments
Stars: ✭ 463 (-1.07%)
Mutual labels:  jupyter-notebook
Hyperparameter Optimization
Implementation of Bayesian Hyperparameter Optimization of Machine Learning Algorithms
Stars: ✭ 457 (-2.35%)
Mutual labels:  jupyter-notebook
Machine Learning A Probabilistic Perspective Solutions
My solutions to Kevin Murphy Machine Learning Book
Stars: ✭ 467 (-0.21%)
Mutual labels:  jupyter-notebook
Timeseries seq2seq
This repo aims to be a useful collection of notebooks/code for understanding and implementing seq2seq neural networks for time series forecasting. Networks are constructed with keras/tensorflow.
Stars: ✭ 462 (-1.28%)
Mutual labels:  jupyter-notebook
Additive Margin Softmax
This is the implementation of paper <Additive Margin Softmax for Face Verification>
Stars: ✭ 464 (-0.85%)
Mutual labels:  jupyter-notebook
Artificial Intelligence For Trading
Content for Udacity's AI in Trading NanoDegree.
Stars: ✭ 459 (-1.92%)
Mutual labels:  jupyter-notebook
Generative Adversarial Network Tutorial
Tutorial on creating your own GAN in Tensorflow
Stars: ✭ 461 (-1.5%)
Mutual labels:  jupyter-notebook
Rl Book
Source codes for the book "Reinforcement Learning: Theory and Python Implementation"
Stars: ✭ 464 (-0.85%)
Mutual labels:  jupyter-notebook
Memeproject
Dank Learning codebase, generate a meme from any image using AI. Uses a modified version of the Show and Tell image captioning network
Stars: ✭ 459 (-1.92%)
Mutual labels:  jupyter-notebook
Interview Questions
机器学习/深度学习/Python/Go语言面试题笔试题(Machine learning Deep Learning Python and Golang Interview Questions)
Stars: ✭ 462 (-1.28%)
Mutual labels:  jupyter-notebook
Automated Feature Engineering
Automated feature engineering in Python with Featuretools
Stars: ✭ 458 (-2.14%)
Mutual labels:  jupyter-notebook
Scene Graph Benchmark.pytorch
A new codebase for popular Scene Graph Generation methods (2020). Visualization & Scene Graph Extraction on custom images/datasets are provided. It's also a PyTorch implementation of paper “Unbiased Scene Graph Generation from Biased Training CVPR 2020”
Stars: ✭ 462 (-1.28%)
Mutual labels:  jupyter-notebook
Tensorflowbook
Stars: ✭ 467 (-0.21%)
Mutual labels:  jupyter-notebook
How to make a text summarizer
This is the code for "How to Make a Text Summarizer - Intro to Deep Learning #10" by Siraj Raval on Youtube
Stars: ✭ 467 (-0.21%)
Mutual labels:  jupyter-notebook
Graph Neural Networks
Stars: ✭ 464 (-0.85%)
Mutual labels:  jupyter-notebook

Clickbait Detector

Detects clickbait headlines using deep learning.

Find the Chrome Extension here ( built by rahulkapoor90 )

The doi for this project is https://doi.org/10.17605/OSF.IO/T3UJ9

Requirements

  • Python 2.7.12
  • Keras 1.2.1
  • Tensorflow 0.12.1
  • Numpy 1.11.1
  • NLTK 3.2.1

Getting Started

  1. Install a virtualenv in the project directory

    virtualenv venv
    
  2. Activate the virtualenv

    • On Windows:

      cd venv/Scripts
      activate
      
    • On Linux

      source venv/bin/activate
      
  3. Install the requirements

     pip install -r requirements.txt
    
  4. Try it out! Try running one of the examples.

Accuracy

Training Accuracy after 25 epochs = 93.8 % (loss = 0.1484)

Validation Accuracy after 25 epochs = 90.15 % (loss = 0.2670)

Examples

$ python src/detect.py "Novak Djokovic stunned as Australian Open title defence ends against Denis Istomin"
Using TensorFlow backend.
headline is 0.33 % clickbaity
$ python src/detect.py "Just 22 Cute Animal Pictures You Need Right Now"
Using TensorFlow backend.
headline is 85.38 % clickbaity
$ python src/detect.py " 15 Beautifully Created Doors You Need To See Before You Die. The One In Soho Blew Me Away"
Using TensorFlow backend.
headline is 52.29 % clickbaity
$ python src/detect.py "French presidential candidate Emmanuel Macrons anti-system angle is a sham | Philippe Marlire"
Using TensorFlow backend.
headline is 0.05 % clickbaity

Model Summary

____________________________________________________________________________________________________
Layer (type)                     Output Shape          Param #     Connected to                     
====================================================================================================
embedding_1 (Embedding)          (None, 20, 30)        195000      embedding_input_1[0][0]          
____________________________________________________________________________________________________
convolution1d_1 (Convolution1D)  (None, 19, 32)        1952        embedding_1[0][0]                
____________________________________________________________________________________________________
batchnormalization_1 (BatchNorma (None, 19, 32)        128         convolution1d_1[0][0]            
____________________________________________________________________________________________________
activation_1 (Activation)        (None, 19, 32)        0           batchnormalization_1[0][0]       
____________________________________________________________________________________________________
convolution1d_2 (Convolution1D)  (None, 18, 32)        2080        activation_1[0][0]               
____________________________________________________________________________________________________
batchnormalization_2 (BatchNorma (None, 18, 32)        128         convolution1d_2[0][0]            
____________________________________________________________________________________________________
activation_2 (Activation)        (None, 18, 32)        0           batchnormalization_2[0][0]       
____________________________________________________________________________________________________
convolution1d_3 (Convolution1D)  (None, 17, 32)        2080        activation_2[0][0]               
____________________________________________________________________________________________________
batchnormalization_3 (BatchNorma (None, 17, 32)        128         convolution1d_3[0][0]            
____________________________________________________________________________________________________
activation_3 (Activation)        (None, 17, 32)        0           batchnormalization_3[0][0]       
____________________________________________________________________________________________________
maxpooling1d_1 (MaxPooling1D)    (None, 1, 32)         0           activation_3[0][0]               
____________________________________________________________________________________________________
flatten_1 (Flatten)              (None, 32)            0           maxpooling1d_1[0][0]             
____________________________________________________________________________________________________
dense_1 (Dense)                  (None, 1)             33          flatten_1[0][0]                  
____________________________________________________________________________________________________
batchnormalization_4 (BatchNorma (None, 1)             4           dense_1[0][0]                    
____________________________________________________________________________________________________
activation_4 (Activation)        (None, 1)             0           batchnormalization_4[0][0]       
====================================================================================================
Total params: 201,533
Trainable params: 201,339
Non-trainable params: 194
____________________________________________________________________________________________________

Data

The dataset consists of about 12,000 headlines half of which are clickbait. The clickbait headlines were fetched from BuzzFeed, NewsWeek, The Times of India and, The Huffington Post. The genuine/non-clickbait headlines were fetched from The Hindu, The Guardian, The Economist, TechCrunch, The wall street journal, National Geographic and, The Indian Express.

Some of the data was from peterldowns's clickbait-classifier repository

Pretrained Embeddings

I used Stanford's Glove Pretrained Embeddings PCA-ed to 30 dimensions. This sped up the training.

Improving accuracy

To improve Accuracy,

  • Increase Embedding layer dimension (Currently it is 30) - src/preprocess_embeddings.py
  • Use more data
  • Increase vocabulary size - src/preprocess_text.py
  • Increase maximum sequence length - src/train.py
  • Do better data cleaning
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].