summarise_nd_smooth()#
- liesel_gam.summarise_nd_smooth(term, samples, newdata=None, ngrid=20, which='mean', quantiles=(0.05, 0.5, 0.95), hdi_prob=0.9, newdata_meshgrid=False)[source]#
Summarises an n-dimensional smooth.
- Parameters:
term (
StrctTerm|StrctInteractionTerm|StrctTensorProdTerm) – The term to summarise, aStrctTermorStrctTensorProdTerm.samples (
Mapping[str,Array|ndarray|bool|number|bool|int|float|complex]) – Dictionary of posterior samples. Must contain samples for the term’s coefficient.newdata (
None|Mapping[str,Array|ndarray|bool|number|bool|int|float|complex], default:None) – Optional dictionary of covariate data at which to summarise the term. IfNone, a grid will be created internally, using the minimum and maximum observed values of this term’s input covariates. Thengridargument refers to the number of grid elements used in the marginal grids, so the total grid length will bengrid**k, wherekis the number of terms.quantiles (
Sequence[float], default:(0.05, 0.5, 0.95)) – Probability levels of quantiles to include.hdi_prob (
float, default:0.9) – Probability level for highest posterior density interval.newdata_meshgrid (
bool, default:False) – If True, then the function will create a large grid of all combinations of covariate values innewdatathat correspond to this term.
- Return type: