GraphCRF User guide's possible bug

49 views
Skip to first unread message

Eduardo Zamudio

unread,
Nov 19, 2015, 12:07:44 PM11/19/15
to pystruct
Hi!

I think there is a bug in the User guide section, at the GraphCRF example (https://pystruct.github.io/user_guide.html#graphcrf).

X_train = [(features_i, np.vstack([np.arange(f_t.shape[0] - 1), np.arange(1, f_t.shape[0])])) for features_i in f_t]

Here, X_train is defined by (features_i, edges), but edges are built with f_t instead of features_i. In consequence, X_train has wrong edges data.

It should be:

X_train = [(features_i, np.vstack([np.arange(features_i.shape[0] - 1), np.arange(1, features_i.shape[0])])) for features_i in f_t]



Thank you, Pystruct is a great tool!

Regards

Andreas Mueller

unread,
Nov 19, 2015, 12:10:14 PM11/19/15
to pyst...@googlegroups.com
Hi Eduardo.
Thanks for your mail.
You are right, that's an error. Would you like to submit a pull request on github to fix it?

Thanks,
Andy
--
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.

Eduardo Zamudio

unread,
Nov 19, 2015, 1:45:09 PM11/19/15
to pyst...@googlegroups.com
Done!

You received this message because you are subscribed to a topic in the Google Groups "pystruct" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pystruct/TEfNfmDGt8k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pystruct+u...@googlegroups.com.

Roshan Santhosh

unread,
Jan 11, 2016, 1:43:29 AM1/11/16
to pystruct
Hey,
       This particular bug is still present in the user guide. Took me some time to get around it. Please change it as it can be misleading to new users

Andreas Mueller

unread,
Jan 14, 2016, 4:41:57 PM1/14/16
to pyst...@googlegroups.com


On 01/11/2016 01:43 AM, Roshan Santhosh wrote:
Hey,
       This particular bug is still present in the user guide. Took me some time to get around it. Please change it as it can be misleading to new users
Reply all
Reply to author
Forward
0 new messages