liveBook · Manning

Violin plot

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

A violin plot visualizes the distribution and density of numeric values, often alongside summary statistics such as the median.

A violin plot shows how SHAP values are distributed across observations, combining density with directionality so model behavior is easier to interpret. section 7.3

Read the plot through these visual cues:

  • Wider regions contain more observations with similar SHAP values and generally indicate greater feature importance. section 7.3
  • The shape reveals distribution: symmetry suggests balanced effects, while asymmetry indicates skewed contributions. section 7.3
  • Values to the right push predictions higher; values to the left push them lower, with color associating feature values to contributions. section 7.3

Model interpretation for accommodation prices

A SHAP violin plot can compare how availability, location coordinates, bedrooms, and beds influence price predictions, revealing both feature importance and the direction of their effects. section 7.3

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

How deep it goes
Explains width, shape, median, sign, color, and outliers, but does not develop the underlying density estimation.
Examples
Uses accommodation-price features such as availability, coordinates, bedrooms, and beds to illustrate prediction effects.
What it assumes
Assumes SHAP values, model predictions, and transformed feature matrices are already available.
What you can do after
Apply it via SHAP to inspect which features matter and whether their values raise or lower predictions.
How it connects
Connects SHAP values with feature importance, model predictions, feature values, and outliers.

Also explained in

Compare how 3 books explain violin plot →

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.