You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This plot is similar to the local interpretation of `GLM`_, as we use Lasso as the surrogate model. It shows the linear regression coefficients and marginal effects of the top-10 features (with feature values on the right axis) that contribute to the prediction of bike counts. The `Weight` represents the regression coefficients, and `Effect` represents the marginal effects. From top to bottom, `hr` contributes the most to the prediction of bike counts, followed by `atemp`, then `hum`, and so on. Note that this plot only shows the top 10 features with the largest contributions. To get the full results, you can set the parameter `return_data` to True.
45
+
This plot is similar to the local interpretation of `GLM`_, as we use Lasso as the surrogate model. The stems represent the coefficients and the bars show the effect. It shows the linear regression coefficients and marginal effects of the top-10 features (with feature values on the right axis) that contribute to the prediction of bike counts. The `Weight` represents the regression coefficients, and `Effect` represents the marginal effects. From top to bottom, `hr` contributes the most to the prediction of bike counts, followed by `atemp`, then `hum`, and so on. Note that this plot only shows the top 10 features with the largest contributions. To get the full results, you can set the parameter `return_data` to True.
In this plot, the bars show the marginal contribution (effects) of each feature. The longer the bar, the larger the marginal effect, and the more contribution the corresponding feature has on the prediction. In contrast, the regression coefficients (weights) indicate the strength and direction of the relationship between each feature and the target variable. The larger the coefficient, the more sensitive the corresponding feature' contribution to the prediction.
152
152
153
-
- The bars marked as `Weight` represent the regression coefficients, which indicate the strength and direction of the relationship between each feature and the target variable. The longer the bar, the larger the coefficient, and the more sensitive the corresponding feature' contribution to the prediction.
154
-
155
-
- The stems marked as `Effect` represent the marginal effects. The longer the stem, the larger the marginal effect, and the more contribution the corresponding feature has on the prediction.
156
-
157
-
The `sample_id=0` indicates that the plot is showing the coefficients and marginal effects for the first sample in the training set, and the feature values for this sample are shown on the right axis. Note that this plot only shows the top 10 features with the largest contributions. To get the full results, you can set the parameter `return_data` to True.
153
+
The `sample_id=0` indicates that the plot is showing the marginal effects for the first sample in the training set, and the feature values for this sample are shown on the right axis. Note that this plot only shows the top 10 features with the largest contributions. To get the full results, you can set the parameter `return_data` to True.
The definition of `Weight` and `Effect` can be found in the introduction for GLM. Similarly, we provide the `centered` option, as shown below.
212
+
The definition of `Weight` and `Effect` can be found in the introduction for GLM. The stems represent the coefficients and the bars show the effect. Similarly, we provide the `centered` option, as shown below.
<p>This plot is similar to the local interpretation of <aclass="reference external" href="glm.html#local-interpretation">GLM</a>, as we use Lasso as the surrogate model. It shows the linear regression coefficients and marginal effects of the top-10 features (with feature values on the right axis) that contribute to the prediction of bike counts. The <codeclass="docutils literal notranslate"><spanclass="pre">Weight</span></code> represents the regression coefficients, and <codeclass="docutils literal notranslate"><spanclass="pre">Effect</span></code> represents the marginal effects. From top to bottom, <codeclass="docutils literal notranslate"><spanclass="pre">hr</span></code> contributes the most to the prediction of bike counts, followed by <codeclass="docutils literal notranslate"><spanclass="pre">atemp</span></code>, then <codeclass="docutils literal notranslate"><spanclass="pre">hum</span></code>, and so on. Note that this plot only shows the top 10 features with the largest contributions. To get the full results, you can set the parameter <codeclass="docutils literal notranslate"><spanclass="pre">return_data</span></code> to True.</p>
250
+
<p>This plot is similar to the local interpretation of <aclass="reference external" href="glm.html#local-interpretation">GLM</a>, as we use Lasso as the surrogate model. The stems represent the coefficients and the bars show the effect. It shows the linear regression coefficients and marginal effects of the top-10 features (with feature values on the right axis) that contribute to the prediction of bike counts. The <codeclass="docutils literal notranslate"><spanclass="pre">Weight</span></code> represents the regression coefficients, and <codeclass="docutils literal notranslate"><spanclass="pre">Effect</span></code> represents the marginal effects. From top to bottom, <codeclass="docutils literal notranslate"><spanclass="pre">hr</span></code> contributes the most to the prediction of bike counts, followed by <codeclass="docutils literal notranslate"><spanclass="pre">atemp</span></code>, then <codeclass="docutils literal notranslate"><spanclass="pre">hum</span></code>, and so on. Note that this plot only shows the top 10 features with the largest contributions. To get the full results, you can set the parameter <codeclass="docutils literal notranslate"><spanclass="pre">return_data</span></code> to True.</p>
251
251
<p><strong>Centered predictors</strong></p>
252
252
<p>Centering is crucial when group effects are of interest and can be done by subtracting the mean attribute from each attribute element.</p>
<li><p>The bars marked as <codeclass="docutils literal notranslate"><spanclass="pre">Weight</span></code> represent the regression coefficients, which indicate the strength and direction of the relationship between each feature and the target variable. The longer the bar, the larger the coefficient, and the more sensitive the corresponding feature’ contribution to the prediction.</p></li>
396
-
<li><p>The stems marked as <codeclass="docutils literal notranslate"><spanclass="pre">Effect</span></code> represent the marginal effects. The longer the stem, the larger the marginal effect, and the more contribution the corresponding feature has on the prediction.</p></li>
397
-
</ul>
398
-
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">sample_id=0</span></code> indicates that the plot is showing the coefficients and marginal effects for the first sample in the training set, and the feature values for this sample are shown on the right axis. Note that this plot only shows the top 10 features with the largest contributions. To get the full results, you can set the parameter <codeclass="docutils literal notranslate"><spanclass="pre">return_data</span></code> to True.</p>
393
+
<p>In this plot, the bars show the marginal contribution (effects) of each feature. The longer the bar, the larger the marginal effect, and the more contribution the corresponding feature has on the prediction. In contrast, the regression coefficients (weights) indicate the strength and direction of the relationship between each feature and the target variable. The larger the coefficient, the more sensitive the corresponding feature’ contribution to the prediction.</p>
394
+
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">sample_id=0</span></code> indicates that the plot is showing the marginal effects for the first sample in the training set, and the feature values for this sample are shown on the right axis. Note that this plot only shows the top 10 features with the largest contributions. To get the full results, you can set the parameter <codeclass="docutils literal notranslate"><spanclass="pre">return_data</span></code> to True.</p>
399
395
<sectionid="original-scale-option">
400
396
<h3><spanclass="section-number">5.1.3.1. </span>Original Scale Option<aclass="headerlink" href="#original-scale-option" title="Permalink to this heading">¶</a></h3>
401
397
<p>The right axis of the local interpretation plot shows the scaled feature values. If you want to know the original feature values before the preprocessing, set <codeclass="docutils literal notranslate"><spanclass="pre">original_scale=True</span></code>.</p>
<h2><spanclass="section-number">5.9.5. </span>Local Interpretation<aclass="headerlink" href="#local-interpretation" title="Permalink to this heading">¶</a></h2>
438
438
<sectionid="local-feature-contribution-plot">
439
439
<h3><spanclass="section-number">5.9.5.1. </span>Local Feature Contribution plot<aclass="headerlink" href="#local-feature-contribution-plot" title="Permalink to this heading">¶</a></h3>
440
-
<p>The local feature importance plot (with the keyword “local_fi”) shows the prediction decomposition of a single training sample.
441
-
This plot is similar to that of GLM, see the local interpretation of <aclass="reference external" href="glm.html#local-interpretation">GLM</a>.</p>
440
+
<p>The local feature importance plot (with the keyword “local_fi”) shows the prediction decomposition of a single training sample.</p>
<p>The definition of <codeclass="docutils literal notranslate"><spanclass="pre">Weight</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">Effect</span></code> can be found in the introduction for GLM. Similarly, we provide the <codeclass="docutils literal notranslate"><spanclass="pre">centered</span></code> option, as shown below.</p>
453
+
<p>The definition of <codeclass="docutils literal notranslate"><spanclass="pre">Weight</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">Effect</span></code> can be found in the introduction for GLM. The stems represent the coefficients and the bars show the effect. Similarly, we provide the <codeclass="docutils literal notranslate"><spanclass="pre">centered</span></code> option, as shown below.</p>
0 commit comments