--
You received this message because you are subscribed to the Google Groups "pystruct" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pystruct+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
For a classification problem with 3 classes, does the feature vector also have to be of length 3 and do the values necessarily have to be integers?
For the Latent Dynamics CRF (toy cross) problem , you have used vectors of length 2 with either 0 or 1 as its values. This has been compared to the unary potential for a particular class to be present at the node. For example, node 0 has a feature [1 0 ] indicating that its more likely a background pixel. Can we instead also have features like [0.75 0.25].
Also given a different problem, can we use a vector of length n as a feature for the node?
2) The GridCRF for toy cross problem gives 12 weights. Can you explain what these weights correspond to? Are these unary/ edge potentials/ latent edge potentials?
H_init = [np.hstack([y.ravel(), np.random.randint(2, 4, size=2 * 2)]) for y in Y]
latent_svm.fit(X_,Y_flat)
latent_svm.fit(X_,Y_flat,H_init)
got it . Thanks
1)For the Latent Variable Hierarchical CRF, you have used a random initialization of the hidden weights like this
H_init = [np.hstack([y.ravel(), np.random.randint(2, 4, size=2 * 2)]) for y in Y]
Whats the rationale for using such an initialization? And why random 2 and 3's in the end of each vector. Are the random 2 and 3's to represent the classes of the hidden layer?
2)I ran a similar model as the above example without defining H_initMy code wasinstead of
latent_svm.fit(X_,Y_flat)
latent_svm.fit(X_,Y_flat,H_init)
Does this change affect the running time of the model? I am running this model on 5 samples of 28*28 images (MNIST) and have added hidden variables for each block of 7*7. So 16 additional edges because of the latent variables. However the model seems to be stuck on iteration 0. Without the latent variables, the model runs sufficiently fast.
A model which took additional diagonal edges (no latent variables) ran quite fast too. This is surprising since both methods simply add new edges to the model. While one is fast , the other (with latent variables) is seemingly stuck on iteration 0. Is there any reason for this?
LATENT SVM ITERATION 0Training 1-slack dual structural SVMiteration 0
Surely. Since I am going to work with CRF's I can probably help with the documentation and examples. I will go through the inference methods and create a small documentation on them which could be put in the "Tips on choosing an Inference algorithm" section.
Also I am using the ad3 inference algorithm now and its running pretty fast. However when it reaches LATENT SVM ITERATION 1 it exits with an error saying "Inconsistent h and y in latent node CRF".What could be causing this problem?
--
1)What I meant is this.
1 2 3 45 6 7 89 10 11 12
Suppose in the above graph, I add a node between all 4-neighborhood pairs. So this will include edges between (1,5) and (5,9). Is there any point in then adding an edge between 1 and 9?. Will the connectivity between 1 and 5 and 5 and 9 , ensure connectivity between 1 and 9 as well? Will adding (1,9) as an edge be a redundant exercise?
2)I am working on a problem involving 3D images. The volumes are of size 240x240x155. A 3D CRF model had memory issues as the dataset was too huge. So I am running 2D CRF models with individual layers as training samples. So each training sample has 240*240 nodes. It has 2 classes. The CRF model has 4-neighborhood connectivity. The training of this CRF model is also time consuming.
Could you suggest which learner and inference method would be best for this purpose?
Also I would like to better understand the training process. What are the parameters new constraints, cutting plane objective and primal objective? Are there any resources that explain these?