SensitivityResult

Result of a smoothing-parameter sensitivity analysis.

Usage

Source

SensitivityResult(
    multipliers,
    predictions,
    edf_total,
    deviance_explained,
    gcv_scores,
    aic_values,
    smoothing_params,
    baseline_idx,
)

Shows how predictions and fit statistics change as the smoothing parameters are scaled by a set of multipliers around their estimated (or fixed) values. Each row corresponds to one multiplier value applied uniformly to all smoothing parameters.

Attributes

multipliers: NDArray

Multiplier values used, shape (n_steps,).

predictions: NDArray

Fitted values at each multiplier, shape (n_steps, n_obs).

edf_total: NDArray

Total effective degrees of freedom at each step, shape (n_steps,).

deviance_explained: NDArray

Deviance explained at each step, shape (n_steps,).

gcv_scores: NDArray

GCV score at each step, shape (n_steps,).

aic_values: NDArray

AIC at each step, shape (n_steps,).

smoothing_params: NDArray

Actual smoothing parameters used, shape (n_steps, n_penalties).

baseline_idx: int
Index into multipliers corresponding to the original fit (multiplier closest to 1).

Attributes

Name Description
baseline_predictions Predictions at the baseline (original) smoothing parameters.
n_obs Number of observations.
n_steps Number of multiplier steps.

baseline_predictions

Predictions at the baseline (original) smoothing parameters.

baseline_predictions: NDArray


n_obs

Number of observations.

n_obs: int


n_steps

Number of multiplier steps.

n_steps: int

Methods

Name Description
max_abs_change() Maximum absolute prediction change relative to baseline, per step.

max_abs_change()

Maximum absolute prediction change relative to baseline, per step.

Usage

Source

max_abs_change()

Returns

NDArray
Shape (n_steps,). The entry at baseline_idx is zero.