Skip to main content

sanssouci.python

General presentation

Post hoc inference via multiple testing

This projet implements post hoc inference-based methods based for neuroimaging and genomics. See also the R package sanssouci for an implementation in R.

Permutation-based confidence envelopes

A typical output for fMRI data (Localizer data set, left vs right click) is shown below:

Confidence envelopes

The left plot displays an upper confidence envelope on the False Discovery Proportion among the most significant voxels. The right plot displays a lower confidence envelope on the number of True Postives among the most significant voxels. See the Script to reproduce this plot.

Test the package on synthetic data

Here is a simple code you can use to test and get familiar with the sanssouci package. Other examples are given in the examples directory.

import sanssouci as sa
import numpy as np



#1) generate phantom data
p = 130
n = 45


X=np.random.randn(n,p)  #NOTE: no signal!! we expect trivial bounds
categ=np.random.binomial(1, 0.4, size=n)


#2) test the algorithm
B = 100
pval0=sa.get_permuted_p_values(X, categ, B=B , row_test_fun=sa.row_welch_tests)

piv_stat=sa.get_pivotal_stats(pval0)


#3) Compute Bounds

alpha=0.1

lambda_quant=np.quantile(piv_stat, alpha)
thr=sa.linear_template(lambda_quant, p, p)
swt=sa.row_welch_tests(X, categ)
p_values=swt['p_value'][:]
pvals=p_values[:10]

bound = sa.max_fp(pvals, thr)
print(bound)

Metadata

Release files for sanssouci 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sanssouci 0.1.5
File Size Uploaded
sanssouci-0.1.5.tar.gz 24.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sanssouci 0.1.5
File Interpreter ABI Platform
sanssouci-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 47.8 kB

Release files / sanssouci-0.1.5.tar.gz

Download URL sanssouci-0.1.5.tar.gz
Size 24.9 kB
Tags Source
SHA-256 checksum
How to use checksums
fb289a2587eef615b46ed23fdcc5a1b208a1874e2fc1a372287177d2c99f5139
BLAKE2b-256 checksum
How to use checksums
ec04297636f894d16b67986ad7aaee1e810473c9cfa9c4b52c036cd5251714e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / sanssouci-0.1.5-py3-none-any.whl

Download URL sanssouci-0.1.5-py3-none-any.whl
Size 22.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5abbf748c1a76cb5a1a04ffcc70f4c4e7cf6f2a34eafc5aa3cbf5945e0a7eeb0
BLAKE2b-256 checksum
How to use checksums
b553944fef9a90b2d03ba097c63385aea3618b1343a434ff761413ad0381b5e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

1 release file

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page