Files
chemplot_scripts/README.md
mm644706215 92850a0936 frist add
2025-09-16 20:49:33 +08:00

41 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## 环境安装
```bash
conda create -n chemplot_env -y -c conda-forge chemplot
conda activate chemplot_env
# 失败可以用pip 进行安装尝试 与mordred兼容
pip install "networkx==2.8.8" chemplot pandas matplotlib scikit-learn umap-learn rdkit-pypi
```
## t-SNE 的局限性
假设有三个分子系列 A、B、C实际空间距离 A↔B 比 A↔C 近:
t-SNE 可能只把 A、B 内部的点聚在一起,但 A↔B vs A↔C 的距离无法反映真实远近关系。
这意味着如果用 t-SNE 后结果做 KMeans可能出现不合理的簇划分。
## UMAP 的优势
在 UMAP 中A、B、C 的相对距离更接近原始分子指纹空间。
当你在降维后的空间运行 KMeans 或 HDBSCAN 时,聚类结果与真实分子结构差异更一致。
t-SNE 的时间复杂度接近 O(N^2),数据量增加后计算时间会爆炸式增长。
UMAP 在大规模分子库上表现更好,并且支持并行计算。
UMAP 是更合适的选择,因为:
它更好地保留了化学空间的全局结构,确保聚类结果有化学意义。
稳定、可复现,适合后续湿实验追踪和比较。
计算速度更快,支持未来大规模分子库扩展。
在生成交互式 HTML 时,结果更直观、可解释。
## 功能脚本
### chemplot_select_and_mark.py 介绍