Package mvpa :: Package measures :: Module searchlight :: Class Searchlight

[hide private]
[frames] | no frames]

# Class Searchlight

source code

    Runs a scalar `DatasetMeasure` on all possible spheres of a certain size
    within a dataset.

    The idea for a searchlight algorithm stems from a paper by
    :ref:`Kriegeskorte et al. (2006) <KGB06>`.

Nested Classes | [hide private]

Inherited from `misc.state.ClassWithCollections`: `__metaclass__`

Instance Methods | [hide private]

__init__(self, datameasure, radius=1.0, center_ids=None, **kwargs) :Parameters: datameasure: callable Any object that takes a :class:`~mvpa.datasets.base.Dataset` and returns some measure when called. | source code

_call(self, dataset) Perform the spheresearch. | source code

Inherited from `base.DatasetMeasure`: `__call__`, `__repr__`, `null_dist`, `transformer`, `untrain`

Inherited from `base.DatasetMeasure` (private): `_postcall`

Inherited from `misc.state.ClassWithCollections`: `__getattribute__`, `__new__`, `__setattr__`, `__str__`, `reset`

Inherited from `object`: `__delattr__`, `__format__`, `__hash__`, `__reduce__`, `__reduce_ex__`, `__sizeof__`, `__subclasshook__`

Class Variables | [hide private]

| spheresizes = `StateVariable(enabled= False, doc= "Number of fe`...``
| __doc__ = `enhancedDocString('Searchlight', locals(), DatasetMe`...``
Inherited from `base.DatasetMeasure`: `null_prob`, `null_t`, `raw_results` Inherited from `misc.state.ClassWithCollections`: `_DEV__doc__`, `descr`

Properties | [hide private]

Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, datameasure, radius=1.0, center_ids=None, **kwargs)
(Constructor)

source code

    :Parameters:
      datameasure: callable
        Any object that takes a :class:`~mvpa.datasets.base.Dataset`
        and returns some measure when called.
      radius: float
        All features within the radius around the center will be part
        of a sphere. Provided dataset should have a metric assigned
        (for NiftiDataset, voxel size is used to provide such a metric,
        hence radius should be specified in mm).
      center_ids: list(int)
        List of feature ids (not coordinates) the shall serve as sphere
        centers. By default all features will be used.
      **kwargs
        In additions this class supports all keyword arguments of its
        base-class :class:`~mvpa.measures.base.DatasetMeasure`.

    .. note::

      If `Searchlight` is used as `SensitivityAnalyzer` one has to make
      sure that the specified scalar `DatasetMeasure` 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 sensitivites and this conflicts
      with the intended behavior of a `SensitivityAnalyzer`.

Parameters:
  - `transformer`, `Functor` - This functor is called in __call__() to perform a final processing step on the to be returned dataset measure. If None, nothing is called
  - `null_dist`, `instance`, `of`, `distribution`, `estimator` - The estimated distribution is used to assign a probability for a certain value of the computed measure.
Overrides: object.__init__

### _call(self, dataset)

source code

Perform the spheresearch.

Overrides: base.DatasetMeasure._call

Class Variable Details | [hide private]

### spheresizes

Value:

      StateVariable(enabled= False, doc= "Number of features in each sphere.
      ")

### __doc__

Value:

      enhancedDocString('Searchlight', locals(), DatasetMeasure)