Description Usage Arguments Value Examples
View source: R/phate_original.R
Original Version of PHATE
1 2 3 4 5 6 7 8 9 10 | phate_original(
data,
ndim = 2,
nbdk = 5,
alpha = 2,
alg = c("cmds", "mmds"),
potential = c("log", "sqrt", "none"),
n_landmark = 100,
use_landmark = TRUE
)
|
data |
matrix N observations |
ndim |
target dimension |
nbdk |
neighborhood size |
alpha |
decaying kernel parameter |
a list containing
transition matrix of optimal kernel.
embedding matrix.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## Not run:
# load the data
data(Embryoid, package="exp3riment")
nsample = 2000
sub_id = sample(1:nrow(Embryoid$data), nsample)
sub_data = Embryoid$data[sub_id,]
sub_label = Embryoid$label[sub_id]
distEB = stats::as.dist(fast_dist(sub_data))
landmark1 = phate_original(distEB, n_landmark=100)$embedding
landmark2 = phate_original(distEB, n_landmark=250)$embedding
landmark3 = phate_original(distEB, n_landmark=500)$embedding
opar <- par(no.readonly=TRUE)
par(mfrow=c(1,3))
plot(landmark1, pch=19, col=sub_label, main="Case 1")
plot(landmark2, pch=19, col=sub_label, main="Case 2")
plot(landmark3, pch=19, col=sub_label, main="Case 3")
par(opar)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.