Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Topological Data Analysis (TDA) : Mapper Algorithm

License

NotificationsYou must be signed in to change notification settings

TDA-R/MapperAlgo

Repository files navigation

CRAN statusmysql

Playground & Document

For a more detailed explanation for this package, thisdocument will keep update for better understanding the source code. You can also try theplayground I build to get familier with the algorithm
I've written some articles on Medium, which you can findhere to get familiar with topological data analysis. I'll be continuously updating my work, and I welcome any feedback!

This package is based on theTDAmapper package by Paul Pearson. You can view the original packagehere. Since the original package hasn't been updated in over seven years, this version is focused on optimization. By incorporating vector computation into the Mapper algorithm, this package aims to significantly improve its performance.

Get started quickly

Mapper Step visualize fromSkaf et al.

Mapper is basically a three-step process:

1.Cover: This step splits the data into overlapping intervals and creates a cover for the data.

2.Cluster: This step clusters the data points in each interval the cover creates.

3.Simplicial Complex: This step combines the two steps above, which connects the data points in the cover to create a simplicial complex.

you can know more about the basic here: Chazal, F., & Michel, B. (2021). An introduction to topological data analysis: fundamental and practical aspects for data scientists. Frontiers in artificial intelligence, 4, 667963.

Besides to the steps above, you can find the following code in the package:

  1. Mapper.R: Combining the three steps above
  2. ConvertLevelset.R: Converting a Flat Index to a Multi-index, or vice versa.
  3. EdgeVertices.R This is to find the nodes for plot, not for the Mapper algorithm.

Example

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)
Iris
Figure 1
IrisMapper
Figure 2

About

Topological Data Analysis (TDA) : Mapper Algorithm

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp