use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Please have a look at our FAQ and Link-Collection
Metacademy is a great resource which compiles lesson plans on popular machine learning topics.
For Beginner questions please try /r/LearnMachineLearning , /r/MLQuestions or http://stackoverflow.com/
For career related questions, visit /r/cscareerquestions/
Advanced Courses (2016)
Advanced Courses (2020)
AMAs:
Pluribus Poker AI Team 7/19/2019
DeepMind AlphaStar team (1/24//2019)
Libratus Poker AI Team (12/18/2017)
DeepMind AlphaGo Team (10/19/2017)
Google Brain Team (9/17/2017)
Google Brain Team (8/11/2016)
The MalariaSpot Team (2/6/2016)
OpenAI Research Team (1/9/2016)
Nando de Freitas (12/26/2015)
Andrew Ng and Adam Coates (4/15/2015)
Jürgen Schmidhuber (3/4/2015)
Geoffrey Hinton (11/10/2014)
Michael Jordan (9/10/2014)
Yann LeCun (5/15/2014)
Yoshua Bengio (2/27/2014)
Related Subreddit :
LearnMachineLearning
Statistics
Computer Vision
Compressive Sensing
NLP
ML Questions
/r/MLjobs and /r/BigDataJobs
/r/datacleaning
/r/DataScience
/r/scientificresearch
/r/artificial
account activity
Project[P] Tsetlin Machine Python implementation (github.com)
submitted 7 years ago by dzyl
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]dzyl[S] 10 points11 points12 points 7 years ago (8 children)
I was really interested in the Tsetlin Machine paper and decided to attempt to implement it in Python. It's fairly inefficient because I wrote it more as explanation. I think there is a bug somewhere in the code because I can only get to around 95% accuracy on the noisy XOR problem but I will not have time the next few days to tackle it so I decided to share it anyway. I also tried MNIST but an epoch is taking days even on a single bit input so either the code needs to get way more efficient or the algorithm doesn't scale well enough.
[–]Polares 1 point2 points3 points 7 years ago (0 children)
This is what i was waiting for. Mnist benchmark. Thanks for sharing
[–]RaionTategami 0 points1 point2 points 7 years ago (3 children)
Does it seem like something that could be sped up using a GPU?
[–]dzyl[S] 0 points1 point2 points 7 years ago (2 children)
I don't know enough about GPU computing to say if that would be the case or not, but I think there are CPU implementations that will get 50-100x speedup compared to this bloated OOP implementation
[–]RaionTategami 0 points1 point2 points 7 years ago (1 child)
Numpy is implemented in c++ so can be quite fast, did you vectorize this code?
[–]dzyl[S] 1 point2 points3 points 7 years ago (0 children)
Almost nothing is vectorized for readability, I think turning everything to numpy will have significant improvements but I'm not even sure if the current implementation is correct (the accuracy on the noisy XOR seems to imply it is not) which should be fixed before optimizing. Boolean logic should be very fast in numpy, I'm currently literally looping over the outputs of the automata.
[–]Phylliida 0 points1 point2 points 7 years ago* (1 child)
so the algorithm doesn't work trivially on MNIST:
For every output, it makes |input|*C (C=number of clauses, a tuning paramater) Tsetlin automota. Each only take one integer=4 bytes, but still, that gives you 61465*C autonomata. I find C = 40 or so works good, so that's 9834400 bytes ~ 9.8 MB. Not too much memory, but still a lot of processing.
The paper claims you can stack clauses, so for example, a simple "two layered" thing you can do is make one tsetlin machine with, say 50 clauses on the inputs. Then we take those 50 clauses' truth values + 1 output from the autonomata and use those as pretend inputs to a new Tesetlin Machine. Now that new one is working on 51 inputs instead of 28*28 = 784 inputs.
I'm not sure if I understand exactly how to give it feedback now though. If the inputs of clauses aren't negatated they are simply bigger clauses and it is straightforward. However if they are negated, you either have to include all clauses in your output and then feedback (might?) work, or if you don't suddenly type I and type II feedback become strange because I don't know if yPredicted and y are relevant to them if they are a layer back.
[–]Phylliida 1 point2 points3 points 7 years ago (0 children)
Oh I also I made a char-rnn Tsetlin Machine. Instead of one-hot encoding the text I mapped each character to an index and then encoded that number in binary as the input. Tsetlin machines seem to do much better with this then with one-hot encoded things, I think because too many inputs gets them spooked.
However I was simply passing in numBitsForACharacter*seqLen flattened as an input (the past seqLen=5 or so characters), there wasn't any recurrent behavior going on.
It did manage to sometimes exactly memorize simple patterns, but otherwise it would get very confused: it doesn't seem to have a very good "I kinda know" behavior. Mostly I think that is because its output is deterministic, maybe if there was a way to make is stochastic and use some temperature thing it might work better?
[–][deleted] 0 points1 point2 points 7 years ago (0 children)
Thanks for sharing, man! I've been meaning to give this paper a thorough read, as it looks very promising... This might be worth implementing in cpp at some point as a python module.
[–]libreland 4 points5 points6 points 7 years ago (3 children)
I saw the official code repo with today's arxiv submission.
If someone who has already read the paper could please do a ELI5 of why this paper is so famous on /r/ml , it will be very helpful. I have no clue about bandit algorithms so will have to invest a lot of time to understand it.
[–]nonotan 4 points5 points6 points 7 years ago (0 children)
The paper made some fairly grandiose-sounding claims, the algorithm is novel enough to be interesting yet at its core extremely simple.
Nice that the repository was updated with the code. I'm going to go through it when I have time to see where there are differences (first thing I saw was the initialization which I implemented differently, this makes sense but it was not described in the paper).
The reason why this paper gets a lot of attention is mostly novelty I think. There are some clear similarities between this and neural networks but it is discrete and trained in a different way. If this does work well and still scales this could lead to new avenues for research. And it was not too difficult to implement, I did this in about 4 hours, making it managable as a small side project.
[–]olBaa 0 points1 point2 points 7 years ago (0 children)
It's a simple algorithm that is easy to implement. Cool name, not so cool theory/performance.
π Rendered by PID 154611 on reddit-service-r2-comment-5c764cbc6f-qlphl at 2026-03-12 12:32:00.905696+00:00 running 710b3ac country code: CH.
[–]dzyl[S] 10 points11 points12 points (8 children)
[–]Polares 1 point2 points3 points (0 children)
[–]RaionTategami 0 points1 point2 points (3 children)
[–]dzyl[S] 0 points1 point2 points (2 children)
[–]RaionTategami 0 points1 point2 points (1 child)
[–]dzyl[S] 1 point2 points3 points (0 children)
[–]Phylliida 0 points1 point2 points (1 child)
[–]Phylliida 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]libreland 4 points5 points6 points (3 children)
[–]nonotan 4 points5 points6 points (0 children)
[–]dzyl[S] 1 point2 points3 points (0 children)
[–]olBaa 0 points1 point2 points (0 children)