Skip to content

Package to run Stan's pathfinder command using cmdstan as an external program

License

Notifications You must be signed in to change notification settings

StanJulia/StanPathfinder.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StanPathfinder.jl

Project Status Build Status

Purpose

StanPathfinder.jl wraps cmdstan's pathfinder method. It is documented in Zhang, Lu, Bob Carpenter, Andrew Gelman, and Aki Vehtari (2022): “Pathfinder: Parallel Quasi-Newton Variational Inference.” Journal of Machine Learning Research 23 (306): 1–49. See also Stan's cmdstan manual (chapter 6) for details.

An example can be found here and a Pluto notebook example can be found here.

Note: This is an initial implementation. A few changes are to be expected!

Installation

This package is registered, you can install it with

pkg> add StanPathfinder.jl

You need a working cmdstan installation, the path of which you should specify either in CMDSTAN or JULIA_CMDSTAN_HOME, eg in your ~/.julia/config/startup.jl have a line like

# CmdStan setup
ENV["CMDSTAN"] = expanduser("~/src/cmdstan-2.35.0/") # replace with your path

Usage

It is recommended that you start your Julia process with multiple worker processes to take advantage of parallel sampling, eg

julia -p auto

Otherwise, stan_sample will use a single process.

Use this package like this:

using StanPathfinder

See the docstrings (in particular ?StanPathfinder) for more.

About

Package to run Stan's pathfinder command using cmdstan as an external program

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages