# Can you choose a binary feature matrix for a binary classification model

This may be a stupid, but, I am new to deep learning (and machine learning for that matter) and I can't seem to find any literature to help with my question. All I can see when Googling many different questions (trying to change keywords to try get a hit on my question) is about binary classification. And also, binary classification where the feature matrix consists of real numbers.

I would like to know, is it possible to build a binary classifier with a binary feature matrix? And please can you point me to some literature.

## 1 Answer

I'm not aware of any literature specific to the case of classification based on binary features since it's just a subset of the general case, but it's definitely possible.

A very common example is traditional text classification, where the document is represented as a bag of words: there are different options but each word in the vocabulary can be represented as a boolean variable, representing whether it belongs to the document or not. For example (among many others), a Bernoulli Naive Bayes classifier can be trained on such data.

• Interesting, thanks @Erwan. I have come across bag of words before, but not the Bernoulli Naive Bayes classifier. I guess the next step is understanding a) how to use it properly, and b) how to integrate into a DL model - if that is even necessary..
– Dean
May 3, 2021 at 3:34
• @Dean in case there's any ambiguity Naive Bayes is not Deep Learning (DL), it's a simple supervised ML methods. if you are new to ML I'd suggest you start with this kind of simple method (decision trees are also quite intuitive) in order to familiarize yourself with ML concepts and methods. DL is appealing but it's more advanced. About "how to use it properly": essentially there's no difference between binary features and numerical features so the usual methods apply, but if you want more specific advice please ask a new question with details about the task that you want to achieve. May 3, 2021 at 12:02
• Brilliant, thanks @Erwan. I tried to use Naive Bayes and it seems that it returns poor validation accuracy. I have built a DL model for binary classification but I am struggling to increase the validation accuracy - it is currently only arround 0.55. I have run through several iterations of the DL model (adjusting number of hidden layers and number of nodes per hidden layer) and it doesn't seem to improve the validation accuracy all that much - hence my confusion as to whether I am building the correct model. Once I get some time I will post another question around it.
– Dean
May 5, 2021 at 5:00