This k-modes algorithm is similar to the k-medoids algorithm, which we have in the Statistics and Machine Learning Toolbox. See the documentation page here at http://www.mathworks.com/help/stats/kmedoids.html. The k-medoids algorithms always produces centers that are actual data points in the dataset. Using the questionnaireâ€‹ example in the blog, centers found by k-medoids are actual responses recorded; whereas the k-modes algorithm may produce centers that are not recorded responses, but they could be valid answers to all the questions. It’s just that nobody has chosen these combinations yet.I would suggest you trying the kmedoids function with Hamming distance and the same binary encoding as in the blog.

Wei

]]>Brad – we hear you about the preview but I don’t think it’s in our hands.

]]>https://shapeofdata.wordpress.com/2014/03/04/k-modes/

This seems like a pretty useful statistical algorithm. Unfortunately, there doesn’t seem to be a readily-available Matlab implementation of k-modes. As Jesse Johnson explains in the above link, k-modes can produce signficantly different results than k-means (available in Statistics Toolbox).

Can another reader provide a link to Matlab k-modes functionality, please? Thanks in advance.

p.s. to blog moderator : Comment previews on Matlab blogs still do not render paragraph breaks. This is a bug which I reported over a year ago. It would be nice if someone could fix this, please..?

]]>Brett, there are many ways to analyze this problem, and yours is probably a lot simpler, but I wanted to use MATLAB and Bayes’ Rule in this case, because I was stuck in a bad snowstorm and I wanted to rest long enough to recover from fatigue before going out to resume snow shoveling! ]]>

I like to think about the Monty Hall question this way:

What if there were 1000 doors (instead of 3), only one of which contained a car? Suppose you were asked to choose a door, and then Monty (who knows where the car is) opened all the remaining doors except one. He then asks if you want to change your pick. Seems clear that you should switch, doesn’t it? ;)

]]>