Multivariate Pattern Analysis in Python

# mvpa2.misc.surfing.queryengine.SurfaceQueryEngine

class `mvpa2.misc.surfing.queryengine.``SurfaceQueryEngine`(surface, radius, distance_metric='dijkstra', fa_node_key='node_indices')

  Query-engine that maps center nodes to indices of features (nodes) that are near each center node.

  This class is for mappings from surface to surface features; for mappings from surface to voxel features, use SurfaceVerticesQueryEngine.

  Attributes

  `ids` |

  Methods

  `__call__`(**kwargs) |
  `query`(**kwargs) |
  `query_byid`(vertex_id) | Return feature ids of features near a vertex
  `train`(ds) | Train the queryengine
  `untrain`() |

  Make a new SurfaceQueryEngine

  Parameters:

  surface: surf.Surface

  > surface object

  radius: float

  > size of neighborhood.

  distance_metric: str

  > ‘euclidean’ or ‘dijkstra’ (default).

  fa_node_key: str

  > Key for feature attribute that contains node indices (default: ‘node_indices’).

  Notes

  After training this instance on a dataset and calling it with self.query_byid(vertex_id) as argument,

  Attributes

  `ids` |

  Methods

  `__call__`(**kwargs) |
  `query`(**kwargs) |
  `query_byid`(vertex_id) | Return feature ids of features near a vertex
  `train`(ds) | Train the queryengine
  `untrain`() |

  `ids`
  `query`(**kwargs)
  `query_byid`(vertex_id)

    Return feature ids of features near a vertex

    Parameters:

    vertex_id: int

    > Index of vertex (i.e. node) on the surface

    Returns:

    feature_ids: list of int

    > Indices of features in the neighborhood of the vertex indexed by ‘vertex_id’

  `train`(ds)

    Train the queryengine

    Parameters:

    ds: Dataset

    > dataset with surface data. It should have a field .fa.node_indices that indicates the node index of each feature.

  `untrain`()