Giter Site home page Giter Site logo

marija-iloska / topology-gibbs-samplers Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 10 KB

Graphical network and topology estimation for autoregressive models using Gibbs sampling

Home Page: https://www.sciencedirect.com/science/article/abs/pii/S0165168421003406

MATLAB 100.00%

topology-gibbs-samplers's Introduction

Graphical Network and Topology Estimation for Autoregressive Models using Gibbs Sampling

Gibbs Sampling

A Gibbs sampler is a Markov chain Monte Carlo (MCMC) method which iteratively samples a parameter from its posterior conditional on the last obtained samples of the rest of the parameters in the model. Here, we propose several strategies based on Gibbs sampling to estimate the network and topology of a 1st order VAR model.

Specifically, we developed the following Gibbs-based algorithms:

  1. Element Gibbs Sampler (and reversed)
  2. Matrix Gibbs Sampler (and reversed)
  3. Element Blocked Gibbs Sampler (and reversed)
  4. Point Estimate Gibbs samplers (Maximum Likelihood and Maximum A Posteriori)

The element samplers refer to sampling the network and topologies element by element, and respectively the matrix ones as a whole. The term "reversed" refers to the order of sampling of the topology and the network, which in some cases is not equivalent.

Synthetic Data

Thorough experiments based on priors, data size, and system size, as well as comparing to LASSO - a standard regularization approach are carried out.

Real Data - Financial network

We applied the best Gibbs sampler and LASSO to data of 27 influential stock market indices on a time-series of about 30 data points, and 20 were reserved for prediction.

For details, please refer to the following link.

Code

  1. Sampling.m - the main script which generates data to user settings and runs all the samplers.
  2. generate_mat.m - generates VAR data according to user settings.
  3. adj_eval.m - computes F-score of the topology estimate
  4. RE_gibbs.m - Element Gibbs Sampler
  5. REr_gibbs.m - Element Gibbs Sampler reversed
  6. RM_gibbs.m - Matrix Gibbs Sampler
  7. RMr_gibbs.m - Matrix Gibbs Sampler reversed
  8. JM_gibbs.m - Element Blocked Gibbs Sampler
  9. JE_gibbs.m - Element Blocked Gibbs Sampler reversed
  10. PE_gibbs.m - Point Estimate Gibbs Samplers (choice of ML or MAP)

topology-gibbs-samplers's People

Contributors

marija-iloska avatar

Watchers

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