What is a binary variable?
A binary variable is a variable that has the potential to take on one of two values. Some examples are:
+1 or -1
Male or Female
Cat or Not A Cat
Muffin or Chihuahua
If the variable can take on more than two values, then the variable is not binary.
Applications
In many applications of machine learning to computer vision, models are faced with the task of identifying whether something is present in an image. Binary variables can also be applied to medical diagnoses, facial recognition, and decision trees. One of the newest internet fads is using neural networks to determine whether an image classifies as a bagel or a puppy. Here’s an example of some images that would be used as input for the classification:
These images would be the input to a neural network and be classified as either a bagel or a puppy. What is interesting about this particular case is that the network has difficulty classifying images when they are similar to one another. However, it knows it is either a bagel or a puppy because we are using binary classification, so it is more likely to predict correctly than otherwise.