PyTsetlinMachineCUDA icon indicating copy to clipboard operation
PyTsetlinMachineCUDA copied to clipboard

Support of multilabel?

Open Filco306 opened this issue 3 years ago • 4 comments

Hello,

I was wondering, does the Tsetlin machine support multilabel output? I saw multiclass, but that assumes only one label is true, correct?

Thanks! :)

Cheers

Filco306 avatar Oct 05 '21 08:10 Filco306

Hi @Filco306! We usually train one multi-class TM per output for multi-class outputs, which can be done from the outside. However, I plan to add multi-output as a thin Python wrapper as well, like the multi-class wrapper. The https://github.com/cair/PyCoalescedTsetlinMachineCUDA is BTW inherently multi-output (binary). Multi-class is actually then mapped to multi-output and then back again to multi class with argmax on the multiple outputs. This allows sharing of clauses among the outputs. A thin Python-wrapper for multi-output is coming soon for this one as well.

olegranmo avatar Oct 05 '21 09:10 olegranmo

Let me know if this functionality is something you will need soon, and I will prioritize finishing these wrappers :-).

olegranmo avatar Oct 05 '21 09:10 olegranmo

Hello,

Thank you for your quick reply! On the tasks I am trying to use it for, I need the support for multi-labels; I think I can use the PyCoalesced Machine, wouldn't that work? I need to read your work more thoroughly, but I have to say that I find this highly interesting and very promising for many problems that can be converted into binary representations :)

Filco306 avatar Oct 05 '21 12:10 Filco306

PyCoalesced should work - just added the class 'MultiOutputTsetlinMachine' where the output 'Y' can be a binary vector. Let me know how it works :-)

olegranmo avatar Oct 05 '21 21:10 olegranmo