This function estimates the mean curve of a functional dataset
given a vector of sampling points and a glmnet
model
for the mean curve.
predict_mean(u, model, lambda, k = 50)
Vector of sampling points.
glmnet
model for the mean curve.
Value of the penalty parameter.
Number of function to be used to fit the data, default=50.
A numeric vector representing the estimation of the mean curve.
if (FALSE) {
if(interactive()){
attach(powerconsumption)
mod <- learn_mean(df = powerconsumption, k = 50)
m <- predict_mean(u = seq(0, 1, length.out = 101), model = mod,
lambda = exp(-3.5), k = 50)
}
}