Fits Penalized Partial Least Squares (PLS) regression when
predictors are hybrid objects that combine functional curves
(infinite-dimensional 'fda' objects) and scalar covariates (finite-dimensional
numeric matrices). The package treats a hybrid predictor as an element of a
product Hilbert space formed by the functional and Euclidean components, and
implements the arithmetic (addition, scalar multiplication, and inner
products, including roughness-penalized inner products) needed to run
penalized PLS directly in that space. The algorithm extracts latent
components that maximize covariance with a scalar response while
penalizing roughness of the estimated functional coefficient curves.
Helpers are included for constructing hybrid predictors, two-step
within- and between-modality normalization, train/test splitting,
synthetic data generation, cross-validated component selection, and
prediction. The method is described in Mun and Jang (2026)
Hybrid Penalized Partial Least Squares for predictors that combine functional curves (fda::fd) and scalar covariates.
The method is described in Mun and Jang (2026):
https://doi.org/10.48550/arXiv.2601.16364
# Once on CRAN:
# install.packages("FSHybridPLS")
# Development version:
# remotes::install_github("Jong-Min-Moon/FShybridPLS")
library(FSHybridPLS)
set.seed(1)
sim <- simulate_hybrid_data(n = 60, n_functional = 1, n_scalar = 3, n_basis = 7)
prep <- split_and_normalize_all(sim$W, sim$y, train_ratio = 0.7)
fit <- fit_hybridPLS(
prep$predictor_train,
prep$response_train,
n_iter = 3,
lambda = 1e-3,
validation_data = list(
W_test = prep$predictor_test,
y_test = prep$response_test
)
)
fit
preds <- predict(fit, prep$predictor_test, n_components = fit$n_iter)
sqrt(mean((prep$response_test - preds)^2))
| Function | Role |
|---|---|
predictor_hybrid() |
Build hybrid predictor object |
simulate_hybrid_data() |
Synthetic data for examples/tests |
split_and_normalize_all() |
Train/test split + normalization |
fit_hybridPLS() |
Fit Hybrid Penalized PLS |
predict() / print() |
S3 methods for class hybridPLS |
cv_fit_hybridPLS() |
Choose number of components by CV |
create_idx_kfold() |
K-fold index helper |
citation("FSHybridPLS")