On 01/11/2016 02:45 AM, Roshan Santhosh
wrote:
So the graph would have just a single circle as the
input, where x1-x4 are just the features that represent the
single training sample?
Circles are random variables in factor graphs. The input is not a
random variable, it is always conditioned on. So the input would be
a unary factor, which is a rectangle.
1)
I tried the ChainCRF example given in the user guide. I get a
model with 4004 weights. Considering that fact that this
directed I get 26*26 (676) parameters for the pairwise
potentials between the classes. Also considering the unary
potentials for all the classes, we have 26*128 (3328)
parameters, which together give the total 4004 parameters. I
would like to know how these are parameters are placed in the
weights vector. Are all the 3328 unary potential weights placed
first followed by the pairwise potential weights or is there
some other manner in which they are arranged?
2)
For multi-label classification using MultiLabelClf (with no edges) does the inference() function iterate over all the possible combination of labels and see which combination maximizes np.dot(weight.T , joint_feature).
I am assuming a naive approach like the one used in iris dataset where each class is independently evaluated will not work in this case.
If you use MultiLabelClf without edges, then all decisions will be independent. The edges are what create connections between the outputs.
If you add a tree of edges, you can just use message passing for inference, if you use a graph with cycles, like a complete graph,
you need to use one of the approximate inference methods.