The t-walk software
J.
Andres Christen and Colin Fox
CIMAT, Mexico,
and U. of Otago, New Zealand.
The t-walk is a "A General Purpose Sampling Algorithm for Continuous Distributions"
to sample from many objective functions (specially suited for
posterior distributions using non-standard models that would make the
use of common algorithms and software difficult); it is an MCMC that does not required tuning. However,
as mentioned in the paper, it may not perform well in some examples and
fine tuned samplers to specific objective densities should perform
better than the t-walk.
It is now implemented in Python, R, C++, C (NEW!) and MatLab, see below.
The paper is now published:The R version is now a standard R package. A small bugg was fund by Edmund Zelnio (Wright State University) were pphi should be defined as pphi=min( dim, 4)/dim, thanks! This is only relevant for examples were the dimension is > 4. The bugg does not exist in the Python and C++ versions. Please download this new version.
The Python version
is also a standard Python package. It is "pure"
Python, therefore is platform independent. It requires the ScyPy
package and, optionally, the PyLab package as well for some basic
plotting methods. Download the
ziped file and follow the README instructions within.
NEW! My students Diego Andrés Pérez and Mario Santana found a small mistake in the calculation of the
IAT in the Python version. Now this is corrected in the pytwalk version 1.2.
The C++ implementation has only been compiled in Linux and Mac OS, but most likely will compile in many other Unix flavor OS's. It requires the GNU scientific library, gsl. Download the ziped file and follow the README instructions within. Tony Begg found two small buggs, which are corrected in this new version.
NEW! Tony Begg has done a very handy, stand alone (does not require the gsl or any other special library), single file, Open Source, pure C version of the t-walk!
R: R source package Rtwalk_1.5.1.tar.gz In UNIX, including Mac, do
% sudo R CMD INSTALL Rtwalk_1.5.1.tar.gz
For Windows insatall (Packages->Local ...) the package: Rtwalk_1.5.1.zip
Include it with
> rm(list=ls(all=TRUE))
> library(Rtwalk) ## and follow the online help:
> help(Rtwalk) ## or with help.start() and look for the Rtwalk package in your browser
Also see the examples.R for more help.
MatLab: The twalk is not here available in MatLab, please ask Colin.
C++: cpptwalk.tar.gz
C: Ctwalk.tar.gz See the main() function for an example.
If you have any troubles or comments please contact (me) Andres <jac at cimat dot mx> for the Python, R and C++ versions and Colin <fox at physics dot otago dot ac dot nz> for the MatLab version and Tony Begg <Tony.Begg at dataventures dot com> for the C example.