Fast, modular, and extensible permutation-based statistical inference for neuroimaging.
Prism is a Python library for running fast, scalable, and fully nonparametric statistical analyses on brain imaging data. It replicates much of the core functionality of Anderson Winkler’s PALM, but without MATLAB dependencies.
import numpy as np
from prism.datasets import Dataset
Y = np.random.randn(100, 50) # Brain data (samples x voxels)
X = np.random.randn(100, 2) # Design matrix
C = np.array([1, -1]) # Contrast
dataset = Dataset(
data=Y,
design=X,
contrast=C,
output_prefix="prism_example",
n_permutations=1000
)
results = dataset.permutation_analysis()
Prism is released under the MIT License.