mapper_shannon_index
computes Shannon indices for nodes of a given
graph from Mapper.
mapper_shannon_index(obj_mapper, group_ind)
obj_mapper | An object of class |
---|---|
group_ind | A vector of group names each of the samples belongs to. |
A list object with two objects. The first object is the weighted average Shannon index for the whole graph. The second object is the matrix of Shannon indices for each of the nodes in the graph, where the first column is the vector of indices and the second column is the vector of node sizes.
how it is computed
tp_data <- chicken_generator(1) tp_data_mapper <- mapper.sta(dat = tp_data[,2:4], filter_values = tp_data$Y, num_intervals = 10, percent_overlap = 70) tp_shannon <- mapper_shannon_index(tp_data_mapper, tp_data$Group) tp_shannon