Description Usage Arguments Value References See Also
Train a machine learning model.
1 2 3 4 5 6 | fdaML_train(X, y, Z = NULL, task, model = NULL, reduction,
intercept = TRUE, smooth_w = NULL, balanced = FALSE, reps = 100,
Q_vec = NULL, Q_len = NULL, Q_opt = NULL, tau_Q_opt = 0,
lam_cv_type = "n", lam_vec = NULL, split_size = c(0.5, 0.25, 0.25),
estimation_w = NULL, bspline_dim = ncol(X), t_range = 350:2500,
verbose = TRUE, ll = NULL)
|
X |
A numeric functional predictor matrix of size |
y |
A numeric or factor response vector of size |
Z |
A numeric non-functional predictor matrix of size |
task |
Regression ( |
model |
Currently Linear Model ( |
reduction |
Partial Least Squares ( |
intercept |
Whether to include a model intercept ( |
smooth_w |
A numeric vector of length equal to |
balanced |
Whether the dataset should be balanced ( |
reps |
Number of randomisations of the training/validating/testing subsets to average over in cross-validation. |
Q_vec |
Vector of numbers of PCA/PLS components to be tried in cross-validation.
The dedault is a vector of evenly spaced values (approximately, due to rounding) between
|
Q_len |
Length of |
Q_opt |
Optimal number of PCA/PLS components. If this is supplied, cross-validation for the number of PCA/PLS components is bypassed. |
tau_Q_opt |
Threshold for choosing the optimal parameters.
If |
lam_cv_type |
Cross-validation strategy to be used when choosing the penalty
parameter |
lam_vec |
Vector of penalty parameters to be tried in cross-validation. The default is a set of 10 values between 0.001 and 20 on an exponential scale. |
split_size |
Either a vector of length 3 specifying the proportion of observations to be
assigned to the training, validation and testing subsets, in this order; or a scalar
specifying the proportion of observations to be assigned to the training subset, in which
case the validation and testing subsets are assigned a proportion |
estimation_w |
A numeric vector of length equal to |
bspline_dim |
The dimension of the cubic B-spline functional representation system. |
t_range |
A numeric vector giving the wavelenghts at which spectra were measured. |
verbose |
Whether to print a progress bar ( |
ll |
A list whose named elements are the parameters for this function.Provide either the function parameters as usual, or this list, but not both. |
An object of class fdaModel
, which is a list containing the trained model.
P.M. Esperança, Thomas S. Churcher (2019). "Machine learning based epidemiological vector control monitoring using functional data analysis techniques for near-infrared spectral data". arXiv.
P.T. Reiss, R.T. Ogden (2007). "Functional Principal Component Regression and Functional Partial Least Squares". Journal of the American Statistical Association, 102(479), 984-996
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.