cair / tmu

Implements the Tsetlin Machine, Coalesced Tsetlin Machine, Convolutional Tsetlin Machine, Regression Tsetlin Machine, and Weighted Tsetlin Machine, with support for continuous features, drop clause, Type III Feedback, focused negative sampling, multi-task classifier, autoencoder, literal budget, and one-vs-one multi-class classifier. TMU is written in Python with wrappers for C and CUDA-based clause evaluation and updating.
https://pypi.org/project/tmu/
MIT License
126 stars 13 forks source link

Type conversion of X to uint32 missing in fit #61

Closed olegranmo closed 9 months ago

olegranmo commented 10 months ago

If you send X as uint8 you will lose 75% of your features during encoding (which assumes uint32).

perara commented 10 months ago

This needs a bit explaination. what we can do is to make an assertion (check) that verify that input to the fit function is of type uint32.

My second question becomes; have we tested uint64?, what is the downside of having that as default, besides not supporting 32 bit systems.

olegranmo commented 10 months ago

32-bit is hardcoded in the C and CUDA parts. Tried a quick test, introducing 64-bit, but did not get any speed-up and got some crashes, so returned to 32-bit.

perara commented 10 months ago

All OK. Lets keep 32 bit. I will make a check that gives error when sending in input other than uint32 :)

olegranmo commented 10 months ago

Excellent!

perara commented 10 months ago

This should now be fixed :)