MapperAlgo funtion remains several params, filter_values is the data you get after pojection, for example, the output of PCA. Intervals is how many areas you want, in the example below, you cut the data into 4 areas, and the 4 areas will be ovelapped in 30%. You can choose hierarchical, kmeans, dbscan, or pam in methods, and according to their original package, you must input a list of params to method_params. Then, according to the original author and the paper, stride or extension in cover_type can be choose in the function, more informations are explained in Cover.R. The num_cores can be set depend on how many cores you want to use for parrallel computing.
MapperPlotter is just plotting the nodes and edges, use forceNetwork if you want to interact with the plot, and ggraph could get you more informations in label.
Mapper <- MapperAlgo(
filter_values = circle_data[,2:3],
intervals = 4,
percent_overlap = 30,
methods = "dbscan",
method_params = list(eps = 0.3, minPts = 5),
cover_type = 'extension',
num_cores = 12
)
MapperPlotter(Mapper, circle_data$circle, circle_data, type = "forceNetwork")
Name | Context |
---|---|
adjacency | 24x24 adjacency matrix, 0 or 1 |
num_vertices | Mapper nodes num |
level_of_vertex | Each node represent to which level set index, correspond to intervals. |
Length 24 correspond to each node | |
points_in_vertex | Each node carries original data index |
points_in_level_set | Each level set(16) include data point index |
vertices_in_level_set | Which node represent to a level set |
Calculate range function
Method | stride |
extension |
---|---|---|
logic | fixed step length and stride: anchor = min + (lsmi - 1) × stride |
fixed width and extend: anchor = min + (lsmi - 1) × interval_width |
overlap method | every stride: interval_width × (1 - overlap%) |
fixed point and extend: ±0.5 × interval_width × overlap% |
original design | Y (from paper) | N (from original author) |
# stride
stride <- interval_width * (1 - percent_overlap / 100)
anchor <- filter_min + (lsmi - 1) * stride
lsfmin <- anchor
lsfmax <- anchor + interval_width
# extension
anchor <- filter_min + (lsmi - 1) * interval_width
extension <- 0.5 * interval_width * percent_overlap / 100
lsfmin <- anchor - extension
lsfmax <- anchor + interval_width + extension
So what’s the difference between stride and extension?
According to the original paper, there’s an example below: