![]() |
Multivariate Pattern Analysis in Python |
Classes and functions to provide sense of distances between sample points
The comprehensive API documentation for this module, including all technical details, is available in the Epydoc-generated API reference for mvpa.mappers.metric (for developers).
Bases: mvpa.mappers.metric.Metric
Find neighboring points in descretized space
If input space is descretized and all points fill in N-dimensional cube, this finder returns list of neighboring points for a given distance.
As input points it operates on discretized values, not absolute coordinates (which are e.g. in mm)
Initialize the class provided @elementsize and @distance_function
Returns coordinates of the neighbors which are within distance from coord
XXX radius might need to be not a scalar but a vector of scalars to specify search distance in different dimensions differently... but then may be it has to be a tensor to specify orientation etc? :-) so it might not be necessary for now
See also
Derived classes might provide additional methods via their base classes. Please refer to the list of base classes (if it exists) at the begining of the DescreteMetric documentation.
Full API documentation of DescreteMetric in module mvpa.mappers.metric.
Bases: object
Abstract class for any finder.
Classes subclasses from this class show know about structure of the data and thus be able to provide information about the neighbors. At least one of the methods (getNeighbors, getNeighbor) has to be overriden in the derived class. NOTE: derived #2 from derived class #1 has to override all methods which were overrident in class #1
Generator to return coordinate of the neighbor.
Base class contains the simplest implementation, assuming that getNeighbors returns iterative structure to spit out neighbors 1-by-1
Return the list of coordinates for the neighbors.
By default it simply constracts the list based on the generator getNeighbor
See also
Derived classes might provide additional methods via their base classes. Please refer to the list of base classes (if it exists) at the begining of the Metric documentation.
Full API documentation of Metric in module mvpa.mappers.metric.