nadayara_prediction | R Documentation |
Functional non-parametric Nadaraya-Watson prediction with 2-Wasserstein distance.
nadayara_prediction(nadaraya, Qpred, hs=NULL)
nadaraya |
A Nadaraya regression object. |
Qpred |
Quantile curves that will be used in the predictions |
hs |
Smoothing parameters for the predictions, by default hs = seq(0.8, 15, length = 200) |
An object of class bnadarayapred:
prediction
The Nadaraya-Watson prediction for the test data at each value of hs.
hs
Hs values used for the prediction.
# Data extracted from the paper: Hall, H., Perelman, D., Breschi, A., Limcaoco, P., Kellogg, R., # McLaughlin, T., Snyder, M., Glucotypes reveal new patterns of glucose dysregulation, PLoS # biology 16(7), 2018. file1 = system.file("extdata", "data_1.csv", package = "biosensors.usc") file2 = system.file("extdata", "variables_1.csv", package = "biosensors.usc") data = load_data(file1, file2) nada = nadayara_regression(data, "BMI") # Example of prediction with the column mean of quantiles npre = nadayara_prediction(nada, t(colMeans(data$quantiles$data)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.