if (FALSE) {
if(requireNamespace(c("kernlab", "DRR"), quietly = TRUE)) {
dat <- loadDataSet("variable Noise Helix", n = 200)[sample(200)]
emb <- embed(dat, "DRR", ndim = 3)
plot(dat, type = "3vars")
plot(emb, type = "3vars")
# We even have function to reconstruct, also working for only the first few dimensions
rec <- inverse(emb, getData(getDimRedData(emb))[, 1, drop = FALSE])
plot(rec, type = "3vars")
}
}
Run the code above in your browser using DataLab