Skip to main content

prediction_intervals

Function prediction_intervals 

Source
pub fn prediction_intervals(
    fit: &FregreLmResult,
    train_data: &FdMatrix,
    train_scalar: Option<&FdMatrix>,
    new_data: &FdMatrix,
    new_scalar: Option<&FdMatrix>,
    confidence_level: f64,
) -> Result<PredictionIntervalResult, FdarError>
Expand description

Prediction intervals for new observations from a linear functional regression model.

Computes prediction intervals accounting for both estimation uncertainty (through the hat matrix) and residual variance.

ยงErrors

Returns FdarError::InvalidParameter if confidence_level is not in (0, 1). Returns FdarError::InvalidDimension if train_data or new_data has zero rows, column counts do not match fit.fpca.mean or each other, or the number of training rows is not greater than the number of model parameters. Returns FdarError::ComputationFailed if Cholesky factorization fails.