Skip to content

Commit 8cba665

Browse files
committed
Improved plots
1 parent 561b6f7 commit 8cba665

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

README.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ from tdamapper.plot import MapperPlot
9292

9393
# Generate toy dataset
9494
X, labels = make_circles(n_samples=5000, noise=0.05, factor=0.3, random_state=42)
95-
plt.scatter(X[:,0], X[:,1], c=labels, cmap='jet', s=1)
95+
plt.scatter(X[:,0], X[:,1], c=labels, cmap='jet', s=0.25)
9696
plt.show()
9797

9898
# Apply PCA as lens
@@ -108,17 +108,11 @@ fig = MapperPlot(graph, dim=2, seed=42, iterations=60).plot_plotly(colors=labels
108108
fig.show(config={'scrollZoom': True})
109109
```
110110

111-
#### Original dataset
111+
| Original Dataset | Mapper Graph |
112+
| ---------------- | ------------ |
113+
| ![Original Dataset](https://github.com/lucasimi/tda-mapper-python/raw/main/resources/circles_dataset_v2.png) | ![Mapper Graph](https://github.com/lucasimi/tda-mapper-python/raw/main/resources/circles_mean_v2.png) |
112114

113-
![Original Dataset: two concentric noisy circles](https://github.com/lucasimi/tda-mapper-python/raw/main/resources/circles_dataset.png)
114-
115-
We generate a toy dataset consisting of two concentric circles with noise, colored by class label.
116-
117-
#### Mapper graph
118-
119-
![Mapper Graph: topological summary of the circles](https://github.com/lucasimi/tda-mapper-python/raw/main/resources/circles_mean.png)
120-
121-
This is the resulting Mapper graph, built from the PCA projection of the data and clustered using DBSCAN.
115+
Left: the original dataset consisting of two concentric circles with noise, colored by class label. Right: the resulting Mapper graph, built from the PCA projection and clustered using DBSCAN. The two concentric circles are well identified by the connected components in the Mapper graph.
122116

123117
More examples can be found in the
124118
[documentation](https://tda-mapper.readthedocs.io/en/main/examples.html).

resources/circles_dataset_v2.png

97.4 KB
Loading

resources/circles_mean_v2.png

60.6 KB
Loading

0 commit comments

Comments
 (0)