WojciechMigda / Tsetlini

Efficient parallelized implementation of Multilabel Classifier and Regressor Tsetlin Machines
https://wojciechmigda.github.io/Tsetlini/
MIT License
4 stars 0 forks source link

Bytewise classifier training algorithm does not follow reference paper #218

Closed WojciechMigda closed 2 years ago

WojciechMigda commented 2 years ago

From "Extending the Tsetlin Machine With Integer-Weighted Clauses for Increased Interpretability" arXiv:2005.05131: image

Quote: As seen in the figure, if the clause output is a true positive, we simple increase the weight by 1. Conversely, if the clause output is a false positive, we decrease the weight by 1.

Tsetlini's bitwise algorithm does it correctly, whilst the bytewise algorithm decrements weights irrespective of clause output.

WojciechMigda commented 2 years ago

Reference implementation code (https://github.com/cair/pyTsetlinMachine): weights decrementation: https://github.com/cair/pyTsetlinMachine/blob/master/pyTsetlinMachine/ConvolutionalTsetlinMachine.c#L320 weights' incrementation: https://github.com/cair/pyTsetlinMachine/blob/master/pyTsetlinMachine/ConvolutionalTsetlinMachine.c#L339