Comparison

Sigmoid/Logistic vs. TanH/Hyperbolic Tangent Functions

  • The hyperbolic tangent (tanh) function outputs values in the range (1,1)(-1, 1), while the sigmoid function outputs values in the range (0, 1).
  • tanh generally works better than sigmoid as a hidden-layer activation function, because its output is centered around 0 rather than 0.5, which tends to make training/optimization faster.
  • Sigmoid is still preferred for the output layer of binary classification models, since its (0, 1) range maps directly to a class probability.

0

1

Updated 2026-07-09

Tags

Data Science