SmoothCurve#
- class superglm.SmoothCurve(
- x: NDArray,
- log_relativity: NDArray,
- relativity: NDArray,
- level_x: NDArray | None = None,
- se_log_relativity: NDArray | None = None,
- ci_lower: NDArray | None = None,
- ci_upper: NDArray | None = None,
Bases:
objectContinuous fitted curve for plotting (not for rating tables).
Attached to
TermInference.smooth_curvefor features likeOrderedCategorical(basis=Spline(...))where the underlying variable is categorical but a smooth curve is fit through the level midpoints.xis the curve’s own grid andlevel_xis marker metadata; NEITHER contains the other. A grouped term expanded back to its original levels puts a marker at every declared level while the curve stays on the axis it was fitted on – the group positions – so a merge at either end of the ordering leaves the curve inside the markers. A consumer that needs both on one canvas should take the union of their extents. The bundled renderers both end up there, by different routes: the matplotlib panel unions the two explicitly, while the plotly one sets no x-range at all and lets autorange cover every trace. Only the first is a guarantee – the second holds as long as nobody adds a range.