For a more detailed explanation for this package, thisdocument willkeep update for better understanding the source code. You can also trytheplaygroundI build to get familier with the algorithm
I’ve written somearticles on Medium, which you can findhere to get familiar withtopological data analysis. I’ll be continuously updating my work, and Iwelcome any feedback!
This package is based on the
TDAmapperpackage by PaulPearson. You can view the original packagehere. Since theoriginal package hasn’t been updated in over seven years, this versionis focused on optimization. By incorporating vector computation into theMapper algorithm, this package aims to significantly improve itsperformance.
Step visualize fromSkaf et al.
Mapper is basically a three-step process:
1.Cover: This step splits the data into overlappingintervals and creates a cover for the data.
2.Cluster: This step clusters the data points ineach interval the cover creates.
3.Simplicial Complex: This step combines the twosteps above, which connects the data points in the cover to create asimplicial complex.
you can know more about the basic here: Chazal, F., & Michel, B.(2021). An introduction to topological data analysis: fundamental andpractical aspects for data scientists. Frontiers in artificialintelligence, 4, 667963.
Besides to the steps above, you can find the following codein the package:
data("iris")data<- irisMapper<-MapperAlgo(filter_values = data[,1:4],percent_overlap =30,methods ="dbscan",method_params =list(eps =1,minPts =1),# methods = "hierarchical",# method_params = list(num_bins_when_clustering = 10, method = 'ward.D2'),# methods = "kmeans",# method_params = list(max_kmeans_clusters = 2),# methods = "pam",# method_params = list(num_clusters = 2),cover_type ='stride',# intervals = 4,interval_width =1,num_cores =12 )data$PW_group<-ifelse(data$Sepal.Width>1.5,"wide","narrow")embedded<-CPEmbedding(Mapper, data,columns =list("PW_group","Species"),a_level ="wide",b_level ="versicolor")MapperPlotter(Mapper,label=embedded,data=data,type="forceNetwork",avg=TRUE,use_embedding=TRUE)![]() Figure 1 | ![]() Figure2 |