mvpa2.measures.nnsearchlight.sphere_m1nnsearchlight

mvpa2.measures.nnsearchlight.sphere_m1nnsearchlight(gnb, generator, radius=1, center_ids=None, space='voxel_indices', *args, **kwargs)

Creates a M1NNSearchlight to assess cross-validation classification performance of M1NN on all possible spheres of a certain size within a dataset.

The idea of taking advantage of naiveness of M1NN for the sake of quick searchlight-ing stems from Francisco Pereira (paper under review).

Parameters:

radius : float

All features within this radius around the center will be part of a sphere.

center_ids : list of int

List of feature ids (not coordinates) the shall serve as sphere centers. By default all features will be used (it is passed roi_ids argument for Searchlight).

space : str

Name of a feature attribute of the input dataset that defines the spatial coordinates of all features.

knn : kNN

Used to fetch space and dfx settings. TODO

generator : Generator

Some Generator to prepare partitions for cross-validation.

qe : QueryEngine

Query engine which would provide neighborhood information

errorfx : func, optional

Functor that computes a scalar error value from the vectors of desired and predicted values (e.g. subclass of ErrorFunction).

indexsum : (‘sparse’, ‘fancy’), optional

What use to compute sums over arbitrary columns. ‘fancy’ corresponds to regular fancy indexing over columns, whenever in ‘sparse’, product of sparse matrices is used (usually faster, so is default if scipy is available).

reuse_neighbors : bool, optional

Compute neighbors information only once, thus allowing for efficient reuse on subsequent calls where dataset’s feature attributes remain the same (e.g. during permutation testing)

enable_ca : None or list of str

Names of the conditional attributes which should be enabled in addition to the default ones

disable_ca : None or list of str

Names of the conditional attributes which should be disabled

queryengine : QueryEngine

Engine to use to discover the “neighborhood” of each feature. See QueryEngine.

null_dist : instance of distribution estimator

The estimated distribution is used to assign a probability for a certain value of the computed measure.

auto_train : bool

Flag whether the learner will automatically train itself on the input dataset when called untrained.

force_train : bool

Flag whether the learner will enforce training on the input dataset upon every call.

postproc : Node instance, optional

Node to perform post-processing of results. This node is applied in __call__() to perform a final processing step on the to be result dataset. If None, nothing is done.

descr : str

Description of the instance

Notes

If any BaseSearchlight is used as SensitivityAnalyzer one has to make sure that the specified scalar Measure returns large (absolute) values for high sensitivities and small (absolute) values for low sensitivities. Especially when using error functions usually low values imply high performance and therefore high sensitivity. This would in turn result in sensitivity maps that have low (absolute) values indicating high sensitivities and this conflicts with the intended behavior of a SensitivityAnalyzer.

NeuroDebian

NITRC-listed