I have a dataset that is completely binary and labeled. I would like to be able to use machine learning for one of the columns. I have read that unsupervised models, such as K-Means, do not work with the data in binary form since the distance measures are only between 0 and 1, and therefore, unable to provide valid clusters. Are there other models that would work adequately? The dataset is comprised of medical diagnoses, and they are broad characteristics with hundreds of columns. Any tips would be helpful!
1 Answer
You can use any instance-based classifier, such as $k$-Nearest Neighbour, equipped with a similarity metric (e.g., Euclidean distance) to assign the class to a new instance; that is, find the $k$ most similar examples of your labelled dataset and give the majority class of such cases to that (new) instance.
Moreover, claiming that $k$-means does not work on binary data is false. From a theoretical point of view, it works, but, from a practical point of view, it should be avoided, as explained in this post.
-
1$\begingroup$ Thanks for the clarification. I should have said you "should not" use k-means, rather than it didn't work. Do any other models perform well on this as well? Also, with the large number of columns, I should try to reduce these as well, correct? Thanks for your help! $\endgroup$ Jan 31 at 14:28
-
$\begingroup$ At the time of writing, you should avoid using neural networks, as they do not function well on tabular data; there are research papers claiming it. The essential thing is that you must prepare your data for training; for example, as you have noted, performing feature selection (or, in general, dimensionality reduction). Indeed, there is an accepted slogan among machine learning experts: garbage in, garbage out. For a model to work adequately, it firmly relies on the previous data science step and the type of data (e.g., structured vs unstructured). +1 to your comment $\endgroup$– EduardJan 31 at 19:28
-
-
$\begingroup$ Please consider upvoting and accepting my answer if you value it. I am saying it because you are a new user of StackExchange. Cheers! $\endgroup$– EduardJan 31 at 20:30