NIPY logo

Site Navigation

NIPY Community

Table Of Contents

Previous topic

neurospin.glm_files_layout.tio

Next topic

neurospin.graph.field

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_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=1e-12)

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