predict_cpop | R Documentation |
Prediction function for CPOP
predict_cpop(cpop_result, newx, s = "lambda.min", newz)
cpop_result |
cpop_model result |
newx |
New data, n times p, as original features, |
s |
CV-Lasso lambda |
newz |
(Deprecated) new data, n times choose(p, 2), as ratio features. |
A vector
data(cpop_data_binary, package = 'CPOP') ## Loading simulated matrices and vectors x1 = cpop_data_binary$x1 x2 = cpop_data_binary$x2 x3 = cpop_data_binary$x3 y1 = cpop_data_binary$y1 y2 = cpop_data_binary$y2 y3 = cpop_data_binary$y3 set.seed(1) cpop_result = cpop_model(x1 = x1, x2 = x2, y1 = y1, y2 = y2, alpha = 0.1, n_features = 10) cpop_result head(predict_cpop(cpop_result, newx = x3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.