functionaldata / tPACE

Testing version of fdapace
Other
31 stars 22 forks source link

enhancement: Example for predict.FPCA does not use predict.FPCA #26

Closed mikeguggis closed 5 years ago

mikeguggis commented 6 years ago

The example for predict.FPCA is

set.seed(1)
n <- 20
pts <- seq(0, 1, by=0.05)
sampWiener <- Wiener(n, pts)
sampWiener <- Sparsify(sampWiener, pts, 10)
res <- FPCA(sampWiener$Ly, sampWiener$Lt)
res

This does not show predict.FPCA being used. It should show a prediction with new data different than sampWiener.

Additionally, it would be good to know if any preprocessing needs to occur first (e.g. subtracting mean function).

hadjipantelis commented 6 years ago

Good catch! We will/should definitely have an actual predict.FPCA example. I will make a relevant PR soon.

No subtraction of the mean is necessary. The mean function estimate will be returned in the list member mu of the resulting FPCA class object.

Once again, thank you for your feedback! :)

All best, Pantelis

CrossD commented 6 years ago

Fixed in pull request #30