Multivariate Pattern Analysis in Python

### Navigation

- index
- modules |
- modules |
- PyMVPA Home |
- Sitemap »

# mvpa2.mappers.mdp_adaptor.DatasetAttributeExtractor

class `mvpa2.mappers.mdp_adaptor.``DatasetAttributeExtractor`(col, key)

  Helper to extract arbitrary attributes from dataset collections.

  Examples

      >>> ds = AttrDataset(np.arange(12).reshape((4,3)),
      ...              sa={'targets': range(4)},
      ...              fa={'foo': [0,0,1]})
      >>> ext = DAE('sa', 'targets')
      >>> ext(ds)
      array([0, 1, 2, 3])

      >>> ext = DAE('fa', 'foo')
      >>> ext(ds)
      array([0, 0, 1])

  Parameters:

  col : {‘sa’, ‘fa’, ‘a’}

  > The respective collection to extract an attribute from.

  key : arbitrary

  > The name/key of the attribute in the collection.

### Navigation

- index
- modules |
- modules |
- PyMVPA Home |
- Sitemap »