You need an activation function for the output neuron of a binary classifier so the raw score can be interpreted directly as a probability between 0 and 1. Which activation function fits this requirement?
Select an answer to reveal the explanation.
Short Explanation and Infographic
You want sigmoid here, hands down. Sigmoid squashes any real number into the range (0, 1), which is exactly what you need to interpret an output as a probability — 0.83 means 'pretty confident this is class 1.' ReLU just clips negatives to zero but lets positive values run off unbounded, so it's not a probability. Tanh is bounded too, but between -1 and 1, not 0 and 1 — close, but the wrong range for a probability. And a plain linear output doesn't squash anything at all; it can spit out any number, positive or negative, which makes zero sense as a probability. Sigmoid's S-curve is the one built for exactly this job.
Full explanation below image
Full Explanation
Sigmoid, defined as f(x) = 1 / (1 + e^(-x)), maps any real-valued input to an output strictly between 0 and 1. This makes it the standard choice for the final layer of a binary classifier, where the single output neuron's value can be directly interpreted as the estimated probability of the positive class, and a threshold (commonly 0.5) is applied to make the final decision. It's also the natural pairing with binary cross-entropy loss.
The first distractor, ReLU (Rectified Linear Unit), f(x) = max(0, x), is unbounded above — for positive inputs the output equals the input itself, potentially any large positive number — so it cannot represent a bounded probability and is instead the standard choice for hidden-layer activations due to its simplicity and resistance to vanishing gradients for positive inputs. The second distractor, tanh, f(x) = (e^x - e^-x)/(e^x + e^-x), is bounded, but its range is (-1, 1), which is zero-centered and useful in certain hidden-layer contexts (e.g., some RNN gates) precisely because of that centering, but it does not match the (0, 1) probability range the question requires. The third distractor, a linear (identity) activation, f(x) = x, applies no squashing at all and is typically reserved for regression output layers where the target is an unbounded continuous value — using it for a probability output would allow nonsensical values like -4.2 or 17.9.
Memory aid: sigmoid's S-shaped curve asymptotes to 0 on the left and 1 on the right, so remember 'sigmoid = 0-to-1 = probability,' while tanh is sigmoid's zero-centered cousin living in the -1-to-1 range, useful inside a network but not as a probability readout at the very end.