Description Usage Arguments Value Author(s) Examples
R inplementation of wanderlust
1 2 3 4 | Rwanderlust(data, s, l = 15, k = 15, num_graphs = 1,
num_waypoints = 250, waypoints_seed = 123, flock_waypoints = 2,
metric = "euclidean", voting_scheme = "exponential",
band_sample = FALSE, partial_order = NULL, verbose = TRUE)
|
data |
Input data matrix. |
s |
Starting point ID. |
l |
l nearest neighbours. |
k |
k nearest neighbours, k < l. |
num_graphs |
Number of repreated graphs. |
num_waypoints |
Number of waypoints to guide the trajectory detection. |
waypoints_seed |
The seed for reproducing the results. |
flock_waypoints |
The number of times for flocking the waypoints, default is 2. |
metric |
Distance calculation metric for nearest neighbour detection. |
voting_scheme |
The scheme of voting. |
band_sample |
Boolean, if band the sample |
partial_order |
default NULL |
verbose |
Boolean, if print the details |
a list containing Trajectory, Order, Waypoints
Hao Chen
1 2 3 4 5 6 7 8 9 | set.seed(15)
shuffled_iris <- iris[sample(150, 150, replace = FALSE), ]
data <- shuffled_iris[,1:4]
data_label <- shuffled_iris[,5]
wishbone <- Rwanderlust(data = data, num_waypoints = 100, waypoints_seed = 2)
pd1 <- data.frame(id = wishbone$Trajectory, label=data_label, stringsAsFactors = FALSE)
pd2 <- data.frame(id = seq_along(row.names(data)), label=data_label, stringsAsFactors = FALSE)
#ggplot(pd1, aes(x=id, y=id, colour = label)) + geom_point() + theme_bw()
#ggplot(pd2, aes(x=id, y=id, colour = label)) + geom_point() + theme_bw()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.