Rwanderlust {uSORT} | R Documentation |
R inplementation of wanderlust
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
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()