Skip to content

SpiNNakerManchester/MarkovChainMonteCarlo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1921ccb · Jun 11, 2024
Jun 6, 2024
Jun 6, 2024
Jun 11, 2024
Jun 10, 2024
Jun 6, 2024
Jun 6, 2024
Jul 18, 2023
Feb 14, 2020
Jun 20, 2023
Feb 20, 2023
Jun 6, 2024
Jun 6, 2024
Jun 6, 2024

Repository files navigation

Python Build Status C Build Status

Markov Chain Monte Carlo Simulations On SpiNNaker

This project contains code for running MCMC Simulations on SpiNNaker. This has been made general, to allow users to add their own MCMC models by providing a few simple components.

Adding your own model

C code

  1. Create a C header file containing:

    • A structure called struct mcmc_params which contains every fixed parameter that you require.
    • A structure called struct mcmc_state which contains each state variable that changes during the execution that you require.

    An example can be seen in c_models/mcmc_models/examples/lighthouse/lighthouse.h

  2. Create a C source file containing and implementation of each of the functions in c_models/mcmc_models/mcmc_model.h

    An example can be seen in c_models/mcmc_models/examples/lighthouse/lighthouse.c

  3. Create a Makefile for your C code, which includes your source file. Call make to build your code.

    An example can be seen in c_models/mcmc_models/examples/lighthouse/Makefile

  4. Create a Python file containing a class which extends mcmc.mcmc_model.MCMCModel and implement each of the abstract methods therein.

    An example can be seen in mcmc_examples/lighthouse/lighthouse_model.py

  5. Create a Python script for your example, which calls mcmc.mcmc_framework.run_mcmc. This returns the results of the simulation.

    An example can be seen in mcmc_examples/lighthouse/lighthouse.py

About

Markov Chain Monte Carlo Simulations on SpiNNaker

Resources

Stars

Watchers

Forks

Packages

No packages published