This function estimates the noise variance given vectors of sampling and observed points and a vector of coefficients.

predict_noise(t, x, model)

Arguments

t

Vector of sampling points.

x

Vector of observed points.

model

Object of class 'gam' from the function learn_noise.

Value

A numeric vector representing the estimation of the noise variance.

Examples

if (FALSE) {
if(interactive()){
 attach(powerconsumption)
 coefs <- learn_noise(df = powerconsumption)
 noise <- predict_noise(t = seq(0, 1, length.out = 101),
                        x = seq(min(powerconsumption, na.rm = T),
                                max(powerconsumption, na.rm = T),
                                length.out = 101),
                        coefs = coefs)
 }
}