psp, parameter space partitioning psp, parameter space partitioning

psp-torch#

Parameter space partitioning MCMC for global model evaluation (Pitt, Kim, Navarro & Myung, 2006), in PyTorch, built to evaluate a model on many parameter sets at once, on the CPU or the GPU, and to support the kind of analyses of Dome & Wills (2025).

Parameter space partitioning asks what a model can do: which qualitatively different patterns of behaviour it produces anywhere in its parameter space, and how much of the space each pattern occupies. psp-torch finds those regions with a Markov chain Monte Carlo search, and psp.clobe compares them with the patterns people produce.

Three cubes of three parameters each, filled with points coloured by the region they fall in.

Three parameter spaces, partitioned. Each point is a parameter set the search evaluated, coloured by the ordinal pattern it produced.#

pip install git+https://github.com/lenarddome/psp-torch
Getting started

Install the package and run a first partition of a two-parameter model.

Getting started
User guide

The interface of psp.PSP(), many runs at once, models written for one parameter set, and when the GPU pays off.

User guide
Tutorials

What can prospect theory predict? And the analysis of Pitt et al. (2006) on ALCOVE.

Tutorials
Comparing models with people

Inequality matrices, the universal set and g-distance with psp.clobe.

Comparing models with people
Benchmarks

The port against the R package, and when the GPU is worth using.

Benchmarks
API reference

Every public function and class, from its docstring.

API reference

Citation#

If you use psp-torch, please cite the paper the methods were written for:

Dome, L., & Wills, A. J. (2025). g-Distance: On the comparison of model and human heterogeneity. Psychological Review, 132(3), 632–655. https://doi.org/10.1037/rev0000550

Pitt, M. A., Kim, W., Navarro, D. J., & Myung, J. I. (2006). Global model analysis by parameter space partitioning. Psychological Review, 113(1), 57–83. https://doi.org/10.1037/0033-295X.113.1.57