NIPY logo

Site Navigation

NIPY Community

Table Of Contents

This Page

neurospin.graph.BPmatch

Module: neurospin.graph.BPmatch

# emacs: -- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -- # vi: set ft=python sts=4 ts=4 sw=4 et: Routines for Matching of a graph to a cloud of points/tree structures through Bayesian networks (Belief propagation) algorithms

Author: Bertrand Thirion , 2006-2008.

Functions

nipy.neurospin.graph.BPmatch.BPmatch(c1, c2, graph, dmax)

Matching the rows of c1 to those of c2 based on their relative positions

Parameters:

c1, array of shape (nbitems1, dim), :

dataset 1

c2, array of shape (nbitems2, dim), :

dataset 2

scale, float, scale parameter :

eps = 1.e-12, float, :

Returns:

i,j,k: arrays of shape(E) :

sparse adjacency matrix of the bipartite association graph

nipy.neurospin.graph.BPmatch.BPmatch_slow(c1, c2, graph, dmax, imax=20, eps=9.9999999999999998e-13)
Matching the rows of c1 to those of c2 based on their relative positions graph is a matrix that yields a graph structure on the rows of c1 dmax is measure of the distance decay between points and correspondences for algorithmic details, see Thirion et al, MMBIA 2006
nipy.neurospin.graph.BPmatch.BPmatch_slow_asym(c1, c2, G1, G2, dmax)
New version which makes the differences between ascending and descending links - c1 and c2 are arrays of shape (n1,d) and (n2,d) that represent features or coordinates, where n1 and n2 are the number of things to be put in correpondence and d is the common dim - G1 and G2 are corresponding graphs (forests in fff sense) - dmax is a typical distance to compare positions
nipy.neurospin.graph.BPmatch.BPmatch_slow_asym_dev(c1, c2, G1, G2, scale)

New version which makes the differences between ascending and descending links

Parameters:

c1, c2 are arrays of shape (n1,d) and (n2,d) that represent :

features or coordinates , where n1 and n2 are the number of things to be put in correpondence and d is the common dimension

G1 and G2 are corresponding graphs (forests in fff sense) :

scale is a typical distance to compare positions :

Returns:

(i,j,k): sparse model of the probabilistic relationships, :

where k is the probability that i is associated with j

nipy.neurospin.graph.BPmatch.match_trivial(c1, c2, scale, eps=9.9999999999999998e-13)

Matching the rows of c1 to those of c2 based on their relative positions

Parameters:

c1, array of shape (nbitems1, dim), :

dataset 1

c2, array of shape (nbitems2, dim), :

dataset 2

scale, float, scale parameter :

eps = 1.e-12, float, :

Returns:

i,j,k: arrays of shape(E) :

sparse adjacency matrix of the bipartite association graph

nipy.neurospin.graph.BPmatch.singles(G)