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)

Arguments

u

Vector of sampling points.

model

glmnet model for the mean curve.

lambda

Value of the penalty parameter.

k

Number of function to be used to fit the data, default=50.

Value

A numeric vector representing the estimation of the mean curve.

See also

Examples

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)
 }
}