Description Usage Arguments Value
Make predictions from an estimated kcde model forward prediction_horizon time steps from the end of predict_data, based on the kernel functions and bandwidths specified in the kcde_fit object. This function requires that the lagged and lead observation vectors have already been computed.
1 2 | kcde_kernel_centers_and_weights_predict_given_lagged_obs(train_lagged_obs,
train_lead_obs, prediction_lagged_obs, kcde_fit)
|
train_lagged_obs |
is a matrix (with column names) containing the lagged observation vector computed from the training data. Each row corresponds to a time point. Each column is a (lagged) variable. |
train_lead_obs |
is a vector with length = nrow(train_lagged_obs) with the value of the prediction target variable corresponding to each row in the train_lagged_obs matrix. |
prediction_lagged_obs |
is a matrix (with column names) containing the lagged observation vector computed from the prediction data. There is only one row, representing one time point. Each column is a (lagged) variable. |
kcde_fit |
is an object representing a fitted kcde model |
prediction_test_lead_obs |
is a matrix (with column names) containing prediction target vectors computed from the prediction data. Each row represents one time point. Each column is a (leading) target variable. |
normalize_weights |
boolean, should the weights be normalized? |
a named list with four components: log_weights: a vector of length = length(train_lagged_obs) with the log of weights assigned to each observation (up to a constant of proportionality if normalize_weights is FALSE) weights: a vector of length = length(train_lagged_obs) with the weights assigned to each observation (up to a constant of proportionality if normalize_weights is FALSE) centers: a copy of the train_lead_obs argument – kernel centers pred_bws: a named vector of bandwidths, one per column of centers
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.