Skip to content

ENH: option for nonreplicated exterior knots in b-splines #132

Open
@josef-pkt

Description

@josef-pkt

AFAICS, patsy sets all exterior knots in BS at the same points, i.e. lower_bound and upper_bound.

https://github.com/pydata/patsy/blob/master/patsy/splines.py#L229

I'm trying to replicate some mgcv functions, and mgcv chooses by default spread out exterior knots. I don't see a way how to replicate this with patsy's BS.

I started to work again on GAM for statsmodels
statsmodels/statsmodels#5296

side question: Is there a way to get access to the stateful transform and underlying spline, e.g. BS, instance from the design_info.
(e.g. in general we would need to know which transform patsy applied to the basis function to incorporate the sum to zero or removal of constant constraint, because a transformation of the spline basis and parameters would also have to be applied to the penalization matrix.)

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