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.
D3.js in Action, Third EditionA violin plot is a distribution chart that uses a mirrored, smoothed density shape to show where numeric observations are concentrated.
Statistics Slam DunkA violin plot displays the distribution and shape of numeric data by combining a mirrored probability-density shape with optional summary statistics.
box-and-whisker plotcontrasts with · A box-and-whisker plot is a statistical graphic that summarizes a numerical distribution using quartiles, a median, and whiskers or markers indicating spread and potential outliers.
histogramalternative to · A histogram is a representation that groups observations into bins or value ranges and records their frequencies or other distribution summaries.
density plotuses · A density plot is a visualization that estimates and displays the shape of a continuous variable’s probability distribution as a smooth curve.
probability densityuses · A probability density function is a nonnegative function describing the distribution of a continuous random variable, whose integral over a region gives the probability of values in that region.
meanuses · A mean is a measure of central tendency, calculated as the arithmetic average of values or, for a random variable, as the probability-weighted average of its possible values.
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.