Multi-label CRF

136 views
Skip to first unread message

Andriy Burkov

unread,
Sep 12, 2016, 4:37:27 PM9/12/16
to pystruct
Hi!

Does pystruct support the multi-label CRF case? For example, let say, we have a finite set of labels {label0, label1, ..., label5}. I would like to create training examples like follows. Let my input sequence is "token0 token1 token2 token3 token4", then I create my training example for this sequence like this (each token get two different labels):

token0 label4 label3
token1 label0 label5
token2 label1 label5
token3 label2 label4
token4 label1 label2

Is this possible?

Thanks!

Andy

unread,
Oct 16, 2016, 7:12:45 PM10/16/16
to pyst...@googlegroups.com
Hi Andriy.
Sorry for the slow reply.
It's possible but not with any of the built-in models. You need to write your own model that's a combination of ChainCRF and MultiLabelClf.
I don't see how to make this model circle-free, though, so inference would be pretty slow.
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.

Reply all
Reply to author
Forward
0 new messages