Giter VIP home page Giter VIP logo

mixmc's Introduction

Learning Mixtures of Continuous-Time Markov Chains

This repository contains code to learn mixtures of continuous-time (and discrete-time) Markov chains using methods. Our method is split into three steps:

  1. Discretization
  2. Soft-Clustering: We use methods from learning discrete-time Markov chains
    • Discrete-Time EM
    • SVD (Gupta et al., Spaeh and Tsourakakis)
    • Spectral Clustering (Kausik et al.)
  3. Recovery

Additionally, we provide code for continuous-time EM.

Methods are split into the representation of discrete and continuous-time mixtures (dtmixtures.py, ctmixtures.py) and learning of discrete and continuous-time mixtures (dtlearn.py, ctlearn.py). The code for experiments is in experiments.py.

Running the Code

Enter the Anaconda environment:

conda activate std_env

Compile cython:

python setup.py build_ext --inplace

We can run a small example using

python run.py

which places a figure under plots. All results are cached in the cache folder. Empty the folder to re-run experiments.

Preparing the Real-World Datasets

In order to experiment with the NBA data from Second Spectrum, put passes.csv and player_ssid.csv in the NBA folder and run NBA/extract.py.

The LastFM data is available under http://millionsongdataset.com/lastfm/#desc Unzip lastfm-dataset-1K.tar.gz in the folder LastFM.

Reproducing the Experiments

Code for plots produced in the paper are in the notebook main.ipynb

mixmc's People

Contributors

285714 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.