R/estimate_risk.R
estimate_risks.Rd
This function performs the estimation of the risk on a set of curves along the sampling points. Both the real and estimated curves have to be sampled on the same grid.
estimate_risks(curves, curves_estim)
curves | A list, where each element represents a real curve. Each curve have to be defined as a list with two entries:
|
---|---|
curves_estim | A list, where each element represents an estimated curve. Each curve have to be defined as a list with two entries:
|
A list, with the mean and max integrated residual squared error in \(t_0\).
Actually, two risks are computed. They are defined as: $$MeanIntRSE = \frac{1}{N}\sum_{n = 1}^{N}\int(X_n(t) - \hat{X}_n(t))^2dt$$ and $$MeanIntRSE = \max_{1 \leq n \leq N} \int(X_n(t) - \hat{X}_n(t))^2dt$$
if (FALSE) { X <- generate_fractional_brownian(N = 1000, M = 300, H = 0.5, sigma = 0.05) X_smoothed <- smooth_curves(X)$smooth estimate_risks(X, X_smoothed) }