| subsetOfData | R Documentation |
Selects a subset of n_max rows from a design X, meant to be
used as a cheap pre-fit reduction for large designs: fit on
X[idx, ]/y[idx] instead of the full data. Unlike
Vecchia/Nystrom (which still use every point), this discards
n - n_max points outright, in exchange for an ordinary exact fit
on the reduced design.
subsetOfData(X, n_max, method = "kmeans", seed = 123)
X |
n x d design matrix. |
n_max |
Target subset size; if |
method |
|
seed |
RNG seed (k-means initialization and/or random fallback). |
Sorted 1-based row-indices into X (and the matching
y) to keep.
Yann Richet yann.richet@asnr.fr
X <- matrix(runif(200), ncol = 2)
idx <- subsetOfData(X, 20)
Xr <- X[idx, ]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.