Skip to content

Predictions refer to latent f(x) than y values #101

@micmicqb

Description

@micmicqb

Hey, great effort, would love to see Bayesian approaches be adopted and such workflow tools bridge the practice gap.

A comment on the example. A Logistic Regression model is presented:
\begin{align}
y_i | f_i &\sim \text{Bernoulli}(\text{logit}=f_i), \
f_i | x_i $= w^\top x_i, \
w &\sim \mathcal{N}(0, \sigma^2), \
\sigma &\sim \dots
\end{align}

Method predict_dist seems to sample the posterior $f|D$ instead of $y|D$ (which would be $\in{0, 1}$). This is a bit problematic, as MAP logistic regression already returns a point estimate for $f$, which defines a Bernoulli distribution for $y$. In the Bayesian case, $y|D \sim \text{Bernoulli}(p=\mathbb{E}[f|D])$.

Similarly, predict seems to give the median of $f|D$ (which incidentally is not necessarily a useful quantity in the Bayesian paradigm).

Did I misunderstand function or intent?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions