Giter Site home page Giter Site logo

mrmorgan17 / fakenews Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 22 KB

Fake News project for the Kaggle competition: "Fake News". While the competition is closed, my best submissions for this competition currently place me 1st on the public leaderboard with an accuracy score of .99038 and 2nd on the private leaderboard with an accuracy score of .98571.

Home Page: https://www.kaggle.com/c/fake-news

Python 6.73% R 93.27%
r wactor nlp text-analysis xgboost

fakenews's Introduction

FakeNews

This repository includes exploratory analysis and predictive modeling for the Fake News Kaggle competition. All code was done using the R programming language.

The .R file MM_FakeNewsCleaning.R includes my code and output for the methodology of feature selection, model building, and model tuning for the competiton.

A notebook was created on Kaggle for this competition as well and can be found here.

The goal of this competition was to use two datasets, a training dataset with information on 20,800 articles and a testing dataset, and a test dataset with information on 5,200 articles (26,000 articles total). Each of the 20,800 articles in the training dataset is labeled as either reliable or unreliable (fake news). The goal of this competition is to use the training data to build a model that can accurately label all 5,200 articles in the testing dataset as reliable or unreliable.

The best model that was fit to the data was an xgboost model. Models were fit using the xgboost R package. Term Frequency–Inverse Document Frequency matrices were also used in this analysis. This competiton used accuracy as the defining metric to compare submissions to each other. While the competition closed approximately 3 years ago, privately, the best logloss score achieved from an xgboost model was .98571 which would place 2nd on the Kaggle leaderboard for this competition.

I'd especially like to acknowledge Michael W. Kearney whose notebook, Opinion/news classifier for predicting fake news, was used as a reference and template for the much of my code. He is one of the creators of the wactor package that I used for this analysis and he does great work with many text-based analyses.

fakenews's People

Contributors

mrmorgan17 avatar darrenmcewan avatar nhphillips5 avatar

Watchers

 avatar  avatar

Forkers

kakamband

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.