fit_fformpp | R Documentation |
This function is written based on the example codes in movingknots package by Dr. Feng Li. Please see https://github.com/feng-li/movingknots for more details.
fit_fformpp(
feamat,
accmat,
sknots = 2,
aknots = 2,
fix.s = 0,
fix.a = 0,
fix.shrinkage,
fix.covariance = 0,
fix.coefficients = 0,
n.iter = 100,
knot.moving.algorithm = "Random-Walk",
ptype = c("identity", "identity", "identity"),
prior.knots
)
feamat |
matrix of features, rows corresponds to each time series, columns coresponds to features |
accmat |
matrix of forecast errors from each method, rows represent time series, columns represent forecast algorithms |
sknots |
the dimension of knots for surface, default 2 |
aknots |
no. of knots used in each covariates for the additive part, default 2 |
fix.s |
number of knots to be fixed in the surface components, 0 means all are updated |
fix.a |
number of knots to be fixed in the additive components, default is 0 which means all are updated |
fix.shrinkage, |
number of shrinkage covariates not to be updated, defalut is, 1:p, |
fix.covariance, |
number of knots to be fixed in the covariance, default is 0, all are updated |
fix.coefficients, |
number of knots to be fixed in the coefficients, default is 0, all are updated |
n.iter |
number of ierations |
knot.moving.algorithm, |
select either "KStepNewton" or "Random-Walk", to fasten the code use Random-Walk |
ptype |
For fixing gprior, This could be c("X'X", "identity", "identity") or c("identity", "identity", "identity") |
prior.knots |
this could be n, log(n) or 1 # to set priors for knots |
returns a list contanining the fitted model and arguments for splines
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.