Table Of Contents

Previous topic

neurospin.group.permutation_test

Next topic

neurospin.neuro.affine_registration

This Page

neurospin.group.spatial_relaxation_onesample

Module: neurospin.group.spatial_relaxation_onesample

Inheritance diagram for nipy.neurospin.group.spatial_relaxation_onesample:

Class

multivariate_stat

class nipy.neurospin.group.spatial_relaxation_onesample.multivariate_stat(data, vardata=None, XYZ=None, std=None, sigma=None, labels=None, network=None, v_shape=0.001, v_scale=0.001, std_shape=0.001, std_scale=0.001, m_mean_rate=0.001, m_var_shape=0.001, m_var_scale=0.001, disp_mask=None, labels_prior=None, label_values=None, labels_prior_mask=None)
__init__(data, vardata=None, XYZ=None, std=None, sigma=None, labels=None, network=None, v_shape=0.001, v_scale=0.001, std_shape=0.001, std_scale=0.001, m_mean_rate=0.001, m_var_shape=0.001, m_var_scale=0.001, disp_mask=None, labels_prior=None, label_values=None, labels_prior_mask=None)

Multivariate modeling of fMRI group data accounting for spatial uncertainty In: data (n,p) estimated effects

vardata (n,p) variances of estimated effects XYZ (3,p) voxel coordinates std <float> Initial guess for standard deviate of spatial displacements sigma <float> regularity of displacement field labels (p,) labels defining regions of interest network (N,) binary region labels (1 for active, 0 for inactive) v_shape <float> intensity variance prior shape v_scale <float> intensity variance prior scale std_shape <float> spatial standard error prior shape std_scale <float> spatial standard error prior scale m_mean_rate <float> mean effect prior rate m_var_shape <float> effect variance prior shape m_var_scale <float> effect variance prior scale disp_mask (q,) mask of the brain, to limit displacements labels_prior (M,r) prior on voxelwise region membership labels_prior_values (M,r) voxelwise label values where prior is defined labels_prior_mask (r,) Mask of voxels where a label prior is defined
compute_log_likelihood_regionwise(verbose=False, J=None)
compute_log_posterior(v=None, m_mean=None, m_var=None, std=None)
compute upper bound on log posterior density of model parameters. assuming posterior distribution of hidden variables has been sampled by the ‘evaluate’ method in ‘saem’ mode.
compute_log_prior(v=None, m_mean=None, m_var=None, std=None)
compute log prior density of model parameters, spatial uncertainty excepted, assuming hidden variables have been initialized
evaluate(nsimu=1000.0, burnin=100.0, J=None, verbose=False, proposal='prior', proposal_std=None, proposal_mean=None, compute_post_mean=False, mode='saem', update_spatial=True)

Sample posterior distribution of model parameters, or compute their MAP estimator In: nsimu <int> Number of samples drawn from posterior mean distribution

burnin <int> Number of discarded burn-in samples J (N,) voxel indices where successive mean values are stored verbose <bool> Print some infos during the sampling process proposal <str> ‘prior’, ‘rand_walk’ or ‘fixed’ proposal_mean <float> Used for fixed proposal only proposal_std <float> Used for random walk or fixed proposal mode <str> if mode=’saem’, compute MAP estimates of model parameters.

if mode=’mcmc’, sample their posterior distribution

update_spatial <bool> when False, enables sampling conditional on spatial parameters

Out: self.v_values (nsimu+burnin) successive population variance values
self.m_values (N, nsimu+burnin) successive mean values (if J is not empty)
if self.labels_prior is not empty:
self.labels_post (M,r) posterior distribution of region labels
if self.std is not empty:
self.std_values (nsimu+burnin,) successive spatial standard deviate values
if compute_post_mean is True:
self.mean_m (p,) posterior average of mean effect self.var_m (p,) posterior variance of mean effect
if self.std is not empty and compute_post_mean is True:
self.r (n, nblocks) mean rejection rate for each displacement field self.mean_U (3, n, nblocks) posterior average of displacement weights self.var_U (3, n, nblocks) posterior marginal variances of displacement weights
init_hidden_variables(mode='saem', init_spatial=True)
update_block(i, b, proposal='prior', proposal_std=None, proposal_mean=None, verbose=False)
update_displacements()
update_effects()
update_labels()
update_mean_effect()
update_parameters_mcmc(update_spatial=True)
update_parameters_saem(update_spatial=True)
update_summary_statistics(w, update_spatial=True)

Functions

nipy.neurospin.group.spatial_relaxation_onesample.log_gammainv_pdf(x, a, b)
log density of the inverse gamma distribution with shape a and scale b, at point x, using Stirling’s approximation for a > 100
nipy.neurospin.group.spatial_relaxation_onesample.log_gaussian_pdf(x, m, v)
log density of the gaussian distribution with mean m and variance v at point x