Skip to content

BayesianRidge is unexpectedly not Bayesian wrt intercept #13409

@pimdh

Description

@pimdh

Hi all,

Contrary to what I expected, BayesianRidge is not Bayesian w.r.t. the intercept parameter. This leads to the undesired outcome that all lines sampled from the parameter posterior go through the same point at the input x=0.

A manual workaround is to add a 1 column to the input and set fit_intercept=False. Then coef_ has the shape (d+1,) and sigma_ the shape (d+1, d+1).

Maybe this can be integrated into the current API. If there's an API change that's sensible, I'm happy to file a PR.

Thanks

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