View source: R/get_landmarks.R
| get_landmarks | R Documentation |
Returns the landmark coordinate matrix used by an approx = "nystrom"
fit. Landmarks are stored internally in the standardized X-space the model
operates in; by default this accessor un-standardizes them so the returned
matrix is in the original X units and can be passed back through
krls(..., landmarks = ...) on a comparable dataset without a
standardize-twice bug.
get_landmarks(fit, scale = c("original", "standardized"))
fit |
A fitted |
scale |
String selecting the coordinate system of the returned matrix.
|
An m by D numeric matrix of landmark coordinates with column
names inherited from fit$X.
Jens Hainmueller (Stanford) and Chad Hazlett (UCLA)
krls
## Not run:
fit <- krls(X, y, approx = "nystrom", nystrom_m = 30)
Z <- get_landmarks(fit) # original-scale m x D matrix
# Reuse the same landmarks on a sensitivity-check refit with a new y:
fit2 <- krls(X, y_alt, approx = "nystrom", landmarks = Z)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.