{"id":29321,"date":"2025-08-04T05:55:45","date_gmt":"2025-08-04T05:55:45","guid":{"rendered":"https:\/\/youzum.net\/tutorial-exploring-shap-iq-visualizations\/"},"modified":"2025-08-04T05:55:45","modified_gmt":"2025-08-04T05:55:45","slug":"tutorial-exploring-shap-iq-visualizations","status":"publish","type":"post","link":"https:\/\/youzum.net\/de\/tutorial-exploring-shap-iq-visualizations\/","title":{"rendered":"Tutorial: Exploring SHAP-IQ Visualizations"},"content":{"rendered":"<p>In this tutorial, we\u2019ll explore a range of SHAP-IQ visualizations that provide insights into how a machine learning model arrives at its predictions. These visuals help break down complex model behavior into interpretable components\u2014revealing both the individual and interactive contributions of features to a specific prediction. Check out the\u00a0<strong><a href=\"https:\/\/github.com\/Marktechpost\/AI-Tutorial-Codes-Included\/blob\/main\/SHAP-IQ\/SHAP_IQ_Visuals.ipynb\" target=\"_blank\" rel=\"noreferrer noopener\">Full Codes here<\/a><em>.<\/em><\/strong><\/p>\n<h3 class=\"wp-block-heading\"><strong>Installing the dependencies<\/strong><\/h3>\n<div class=\"dm-code-snippet dark dm-normal-version default no-background-mobile\">\n<div class=\"control-language\">\n<div class=\"dm-buttons\">\n<div class=\"dm-buttons-left\">\n<div class=\"dm-button-snippet red-button\"><\/div>\n<div class=\"dm-button-snippet orange-button\"><\/div>\n<div class=\"dm-button-snippet green-button\"><\/div>\n<\/div>\n<div class=\"dm-buttons-right\"><a><span class=\"dm-copy-text\">Copy Code<\/span><span class=\"dm-copy-confirmed\">Copied<\/span><span class=\"dm-error-message\">Use a different Browser<\/span><\/a><\/div>\n<\/div>\n<pre class=\"no-line-numbers\"><code class=\"no-wrap language-php\">!pip install shapiq overrides scikit-learn pandas numpy seaborn<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"dm-code-snippet dark dm-normal-version default no-background-mobile\">\n<div class=\"control-language\">\n<div class=\"dm-buttons\">\n<div class=\"dm-buttons-left\">\n<div class=\"dm-button-snippet red-button\"><\/div>\n<div class=\"dm-button-snippet orange-button\"><\/div>\n<div class=\"dm-button-snippet green-button\"><\/div>\n<\/div>\n<div class=\"dm-buttons-right\"><a><span class=\"dm-copy-text\">Copy Code<\/span><span class=\"dm-copy-confirmed\">Copied<\/span><span class=\"dm-error-message\">Use a different Browser<\/span><\/a><\/div>\n<\/div>\n<pre class=\"no-line-numbers\"><code class=\"no-wrap language-php\">from sklearn.ensemble import RandomForestRegressor\nfrom sklearn.metrics import mean_squared_error, r2_score\nfrom sklearn.model_selection import train_test_split\nfrom tqdm.asyncio import tqdm\n\nimport shapiq\n\nprint(f\"shapiq version: {shapiq.__version__}\")<\/code><\/pre>\n<\/div>\n<\/div>\n<h3 class=\"wp-block-heading\"><strong>Importing the dataset<\/strong><\/h3>\n<p>In this tutorial, we\u2019ll use the MPG (Miles Per Gallon) dataset, which we\u2019ll load directly from the Seaborn library. This dataset contains information about various car models, including features like horsepower, weight, and origin. Check out the\u00a0<strong><a href=\"https:\/\/github.com\/Marktechpost\/AI-Tutorial-Codes-Included\/blob\/main\/SHAP-IQ\/SHAP_IQ_Visuals.ipynb\" target=\"_blank\" rel=\"noreferrer noopener\">Full Codes here<\/a><em>.<\/em><\/strong><\/p>\n<div class=\"dm-code-snippet dark dm-normal-version default no-background-mobile\">\n<div class=\"control-language\">\n<div class=\"dm-buttons\">\n<div class=\"dm-buttons-left\">\n<div class=\"dm-button-snippet red-button\"><\/div>\n<div class=\"dm-button-snippet orange-button\"><\/div>\n<div class=\"dm-button-snippet green-button\"><\/div>\n<\/div>\n<div class=\"dm-buttons-right\"><a><span class=\"dm-copy-text\">Copy Code<\/span><span class=\"dm-copy-confirmed\">Copied<\/span><span class=\"dm-error-message\">Use a different Browser<\/span><\/a><\/div>\n<\/div>\n<pre class=\"no-line-numbers\"><code class=\"no-wrap language-php\">import seaborn as sns\ndf = sns.load_dataset(\"mpg\")\ndf<\/code><\/pre>\n<\/div>\n<\/div>\n<h3 class=\"wp-block-heading\"><strong>Processing the dataset<\/strong><\/h3>\n<p>We use Label Encoding to convert the categorical column(s) into numeric format, making them suitable for model training.<\/p>\n<div class=\"dm-code-snippet dark dm-normal-version default no-background-mobile\">\n<div class=\"control-language\">\n<div class=\"dm-buttons\">\n<div class=\"dm-buttons-left\">\n<div class=\"dm-button-snippet red-button\"><\/div>\n<div class=\"dm-button-snippet orange-button\"><\/div>\n<div class=\"dm-button-snippet green-button\"><\/div>\n<\/div>\n<div class=\"dm-buttons-right\"><a><span class=\"dm-copy-text\">Copy Code<\/span><span class=\"dm-copy-confirmed\">Copied<\/span><span class=\"dm-error-message\">Use a different Browser<\/span><\/a><\/div>\n<\/div>\n<pre class=\"no-line-numbers\"><code class=\"no-wrap language-php\">import pandas as pd\nfrom sklearn.preprocessing import LabelEncoder\n\n# Drop rows with missing values\ndf = df.dropna()\n\n# Encoding the origin column\nle = LabelEncoder()\ndf.loc[:, \"origin\"] = le.fit_transform(df[\"origin\"])\ndf['origin'].unique()<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"dm-code-snippet dark dm-normal-version default no-background-mobile\">\n<div class=\"control-language\">\n<div class=\"dm-buttons\">\n<div class=\"dm-buttons-left\">\n<div class=\"dm-button-snippet red-button\"><\/div>\n<div class=\"dm-button-snippet orange-button\"><\/div>\n<div class=\"dm-button-snippet green-button\"><\/div>\n<\/div>\n<div class=\"dm-buttons-right\"><a><span class=\"dm-copy-text\">Copy Code<\/span><span class=\"dm-copy-confirmed\">Copied<\/span><span class=\"dm-error-message\">Use a different Browser<\/span><\/a><\/div>\n<\/div>\n<pre class=\"no-line-numbers\"><code class=\"no-wrap language-php\">for i, label in enumerate(le.classes_):\n    print(f\"{label} \u2192 {i}\")<\/code><\/pre>\n<\/div>\n<\/div>\n<h3 class=\"wp-block-heading\"><strong>Splitting the data into training &amp; test subsets<\/strong><\/h3>\n<div class=\"dm-code-snippet dark dm-normal-version default no-background-mobile\">\n<div class=\"control-language\">\n<div class=\"dm-buttons\">\n<div class=\"dm-buttons-left\">\n<div class=\"dm-button-snippet red-button\"><\/div>\n<div class=\"dm-button-snippet orange-button\"><\/div>\n<div class=\"dm-button-snippet green-button\"><\/div>\n<\/div>\n<div class=\"dm-buttons-right\"><a><span class=\"dm-copy-text\">Copy Code<\/span><span class=\"dm-copy-confirmed\">Copied<\/span><span class=\"dm-error-message\">Use a different Browser<\/span><\/a><\/div>\n<\/div>\n<pre class=\"no-line-numbers\"><code class=\"no-wrap language-php\"># Select features and target\nX = df.drop(columns=[\"mpg\", \"name\"])\ny = df[\"mpg\"]\n\nfeature_names = X.columns.tolist()\nx_data, y_data = X.values, y.values\n\n# Train-test split\nx_train, x_test, y_train, y_test = train_test_split(x_data, y_data, test_size=0.2, random_state=42)<\/code><\/pre>\n<\/div>\n<\/div>\n<h3 class=\"wp-block-heading\"><strong>Model Training<\/strong><\/h3>\n<p>We train a Random Forest Regressor with a maximum depth of 10 and 10 decision trees (n_estimators=10). A fixed random_state ensures reproducibility.<\/p>\n<div class=\"dm-code-snippet dark dm-normal-version default no-background-mobile\">\n<div class=\"control-language\">\n<div class=\"dm-buttons\">\n<div class=\"dm-buttons-left\">\n<div class=\"dm-button-snippet red-button\"><\/div>\n<div class=\"dm-button-snippet orange-button\"><\/div>\n<div class=\"dm-button-snippet green-button\"><\/div>\n<\/div>\n<div class=\"dm-buttons-right\"><a><span class=\"dm-copy-text\">Copy Code<\/span><span class=\"dm-copy-confirmed\">Copied<\/span><span class=\"dm-error-message\">Use a different Browser<\/span><\/a><\/div>\n<\/div>\n<pre class=\"no-line-numbers\"><code class=\"no-wrap language-php\"># Train model\nmodel = RandomForestRegressor(random_state=42, max_depth=10, n_estimators=10)\nmodel.fit(x_train, y_train)<\/code><\/pre>\n<\/div>\n<\/div>\n<h3 class=\"wp-block-heading\"><strong>Model Evaluation<\/strong><\/h3>\n<div class=\"dm-code-snippet dark dm-normal-version default no-background-mobile\">\n<div class=\"control-language\">\n<div class=\"dm-buttons\">\n<div class=\"dm-buttons-left\">\n<div class=\"dm-button-snippet red-button\"><\/div>\n<div class=\"dm-button-snippet orange-button\"><\/div>\n<div class=\"dm-button-snippet green-button\"><\/div>\n<\/div>\n<div class=\"dm-buttons-right\"><a><span class=\"dm-copy-text\">Copy Code<\/span><span class=\"dm-copy-confirmed\">Copied<\/span><span class=\"dm-error-message\">Use a different Browser<\/span><\/a><\/div>\n<\/div>\n<pre class=\"no-line-numbers\"><code class=\"no-wrap language-php\"># Evaluate\nmse = mean_squared_error(y_test, model.predict(x_test))\nr2 = r2_score(y_test, model.predict(x_test))\nprint(f\"Mean Squared Error: {mse:.2f}\")\nprint(f\"R2 Score: {r2:.2f}\")<\/code><\/pre>\n<\/div>\n<\/div>\n<h3 class=\"wp-block-heading\"><strong>Explaining a Local Instance<\/strong><\/h3>\n<p>We choose a specific test instance (with instance_id = 7) to explore how the model arrived at its prediction. We\u2019ll print the true value, predicted value, and the feature values for this instance. Check out the\u00a0<strong><a href=\"https:\/\/github.com\/Marktechpost\/AI-Tutorial-Codes-Included\/blob\/main\/SHAP-IQ\/SHAP_IQ_Visuals.ipynb\" target=\"_blank\" rel=\"noreferrer noopener\">Full Codes here<\/a><em>.<\/em><\/strong><\/p>\n<div class=\"dm-code-snippet dark dm-normal-version default no-background-mobile\">\n<div class=\"control-language\">\n<div class=\"dm-buttons\">\n<div class=\"dm-buttons-left\">\n<div class=\"dm-button-snippet red-button\"><\/div>\n<div class=\"dm-button-snippet orange-button\"><\/div>\n<div class=\"dm-button-snippet green-button\"><\/div>\n<\/div>\n<div class=\"dm-buttons-right\"><a><span class=\"dm-copy-text\">Copy Code<\/span><span class=\"dm-copy-confirmed\">Copied<\/span><span class=\"dm-error-message\">Use a different Browser<\/span><\/a><\/div>\n<\/div>\n<pre class=\"no-line-numbers\"><code class=\"no-wrap language-php\"># select a local instance to be explained\ninstance_id = 7\nx_explain = x_test[instance_id]\ny_true = y_test[instance_id]\ny_pred = model.predict(x_explain.reshape(1, -1))[0]\nprint(f\"Instance {instance_id}, True Value: {y_true}, Predicted Value: {y_pred}\")\nfor i, feature in enumerate(feature_names):\n    print(f\"{feature}: {x_explain[i]}\")<\/code><\/pre>\n<\/div>\n<\/div>\n<h3 class=\"wp-block-heading\"><strong>Generating Explanations for Multiple Interaction Orders<\/strong><\/h3>\n<p>We generate Shapley-based explanations for different interaction orders using the shapiq package. Specifically, we compute:<\/p>\n<ul class=\"wp-block-list\">\n<li>Order 1 (Standard Shapley Values): Individual feature contributions<\/li>\n<\/ul>\n<ul class=\"wp-block-list\">\n<li>Order 2 (Pairwise Interactions): Combined effects of feature pairs<\/li>\n<\/ul>\n<ul class=\"wp-block-list\">\n<li>Order N (Full Interaction): All interactions up to the total number of features<\/li>\n<\/ul>\n<div class=\"dm-code-snippet dark dm-normal-version default no-background-mobile\">\n<div class=\"control-language\">\n<div class=\"dm-buttons\">\n<div class=\"dm-buttons-left\">\n<div class=\"dm-button-snippet red-button\"><\/div>\n<div class=\"dm-button-snippet orange-button\"><\/div>\n<div class=\"dm-button-snippet green-button\"><\/div>\n<\/div>\n<div class=\"dm-buttons-right\"><a><span class=\"dm-copy-text\">Copy Code<\/span><span class=\"dm-copy-confirmed\">Copied<\/span><span class=\"dm-error-message\">Use a different Browser<\/span><\/a><\/div>\n<\/div>\n<pre class=\"no-line-numbers\"><code class=\"no-wrap language-php\"># create explanations for different orders\nfeature_names = list(X.columns)  # get the feature names\nn_features = len(feature_names)\n\nsi_order: dict[int, shapiq.InteractionValues] = {}\nfor order in tqdm([1, 2, n_features]):\n    index = \"k-SII\" if order &gt; 1 else \"SV\"  # will also be set automatically by the explainer\n    explainer = shapiq.TreeExplainer(model=model, max_order=order, index=index)\n    si_order[order] = explainer.explain(x=x_explain)\nsi_order<\/code><\/pre>\n<\/div>\n<\/div>\n<h3 class=\"wp-block-heading\"><strong>1. Force Chart<\/strong><\/h3>\n<p>The force plot is a powerful visualization tool that helps us understand how a machine learning model arrived at a specific prediction. It displays the baseline prediction (i.e., the expected value of the model before seeing any features), and then shows how each feature \u201cpushes\u201d the prediction higher or lower.<\/p>\n<p>In this plot:<\/p>\n<ul class=\"wp-block-list\">\n<li>Red bars represent features or interactions that increase the prediction.<\/li>\n<li>Blue bars represent those that decrease it.<\/li>\n<li>The length of each bar corresponds to the magnitude of its effect.<\/li>\n<\/ul>\n<p>When using Shapley interaction values, the force plot can visualize not just individual contributions but also interactions between features. This makes it especially insightful when interpreting complex models, as it visually decomposes how combinations of features work together to influence the outcome. Check out the\u00a0<strong><a href=\"https:\/\/github.com\/Marktechpost\/AI-Tutorial-Codes-Included\/blob\/main\/SHAP-IQ\/SHAP_IQ_Visuals.ipynb\" target=\"_blank\" rel=\"noreferrer noopener\">Full Codes here<\/a><em>.<\/em><\/strong><\/p>\n<div class=\"dm-code-snippet dark dm-normal-version default no-background-mobile\">\n<div class=\"control-language\">\n<div class=\"dm-buttons\">\n<div class=\"dm-buttons-left\">\n<div class=\"dm-button-snippet red-button\"><\/div>\n<div class=\"dm-button-snippet orange-button\"><\/div>\n<div class=\"dm-button-snippet green-button\"><\/div>\n<\/div>\n<div class=\"dm-buttons-right\"><a><span class=\"dm-copy-text\">Copy Code<\/span><span class=\"dm-copy-confirmed\">Copied<\/span><span class=\"dm-error-message\">Use a different Browser<\/span><\/a><\/div>\n<\/div>\n<pre class=\"no-line-numbers\"><code class=\"no-wrap language-php\">sv = si_order[1]  # get the SV\nsi = si_order[2]  # get the 2-SII\nmi = si_order[n_features]  # get the Moebius transform\n\nsv.plot_force(feature_names=feature_names, show=True)\nsi.plot_force(feature_names=feature_names, show=True)\nmi.plot_force(feature_names=feature_names, show=True)<\/code><\/pre>\n<\/div>\n<\/div>\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXdSzKJXZ6TsWprj_MP5wcuq6iZQLUdldMbwkb_W0TSdZeNfUt4kFj95hBcFz5BfBAw_8P4xAv9Y4Oa8vnevZytRimFf6vwzt4rU6c34t-muhJmGt7VfoVdzoEN2V2pkQXmaK4QMLQ?key=aAipKL6NcbRDTM9g2wsEFQ\" alt=\"\" \/><\/figure>\n<p>From the first plot, we can see that the base value is 23.5. Features like Weight, Cylinders, Horsepower, and Displacement have a positive influence on the prediction, pushing it above the baseline. On the other hand, Model Year and Acceleration have a negative impact, pulling the prediction downward.<\/p>\n<h3 class=\"wp-block-heading\"><strong>2. Waterfall Chart<\/strong><\/h3>\n<p>Similar to the force plot, the waterfall plot is another popular way to visualize Shapley values, originally introduced with the shap library. It shows how different features push the prediction higher or lower compared to the baseline. One key advantage of the waterfall plot is that it automatically groups features with very small impacts into an \u201cother\u201d category, making the chart cleaner and easier to understand. Check out the\u00a0<strong><a href=\"https:\/\/github.com\/Marktechpost\/AI-Tutorial-Codes-Included\/blob\/main\/SHAP-IQ\/SHAP_IQ_Visuals.ipynb\" target=\"_blank\" rel=\"noreferrer noopener\">Full Codes here<\/a><em>.<\/em><\/strong><\/p>\n<div class=\"dm-code-snippet dark dm-normal-version default no-background-mobile\">\n<div class=\"control-language\">\n<div class=\"dm-buttons\">\n<div class=\"dm-buttons-left\">\n<div class=\"dm-button-snippet red-button\"><\/div>\n<div class=\"dm-button-snippet orange-button\"><\/div>\n<div class=\"dm-button-snippet green-button\"><\/div>\n<\/div>\n<div class=\"dm-buttons-right\"><a><span class=\"dm-copy-text\">Copy Code<\/span><span class=\"dm-copy-confirmed\">Copied<\/span><span class=\"dm-error-message\">Use a different Browser<\/span><\/a><\/div>\n<\/div>\n<pre class=\"no-line-numbers\"><code class=\"no-wrap language-php\">sv.plot_waterfall(feature_names=feature_names, show=True)\nsi.plot_waterfall(feature_names=feature_names, show=True)\nmi.plot_waterfall(feature_names=feature_names, show=True)<\/code><\/pre>\n<\/div>\n<\/div>\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXeRTI2OtfHUaphJpAruRXYbqGAs-AgVPspFOczu-IlM3K7m6NieqPulKCBQWMdpD51fCasRZV6zaiOgWfo4c0Q2z7NQqpI7erHsnt4jOq_CRiWXjUj6wMzuXmc3b555HCjrUHnI?key=aAipKL6NcbRDTM9g2wsEFQ\" alt=\"\" \/><\/figure>\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXeFeEomfA09HB1wEFAWWMJ9h3Iet_1YC2fh676AUKddgDrmUZ_KtP11cGFR5JanmRiPJsKfjE3JdmnwIlzQ7I1BZgaxOh6JDBBUb8nfhRuH5WS4YdnAaa1Ftr64PIcAAnHF3z_aIQ?key=aAipKL6NcbRDTM9g2wsEFQ\" alt=\"\" \/><\/figure>\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXe5R3wKkWmjQkCqOuQSOAT54x8jg9MNYTkYTp0H4HAIJMPZrb9U0DuYjkjwC9o3X_aXW7u5W88xOVWLxO4tp3fhvRGwU6rFuW1XCKiytZ6nkKd7vZfzHRXdx2PPqWufl6cHWysfjg?key=aAipKL6NcbRDTM9g2wsEFQ\" alt=\"\" \/><\/figure>\n<h3 class=\"wp-block-heading\"><strong>3. Network Plot<\/strong><\/h3>\n<p>The network plot shows how features interact with each other using first- and second-order Shapley interactions. Node size reflects individual feature impact, while edge width and color show interaction strength and direction. It\u2019s especially helpful when dealing with many features, revealing complex interactions that simpler plots might miss. Check out the\u00a0<strong><a href=\"https:\/\/github.com\/Marktechpost\/AI-Tutorial-Codes-Included\/blob\/main\/SHAP-IQ\/SHAP_IQ_Visuals.ipynb\" target=\"_blank\" rel=\"noreferrer noopener\">Full Codes here<\/a><em>.<\/em><\/strong><\/p>\n<div class=\"dm-code-snippet dark dm-normal-version default no-background-mobile\">\n<div class=\"control-language\">\n<div class=\"dm-buttons\">\n<div class=\"dm-buttons-left\">\n<div class=\"dm-button-snippet red-button\"><\/div>\n<div class=\"dm-button-snippet orange-button\"><\/div>\n<div class=\"dm-button-snippet green-button\"><\/div>\n<\/div>\n<div class=\"dm-buttons-right\"><a><span class=\"dm-copy-text\">Copy Code<\/span><span class=\"dm-copy-confirmed\">Copied<\/span><span class=\"dm-error-message\">Use a different Browser<\/span><\/a><\/div>\n<\/div>\n<pre class=\"no-line-numbers\"><code class=\"no-wrap language-php\">si.plot_network(feature_names=feature_names, show=True)\nmi.plot_network(feature_names=feature_names, show=True)<\/code><\/pre>\n<\/div>\n<\/div>\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXc0nUeNhFZeHh2TLbN9iZPmeEOsUe5O6uxtiHgPq-k7cJwI-b1AAbm0tHHHOZw2LjSYTU3ozNz5L9qDCqA_MFsAq9-OeY1SwmlB5c8tG8mQiFg2qX3JuqHwPII0Daij3kyEt-7x?key=aAipKL6NcbRDTM9g2wsEFQ\" alt=\"\" \/><\/figure>\n<h3 class=\"wp-block-heading\"><strong>4. SI Graph Plot<\/strong><\/h3>\n<p>The SI graph plot extends the network plot by visualizing all higher-order interactions as hyper-edges connecting multiple features. Node size shows individual feature impact, while edge width, color, and transparency reflect the strength and direction of interactions. It provides a comprehensive view of how features jointly influence the model\u2019s prediction. Check out the\u00a0<strong><a href=\"https:\/\/github.com\/Marktechpost\/AI-Tutorial-Codes-Included\/blob\/main\/SHAP-IQ\/SHAP_IQ_Visuals.ipynb\" target=\"_blank\" rel=\"noreferrer noopener\">Full Codes here<\/a><em>.<\/em><\/strong><\/p>\n<div class=\"dm-code-snippet dark dm-normal-version default no-background-mobile\">\n<div class=\"control-language\">\n<div class=\"dm-buttons\">\n<div class=\"dm-buttons-left\">\n<div class=\"dm-button-snippet red-button\"><\/div>\n<div class=\"dm-button-snippet orange-button\"><\/div>\n<div class=\"dm-button-snippet green-button\"><\/div>\n<\/div>\n<div class=\"dm-buttons-right\"><a><span class=\"dm-copy-text\">Copy Code<\/span><span class=\"dm-copy-confirmed\">Copied<\/span><span class=\"dm-error-message\">Use a different Browser<\/span><\/a><\/div>\n<\/div>\n<pre class=\"no-line-numbers\"><code class=\"no-wrap language-php\"># we abbreviate the feature names since, they are plotted inside the nodes\nabbrev_feature_names = shapiq.plot.utils.abbreviate_feature_names(feature_names)\nsv.plot_si_graph(\n    feature_names=abbrev_feature_names,\n    show=True,\n    size_factor=2.5,\n    node_size_scaling=1.5,\n    plot_original_nodes=True,\n)\nsi.plot_si_graph(\n    feature_names=abbrev_feature_names,\n    show=True,\n    size_factor=2.5,\n    node_size_scaling=1.5,\n    plot_original_nodes=True,\n)\nmi.plot_si_graph(\n    feature_names=abbrev_feature_names,\n    show=True,\n    size_factor=2.5,\n    node_size_scaling=1.5,\n    plot_original_nodes=True,\n)<\/code><\/pre>\n<\/div>\n<\/div>\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXeE0EOA7mqqVkt9B4kbDEewnC2ob25gYdQVPhbj-WPmB1oNBY92gr8Gzo_1I56JJ6YScg3xDSFdybk9bJ3hH0o3uytv8uqeCWMmf4dcHwPWlQjwXirm_OeUF9bymfXKzPK02CWH?key=aAipKL6NcbRDTM9g2wsEFQ\" alt=\"\" \/><\/figure>\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXdLGjR3cFoFuXnQBz6h7gx-xaO2RjFvGBoz5rPu60INpxJV426tftkdbksIvkv3i_KuvpdLZPVyBEy7T6dC3e9e6_1YpeAeNjfpHIlM9-gRC6LXF5zpZfI4YbI_aDj00Kjoh2kslA?key=aAipKL6NcbRDTM9g2wsEFQ\" alt=\"\" \/><\/figure>\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXcdyW6mg0LPEBRrkjbmpOkvpU3w6Fw1x1ydC2a1P_cj4L5cF-lrkGb4WlrQaFiZGoukGKc6rPscB1y5OFfaT-SP1vLiCG1KvqrKCCbUWkyul3mGPowxpG3296pr3jCUPS_bSt3E5g?key=aAipKL6NcbRDTM9g2wsEFQ\" alt=\"\" \/><\/figure>\n<h3 class=\"wp-block-heading\"><strong>5. Bar Plot<\/strong><\/h3>\n<p>The bar plot is tailored for global explanations. While other plots can be used both locally and globally, the bar plot summarizes the overall importance of features (or feature interactions) by showing the mean absolute Shapley (or interaction) values across all instances. In shapiq, it highlights which feature interactions contribute most on average. Check out the\u00a0<strong><a href=\"https:\/\/github.com\/Marktechpost\/AI-Tutorial-Codes-Included\/blob\/main\/SHAP-IQ\/SHAP_IQ_Visuals.ipynb\" target=\"_blank\" rel=\"noreferrer noopener\">Full Codes here<\/a><em>.<\/em><\/strong><\/p>\n<div class=\"dm-code-snippet dark dm-normal-version default no-background-mobile\">\n<div class=\"control-language\">\n<div class=\"dm-buttons\">\n<div class=\"dm-buttons-left\">\n<div class=\"dm-button-snippet red-button\"><\/div>\n<div class=\"dm-button-snippet orange-button\"><\/div>\n<div class=\"dm-button-snippet green-button\"><\/div>\n<\/div>\n<div class=\"dm-buttons-right\"><a><span class=\"dm-copy-text\">Copy Code<\/span><span class=\"dm-copy-confirmed\">Copied<\/span><span class=\"dm-error-message\">Use a different Browser<\/span><\/a><\/div>\n<\/div>\n<pre class=\"no-line-numbers\"><code class=\"no-wrap language-php\">explanations = []\nexplainer = shapiq.TreeExplainer(model=model, max_order=2, index=\"k-SII\")\nfor instance_id in tqdm(range(20)):\n    x_explain = x_test[instance_id]\n    si = explainer.explain(x=x_explain)\n    explanations.append(si)\nshapiq.plot.bar_plot(explanations, feature_names=feature_names, show=True)<\/code><\/pre>\n<\/div>\n<\/div>\n<figure class=\"wp-block-image is-resized\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXeAeAJkwcZmczz3nTL7NWE77pEmxJQ4h8a9czAIzG8PinLWuH8HA3koH1qfYmXo_n7bghZ2MpNKhQThcfQje_OUQfWTnDkk-N65PoEhFEWe_MSoPJVYQu2XacCMdEGQ48B9pFhlDQ?key=aAipKL6NcbRDTM9g2wsEFQ\" alt=\"\" \/><\/figure>\n<p>\u201cDistance\u201d and \u201cHorsepower\u201d are the most influential features overall, meaning they have the strongest individual impact on the model\u2019s predictions. This is evident from their high mean absolute Shapley interaction values in the bar plot.<\/p>\n<p>Additionally, when looking at second-order interactions (i.e., how two features interact together), the combinations \u201cHorsepower \u00d7 Weight\u201d and \u201cDistance \u00d7 Horsepower\u201d show significant joint influence. Their combined attribution is around 1.4, indicating that these interactions play an important role in shaping the model\u2019s predictions beyond what each feature contributes individually. This highlights the presence of non-linear relationships between features in the model.<\/p>\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n<p>Check out the\u00a0<strong><a href=\"https:\/\/github.com\/Marktechpost\/AI-Tutorial-Codes-Included\/blob\/main\/SHAP-IQ\/SHAP_IQ_Visuals.ipynb\" target=\"_blank\" rel=\"noreferrer noopener\">Full Codes here<\/a><em>.<\/em><\/strong>\u00a0Feel free to check out our\u00a0<strong><mark><a href=\"https:\/\/github.com\/Marktechpost\/AI-Tutorial-Codes-Included\" target=\"_blank\" rel=\"noreferrer noopener\">GitHub Page for Tutorials, Codes and Notebooks<\/a><\/mark><\/strong>.\u00a0Also,\u00a0feel free to follow us on\u00a0<strong><a href=\"https:\/\/x.com\/intent\/follow?screen_name=marktechpost\" target=\"_blank\" rel=\"noreferrer noopener\"><mark>Twitter<\/mark><\/a><\/strong>\u00a0and don\u2019t forget to join our\u00a0<strong><a href=\"https:\/\/www.reddit.com\/r\/machinelearningnews\/\" target=\"_blank\" rel=\"noreferrer noopener\">100k+ ML SubReddit<\/a><\/strong>\u00a0and Subscribe to\u00a0<strong><a href=\"https:\/\/www.aidevsignals.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">our Newsletter<\/a><\/strong>.<\/p>\n<p>The post <a href=\"https:\/\/www.marktechpost.com\/2025\/08\/03\/tutorial-exploring-shap-iq-visualizations\/\">Tutorial: Exploring SHAP-IQ Visualizations<\/a> appeared first on <a href=\"https:\/\/www.marktechpost.com\/\">MarkTechPost<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>In this tutorial, we\u2019ll explore a range of SHAP-IQ visualizations that provide insights into how a machine learning model arrives at its predictions. These visuals help break down complex model behavior into interpretable components\u2014revealing both the individual and interactive contributions of features to a specific prediction. Check out the\u00a0Full Codes here. Installing the dependencies Copy CodeCopiedUse a different Browser !pip install shapiq overrides scikit-learn pandas numpy seaborn Copy CodeCopiedUse a different Browser from sklearn.ensemble import RandomForestRegressor from sklearn.metrics import mean_squared_error, r2_score from sklearn.model_selection import train_test_split from tqdm.asyncio import tqdm import shapiq print(f&#8221;shapiq version: {shapiq.__version__}&#8221;) Importing the dataset In this tutorial, we\u2019ll use the MPG (Miles Per Gallon) dataset, which we\u2019ll load directly from the Seaborn library. This dataset contains information about various car models, including features like horsepower, weight, and origin. Check out the\u00a0Full Codes here. Copy CodeCopiedUse a different Browser import seaborn as sns df = sns.load_dataset(&#8220;mpg&#8221;) df Processing the dataset We use Label Encoding to convert the categorical column(s) into numeric format, making them suitable for model training. Copy CodeCopiedUse a different Browser import pandas as pd from sklearn.preprocessing import LabelEncoder # Drop rows with missing values df = df.dropna() # Encoding the origin column le = LabelEncoder() df.loc[:, &#8220;origin&#8221;] = le.fit_transform(df[&#8220;origin&#8221;]) df[&#8216;origin&#8217;].unique() Copy CodeCopiedUse a different Browser for i, label in enumerate(le.classes_): print(f&#8221;{label} \u2192 {i}&#8221;) Splitting the data into training &amp; test subsets Copy CodeCopiedUse a different Browser # Select features and target X = df.drop(columns=[&#8220;mpg&#8221;, &#8220;name&#8221;]) y = df[&#8220;mpg&#8221;] feature_names = X.columns.tolist() x_data, y_data = X.values, y.values # Train-test split x_train, x_test, y_train, y_test = train_test_split(x_data, y_data, test_size=0.2, random_state=42) Model Training We train a Random Forest Regressor with a maximum depth of 10 and 10 decision trees (n_estimators=10). A fixed random_state ensures reproducibility. Copy CodeCopiedUse a different Browser # Train model model = RandomForestRegressor(random_state=42, max_depth=10, n_estimators=10) model.fit(x_train, y_train) Model Evaluation Copy CodeCopiedUse a different Browser # Evaluate mse = mean_squared_error(y_test, model.predict(x_test)) r2 = r2_score(y_test, model.predict(x_test)) print(f&#8221;Mean Squared Error: {mse:.2f}&#8221;) print(f&#8221;R2 Score: {r2:.2f}&#8221;) Explaining a Local Instance We choose a specific test instance (with instance_id = 7) to explore how the model arrived at its prediction. We\u2019ll print the true value, predicted value, and the feature values for this instance. Check out the\u00a0Full Codes here. Copy CodeCopiedUse a different Browser # select a local instance to be explained instance_id = 7 x_explain = x_test[instance_id] y_true = y_test[instance_id] y_pred = model.predict(x_explain.reshape(1, -1))[0] print(f&#8221;Instance {instance_id}, True Value: {y_true}, Predicted Value: {y_pred}&#8221;) for i, feature in enumerate(feature_names): print(f&#8221;{feature}: {x_explain[i]}&#8221;) Generating Explanations for Multiple Interaction Orders We generate Shapley-based explanations for different interaction orders using the shapiq package. Specifically, we compute: Order 1 (Standard Shapley Values): Individual feature contributions Order 2 (Pairwise Interactions): Combined effects of feature pairs Order N (Full Interaction): All interactions up to the total number of features Copy CodeCopiedUse a different Browser # create explanations for different orders feature_names = list(X.columns) # get the feature names n_features = len(feature_names) si_order: dict[int, shapiq.InteractionValues] = {} for order in tqdm([1, 2, n_features]): index = &#8220;k-SII&#8221; if order &gt; 1 else &#8220;SV&#8221; # will also be set automatically by the explainer explainer = shapiq.TreeExplainer(model=model, max_order=order, index=index) si_order[order] = explainer.explain(x=x_explain) si_order 1. Force Chart The force plot is a powerful visualization tool that helps us understand how a machine learning model arrived at a specific prediction. It displays the baseline prediction (i.e., the expected value of the model before seeing any features), and then shows how each feature \u201cpushes\u201d the prediction higher or lower. In this plot: Red bars represent features or interactions that increase the prediction. Blue bars represent those that decrease it. The length of each bar corresponds to the magnitude of its effect. When using Shapley interaction values, the force plot can visualize not just individual contributions but also interactions between features. This makes it especially insightful when interpreting complex models, as it visually decomposes how combinations of features work together to influence the outcome. Check out the\u00a0Full Codes here. Copy CodeCopiedUse a different Browser sv = si_order[1] # get the SV si = si_order[2] # get the 2-SII mi = si_order[n_features] # get the Moebius transform sv.plot_force(feature_names=feature_names, show=True) si.plot_force(feature_names=feature_names, show=True) mi.plot_force(feature_names=feature_names, show=True) From the first plot, we can see that the base value is 23.5. Features like Weight, Cylinders, Horsepower, and Displacement have a positive influence on the prediction, pushing it above the baseline. On the other hand, Model Year and Acceleration have a negative impact, pulling the prediction downward. 2. Waterfall Chart Similar to the force plot, the waterfall plot is another popular way to visualize Shapley values, originally introduced with the shap library. It shows how different features push the prediction higher or lower compared to the baseline. One key advantage of the waterfall plot is that it automatically groups features with very small impacts into an \u201cother\u201d category, making the chart cleaner and easier to understand. Check out the\u00a0Full Codes here. Copy CodeCopiedUse a different Browser sv.plot_waterfall(feature_names=feature_names, show=True) si.plot_waterfall(feature_names=feature_names, show=True) mi.plot_waterfall(feature_names=feature_names, show=True) 3. Network Plot The network plot shows how features interact with each other using first- and second-order Shapley interactions. Node size reflects individual feature impact, while edge width and color show interaction strength and direction. It\u2019s especially helpful when dealing with many features, revealing complex interactions that simpler plots might miss. Check out the\u00a0Full Codes here. Copy CodeCopiedUse a different Browser si.plot_network(feature_names=feature_names, show=True) mi.plot_network(feature_names=feature_names, show=True) 4. SI Graph Plot The SI graph plot extends the network plot by visualizing all higher-order interactions as hyper-edges connecting multiple features. Node size shows individual feature impact, while edge width, color, and transparency reflect the strength and direction of interactions. It provides a comprehensive view of how features jointly influence the model\u2019s prediction. Check out the\u00a0Full Codes here. Copy CodeCopiedUse a different Browser # we abbreviate the feature names since, they are plotted inside the nodes abbrev_feature_names = shapiq.plot.utils.abbreviate_feature_names(feature_names) sv.plot_si_graph( feature_names=abbrev_feature_names, show=True, size_factor=2.5, node_size_scaling=1.5, plot_original_nodes=True, ) si.plot_si_graph( feature_names=abbrev_feature_names, show=True, size_factor=2.5, node_size_scaling=1.5, plot_original_nodes=True, ) mi.plot_si_graph( feature_names=abbrev_feature_names, show=True, size_factor=2.5, node_size_scaling=1.5, plot_original_nodes=True, ) 5. Bar Plot The bar plot is tailored for global explanations. While other plots can<\/p>","protected":false},"author":2,"featured_media":29322,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"pmpro_default_level":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_pvb_checkbox_block_on_post":false,"footnotes":""},"categories":[52,5,7,1],"tags":[],"class_list":["post-29321","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai-club","category-committee","category-news","category-uncategorized","pmpro-has-access"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Tutorial: Exploring SHAP-IQ Visualizations - YouZum<\/title>\n<meta name=\"description\" content=\"\u0e01\u0e34\u0e08\u0e01\u0e23\u0e23\u0e21\u0e40\u0e01\u0e35\u0e48\u0e22\u0e27\u0e01\u0e31\u0e1a\u0e42\u0e14\u0e23\u0e19\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/youzum.net\/de\/tutorial-exploring-shap-iq-visualizations\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Tutorial: Exploring SHAP-IQ Visualizations - YouZum\" \/>\n<meta property=\"og:description\" content=\"\u0e01\u0e34\u0e08\u0e01\u0e23\u0e23\u0e21\u0e40\u0e01\u0e35\u0e48\u0e22\u0e27\u0e01\u0e31\u0e1a\u0e42\u0e14\u0e23\u0e19\" \/>\n<meta property=\"og:url\" content=\"https:\/\/youzum.net\/de\/tutorial-exploring-shap-iq-visualizations\/\" \/>\n<meta property=\"og:site_name\" content=\"YouZum\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DroneAssociationTH\/\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-04T05:55:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXdSzKJXZ6TsWprj_MP5wcuq6iZQLUdldMbwkb_W0TSdZeNfUt4kFj95hBcFz5BfBAw_8P4xAv9Y4Oa8vnevZytRimFf6vwzt4rU6c34t-muhJmGt7VfoVdzoEN2V2pkQXmaK4QMLQ?key=aAipKL6NcbRDTM9g2wsEFQ\" \/>\n<meta name=\"author\" content=\"admin NU\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Verfasst von\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin NU\" \/>\n\t<meta name=\"twitter:label2\" content=\"Gesch\u00e4tzte Lesezeit\" \/>\n\t<meta name=\"twitter:data2\" content=\"7\u00a0Minuten\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/youzum.net\/tutorial-exploring-shap-iq-visualizations\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/youzum.net\/tutorial-exploring-shap-iq-visualizations\/\"},\"author\":{\"name\":\"admin NU\",\"@id\":\"https:\/\/yousum.gpucore.co\/#\/schema\/person\/97fa48242daf3908e4d9a5f26f4a059c\"},\"headline\":\"Tutorial: Exploring SHAP-IQ Visualizations\",\"datePublished\":\"2025-08-04T05:55:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/youzum.net\/tutorial-exploring-shap-iq-visualizations\/\"},\"wordCount\":940,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/yousum.gpucore.co\/#organization\"},\"image\":{\"@id\":\"https:\/\/youzum.net\/tutorial-exploring-shap-iq-visualizations\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/youzum.net\/wp-content\/uploads\/2025\/08\/AD_4nXdSzKJXZ6TsWprj_MP5wcuq6iZQLUdldMbwkb_W0TSdZeNfUt4kFj95hBcFz5BfBAw_8P4xAv9Y4Oa8vnevZytRimFf6vwzt4rU6c34t-muhJmGt7VfoVdzoEN2V2pkQXmaK4QMLQ-DbWJlU.png\",\"articleSection\":[\"AI\",\"Committee\",\"News\",\"Uncategorized\"],\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/youzum.net\/tutorial-exploring-shap-iq-visualizations\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/youzum.net\/tutorial-exploring-shap-iq-visualizations\/\",\"url\":\"https:\/\/youzum.net\/tutorial-exploring-shap-iq-visualizations\/\",\"name\":\"Tutorial: Exploring SHAP-IQ Visualizations - YouZum\",\"isPartOf\":{\"@id\":\"https:\/\/yousum.gpucore.co\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/youzum.net\/tutorial-exploring-shap-iq-visualizations\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/youzum.net\/tutorial-exploring-shap-iq-visualizations\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/youzum.net\/wp-content\/uploads\/2025\/08\/AD_4nXdSzKJXZ6TsWprj_MP5wcuq6iZQLUdldMbwkb_W0TSdZeNfUt4kFj95hBcFz5BfBAw_8P4xAv9Y4Oa8vnevZytRimFf6vwzt4rU6c34t-muhJmGt7VfoVdzoEN2V2pkQXmaK4QMLQ-DbWJlU.png\",\"datePublished\":\"2025-08-04T05:55:45+00:00\",\"description\":\"\u0e01\u0e34\u0e08\u0e01\u0e23\u0e23\u0e21\u0e40\u0e01\u0e35\u0e48\u0e22\u0e27\u0e01\u0e31\u0e1a\u0e42\u0e14\u0e23\u0e19\",\"breadcrumb\":{\"@id\":\"https:\/\/youzum.net\/tutorial-exploring-shap-iq-visualizations\/#breadcrumb\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/youzum.net\/tutorial-exploring-shap-iq-visualizations\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\/\/youzum.net\/tutorial-exploring-shap-iq-visualizations\/#primaryimage\",\"url\":\"https:\/\/youzum.net\/wp-content\/uploads\/2025\/08\/AD_4nXdSzKJXZ6TsWprj_MP5wcuq6iZQLUdldMbwkb_W0TSdZeNfUt4kFj95hBcFz5BfBAw_8P4xAv9Y4Oa8vnevZytRimFf6vwzt4rU6c34t-muhJmGt7VfoVdzoEN2V2pkQXmaK4QMLQ-DbWJlU.png\",\"contentUrl\":\"https:\/\/youzum.net\/wp-content\/uploads\/2025\/08\/AD_4nXdSzKJXZ6TsWprj_MP5wcuq6iZQLUdldMbwkb_W0TSdZeNfUt4kFj95hBcFz5BfBAw_8P4xAv9Y4Oa8vnevZytRimFf6vwzt4rU6c34t-muhJmGt7VfoVdzoEN2V2pkQXmaK4QMLQ-DbWJlU.png\",\"width\":991,\"height\":657},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/youzum.net\/tutorial-exploring-shap-iq-visualizations\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/youzum.net\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tutorial: Exploring SHAP-IQ Visualizations\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/yousum.gpucore.co\/#website\",\"url\":\"https:\/\/yousum.gpucore.co\/\",\"name\":\"YouSum\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/yousum.gpucore.co\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/yousum.gpucore.co\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"de\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/yousum.gpucore.co\/#organization\",\"name\":\"Drone Association Thailand\",\"url\":\"https:\/\/yousum.gpucore.co\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\/\/yousum.gpucore.co\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/youzum.net\/wp-content\/uploads\/2024\/11\/tranparent-logo.png\",\"contentUrl\":\"https:\/\/youzum.net\/wp-content\/uploads\/2024\/11\/tranparent-logo.png\",\"width\":300,\"height\":300,\"caption\":\"Drone Association Thailand\"},\"image\":{\"@id\":\"https:\/\/yousum.gpucore.co\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/DroneAssociationTH\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/yousum.gpucore.co\/#\/schema\/person\/97fa48242daf3908e4d9a5f26f4a059c\",\"name\":\"admin NU\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\/\/yousum.gpucore.co\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/youzum.net\/wp-content\/uploads\/avatars\/2\/1746849356-bpfull.png\",\"contentUrl\":\"https:\/\/youzum.net\/wp-content\/uploads\/avatars\/2\/1746849356-bpfull.png\",\"caption\":\"admin NU\"},\"url\":\"https:\/\/youzum.net\/de\/members\/adminnu\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Tutorial: Exploring SHAP-IQ Visualizations - YouZum","description":"\u0e01\u0e34\u0e08\u0e01\u0e23\u0e23\u0e21\u0e40\u0e01\u0e35\u0e48\u0e22\u0e27\u0e01\u0e31\u0e1a\u0e42\u0e14\u0e23\u0e19","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/youzum.net\/de\/tutorial-exploring-shap-iq-visualizations\/","og_locale":"de_DE","og_type":"article","og_title":"Tutorial: Exploring SHAP-IQ Visualizations - YouZum","og_description":"\u0e01\u0e34\u0e08\u0e01\u0e23\u0e23\u0e21\u0e40\u0e01\u0e35\u0e48\u0e22\u0e27\u0e01\u0e31\u0e1a\u0e42\u0e14\u0e23\u0e19","og_url":"https:\/\/youzum.net\/de\/tutorial-exploring-shap-iq-visualizations\/","og_site_name":"YouZum","article_publisher":"https:\/\/www.facebook.com\/DroneAssociationTH\/","article_published_time":"2025-08-04T05:55:45+00:00","og_image":[{"url":"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXdSzKJXZ6TsWprj_MP5wcuq6iZQLUdldMbwkb_W0TSdZeNfUt4kFj95hBcFz5BfBAw_8P4xAv9Y4Oa8vnevZytRimFf6vwzt4rU6c34t-muhJmGt7VfoVdzoEN2V2pkQXmaK4QMLQ?key=aAipKL6NcbRDTM9g2wsEFQ","type":"","width":"","height":""}],"author":"admin NU","twitter_card":"summary_large_image","twitter_misc":{"Verfasst von":"admin NU","Gesch\u00e4tzte Lesezeit":"7\u00a0Minuten"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/youzum.net\/tutorial-exploring-shap-iq-visualizations\/#article","isPartOf":{"@id":"https:\/\/youzum.net\/tutorial-exploring-shap-iq-visualizations\/"},"author":{"name":"admin NU","@id":"https:\/\/yousum.gpucore.co\/#\/schema\/person\/97fa48242daf3908e4d9a5f26f4a059c"},"headline":"Tutorial: Exploring SHAP-IQ Visualizations","datePublished":"2025-08-04T05:55:45+00:00","mainEntityOfPage":{"@id":"https:\/\/youzum.net\/tutorial-exploring-shap-iq-visualizations\/"},"wordCount":940,"commentCount":0,"publisher":{"@id":"https:\/\/yousum.gpucore.co\/#organization"},"image":{"@id":"https:\/\/youzum.net\/tutorial-exploring-shap-iq-visualizations\/#primaryimage"},"thumbnailUrl":"https:\/\/youzum.net\/wp-content\/uploads\/2025\/08\/AD_4nXdSzKJXZ6TsWprj_MP5wcuq6iZQLUdldMbwkb_W0TSdZeNfUt4kFj95hBcFz5BfBAw_8P4xAv9Y4Oa8vnevZytRimFf6vwzt4rU6c34t-muhJmGt7VfoVdzoEN2V2pkQXmaK4QMLQ-DbWJlU.png","articleSection":["AI","Committee","News","Uncategorized"],"inLanguage":"de","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/youzum.net\/tutorial-exploring-shap-iq-visualizations\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/youzum.net\/tutorial-exploring-shap-iq-visualizations\/","url":"https:\/\/youzum.net\/tutorial-exploring-shap-iq-visualizations\/","name":"Tutorial: Exploring SHAP-IQ Visualizations - YouZum","isPartOf":{"@id":"https:\/\/yousum.gpucore.co\/#website"},"primaryImageOfPage":{"@id":"https:\/\/youzum.net\/tutorial-exploring-shap-iq-visualizations\/#primaryimage"},"image":{"@id":"https:\/\/youzum.net\/tutorial-exploring-shap-iq-visualizations\/#primaryimage"},"thumbnailUrl":"https:\/\/youzum.net\/wp-content\/uploads\/2025\/08\/AD_4nXdSzKJXZ6TsWprj_MP5wcuq6iZQLUdldMbwkb_W0TSdZeNfUt4kFj95hBcFz5BfBAw_8P4xAv9Y4Oa8vnevZytRimFf6vwzt4rU6c34t-muhJmGt7VfoVdzoEN2V2pkQXmaK4QMLQ-DbWJlU.png","datePublished":"2025-08-04T05:55:45+00:00","description":"\u0e01\u0e34\u0e08\u0e01\u0e23\u0e23\u0e21\u0e40\u0e01\u0e35\u0e48\u0e22\u0e27\u0e01\u0e31\u0e1a\u0e42\u0e14\u0e23\u0e19","breadcrumb":{"@id":"https:\/\/youzum.net\/tutorial-exploring-shap-iq-visualizations\/#breadcrumb"},"inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/youzum.net\/tutorial-exploring-shap-iq-visualizations\/"]}]},{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/youzum.net\/tutorial-exploring-shap-iq-visualizations\/#primaryimage","url":"https:\/\/youzum.net\/wp-content\/uploads\/2025\/08\/AD_4nXdSzKJXZ6TsWprj_MP5wcuq6iZQLUdldMbwkb_W0TSdZeNfUt4kFj95hBcFz5BfBAw_8P4xAv9Y4Oa8vnevZytRimFf6vwzt4rU6c34t-muhJmGt7VfoVdzoEN2V2pkQXmaK4QMLQ-DbWJlU.png","contentUrl":"https:\/\/youzum.net\/wp-content\/uploads\/2025\/08\/AD_4nXdSzKJXZ6TsWprj_MP5wcuq6iZQLUdldMbwkb_W0TSdZeNfUt4kFj95hBcFz5BfBAw_8P4xAv9Y4Oa8vnevZytRimFf6vwzt4rU6c34t-muhJmGt7VfoVdzoEN2V2pkQXmaK4QMLQ-DbWJlU.png","width":991,"height":657},{"@type":"BreadcrumbList","@id":"https:\/\/youzum.net\/tutorial-exploring-shap-iq-visualizations\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/youzum.net\/"},{"@type":"ListItem","position":2,"name":"Tutorial: Exploring SHAP-IQ Visualizations"}]},{"@type":"WebSite","@id":"https:\/\/yousum.gpucore.co\/#website","url":"https:\/\/yousum.gpucore.co\/","name":"YouSum","description":"","publisher":{"@id":"https:\/\/yousum.gpucore.co\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/yousum.gpucore.co\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"de"},{"@type":"Organization","@id":"https:\/\/yousum.gpucore.co\/#organization","name":"Drone Association Thailand","url":"https:\/\/yousum.gpucore.co\/","logo":{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/yousum.gpucore.co\/#\/schema\/logo\/image\/","url":"https:\/\/youzum.net\/wp-content\/uploads\/2024\/11\/tranparent-logo.png","contentUrl":"https:\/\/youzum.net\/wp-content\/uploads\/2024\/11\/tranparent-logo.png","width":300,"height":300,"caption":"Drone Association Thailand"},"image":{"@id":"https:\/\/yousum.gpucore.co\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DroneAssociationTH\/"]},{"@type":"Person","@id":"https:\/\/yousum.gpucore.co\/#\/schema\/person\/97fa48242daf3908e4d9a5f26f4a059c","name":"admin NU","image":{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/yousum.gpucore.co\/#\/schema\/person\/image\/","url":"https:\/\/youzum.net\/wp-content\/uploads\/avatars\/2\/1746849356-bpfull.png","contentUrl":"https:\/\/youzum.net\/wp-content\/uploads\/avatars\/2\/1746849356-bpfull.png","caption":"admin NU"},"url":"https:\/\/youzum.net\/de\/members\/adminnu\/"}]}},"rttpg_featured_image_url":{"full":["https:\/\/youzum.net\/wp-content\/uploads\/2025\/08\/AD_4nXdSzKJXZ6TsWprj_MP5wcuq6iZQLUdldMbwkb_W0TSdZeNfUt4kFj95hBcFz5BfBAw_8P4xAv9Y4Oa8vnevZytRimFf6vwzt4rU6c34t-muhJmGt7VfoVdzoEN2V2pkQXmaK4QMLQ-DbWJlU.png",991,657,false],"landscape":["https:\/\/youzum.net\/wp-content\/uploads\/2025\/08\/AD_4nXdSzKJXZ6TsWprj_MP5wcuq6iZQLUdldMbwkb_W0TSdZeNfUt4kFj95hBcFz5BfBAw_8P4xAv9Y4Oa8vnevZytRimFf6vwzt4rU6c34t-muhJmGt7VfoVdzoEN2V2pkQXmaK4QMLQ-DbWJlU.png",991,657,false],"portraits":["https:\/\/youzum.net\/wp-content\/uploads\/2025\/08\/AD_4nXdSzKJXZ6TsWprj_MP5wcuq6iZQLUdldMbwkb_W0TSdZeNfUt4kFj95hBcFz5BfBAw_8P4xAv9Y4Oa8vnevZytRimFf6vwzt4rU6c34t-muhJmGt7VfoVdzoEN2V2pkQXmaK4QMLQ-DbWJlU.png",991,657,false],"thumbnail":["https:\/\/youzum.net\/wp-content\/uploads\/2025\/08\/AD_4nXdSzKJXZ6TsWprj_MP5wcuq6iZQLUdldMbwkb_W0TSdZeNfUt4kFj95hBcFz5BfBAw_8P4xAv9Y4Oa8vnevZytRimFf6vwzt4rU6c34t-muhJmGt7VfoVdzoEN2V2pkQXmaK4QMLQ-DbWJlU-150x150.png",150,150,true],"medium":["https:\/\/youzum.net\/wp-content\/uploads\/2025\/08\/AD_4nXdSzKJXZ6TsWprj_MP5wcuq6iZQLUdldMbwkb_W0TSdZeNfUt4kFj95hBcFz5BfBAw_8P4xAv9Y4Oa8vnevZytRimFf6vwzt4rU6c34t-muhJmGt7VfoVdzoEN2V2pkQXmaK4QMLQ-DbWJlU-300x199.png",300,199,true],"large":["https:\/\/youzum.net\/wp-content\/uploads\/2025\/08\/AD_4nXdSzKJXZ6TsWprj_MP5wcuq6iZQLUdldMbwkb_W0TSdZeNfUt4kFj95hBcFz5BfBAw_8P4xAv9Y4Oa8vnevZytRimFf6vwzt4rU6c34t-muhJmGt7VfoVdzoEN2V2pkQXmaK4QMLQ-DbWJlU.png",991,657,false],"1536x1536":["https:\/\/youzum.net\/wp-content\/uploads\/2025\/08\/AD_4nXdSzKJXZ6TsWprj_MP5wcuq6iZQLUdldMbwkb_W0TSdZeNfUt4kFj95hBcFz5BfBAw_8P4xAv9Y4Oa8vnevZytRimFf6vwzt4rU6c34t-muhJmGt7VfoVdzoEN2V2pkQXmaK4QMLQ-DbWJlU.png",991,657,false],"2048x2048":["https:\/\/youzum.net\/wp-content\/uploads\/2025\/08\/AD_4nXdSzKJXZ6TsWprj_MP5wcuq6iZQLUdldMbwkb_W0TSdZeNfUt4kFj95hBcFz5BfBAw_8P4xAv9Y4Oa8vnevZytRimFf6vwzt4rU6c34t-muhJmGt7VfoVdzoEN2V2pkQXmaK4QMLQ-DbWJlU.png",991,657,false],"trp-custom-language-flag":["https:\/\/youzum.net\/wp-content\/uploads\/2025\/08\/AD_4nXdSzKJXZ6TsWprj_MP5wcuq6iZQLUdldMbwkb_W0TSdZeNfUt4kFj95hBcFz5BfBAw_8P4xAv9Y4Oa8vnevZytRimFf6vwzt4rU6c34t-muhJmGt7VfoVdzoEN2V2pkQXmaK4QMLQ-DbWJlU-18x12.png",18,12,true],"woocommerce_thumbnail":["https:\/\/youzum.net\/wp-content\/uploads\/2025\/08\/AD_4nXdSzKJXZ6TsWprj_MP5wcuq6iZQLUdldMbwkb_W0TSdZeNfUt4kFj95hBcFz5BfBAw_8P4xAv9Y4Oa8vnevZytRimFf6vwzt4rU6c34t-muhJmGt7VfoVdzoEN2V2pkQXmaK4QMLQ-DbWJlU-300x300.png",300,300,true],"woocommerce_single":["https:\/\/youzum.net\/wp-content\/uploads\/2025\/08\/AD_4nXdSzKJXZ6TsWprj_MP5wcuq6iZQLUdldMbwkb_W0TSdZeNfUt4kFj95hBcFz5BfBAw_8P4xAv9Y4Oa8vnevZytRimFf6vwzt4rU6c34t-muhJmGt7VfoVdzoEN2V2pkQXmaK4QMLQ-DbWJlU-600x398.png",600,398,true],"woocommerce_gallery_thumbnail":["https:\/\/youzum.net\/wp-content\/uploads\/2025\/08\/AD_4nXdSzKJXZ6TsWprj_MP5wcuq6iZQLUdldMbwkb_W0TSdZeNfUt4kFj95hBcFz5BfBAw_8P4xAv9Y4Oa8vnevZytRimFf6vwzt4rU6c34t-muhJmGt7VfoVdzoEN2V2pkQXmaK4QMLQ-DbWJlU-100x100.png",100,100,true]},"rttpg_author":{"display_name":"admin NU","author_link":"https:\/\/youzum.net\/de\/members\/adminnu\/"},"rttpg_comment":0,"rttpg_category":"<a href=\"https:\/\/youzum.net\/de\/category\/ai-club\/\" rel=\"category tag\">AI<\/a> <a href=\"https:\/\/youzum.net\/de\/category\/committee\/\" rel=\"category tag\">Committee<\/a> <a href=\"https:\/\/youzum.net\/de\/category\/news\/\" rel=\"category tag\">News<\/a> <a href=\"https:\/\/youzum.net\/de\/category\/uncategorized\/\" rel=\"category tag\">Uncategorized<\/a>","rttpg_excerpt":"In this tutorial, we\u2019ll explore a range of SHAP-IQ visualizations that provide insights into how a machine learning model arrives at its predictions. These visuals help break down complex model behavior into interpretable components\u2014revealing both the individual and interactive contributions of features to a specific prediction. Check out the\u00a0Full Codes here. Installing the dependencies Copy&hellip;","_links":{"self":[{"href":"https:\/\/youzum.net\/de\/wp-json\/wp\/v2\/posts\/29321","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/youzum.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/youzum.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/youzum.net\/de\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/youzum.net\/de\/wp-json\/wp\/v2\/comments?post=29321"}],"version-history":[{"count":0,"href":"https:\/\/youzum.net\/de\/wp-json\/wp\/v2\/posts\/29321\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/youzum.net\/de\/wp-json\/wp\/v2\/media\/29322"}],"wp:attachment":[{"href":"https:\/\/youzum.net\/de\/wp-json\/wp\/v2\/media?parent=29321"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/youzum.net\/de\/wp-json\/wp\/v2\/categories?post=29321"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/youzum.net\/de\/wp-json\/wp\/v2\/tags?post=29321"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}