Giter VIP home page Giter VIP logo

mhrw's Introduction

mhrw

This repository contains code for preprocessing twitter data labeled as straight or gay, and then run a Metropolis-Hastings random walk. Requires:

  • SNAP (snap.stanford.edu)
  • Rochester twitter graph and user list
  • Several python libraries, including networkx and pqdict.

This repo contains the necessary labeled data. To run, clone this repo into the examples directory under snap. Then edit the Makefile with the the location of any python libraries.

You need the following files.

  • 02-2015_master_user_list.json
  • 02-2015_social_graph.json

These are located, for instance, on

  • cycle1.cs.rochester.edu

in

  • /p/twitter4/rochester/02-2015

To build the larger neighborhood graph, type

export DATE=02-2015; make ${DATE}_twitter_graph.pkl

To build the input to the MHRW, type

export DATE=02-2015; make ${DATE}_gaydar_snap.graph

To compile the mhrw, type

make

Here is an example of running the mhrw.

./mhrw -file:gaydar_snap.graph -balance:.5 -flip:0 -num_swaps:100 -grad:2500 -gayweight:10 -labweight:10 -greedy:0

The arguments are explained in mhrw.cpp

mhrw's People

Stargazers

Vince Silenzio avatar

Watchers

James Cloos avatar  avatar Henry Kautz avatar Vince Silenzio 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.