createCobraPred | R Documentation |
The createCobraPred
function calculates predictions by averaging the target
values of all the nearest candidates in the training dataset. Only the
training points that are within the specified proximity (eps
) to the test
point are used to determine the prediction. If no suitable training points
are found, the function returns NA
as the prediction.
createCobraPred(
train,
test,
n_train,
n_test,
nlearners,
eps,
alpha,
train_target
)
train |
A |
test |
A |
n_train |
An |
n_test |
An |
nlearners |
An |
eps |
A |
alpha |
A value that determines the optimal number of learners in the neighborhood (only for alpha optimization). |
train_target |
A |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.