Predicting binary classification
it's basically the same, when talking about binary classification, you can think of a final layer for each model that adapt the output to other model
e.g if the model output 0 or 1 than the final layer will translate it to vector like [1,0] or [0,1] and vise-versa by a threshold criteria, usually is >= 0.5
a nice byproduct of 2 nodes in the final layer is the confidence level of the model in it's predictions [0.80, 0.20] and [0.55, 0.45] will both yield [1,0] classification but the first prediction has more confidence
this can be also extrapolate from 1 node output by the distance of the output from the fringes 1 and 0 so 0.1 will be considered with more confidence than 0.3 as a 0 prediction
I have been self-learning machine learning lately, and I am now trying to solve a binary classification problem (i.e: one label which can either be true or false). I was representing this as a single column which can be 1 or 0 (true or false).
Nonetheless, I was researching and read about how categorical variables can reduce the effectiveness of an algorithm, and how one should one-hot encode them or translate into a dummy variable thus ending with 2 labels (variable_true, variable_false).
Which is the correct way to go about this? Should one predict a single variable with two possible values or 2 simultaneous variables with a fixed unique value?
As an example, let's say we want to predict whether a person is a male or female:
Should we have a single label Gender and predict 1 or 0 for that variable, or Gender_Male and Gender_Female?