McNeuron: A Python Package for Sampling Neuron Morphology
McNeuron is a 'more of this' algorithm for sampling morphologies. Specifically, it is based on Markov chain Monte Carlo methods for generating morphologies. By iterating changes, the chain becomes closer and closer to the generative distribution until it samples from a meaningful distribution. The advantage of our approach is that it generates morphologies based on a dataset of neurons, compared to other generative models which we can only optimize a small number of generator parameters. In this setup by adding more features or generally by making the generative model better, the resulting morphologies gradually become more realistic.
Reversible-jump Markov Chain Monte Carlo (RJMCMC):
RJMCMA is the core of sampling in McNeuron. McNeuron first extracts all the desired features from a database of neuron and builds a generative model using na{"i}ve Bayes assumption. Then by starting from a simple neuron (e.g. a neuron with soma only) and perturbing it using Reversible-jump Markov Chain Monte Carlo in each iteration, gradually enriches the morphology with the desired features.
Installation and Usage:
Clone the repository.
$ git clone https://github.com/BonsaiNet/McNeuron.gitTo use the algorithm go to
https://github.com/BonsaiNet/McNeuron/blob/master/Generating%20Neurons%20with%20MCMC.ipynb
and follow the notebook.
Dependencies:
Reference:
The preprint (not peer-reviewed) is available at Farhoodi, Roozbeh, and Konrad P. Kording. "Sampling Neuron Morphologies." bioRxiv (2018): 248385.
Contact: Roozbeh Farhoodi [roozbehfarhoodi@gmail.com]
