liveBook · Manning

Sigmoid

As explained in Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI

A sigmoid is a smooth mathematical function that maps real-valued inputs to values between zero and one.

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

How Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI covers it

How deep it goes
Explains the formula, smooth bounded behavior, logit relationship, and application to model outputs.
Examples
Demonstrates gradient boosting probability histograms and a property prediction yielding 17.9% probability above the median.
What it assumes
Assumes familiarity with model predictions and logits while defining the sigmoid-to-probability transformation explicitly.
What you can do after
Apply it via TensorFlow to transform raw model predictions into interpretable probabilities.
How it connects
Connects sigmoid with logits, probabilities, gradient boosting, classification, and model deployment.

Also explained in

Compare how 16 books explain sigmoid →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI. The section links point to the parts of the book it draws on.