GithubHelp home page GithubHelp logo

gitmarco19 / classificazionetweet Goto Github PK

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

Machine learning algorithm which predicts which tweets are about real disasters and which ones are not.

Python 100.00%
machine-learning prediction tweets

classificazionetweet's Introduction

Tweet classification

Authors: Marco Scanu and Luca Mirenda

Description

Twitter has become an important communication channel in times of emergency.
The ubiquitousness of smartphones enables people to announce an emergency they’re observing in real-time. Because of this, more agencies are interested in programatically monitoring Twitter (i.e. disaster relief organizations and news agencies).

Objective

The objective of this project is to predict which tweets are about real disasters and which ones are not.

Files

pulisciParole.py

This file takes as input the files train.csv and test.csv. It cleans all tweets from unuseful tags, emojis, URL and all kinds of like stuff which could create some problems to classify correctly the tweets. Finally, as output, it produces new clean files named train_cleaned.csv and test_cleaned.csv.

findModello.py

This file takes train_cleaned.csv and test_cleaned.csv in input.
It makes a comparison between some classification models by doing the cross validation and computing the score for each model. At the end, in order to perform the classification of the tweets as well as possible, the model with the highest score has been chosen.

SVC_formula.py

This file implements the SVC model by using the mathematical formulas of the Support Vector Machine.
Since in the file findModello.py has been found that the best model is the SVM, I developed the SVM model from scratch in order to see if was possible to reach better predictions than ones obteined using the algorithm implemented in the libraries.

File directory

In this directory there are:

  • train.csv: tweets train set.
  • test.csv: tweets test set.
  • train_cleaned.csv: it is the train set which will be used to train the model. It comes from the clean of the file train.csv used in input of "pulisciParole.py";
  • test_cleaned.csv: it is the test set which will be used to test the model. It comes from the clean of the file test.csv used in input of "pulisciParole.py"
  • sample_submission.csv: file which will be used to make the real submission file.

classificazionetweet's People

Contributors

gitmarco19 avatar

Watchers

 avatar

Forkers

mirwe

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.