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)
Dataframe containing the real dataset.
An object of class 'gam' from the function mgcv::gam
.
if (FALSE) {
if(interactive()){
attach(powerconsumption)
coefs <- learn_noise(df = powerconsumption)
}
}