Skip to content

Commit

Permalink
Built site for gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Quarto GHA Workflow Runner committed Jul 8, 2024
1 parent 9389ab9 commit 620a61f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .nojekyll
Original file line number Diff line number Diff line change
@@ -1 +1 @@
bf04d777
d5b17e10
24 changes: 6 additions & 18 deletions api/Model.html
Original file line number Diff line number Diff line change
Expand Up @@ -893,10 +893,10 @@ <h3 class="anchored" data-anchor-id="bambi.Model.predict">predict</h3>
<h4 class="anchored" data-anchor-id="parameters-5">Parameters</h4>
<table class="table">
<colgroup>
<col style="width: 5%">
<col style="width: 5%">
<col style="width: 85%">
<col style="width: 4%">
<col style="width: 4%">
<col style="width: 86%">
<col style="width: 3%">
</colgroup>
<thead>
<tr class="header">
Expand All @@ -916,7 +916,7 @@ <h4 class="anchored" data-anchor-id="parameters-5">Parameters</h4>
<tr class="even">
<td><code>kind</code></td>
<td>str</td>
<td>Indicates the type of prediction required. Can be <code>"mean"</code> or <code>"pps"</code>. The first returns draws from the posterior distribution of the mean, while the latter returns the draws from the posterior predictive distribution (i.e.&nbsp;the posterior probability distribution for a new observation) in addition to the mean posterior distribution. Defaults to <code>"mean"</code>.</td>
<td>Indicates the type of prediction required. Can be <code>"response_params"</code> or <code>"response"</code>. The first returns draws from the posterior distribution of the likelihood parameters, while the latter returns the draws from the posterior predictive distribution (i.e.&nbsp;the posterior probability distribution for a new observation) in addition to the posterior distribution. Defaults to <code>"response_params"</code>.</td>
<td><code>'response_params'</code></td>
</tr>
<tr class="odd">
Expand All @@ -928,20 +928,8 @@ <h4 class="anchored" data-anchor-id="parameters-5">Parameters</h4>
<tr class="even">
<td><code>inplace</code></td>
<td>bool</td>
<td>If <code>True</code> it will modify <code>idata</code> in-place. Otherwise, it will return a copy of <code>idata</code> with the predictions added. If <code>kind="mean"</code>, a new variable ending in <code>"_mean"</code> is added to the <code>posterior</code> group. If <code>kind="pps"</code>, it appends a <code>posterior_predictive</code> group to <code>idata</code>. If any of these already exist, it will be overwritten.</td>
<td><code>True</code></td>
</tr>
<tr class="odd">
<td><code>include_group_specific</code></td>
<td>bool</td>
<td>Determines if predictions incorporate group-specific effects. If <code>False</code>, predictions are made with common effects only (i.e.&nbsp;group specific are set to zero). Defaults to <code>True</code>.</td>
<td><code>True</code></td>
</tr>
<tr class="even">
<td><code>sample_new_groups</code></td>
<td>bool</td>
<td>Specifies if it is allowed to obtain predictions for new groups of group-specific terms. When <code>True</code>, each posterior sample for the new groups is drawn from the posterior draws of a randomly selected existing group. Since different groups may be selected at each draw, the end result represents the variation across existing groups. The method implemented is quivalent to <code>sample_new_levels="uncertainty"</code> in brms.</td>
<td><code>False</code></td>
<td>If <code>True</code> it will modify <code>idata</code> in-place. Otherwise, it will return a copy of <code>idata</code> with the predictions added. If <code>kind="response_params"</code>, a new variable with the name of the parent parameter, e.g.&nbsp;<code>"mu"</code> and <code>"sigma" for a Gaussian likelihood, or</code>“p”<code>for a Bernoulli likelihood, is added to the</code>posterior<code>group. If</code>kind=“response”<code>, it appends a</code>posterior_predictive<code>group to</code>idata<code>. If any of these already exist, it will be overwritten. | `True` | | `include_group_specific` | bool | Determines if predictions incorporate group-specific effects. If</code>False<code>, predictions are made with common effects only (i.e. group specific are set to zero). Defaults to</code>True<code>. | `True` | | `sample_new_groups` | bool | Specifies if it is allowed to obtain predictions for new groups of group-specific terms. When</code>True`<code>, each posterior sample for the new groups is drawn from the posterior draws of a randomly selected existing group. Since different groups may be selected at each draw, the end result represents the variation across existing groups. The method implemented is quivalent to</code>sample_new_levels=“uncertainty”<code>in brms. |</code>False`</td>
<td></td>
</tr>
</tbody>
</table>
Expand Down
16 changes: 8 additions & 8 deletions api/Model.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,14 @@ Obtains in-sample and out-of-sample predictions from a fitted Bambi model.

#### Parameters

| Name | Type | Description | Default |
|--------------------------|--------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------|
| `idata` | InferenceData | The ``InferenceData`` instance returned by ``.fit()``. | _required_ |
| `kind` | str | Indicates the type of prediction required. Can be ``"mean"`` or ``"pps"``. The first returns draws from the posterior distribution of the mean, while the latter returns the draws from the posterior predictive distribution (i.e. the posterior probability distribution for a new observation) in addition to the mean posterior distribution. Defaults to ``"mean"``. | `'response_params'` |
| `data` | pandas.DataFrame or None | An optional data frame with values for the predictors that are used to obtain out-of-sample predictions. If omitted, the original dataset is used. | `None` |
| `inplace` | bool | If ``True`` it will modify ``idata`` in-place. Otherwise, it will return a copy of ``idata`` with the predictions added. If ``kind="mean"``, a new variable ending in ``"_mean"`` is added to the ``posterior`` group. If ``kind="pps"``, it appends a ``posterior_predictive`` group to ``idata``. If any of these already exist, it will be overwritten. | `True` |
| `include_group_specific` | bool | Determines if predictions incorporate group-specific effects. If ``False``, predictions are made with common effects only (i.e. group specific are set to zero). Defaults to ``True``. | `True` |
| `sample_new_groups` | bool | Specifies if it is allowed to obtain predictions for new groups of group-specific terms. When ``True``, each posterior sample for the new groups is drawn from the posterior draws of a randomly selected existing group. Since different groups may be selected at each draw, the end result represents the variation across existing groups. The method implemented is quivalent to `sample_new_levels="uncertainty"` in brms. | `False` |
| Name | Type | Description | Default |
|--------------------------|--------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------|
| `idata` | InferenceData | The ``InferenceData`` instance returned by ``.fit()``. | _required_ |
| `kind` | str | Indicates the type of prediction required. Can be ``"response_params"`` or ``"response"``. The first returns draws from the posterior distribution of the likelihood parameters, while the latter returns the draws from the posterior predictive distribution (i.e. the posterior probability distribution for a new observation) in addition to the posterior distribution. Defaults to ``"response_params"``. | `'response_params'` |
| `data` | pandas.DataFrame or None | An optional data frame with values for the predictors that are used to obtain out-of-sample predictions. If omitted, the original dataset is used. | `None` |
| `inplace` | bool | If ``True`` it will modify ``idata`` in-place. Otherwise, it will return a copy of ``idata`` with the predictions added. If ``kind="response_params"``, a new variable with the name of the parent parameter, e.g. ``"mu"`` and ``"sigma" for a Gaussian likelihood, or ``"p"`` for a Bernoulli likelihood, is added to the ``posterior`` group. If ``kind="response"``, it appends a ``posterior_predictive`` group to ``idata``. If any of these already exist, it will be overwritten. | `True` |
| `include_group_specific` | bool | Determines if predictions incorporate group-specific effects. If ``False``, predictions are made with common effects only (i.e. group specific are set to zero). Defaults to ``True``. | `True` |
| `sample_new_groups` | bool | Specifies if it is allowed to obtain predictions for new groups of group-specific terms. When ``True``, each posterior sample for the new groups is drawn from the posterior draws of a randomly selected existing group. Since different groups may be selected at each draw, the end result represents the variation across existing groups. The method implemented is quivalent to `sample_new_levels="uncertainty"` in brms. | `False` |

#### Returns

Expand Down
Loading

0 comments on commit 620a61f

Please sign in to comment.