Code Monkey home page Code Monkey logo

drra's Introduction

DRRA

Data representation and reduction analysis

Copyright ©VUB - Data representation and reduction analysis course 2017.

Authors:

  • Ahmed K. A Abdullah @github/antemooo.
  • Rencong Tang @github/rencongtang.

An example to data clustering.

The data will be clustered into 9 clusters through kmeans algorithm.

**The example is written and tested with Python 3.6.4 && Python 3.5.2 **



To setup the dependencies:


pip3 install -r requirements.txt

OR

pip install -r requirements.txt



main.py


A full example is established.

Needs to use other python files: csv_helper.py, consensus_matrix.py, WordsFrequency.py, cluster.py, clean_tweet.py

A well explained example of how to obtain get the cluster files by using the original data To run the code:

python3 main.py

The script will produce 3 .txt files:

  • name+ cluster1.csv to cluster9.csv: contains the tweets which have been clustered into 9 clusters, the name corresponds to .

  • kmeans_edge: contains all the kmeans edges information for the further use

  • kmeans_nodes: contains all the kmeans nodes information for the further use

  • DBSCAN_edge: contains all the DBSCAN edges information for the further use

  • DBSCAN_nodes: contains all the DBSCAN nodes information for the further use


csv_helper.py


A class contains the basic method needed to get the tweets in the .csv file.


load_csv:

  • get the information in .csv file tweet by tweet

load_csv2:

  • get the information in .csv file word by word

consensus_matrix.py


A simple script that contains different method to calculate the kmenas consensus matrix

The script itself is well documented and each method has a comment explaining the functionality.


WordsFrequency.py


A simple script that contains different method to calculate the the most frequency words in each cluster

The script itself is well documented and each method has a comment explaining the functionality.


cluster.py


A simple script that contains different method to generate different files

The script itself is well documented and each method has a comment explaining the functionality.

drra's People

Contributors

antemooo avatar rencongtang 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.