I wanted arbitrary potentials; ie a factor f_1 describing transitions
between nodes of a chain, a factor f_2 describing transitions between the
nodes of the other chain, and a factor f_3 describing interactions between
corresponding variables in each chain.

I implemented this by having the edges attribute consist of three lists.  I
hope it did the right thing ;)


On Wed, Jul 31, 2013 at 9:34 AM, Andreas Mueller
<notifications@github.com>wrote:

> In pystruct/models/graph_crf.py:
>
> > @@ -17,7 +13,24 @@ class GraphCRF(CRF):
> >
> >      Labels, Y, are given as an interable of n_examples. Each label, y, in Y
> >      is given by a numpy array of shape (n_nodes,).
> > -
> > +
> > +    There are n_states * n_features parameters for unary potentials. For edge
> > +    potential parameters, there are n_state * n_states permutations, i.e.
> > +
> > +            state_1 state_2
> > +    state_1       1       2
> > +    state_2       2       3
> > +
> > +    However, since edge potentials are symmetric, so we only need to keep track
> > +    of the lower triangle, or n_states * (n_states + 1) / 2 parameters for
> > +    edge potentials.
> > +
> > +    The fitted parameters of this model will be returned as an array with
> > +    the first n_states * n_features elements representing the unary potentials
>
> that reminds me, @vene <https://github.com/vene> for chains, you don't
> really want the symmetry, do you?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/pystruct/pystruct/pull/41/files#r5497316>
> .
>