This function estimates the noise variance by fitting a linear model on the squared difference between the observed curves and their smoothed version.

learn_noise(df)

Arguments

df

Dataframe containing the real dataset.

Value

An object of class 'gam' from the function mgcv::gam.

Examples

if (FALSE) {
if(interactive()){
 attach(powerconsumption)
 coefs <- learn_noise(df = powerconsumption)
 }
}