A sigmoid maps an unbounded real-valued input to a smooth value between zero and one. In classification, it converts a model’s logit output into a probability using σ(x) = 1 / (1 + exp(−x)). section 5.2.2
Use sigmoid to connect model calculations with probability-based decisions:
- Convert gradient boosting logit predictions into probabilities bounded between zero and one. section 5.2.2
- Apply it after a deployed endpoint returns a raw prediction rather than a probability. section 10.4.4
- Keep the raw regression-style output separate when extrapolation beyond the zero-to-one range is intentional. section 5.2.2
Turning a property prediction into a probability
A deployed property-price model returns the raw value −1.52191401. Applying sigmoid produces a 17.9% probability that the property’s price is above the median. section 10.4.4
predictions = loaded_model.predict(input_dict) prob = tf.nn.sigmoid(predictions[0])
Apply TensorFlow’s sigmoid to the endpoint prediction before reporting it as a probability. section 10.4.4















