Skip to content

Commit

Permalink
update docstring to be more specific
Browse files Browse the repository at this point in the history
  • Loading branch information
GStechschulte committed Jul 6, 2024
1 parent 534e4ee commit 04df444
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions bambi/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -813,19 +813,21 @@ def predict(
The ``InferenceData`` instance returned by ``.fit()``.
kind : str
Indicates the type of prediction required. Can be ``"response_params"`` or
``"response"``. 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 ``"response_params"``.
``"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"``.
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.
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"`` or ``"p"``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.
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.
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
Expand Down

0 comments on commit 04df444

Please sign in to comment.