[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-sunlabuiuc--PyHealth":3,"tool-sunlabuiuc--PyHealth":61},[4,18,26,36,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",145895,2,"2026-04-08T11:32:59",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108111,"2026-04-08T11:23:26",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":10,"last_commit_at":59,"category_tags":60,"status":17},4487,"LLMs-from-scratch","rasbt\u002FLLMs-from-scratch","LLMs-from-scratch 是一个基于 PyTorch 的开源教育项目，旨在引导用户从零开始一步步构建一个类似 ChatGPT 的大型语言模型（LLM）。它不仅是同名技术著作的官方代码库，更提供了一套完整的实践方案，涵盖模型开发、预训练及微调的全过程。\n\n该项目主要解决了大模型领域“黑盒化”的学习痛点。许多开发者虽能调用现成模型，却难以深入理解其内部架构与训练机制。通过亲手编写每一行核心代码，用户能够透彻掌握 Transformer 架构、注意力机制等关键原理，从而真正理解大模型是如何“思考”的。此外，项目还包含了加载大型预训练权重进行微调的代码，帮助用户将理论知识延伸至实际应用。\n\nLLMs-from-scratch 特别适合希望深入底层原理的 AI 开发者、研究人员以及计算机专业的学生。对于不满足于仅使用 API，而是渴望探究模型构建细节的技术人员而言，这是极佳的学习资源。其独特的技术亮点在于“循序渐进”的教学设计：将复杂的系统工程拆解为清晰的步骤，配合详细的图表与示例，让构建一个虽小但功能完备的大模型变得触手可及。无论你是想夯实理论基础，还是为未来研发更大规模的模型做准备",90106,"2026-04-06T11:19:32",[35,15,13,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":66,"readme_en":67,"readme_zh":68,"quickstart_zh":69,"use_case_zh":70,"hero_image_url":71,"owner_login":72,"owner_name":73,"owner_avatar_url":74,"owner_bio":75,"owner_company":76,"owner_location":76,"owner_email":76,"owner_twitter":76,"owner_website":77,"owner_url":78,"languages":79,"stars":96,"forks":97,"last_commit_at":98,"license":99,"difficulty_score":32,"env_os":75,"env_gpu":100,"env_ram":100,"env_deps":101,"category_tags":107,"github_topics":109,"view_count":32,"oss_zip_url":76,"oss_zip_packed_at":76,"status":17,"created_at":119,"updated_at":120,"faqs":121,"releases":151},5509,"sunlabuiuc\u002FPyHealth","PyHealth","A Deep Learning Python Toolkit for Healthcare Applications.","PyHealth 是一个专为医疗健康领域打造的深度学习 Python 工具包，旨在降低临床数据分析和医疗 AI 模型开发的门槛。它主要解决了医疗数据格式复杂、预处理繁琐以及深度学习模型复现困难等痛点，让研究人员和开发者能够更专注于算法创新而非底层数据清洗。\n\n无论是从事医疗人工智能研究的学者，还是希望将深度学习应用于临床场景的工程师，PyHealth 都能提供强有力的支持。其核心亮点在于内置了多种主流医疗数据集的标准加载器，支持从原始电子病历到标准化张量的快速转换；同时封装了大量前沿的临床预测模型（如疾病风险预测、药物推荐等），并提供了统一的训练与评估接口。此外，PyHealth 强调可复现性，配套了丰富的教程、Google Colab 示例及视频教程，帮助用户轻松上手。通过加入其活跃的社区，用户还能及时获取最新功能更新并与全球同行交流。如果你希望在医疗 AI 领域高效开展实验或构建应用，PyHealth 将是一个值得信赖的开源伙伴。","Welcome to PyHealth!\n====================================\n\n.. note::\n\n   **This README may be out of date.** For the most up-to-date documentation, tutorials, and API reference, please visit our official documentation site at `pyhealth.readthedocs.io \u003Chttps:\u002F\u002Fpyhealth.readthedocs.io\u002Fen\u002Flatest\u002F>`_.\n\n.. important::\n\n   * **Join our PyHealth Discord Community!** We are actively looking for contributors and want to get to know our users better! `Click here to join Discord \u003Chttps:\u002F\u002Fdiscord.gg\u002Fmpb835EHaX>`_\n   * **Signup for our mailing list!** We will email any significant PyHealth changes that are soon to come! `Click here to subscribe \u003Chttps:\u002F\u002Fdocs.google.com\u002Fforms\u002Fd\u002Fe\u002F1FAIpQLSfpJB5tdkI7BccTCReoszV9cyyX2rF99SgznzwlOepi5v-xLw\u002Fviewform?usp=header>`_\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Freadthedocs\u002Fpyhealth?logo=readthedocs&label=docs&version=latest\n   :target: https:\u002F\u002Fpyhealth.readthedocs.io\u002Fen\u002Flatest\u002F\n   :alt: Docs\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDiscord-Join-5865F2?logo=discord&logoColor=white\n   :target: https:\u002F\u002Fdiscord.gg\u002Fmpb835EHaX\n   :alt: Discord\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FMailing%20List-Subscribe-blue?logo=gmail&logoColor=white\n   :target: https:\u002F\u002Fdocs.google.com\u002Fforms\u002Fd\u002Fe\u002F1FAIpQLSfpJB5tdkI7BccTCReoszV9cyyX2rF99SgznzwlOepi5v-xLw\u002Fviewform?usp=header\n   :alt: Mailing list\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fpyhealth.svg?color=brightgreen\n   :target: https:\u002F\u002Fpypi.org\u002Fproject\u002Fpyhealth\u002F\n   :alt: PyPI version\n\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fsunlabuiuc\u002Fpyhealth.svg\n   :target: https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002Fpyhealth\u002Fstargazers\n   :alt: GitHub stars\n\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fforks\u002Fsunlabuiuc\u002Fpyhealth.svg?color=blue\n   :target: https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002Fpyhealth\u002Fnetwork\n   :alt: GitHub forks\n\n\n.. image:: https:\u002F\u002Fstatic.pepy.tech\u002Fbadge\u002Fpyhealth\n   :target: https:\u002F\u002Fpepy.tech\u002Fproject\u002Fpyhealth\n   :alt: Downloads\n\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTutorials-Google%20Colab-red\n   :target: https:\u002F\u002Fpyhealth.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials.html\n   :alt: Tutorials\n\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FYouTube-16%20Videos-red\n   :target: https:\u002F\u002Fwww.youtube.com\u002Fplaylist?list=PLR3CNIF8DDHJUl8RLhyOVpX_kT4bxulEV\n   :alt: YouTube\n\n.. image:: https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fworkflows\u002FCI\u002Fbadge.svg\n   :target: https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Factions\n   :alt: CI status\n\n\nCiting PyHealth :handshake:\n----------------------------------\n\n**PyHealth 2.0 (2026):**\n\nWu, John, Yongda Fan, Zhenbang Wu, Paul Landes, Eric Schrock, Sayeed Sajjad Razin, Arjun Chatterjee, Naveen Baskaran, Joshua Steier, Andrea Fitzpatrick, Bilal Arif, Rian Atri, Jathurshan Pradeepkumar, Siddhartha Laghuvarapu, Junyi Gao, Adam R. Cross, and Jimeng Sun. 2026. \"PyHealth 2.0: A Comprehensive Open-Source Toolkit for Accessible and Reproducible Clinical Deep Learning.\" arXiv preprint arXiv:2601.16414.\n\n.. code-block:: bibtex\n\n    @misc{wu2026pyhealth20comprehensiveopensource,\n        title={PyHealth 2.0: A Comprehensive Open-Source Toolkit for Accessible and Reproducible Clinical Deep Learning}, \n        author={John Wu and Yongda Fan and Zhenbang Wu and Paul Landes and Eric Schrock and Sayeed Sajjad Razin and Arjun Chatterjee and Naveen Baskaran and Joshua Steier and Andrea Fitzpatrick and Bilal Arif and Rian Atri and Jathurshan Pradeepkumar and Siddhartha Laghuvarapu and Junyi Gao and Adam R. Cross and Jimeng Sun},\n        year={2026},\n        eprint={2601.16414},\n        archivePrefix={arXiv},\n        primaryClass={cs.LG},\n        url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2601.16414}\n    }\n\n**PyHealth 1.0 (2023):**\n\nYang, Chaoqi, Zhenbang Wu, Patrick Jiang, Zhen Lin, Junyi Gao, Benjamin P. Danek, and Jimeng Sun. 2023. \"PyHealth: A Deep Learning Toolkit for Healthcare Applications.\" In Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, 5788–89. KDD '23. New York, NY, USA: Association for Computing Machinery.\n\n.. code-block:: bibtex\n\n    @inproceedings{pyhealth2023yang,\n        author = {Yang, Chaoqi and Wu, Zhenbang and Jiang, Patrick and Lin, Zhen and Gao, Junyi and Danek, Benjamin and Sun, Jimeng},\n        title = {{PyHealth}: A Deep Learning Toolkit for Healthcare Predictive Modeling},\n        url = {https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth},\n        booktitle = {Proceedings of the 27th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD) 2023},\n        year = {2023}\n    }\n\n-----------------------------------------------------------------\n\n\nPyHealth is a comprehensive deep learning toolkit for supporting clinical predictive modeling, which is designed for both **ML researchers and medical practitioners**. We can make your **healthcare AI applications** easier to develop, test, and deploy—more flexible and more customizable. `[Tutorials] \u003Chttps:\u002F\u002Fpyhealth.readthedocs.io\u002F>`_\n\n**Key Features**\n\n- Modular 5-stage pipeline for healthcare ML\n- Healthcare-first: medical codes and clinical datasets (MIMIC, eICU, OMOP)\n- 33+ pre-built models and production-ready trainer\u002Fmetrics\n- 10+ supported healthcare tasks and datasets\n- Fast (~3x faster than pandas) data processing for quick experimentation\n\n **[News!]** We are continuously implementing good papers and benchmarks into PyHealth, checkout the `[Planned List] \u003Chttps:\u002F\u002Fdocs.google.com\u002Fspreadsheets\u002Fd\u002F1PNMgDe-llOm1SM5ZyGLkmPysjC4wwaVblPLAHLxejTw\u002Fedit#gid=159213380>`_. Welcome to pick one from the list and send us a PR or add more influential and new papers into the plan list.\n\n.. image:: figure\u002Fposter.png\n   :width: 810\n\n..\n\n1. Installation :rocket:\n----------------------------\n\n**Python Version Requirement**\n\nPyHealth 2.0 requires **Python 3.12 or 3.13** (``>=3.12,\u003C3.14``). This version requirement enables optimal parallel processing, memory management, and compatibility with our modern dependencies.\n\n**Recommended Installation (Latest Release)**\n\nInstall the latest PyHealth 2.0 release from PyPI:\n\n.. code-block:: sh\n\n    pip install pyhealth\n\nThis version includes significant performance improvements, dynamic memory support, parallelized processing, multimodal dataloaders, and many new features.\n\n**Legacy Version**\n\nThe older stable version (1.16) is still available for backward compatibility and supports Python 3.9+:\n\n.. code-block:: sh\n\n    pip install pyhealth==1.16\n\n**For Contributors and Developers**\n\nIf you are contributing to PyHealth or need the latest development features, install from GitHub source:\n\n.. code-block:: sh\n\n    git clone https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth.git\n    cd PyHealth\n    pip install -e .\n\n**Note:** PyHealth 2.0 automatically installs PyTorch and other deep learning dependencies. The alpha version includes all required libraries for neural network-based models.\n\n\n2. Introduction :book:\n--------------------------\n``pyhealth`` provides these functionalities (we are still enriching some modules):\n\n.. image:: figure\u002Foverview.png\n   :width: 770\n\nYou can use the following functions independently:\n\n- **Dataset**: ``MIMIC-III``, ``MIMIC-IV``, ``eICU``, ``OMOP-CDM``, ``EHRShot``, ``COVID19-CXR``, ``SleepEDF``, ``SHHS``, ``ISRUC``, ``customized EHR datasets``, etc.\n- **Tasks**: ``diagnosis-based drug recommendation``, ``patient hospitalization and mortality prediction``, ``readmission prediction``, ``length of stay forecasting``, ``sleep staging``, etc.\n- **ML models**: ``RNN``, ``LSTM``, ``GRU``, ``Transformer``, ``RETAIN``, ``SafeDrug``, ``GAMENet``, ``MoleRec``, ``AdaCare``, ``ConCare``, ``StageNet``, ``GRASP``, ``SparcNet``, ``ContraWR``, ``Deepr``, ``TCN``, ``Dr. Agent``, etc.\n\n*Building a healthcare AI pipeline can be as short as 10 lines of code in PyHealth*.\n\n\n3. Build ML Pipelines :trophy:\n---------------------------------\n\nAll healthcare tasks in our package follow a **five-stage pipeline**:\n\n.. image:: figure\u002Ffive-stage-pipeline.png\n   :width: 640\n\n..\n\n We try hard to make sure each stage is as separate as possible, so that people can customize their own pipeline by only using our data processing steps or the ML models.\n\nModule 1: \u003Cpyhealth.datasets>\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\n``pyhealth.datasets`` provides a clean structure for the dataset, independent from the tasks. We support `MIMIC-III`, `MIMIC-IV`, `eICU`, `OMOP-CDM`, and more. The output (mimic3base) is a multi-level dictionary structure (see illustration below).\n\n.. code-block:: python\n\n    from pyhealth.datasets import MIMIC3Dataset\n\n    mimic3base = MIMIC3Dataset(\n        # root directory of the dataset\n        root=\"https:\u002F\u002Fstorage.googleapis.com\u002Fpyhealth\u002FSynthetic_MIMIC-III\u002F\",\n        # raw CSV table name\n        tables=[\"DIAGNOSES_ICD\", \"PROCEDURES_ICD\", \"PRESCRIPTIONS\"],\n        # map all NDC codes to CCS codes in these tables\n        code_mapping={\"NDC\": \"CCSCM\"},\n    )\n\n.. image:: figure\u002Fstructured-dataset.png\n   :width: 400\n\n..\n\nModule 2: \u003Cpyhealth.tasks>\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\n``pyhealth.tasks`` defines how to process each patient's data into a set of samples for the tasks. In the package, we provide several task examples, such as ``drug recommendation``, ``mortality prediction``, and ``readmission prediction``. **It is easy to customize your own tasks following our** `template \u003Chttps:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1r7MYQR_5yCJGpK_9I9-A10HmpupZuIN-?usp=sharing>`_.\n\n.. code-block:: python\n\n    from pyhealth.tasks import ReadmissionPredictionMIMIC3\n\n    mimic3sample = mimic3base.set_task(ReadmissionPredictionMIMIC3())\n    mimic3sample[0] # show the information of the first sample\n\n    from pyhealth.datasets import split_by_patient, get_dataloader\n\n    train_ds, val_ds, test_ds = split_by_patient(mimic3sample, [0.8, 0.1, 0.1])\n    train_loader = get_dataloader(train_ds, batch_size=32, shuffle=True)\n    val_loader = get_dataloader(val_ds, batch_size=32, shuffle=False)\n    test_loader = get_dataloader(test_ds, batch_size=32, shuffle=False)\n\nModule 3: \u003Cpyhealth.models>\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\n``pyhealth.models`` provides different ML models with very similar argument configs.\n\n.. code-block:: python\n\n    from pyhealth.models import Transformer\n\n    model = Transformer(\n        dataset=mimic3sample,\n    )\n\nModule 4: \u003Cpyhealth.trainer>\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\n``pyhealth.trainer`` can specify training arguments, such as epochs, optimizer, learning rate, etc. The trainer will automatically save the best model and output the path in the end.\n\n.. code-block:: python\n\n    from pyhealth.trainer import Trainer\n\n    trainer = Trainer(model=model)\n    trainer.train(\n        train_dataloader=train_loader,\n        val_dataloader=val_loader,\n        epochs=50,\n        monitor=\"pr_auc_samples\",\n    )\n\nModule 5: \u003Cpyhealth.metrics>\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\n``pyhealth.metrics`` provides several **common evaluation metrics** (refer to `Doc \u003Chttps:\u002F\u002Fpyhealth.readthedocs.io\u002Fen\u002Flatest\u002Fapi\u002Fmetrics.html>`_ and see what are available).\n\n.. code-block:: python\n\n    # method 1\n    trainer.evaluate(test_loader)\n\n    # method 2\n    from pyhealth.metrics.binary import binary_metrics_fn\n\n    y_true, y_prob, loss = trainer.inference(test_loader)\n    binary_metrics_fn(y_true, y_prob, metrics=[\"pr_auc\", \"roc_auc\"])\n\n4. Medical Code Map :hospital:\n---------------------------------\n\n``pyhealth.codemap`` provides two core functionalities. **This module can be used independently.**\n\n* For code ontology lookup within one medical coding system (e.g., name, category, sub-concept);\n\n.. code-block:: python\n\n    from pyhealth.medcode import InnerMap\n\n    icd9cm = InnerMap.load(\"ICD9CM\")\n    icd9cm.lookup(\"428.0\")\n    # `Congestive heart failure, unspecified`\n    icd9cm.get_ancestors(\"428.0\")\n    # ['428', '420-429.99', '390-459.99', '001-999.99']\n\n    atc = InnerMap.load(\"ATC\")\n    atc.lookup(\"M01AE51\")\n    # `ibuprofen, combinations`\n    atc.lookup(\"M01AE51\", \"drugbank_id\")\n    # `DB01050`\n    atc.lookup(\"M01AE51\", \"description\")\n    # Ibuprofen is a non-steroidal anti-inflammatory drug (NSAID) derived ...\n    atc.lookup(\"M01AE51\", \"indication\")\n    # Ibuprofen is the most commonly used and prescribed NSAID. It is very common over the ...\n\n* For code mapping between two coding systems (e.g., ICD9CM to CCSCM).\n\n.. code-block:: python\n\n    from pyhealth.medcode import CrossMap\n\n    codemap = CrossMap.load(\"ICD9CM\", \"CCSCM\")\n    codemap.map(\"428.0\")\n    # ['108']\n\n    codemap = CrossMap.load(\"NDC\", \"RxNorm\")\n    codemap.map(\"50580049698\")\n    # ['209387']\n\n    codemap = CrossMap.load(\"NDC\", \"ATC\")\n    codemap.map(\"50090539100\")\n    # ['A10AC04', 'A10AD04', 'A10AB04']\n\n5. Medical Code Tokenizer :speech_balloon:\n---------------------------------------------\n\n``pyhealth.tokenizer`` is used for transformations between string-based tokens and integer-based indices, based on the overall token space. We provide flexible functions to tokenize 1D, 2D and 3D lists. **This module can be used independently.**\n\n.. code-block:: python\n\n    from pyhealth.tokenizer import Tokenizer\n\n    # Example: we use a list of ATC3 code as the token\n    token_space = ['A01A', 'A02A', 'A02B', 'A02X', 'A03A', 'A03B', 'A03C', 'A03D', \\\n            'A03F', 'A04A', 'A05A', 'A05B', 'A05C', 'A06A', 'A07A', 'A07B', 'A07C', \\\n            'A12B', 'A12C', 'A13A', 'A14A', 'A14B', 'A16A']\n    tokenizer = Tokenizer(tokens=token_space, special_tokens=[\"\u003Cpad>\", \"\u003Cunk>\"])\n\n    # 2d encode\n    tokens = [['A03C', 'A03D', 'A03E', 'A03F'], ['A04A', 'B035', 'C129']]\n    indices = tokenizer.batch_encode_2d(tokens)\n    # [[8, 9, 10, 11], [12, 1, 1, 0]]\n\n    # 2d decode\n    indices = [[8, 9, 10, 11], [12, 1, 1, 0]]\n    tokens = tokenizer.batch_decode_2d(indices)\n    # [['A03C', 'A03D', 'A03E', 'A03F'], ['A04A', '\u003Cunk>', '\u003Cunk>']]\n\n    # 3d encode\n    tokens = [[['A03C', 'A03D', 'A03E', 'A03F'], ['A08A', 'A09A']], \\\n        [['A04A', 'B035', 'C129']]]\n    indices = tokenizer.batch_encode_3d(tokens)\n    # [[[8, 9, 10, 11], [24, 25, 0, 0]], [[12, 1, 1, 0], [0, 0, 0, 0]]]\n\n    # 3d decode\n    indices = [[[8, 9, 10, 11], [24, 25, 0, 0]], \\\n        [[12, 1, 1, 0], [0, 0, 0, 0]]]\n    tokens = tokenizer.batch_decode_3d(indices)\n    # [[['A03C', 'A03D', 'A03E', 'A03F'], ['A08A', 'A09A']], [['A04A', '\u003Cunk>', '\u003Cunk>']]]\n..\n\n6. Tutorials :teacher:\n----------------------------\n\n.. image:: https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\n    :target: https:\u002F\u002Fpyhealth.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials.html\n\n..\n\n We provide the following tutorials to help users get started with our pyhealth. Please bear with us as we update the documentation on how to use PyHealth 2.0.\n\n`Tutorial 0: Introduction to pyhealth.data \u003Chttps:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1y9PawgSbyMbSSMw1dpfwtooH7qzOEYdN?usp=sharing>`_  `[Video] \u003Chttps:\u002F\u002Fwww.youtube.com\u002Fwatch?v=Nk1itBoLOX8&list=PLR3CNIF8DDHJUl8RLhyOVpX_kT4bxulEV&index=2>`__\n\n`Tutorial 1: Introduction to pyhealth.datasets \u003Chttps:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1voSx7wEfzXfEf2sIfW6b-8p1KqMyuWxK?usp=sharing>`_  `[Video (PyHealth 1.16)] \u003Chttps:\u002F\u002Fwww.youtube.com\u002Fwatch?v=c1InKqFJbsI&list=PLR3CNIF8DDHJUl8RLhyOVpX_kT4bxulEV&index=3>`__\n\n`Tutorial 2: Introduction to pyhealth.tasks \u003Chttps:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1kKkkBVS_GclHoYTbnOtjyYnSee79hsyT?usp=sharing>`_  `[Video (PyHealth 1.16)] \u003Chttps:\u002F\u002Fwww.youtube.com\u002Fwatch?v=CxESe1gYWU4&list=PLR3CNIF8DDHJUl8RLhyOVpX_kT4bxulEV&index=4>`__\n\n`Tutorial 3: Introduction to pyhealth.models \u003Chttps:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1LcXZlu7ZUuqepf269X3FhXuhHeRvaJX5?usp=sharing>`_  `[Video] \u003Chttps:\u002F\u002Fwww.youtube.com\u002Fwatch?v=fRc0ncbTgZA&list=PLR3CNIF8DDHJUl8RLhyOVpX_kT4bxulEV&index=6>`__\n\n`Tutorial 4: Introduction to pyhealth.trainer \u003Chttps:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1L1Nz76cRNB7wTp5Pz_4Vp4N2eRZ9R6xl?usp=sharing>`_  `[Video] \u003Chttps:\u002F\u002Fwww.youtube.com\u002Fwatch?v=5Hyw3of5pO4&list=PLR3CNIF8DDHJUl8RLhyOVpX_kT4bxulEV&index=7>`__\n\n`Tutorial 5: Introduction to pyhealth.metrics \u003Chttps:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1Mrs77EJ92HwMgDaElJ_CBXbi4iABZBeo?usp=sharing>`_  `[Video] \u003Chttps:\u002F\u002Fwww.youtube.com\u002Fwatch?v=d-Kx_xCwre4&list=PLR3CNIF8DDHJUl8RLhyOVpX_kT4bxulEV&index=8>`__\n\n\n`Tutorial 6: Introduction to pyhealth.tokenizer \u003Chttps:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1bDOb0A5g0umBjtz8NIp4wqye7taJ03D0?usp=sharing>`_ `[Video] \u003Chttps:\u002F\u002Fwww.youtube.com\u002Fwatch?v=CeXJtf0lfs0&list=PLR3CNIF8DDHJUl8RLhyOVpX_kT4bxulEV&index=10>`__\n\n\n`Tutorial 7: Introduction to pyhealth.medcode \u003Chttps:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1xrp_ACM2_Hg5Wxzj0SKKKgZfMY0WwEj3?usp=sharing>`_ `[Video] \u003Chttps:\u002F\u002Fwww.youtube.com\u002Fwatch?v=MmmfU6_xkYg&list=PLR3CNIF8DDHJUl8RLhyOVpX_kT4bxulEV&index=9>`__\n\n\n The following tutorials will help users build their own task pipelines.\n\n`Pipeline 1: Chest Xray Classification \u003Chttps:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F18vK23gyI1LjWbTgkq4f99yDZA3A7Pxp9?usp=sharing>`_ `[Video] \u003Chttps:\u002F\u002Fwww.youtube.com\u002Fwatch?v=GGP3Dhfyisc&list=PLR3CNIF8DDHJUl8RLhyOVpX_kT4bxulEV&index=12>`__\n\n`Pipeline 2: Medical Coding \u003Chttps:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1ThYP_5ng5xPQwscv5XztefkkoTruhjeK?usp=sharing>`_\n\n`Pipeline 3: Medical Transcription Classification \u003Chttps:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1bjk_IArc2ZmXGR6u6Qzyf7kh70RdiY9c?usp=sharing>`_\n\n`Pipeline 4: Mortality Prediction \u003Chttps:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1b9xRbxUz-HLzxsrvxdsdJ868ajGQCY6U?usp=sharing>`_\n\n`Pipeline 5: Readmission Prediction \u003Chttps:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1h0pAymUlPQfkLFryI9QI37-HAW1tRxGZ?usp=sharing>`_\n\n\n We provide advanced tutorials for supporting various needs.\n\n`Advanced Tutorial 1: Fit your dataset into our pipeline \u003Chttps:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1UurxwAAov1bL_5OO3gQJ4gAa_paeJwJp?usp=sharing>`_  `[Video] \u003Chttps:\u002F\u002Fwww.youtube.com\u002Fwatch?v=xw2hGLEQ4Y0&list=PLR3CNIF8DDHJUl8RLhyOVpX_kT4bxulEV&index=13>`__\n\n`Advanced Tutorial 2: Define your own healthcare task \u003Chttps:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1gK6zPXvfFGBM1uNaLP32BOKrnnJdqRq2?usp=sharing>`_\n\n`Advanced Tutorial 3: Adopt customized model into pyhealth \u003Chttps:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1F_NJ90GC8_Eq-vKTf7Tyziew4gWjjKoH?usp=sharing>`_  `[Video] \u003Chttps:\u002F\u002Fwww.youtube.com\u002Fwatch?v=lADFlcmLtdE&list=PLR3CNIF8DDHJUl8RLhyOVpX_kT4bxulEV&index=14>`__\n\n`Advanced Tutorial 4: Load your own processed data into pyhealth and try out our ML models \u003Chttps:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1ZRnKch2EyJLrI3G5AvDXVpeE2wwgBWfw?usp=sharing>`_ `[Video] \u003Chttps:\u002F\u002Fwww.youtube.com\u002Fwatch?v=xw2hGLEQ4Y0&list=PLR3CNIF8DDHJUl8RLhyOVpX_kT4bxulEV&index=13>`__\n\n\n7. Datasets :mountain_snow:\n-----------------------------\nWe provide the processing files for the following open EHR datasets:\n\n===================  =======================================  ========================================  ========================================================================================================\nMIMIC-III            ``pyhealth.datasets.MIMIC3Dataset``      2016                                      `MIMIC-III Clinical Database \u003Chttps:\u002F\u002Fphysionet.org\u002Fcontent\u002Fmimiciii\u002F1.4\u002F\u002F>`_\nMIMIC-IV             ``pyhealth.datasets.MIMIC4Dataset``      2020                                      `MIMIC-IV Clinical Database \u003Chttps:\u002F\u002Fphysionet.org\u002Fcontent\u002Fmimiciv\u002F0.4\u002F>`_\neICU                 ``pyhealth.datasets.eICUDataset``        2018                                      `eICU Collaborative Research Database \u003Chttps:\u002F\u002Feicu-crd.mit.edu\u002F\u002F>`_\nOMOP                 ``pyhealth.datasets.OMOPDataset``                                                  `OMOP-CDM schema based dataset \u003Chttps:\u002F\u002Fwww.ohdsi.org\u002Fdata-standardization\u002Fthe-common-data-model\u002F>`_\nEHRShot              ``pyhealth.datasets.EHRShotDataset``     2023                                      `Few-shot EHR benchmarking dataset \u003Chttps:\u002F\u002Fgithub.com\u002Fsom-shahlab\u002Fehrshot-benchmark>`_\nCOVID19-CXR          ``pyhealth.datasets.COVID19CXRDataset``  2020                                      `COVID-19 chest X-ray image dataset`\nSleepEDF             ``pyhealth.datasets.SleepEDFDataset``    2018                                      `Sleep-EDF dataset \u003Chttps:\u002F\u002Fphysionet.org\u002Fcontent\u002Fsleep-edfx\u002F1.0.0\u002F>`_\nSHHS                 ``pyhealth.datasets.SHHSDataset``        2016                                      `Sleep Heart Health Study dataset \u003Chttps:\u002F\u002Fsleepdata.org\u002Fdatasets\u002Fshhs>`_\nISRUC                ``pyhealth.datasets.ISRUCDataset``       2016                                      `ISRUC-SLEEP dataset \u003Chttps:\u002F\u002Fsleeptight.isr.uc.pt\u002F?page_id=48>`_\n===================  =======================================  ========================================  ========================================================================================================\n\n\n8. Machine\u002FDeep Learning Models :airplane:\n------------------------------------------------------------\n\n**Deep Learning Models**\n\n==================================    ======  ============================================================================================================\nModel                                 Year    Key Innovation\n==================================    ======  ============================================================================================================\n**RETAIN**                            2016    Interpretable attention for clinical decisions\n**GAMENet**                           2019    Memory networks for drug recommendation\n**SafeDrug**                          2021    Molecular graphs for safe drug combinations\n**MoleRec**                           2023    Substructure-aware drug recommendation\n**AdaCare**                           2020    Scale-adaptive feature extraction\n**ConCare**                           2020    Transformer-based patient modeling\n**StageNet**                          2020    Disease progression stage modeling\n**GRASP**                             2021    Graph neural networks for patient clustering\n**MICRON**                            2021    Medication change prediction with recurrent residual networks\n==================================    ======  ============================================================================================================\n\n**Foundation Models**\n\n==================================    ======  ============================================================================================================\nModel                                 Year    Description\n==================================    ======  ============================================================================================================\n**Transformer**                       2017    Attention-based sequence modeling\n**RNN\u002FLSTM\u002FGRU**                      2011    Recurrent neural networks for sequences\n**CNN**                               1989    Convolutional networks for structured data\n**TCN**                               2018    Temporal convolutional networks\n**MLP**                               1986    Multi-layer perceptrons for tabular data\n==================================    ======  ============================================================================================================\n\n**Specialized Models**\n\n==================================    ======  ============================================================================================================\nModel                                 Year    Specialization\n==================================    ======  ============================================================================================================\n**ContraWR**                          2021    Biosignal analysis (EEG, ECG)\n**SparcNet**                          2023    Seizure detection and sleep staging\n**Deepr**                             2017    Electronic health records\n**Dr. Agent**                         2020    Reinforcement learning for clinical decisions\n==================================    ======  ============================================================================================================\n\n* Check the `interactive map on benchmark EHR predictive tasks \u003Chttps:\u002F\u002Fpyhealth.readthedocs.io\u002Fen\u002Flatest\u002Findex.html#benchmark-on-healthcare-tasks>`_.\n\n\n9. Research Initiative :microscope:\n--------------------------------------------\n\nThe **PyHealth Research Initiative** is a year-round, open research program that brings together talented individuals from diverse backgrounds to conduct cutting-edge research in healthcare AI.\n\n**How to participate:**\n\n1. Join our `Discord server \u003Chttps:\u002F\u002Fdiscord.gg\u002Fmpb835EHaX>`_\n2. Submit a high-quality PR to the `PyHealth repository \u003Chttps:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth>`_\n3. Check the `documentation \u003Chttps:\u002F\u002Fpyhealth.readthedocs.io\u002Fen\u002Flatest\u002Fresearch_initiative.html>`_ for more details\n\nRecent research from the initiative has been published at venues including **ML4H 2025** and other top conferences.\n\n\n10. About Us :busts_in_silhouette:\n--------------------------------------------\n\nWe are the `SunLab \u003Chttp:\u002F\u002Fsunlab.org\u002F>`_ healthcare research team at UIUC.\n\n**Current Maintainers:**\n\n- `Zhenbang Wu \u003Chttps:\u002F\u002Fzzachw.github.io\u002F>`_ (Ph.D. Student @ UIUC)\n- `John Wu \u003Chttps:\u002F\u002Fjhnwu3.github.io\u002F>`_ (Ph.D. Student @ UIUC)\n- `Junyi Gao \u003Chttp:\u002F\u002Faboutme.vixerunt.org\u002F>`_ (Ph.D. Student @ University of Edinburgh)\n- `Jimeng Sun \u003Chttp:\u002F\u002Fsunlab.org\u002F>`_ (Professor @ UIUC)\n\n**Get in Touch:**\n\n- `Discord Community \u003Chttps:\u002F\u002Fdiscord.gg\u002Fmpb835EHaX>`_ (fastest response)\n- `GitHub Issues \u003Chttps:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fissues>`_\n- `Mailing List \u003Chttps:\u002F\u002Fdocs.google.com\u002Fforms\u002Fd\u002Fe\u002F1FAIpQLSfpJB5tdkI7BccTCReoszV9cyyX2rF99SgznzwlOepi5v-xLw\u002Fviewform?usp=header>`_\n\n","欢迎来到 PyHealth！\n====================================\n\n.. note::\n\n   **此 README 可能已过时。** 如需最新文档、教程和 API 参考，请访问我们的官方文档网站：`pyhealth.readthedocs.io \u003Chttps:\u002F\u002Fpyhealth.readthedocs.io\u002Fen\u002Flatest\u002F>`_。\n\n.. important::\n\n   * **加入我们的 PyHealth Discord 社区！** 我们正在积极寻找贡献者，并希望更好地了解我们的用户！ `点击此处加入 Discord \u003Chttps:\u002F\u002Fdiscord.gg\u002Fmpb835EHaX>`_\n   * **注册我们的邮件列表！** 我们会通过邮件通知您即将发生的任何重要 PyHealth 更新！ `点击此处订阅 \u003Chttps:\u002F\u002Fdocs.google.com\u002Fforms\u002Fd\u002Fe\u002F1FAIpQLSfpJB5tdkI7BccTCReoszV9cyyX2rF99SgznzwlOepi5v-xLw\u002Fviewform?usp=header>`_\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Freadthedocs\u002Fpyhealth?logo=readthedocs&label=docs&version=latest\n   :target: https:\u002F\u002Fpyhealth.readthedocs.io\u002Fen\u002Flatest\u002F\n   :alt: 文档\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDiscord-Join-5865F2?logo=discord&logoColor=white\n   :target: https:\u002F\u002Fdiscord.gg\u002Fmpb835EHaX\n   :alt: Discord\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FMailing%20List-Subscribe-blue?logo=gmail&logoColor=white\n   :target: https:\u002F\u002Fdocs.google.com\u002Fforms\u002Fd\u002Fe\u002F1FAIpQLSfpJB5tdkI7BccTCReoszV9cyyX2rF99SgznzwlOepi5v-xLw\u002Fviewform?usp=header\n   :alt: 邮件列表\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fpyhealth.svg?color=brightgreen\n   :target: https:\u002F\u002Fpypi.org\u002Fproject\u002Fpyhealth\u002F\n   :alt: PyPI 版本\n\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fsunlabuiuc\u002Fpyhealth.svg\n   :target: https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002Fpyhealth\u002Fstargazers\n   :alt: GitHub 星标\n\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fforks\u002Fsunlabuiuc\u002Fpyhealth.svg?color=blue\n   :target: https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002Fpyhealth\u002Fnetwork\n   :alt: GitHub 分支\n\n\n.. image:: https:\u002F\u002Fstatic.pepy.tech\u002Fbadge\u002Fpyhealth\n   :target: https:\u002F\u002Fpepy.tech\u002Fproject\u002Fpyhealth\n   :alt: 下载量\n\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTutorials-Google%20Colab-red\n   :target: https:\u002F\u002Fpyhealth.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials.html\n   :alt: 教程\n\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FYouTube-16%20Videos-red\n   :target: https:\u002F\u002Fwww.youtube.com\u002Fplaylist?list=PLR3CNIF8DDHJUl8RLhyOVpX_kT4bxulEV\n   :alt: YouTube\n\n.. image:: https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fworkflows\u002FCI\u002Fbadge.svg\n   :target: https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Factions\n   :alt: CI 状态\n\n\n引用 PyHealth :handshake:\n----------------------------------\n\n**PyHealth 2.0 (2026):**\n\nWu, John, Yongda Fan, Zhenbang Wu, Paul Landes, Eric Schrock, Sayeed Sajjad Razin, Arjun Chatterjee, Naveen Baskaran, Joshua Steier, Andrea Fitzpatrick, Bilal Arif, Rian Atri, Jathurshan Pradeepkumar, Siddhartha Laghuvarapu, Junyi Gao, Adam R. Cross, and Jimeng Sun. 2026. \"PyHealth 2.0: A Comprehensive Open-Source Toolkit for Accessible and Reproducible Clinical Deep Learning.\" arXiv preprint arXiv:2601.16414.\n\n.. code-block:: bibtex\n\n    @misc{wu2026pyhealth20comprehensiveopensource,\n        title={PyHealth 2.0: A Comprehensive Open-Source Toolkit for Accessible and Reproducible Clinical Deep Learning}, \n        author={John Wu and Yongda Fan and Zhenbang Wu and Paul Landes and Eric Schrock and Sayeed Sajjad Razin and Arjun Chatterjee and Naveen Baskaran and Joshua Steier and Andrea Fitzpatrick and Bilal Arif and Rian Atri and Jathurshan Pradeepkumar and Siddhartha Laghuvarapu and Junyi Gao and Adam R. Cross and Jimeng Sun},\n        year={2026},\n        eprint={2601.16414},\n        archivePrefix={arXiv},\n        primaryClass={cs.LG},\n        url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2601.16414}\n    }\n\n**PyHealth 1.0 (2023):**\n\nYang, Chaoqi, Zhenbang Wu, Patrick Jiang, Zhen Lin, Junyi Gao, Benjamin P. Danek, and Jimeng Sun. 2023. \"PyHealth: A Deep Learning Toolkit for Healthcare Applications.\" In Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, 5788–89. KDD '23. New York, NY, USA: Association for Computing Machinery.\n\n.. code-block:: bibtex\n\n    @inproceedings{pyhealth2023yang,\n        author = {Yang, Chaoqi and Wu, Zhenbang and Jiang, Patrick and Lin, Zhen and Gao, Junyi and Danek, Benjamin and Sun, Jimeng},\n        title = {{PyHealth}: A Deep Learning Toolkit for Healthcare Predictive Modeling},\n        url = {https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth},\n        booktitle = {Proceedings of the 27th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD) 2023},\n        year = {2023}\n    }\n\n-----------------------------------------------------------------\n\n\nPyHealth 是一个全面的深度学习工具包，用于支持临床预测建模，专为 **机器学习研究人员和医疗从业者** 设计。我们可以让您的 **医疗 AI 应用程序** 更容易开发、测试和部署——更加灵活且可定制。 `[教程] \u003Chttps:\u002F\u002Fpyhealth.readthedocs.io\u002F>`_\n\n**主要特性**\n\n- 针对医疗 ML 的模块化五阶段流水线\n- 以医疗为中心：医学编码和临床数据集（MIMIC、eICU、OMOP）\n- 33+ 种预构建模型以及生产就绪的训练器和指标\n- 支持 10+ 种医疗任务和数据集\n- 快速（比 pandas 快约 3 倍）的数据处理，便于快速实验\n\n **[新闻！]** 我们正在不断将优秀的论文和基准测试整合到 PyHealth 中，请查看 `[计划列表] \u003Chttps:\u002F\u002Fdocs.google.com\u002Fspreadsheets\u002Fd\u002F1PNMgDe-llOm1SM5ZyGLkmPysjC4wwaVblPLAHLxejTw\u002Fedit#gid=159213380>`_。欢迎从列表中选择一篇，向我们提交 PR，或将更多有影响力的新论文添加到计划列表中。\n\n.. image:: figure\u002Fposter.png\n   :width: 810\n\n..\n\n1. 安装 :rocket:\n----------------------------\n\n**Python 版本要求**\n\nPyHealth 2.0 需要 **Python 3.12 或 3.13**（``>=3.12,\u003C3.14``）。这一版本要求能够实现最佳的并行处理、内存管理，并与我们现代依赖项兼容。\n\n**推荐安装方式（最新版本）**\n\n从 PyPI 安装最新的 PyHealth 2.0 版本：\n\n.. code-block:: sh\n\n    pip install pyhealth\n\n此版本包含显著的性能提升、动态内存支持、并行化处理、多模态数据加载器以及许多新功能。\n\n**旧版**\n\n较旧的稳定版本（1.16）仍然可用，以确保向后兼容性，并支持 Python 3.9 及以上版本：\n\n.. code-block:: sh\n\n    pip install pyhealth==1.16\n\n**面向贡献者和开发者**\n\n如果您正在为 PyHealth 做贡献，或需要最新的开发功能，请从 GitHub 源代码安装：\n\n.. code-block:: sh\n\n    git clone https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth.git\n    cd PyHealth\n    pip install -e .\n\n**注意：** PyHealth 2.0 会自动安装 PyTorch 和其他深度学习依赖项。Alpha 版本包含了所有基于神经网络模型所需的库。\n\n\n2. 简介 :book:\n--------------------------\n``pyhealth`` 提供以下功能（我们仍在丰富部分模块）：\n\n.. image:: figure\u002Foverview.png\n   :width: 770\n\n您可以独立使用以下功能：\n\n- **数据集**: ``MIMIC-III``、``MIMIC-IV``、``eICU``、``OMOP-CDM``、``EHRShot``、``COVID19-CXR``、``SleepEDF``、``SHHS``、``ISRUC``、``自定义电子健康记录数据集``等。\n- **任务**: ``基于诊断的药物推荐``、``患者住院及死亡率预测``、``再入院预测``、``住院时长预测``、``睡眠分期``等。\n- **机器学习模型**: ``RNN``、``LSTM``、``GRU``、``Transformer``、``RETAIN``、``SafeDrug``、``GAMENet``、``MoleRec``、``AdaCare``、``ConCare``、``StageNet``、``GRASP``、``SparcNet``、``ContraWR``、``Deepr``、``TCN``、``Dr. Agent``等。\n\n*使用PyHealth构建医疗AI流水线，代码量可短至10行*。\n\n\n3. 构建机器学习流水线 :trophy:\n---------------------------------\n\n我们包中的所有医疗任务都遵循一个**五阶段流水线**：\n\n.. image:: figure\u002Ffive-stage-pipeline.png\n   :width: 640\n\n..\n\n 我们尽力确保每个阶段尽可能独立，以便用户仅使用我们的数据处理步骤或机器学习模型即可自定义自己的流水线。\n\n模块1: \u003Cpyhealth.datasets>\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\n``pyhealth.datasets``为数据集提供了一个干净的结构，与具体任务无关。我们支持`MIMIC-III`、`MIMIC-IV`、`eICU`、`OMOP-CDM`等数据集。其输出（mimic3base）是一个多级字典结构（见下图）。\n\n.. code-block:: python\n\n    from pyhealth.datasets import MIMIC3Dataset\n\n    mimic3base = MIMIC3Dataset(\n        # 数据集的根目录\n        root=\"https:\u002F\u002Fstorage.googleapis.com\u002Fpyhealth\u002FSynthetic_MIMIC-III\u002F\",\n        # 原始CSV表名\n        tables=[\"DIAGNOSES_ICD\", \"PROCEDURES_ICD\", \"PRESCRIPTIONS\"],\n        # 将这些表中的所有NDC编码映射到CCS编码\n        code_mapping={\"NDC\": \"CCSCM\"},\n    )\n\n.. image:: figure\u002Fstructured-dataset.png\n   :width: 400\n\n..\n\n模块2: \u003Cpyhealth.tasks>\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\n``pyhealth.tasks``定义了如何将每位患者的数据处理成用于特定任务的一组样本。在本包中，我们提供了多个任务示例，如``药物推荐``、``死亡率预测``和``再入院预测``。**您可以按照我们的** `模板 \u003Chttps:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1r7MYQR_5yCJGpK_9I9-A10HmpupZuIN-?usp=sharing>`_ **轻松自定义自己的任务**。\n\n.. code-block:: python\n\n    from pyhealth.tasks import ReadmissionPredictionMIMIC3\n\n    mimic3sample = mimic3base.set_task(ReadmissionPredictionMIMIC3())\n    mimic3sample[0] # 显示第一个样本的信息\n\n    from pyhealth.datasets import split_by_patient, get_dataloader\n\n    train_ds、val_ds、test_ds = split_by_patient(mimic3sample, [0.8, 0.1, 0.1])\n    train_loader = get_dataloader(train_ds, batch_size=32, shuffle=True)\n    val_loader = get_dataloader(val_ds, batch_size=32, shuffle=False)\n    test_loader = get_dataloader(test_ds, batch_size=32, shuffle=False)\n\n模块3: \u003Cpyhealth.models>\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\n``pyhealth.models``提供了多种机器学习模型，它们的参数配置非常相似。\n\n.. code-block:: python\n\n    from pyhealth.models import Transformer\n\n    model = Transformer(\n        dataset=mimic3sample,\n    )\n\n模块4: \u003Cpyhealth.trainer>\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\n``pyhealth.trainer``可以指定训练参数，如轮数、优化器、学习率等。训练器会自动保存最佳模型，并在最后输出模型路径。\n\n.. code-block:: python\n\n    from pyhealth.trainer import Trainer\n\n    trainer = Trainer(model=model)\n    trainer.train(\n        train_dataloader=train_loader,\n        val_dataloader=val_loader,\n        epochs=50,\n        monitor=\"pr_auc_samples\",\n    )\n\n模块5: \u003Cpyhealth.metrics>\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\n``pyhealth.metrics``提供了若干**常用评估指标**（请参阅`文档 \u003Chttps:\u002F\u002Fpyhealth.readthedocs.io\u002Fen\u002Flatest\u002Fapi\u002Fmetrics.html>`_以了解可用指标）。\n\n.. code-block:: python\n\n    # 方法1\n    trainer.evaluate(test_loader)\n\n    # 方法2\n    from pyhealth.metrics.binary import binary_metrics_fn\n\n    y_true、y_prob、loss = trainer.inference(test_loader)\n    binary_metrics_fn(y_true、y_prob、metrics=[\"pr_auc\"、\"roc_auc\"])\n\n4. 医疗编码映射 :hospital:\n---------------------------------\n\n``pyhealth.codemap``提供了两项核心功能。**该模块可独立使用。**\n\n* 用于在单一医疗编码系统内进行编码本体查询（例如，名称、类别、子概念）；\n\n.. code-block:: python\n\n    from pyhealth.medcode import InnerMap\n\n    icd9cm = InnerMap.load(\"ICD9CM\")\n    icd9cm.lookup(\"428.0\")\n    # `充血性心力衰竭，未特指`\n    icd9cm.get_ancestors(\"428.0\")\n    # ['428'、'420-429.99'、'390-459.99'、'001-999.99']\n\n    atc = InnerMap.load(\"ATC\")\n    atc.lookup(\"M01AE51\")\n    # `布洛芬，复方制剂`\n    atc.lookup(\"M01AE51\"、\"drugbank_id\")\n    # `DB01050`\n    atc.lookup(\"M01AE51\"、\"description\")\n    # 布洛芬是一种非甾体抗炎药（NSAID），来源于…\n    atc.lookup(\"M01AE51\"、\"indication\")\n    # 布洛芬是最常用且最常被处方的NSAID。它在临床上非常常见……\n\n* 用于在两个编码系统之间进行编码映射（例如，ICD9CM到CCSCM）。\n\n.. code-block:: python\n\n    from pyhealth.medcode import CrossMap\n\n    codemap = CrossMap.load(\"ICD9CM\"、\"CCSCM\")\n    codemap.map(\"428.0\")\n    # ['108']\n\n    codemap = CrossMap.load(\"NDC\"、\"RxNorm\")\n    codemap.map(\"50580049698\")\n    # ['209387']\n\n    codemap = CrossMap.load(\"NDC\"、\"ATC\")\n    codemap.map(\"50090539100\")\n    # ['A10AC04'、'A10AD04'、'A10AB04']\n\n5. 医疗编码分词器 :speech_balloon:\n---------------------------------------------\n\n``pyhealth.tokenizer``用于在基于字符串的标记和基于整数的索引之间进行转换，基于整体标记空间。我们提供了灵活的函数来对1D、2D和3D列表进行分词。**该模块可独立使用。**\n\n.. code-block:: python\n\n    from pyhealth.tokenizer import Tokenizer\n\n    # 示例：我们使用ATC3编码列表作为标记\n    token_space = ['A01A'、'A02A'、'A02B'、'A02X'、'A03A'、'A03B'、'A03C'、'A03D'、\\\n            'A03F'、'A04A'、'A05A'、'A05B'、'A05C'、'A06A'、'A07A'、'A07B'、'A07C'、\\\n            'A12B'、'A12C'、'A13A'、'A14A'、'A14B'、'A16A']\n    tokenizer = Tokenizer(tokens=token_space、special_tokens=[\"\u003Cpad>\"、\"\u003Cunk>\"])\n\n    # 2D编码\n    tokens = [['A03C'、'A03D'、'A03E'、'A03F']、['A04A'、'B035'、'C129']]\n    indices = tokenizer.batch_encode_2d(tokens)\n    # [[8、9、10、11]、[12、1、1、0]]\n\n    # 2D解码\n    indices = [[8、9、10、11]、[12、1、1、0]]\n    tokens = tokenizer.batch_decode_2d(indices)\n    # [['A03C'、'A03D'、'A03E'、'A03F']、['A04A'、'\u003Cunk>'、'\u003Cunk>']]\n\n    # 3D编码\n    tokens = [[['A03C'、'A03D'、'A03E'、'A03F']、['A08A'、'A09A']]、\\\n        [['A04A'、'B035'、'C129']]]\n    indices = tokenizer.batch_encode_3d(tokens)\n    # [[[8、9、10、11]、[24、25、0、0]]、[[12、1、1、0]、[0、0、0、0]]]\n\n# 3D解码\n    indices = [[[8, 9, 10, 11], [24, 25, 0, 0]], \\\n        [[12, 1, 1, 0], [0, 0, 0, 0]]]\n    tokens = tokenizer.batch_decode_3d(indices)\n    # [[['A03C', 'A03D', 'A03E', 'A03F'], ['A08A', 'A09A']], [['A04A', '\u003Cunk>', '\u003Cunk>']]]\n..\n\n6. 教程 :teacher:\n----------------------------\n\n.. image:: https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\n    :target: https:\u002F\u002Fpyhealth.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials.html\n\n..\n\n 我们提供以下教程，帮助用户快速上手我们的 pyhealth。请耐心等待我们更新关于如何使用 PyHealth 2.0 的文档。\n\n`教程0：pyhealth.data简介 \u003Chttps:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1y9PawgSbyMbSSMw1dpfwtooH7qzOEYdN?usp=sharing>`_  `[视频] \u003Chttps:\u002F\u002Fwww.youtube.com\u002Fwatch?v=Nk1itBoLOX8&list=PLR3CNIF8DDHJUl8RLhyOVpX_kT4bxulEV&index=2>`__\n\n`教程1：pyhealth.datasets简介 \u003Chttps:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1voSx7wEfzXfEf2sIfW6b-8p1KqMyuWxK?usp=sharing>`_  `[视频（PyHealth 1.16）] \u003Chttps:\u002F\u002Fwww.youtube.com\u002Fwatch?v=c1InKqFJbsI&list=PLR3CNIF8DDHJUl8RLhyOVpX_kT4bxulEV&index=3>`__\n\n`教程2：pyhealth.tasks简介 \u003Chttps:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1kKkkBVS_GclHoYTbnOtjyYnSee79hsyT?usp=sharing>`_  `[视频（PyHealth 1.16）] \u003Chttps:\u002F\u002Fwww.youtube.com\u002Fwatch?v=CxESe1gYWU4&list=PLR3CNIF8DDHJUl8RLhyOVpX_kT4bxulEV&index=4>`__\n\n`教程3：pyhealth.models简介 \u003Chttps:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1LcXZlu7ZUuqepf269X3FhXuhHeRvaJX5?usp=sharing>`_  `[视频] \u003Chttps:\u002F\u002Fwww.youtube.com\u002Fwatch?v=fRc0ncbTgZA&list=PLR3CNIF8DDHJUl8RLhyOVpX_kT4bxulEV&index=6>`__\n\n`教程4：pyhealth.trainer简介 \u003Chttps:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1L1Nz76cRNB7wTp5Pz_4Vp4N2eRZ9R6xl?usp=sharing>`_  `[视频] \u003Chttps:\u002F\u002Fwww.youtube.com\u002Fwatch?v=5Hyw3of5pO4&list=PLR3CNIF8DDHJUl8RLhyOVpX_kT4bxulEV&index=7>`__\n\n`教程5：pyhealth.metrics简介 \u003Chttps:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1Mrs77EJ92HwMgDaElJ_CBXbi4iABZBeo?usp=sharing>`_  `[视频] \u003Chttps:\u002F\u002Fwww.youtube.com\u002Fwatch?v=d-Kx_xCwre4&list=PLR3CNIF8DDHJUl8RLhyOVpX_kT4bxulEV&index=8>`__\n\n\n`教程6：pyhealth.tokenizer简介 \u003Chttps:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1bDOb0A5g0umBjtz8NIp4wqye7taJ03D0?usp=sharing>`_ `[视频] \u003Chttps:\u002F\u002Fwww.youtube.com\u002Fwatch?v=CeXJtf0lfs0&list=PLR3CNIF8DDHJUl8RLhyOVpX_kT4bxulEV&index=10>`__\n\n\n`教程7：pyhealth.medcode简介 \u003Chttps:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1xrp_ACM2_Hg5Wxzj0SKKKgZfMY0WwEj3?usp=sharing>`_ `[视频] \u003Chttps:\u002F\u002Fwww.youtube.com\u002Fwatch?v=MmmfU6_xkYg&list=PLR3CNIF8DDHJUl8RLhyOVpX_kT4bxulEV&index=9>`__\n\n\n 以下教程将帮助用户构建自己的任务流水线。\n\n`流水线1：胸部X光片分类 \u003Chttps:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F18vK23gyI1LjWbTgkq4f99yDZA3A7Pxp9?usp=sharing>`_ `[视频] \u003Chttps:\u002F\u002Fwww.youtube.com\u002Fwatch?v=GGP3Dhfyisc&list=PLR3CNIF8DDHJUl8RLhyOVpX_kT4bxulEV&index=12>`__\n\n`流水线2：医学编码 \u003Chttps:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1ThYP_5ng5xPQwscv5XztefkkoTruhjeK?usp=sharing>`\n\n`流水线3：医疗转录分类 \u003Chttps:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1bjk_IArc2ZmXGR6u6Qzyf7kh70RdiY9c?usp=sharing>`\n\n`流水线4：死亡率预测 \u003Chttps:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1b9xRbxUz-HLzxsrvxdsdJ868ajGQCY6U?usp=sharing>`\n\n`流水线5：再入院预测 \u003Chttps:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1h0pAymUlPQfkLFryI9QI37-HAW1tRxGZ?usp=sharing>`_\n\n\n 我们提供高级教程，以满足各种需求。\n\n`高级教程1：将您的数据集适配到我们的流水线中 \u003Chttps:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1UurxwAAov1bL_5OO3gQJ4gAa_paeJwJp?usp=sharing>`_  `[视频] \u003Chttps:\u002F\u002Fwww.youtube.com\u002Fwatch?v=xw2hGLEQ4Y0&list=PLR3CNIF8DDHJUl8RLhyOVpX_kT4bxulEV&index=13>`__\n\n`高级教程2：定义您自己的医疗保健任务 \u003Chttps:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1gK6zPXvfFGBM1uNaLP32BOKrnnJdqRq2?usp=sharing>`\n\n`高级教程3：将自定义模型引入pyhealth \u003Chttps:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1F_NJ90GC8_Eq-vKTf7Tyziew4gWjjKoH?usp=sharing>`_  `[视频] \u003Chttps:\u002F\u002Fwww.youtube.com\u002Fwatch?v=lADFlcmLtdE&list=PLR3CNIF8DDHJUl8RLhyOVpX_kT4bxulEV&index=14>`__\n\n`高级教程4：将您自己处理好的数据加载到pyhealth中，并尝试我们的机器学习模型 \u003Chttps:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1ZRnKch2EyJLrI3G5AvDXVpeE2wwgBWfw?usp=sharing>`_ `[视频] \u003Chttps:\u002F\u002Fwww.youtube.com\u002Fwatch?v=xw2hGLEQ4Y0&list=PLR3CNIF8DDHJUl8RLhyOVpX_kT4bxulEV&index=13>`__\n\n\n7. 数据集 :mountain_snow:\n-----------------------------\n我们为以下开放的电子健康记录（EHR）数据集提供了处理文件：\n\n===================  =======================================  ========================================  ========================================================================================================\nMIMIC-III            ``pyhealth.datasets.MIMIC3Dataset``      2016                                      `MIMIC-III临床数据库 \u003Chttps:\u002F\u002Fphysionet.org\u002Fcontent\u002Fmimiciii\u002F1.4\u002F\u002F>`_\nMIMIC-IV             ``pyhealth.datasets.MIMIC4Dataset``      2020                                      `MIMIC-IV临床数据库 \u003Chttps:\u002F\u002Fphysionet.org\u002Fcontent\u002Fmimiciv\u002F0.4\u002F>`_\neICU                 ``pyhealth.datasets.eICUDataset``        2018                                      `eICU协作研究数据库 \u003Chttps:\u002F\u002Feicu-crd.mit.edu\u002F\u002F>`_\nOMOP                 ``pyhealth.datasets.OMOPDataset``                                                  `基于OMOP-CDM模式的数据集 \u003Chttps:\u002F\u002Fwww.ohdsi.org\u002Fdata-standardization\u002Fthe-common-data-model\u002F>`_\nEHRShot              ``pyhealth.datasets.EHRShotDataset``     2023                                      `小样本EHR基准测试数据集 \u003Chttps:\u002F\u002Fgithub.com\u002Fsom-shahlab\u002Fehrshot-benchmark>`_\nCOVID19-CXR          ``pyhealth.datasets.COVID19CXRDataset``  2020                                      `COVID-19胸部X光图像数据集`\nSleepEDF             ``pyhealth.datasets.SleepEDFDataset``    2018                                      `Sleep-EDF数据集 \u003Chttps:\u002F\u002Fphysionet.org\u002Fcontent\u002Fsleep-edfx\u002F1.0.0\u002F>`_\nSHHS                 ``pyhealth.datasets.SHHSDataset``        2016                                      `睡眠心脏健康研究数据集 \u003Chttps:\u002F\u002Fsleepdata.org\u002Fdatasets\u002Fshhs>`_\nISRUC                ``pyhealth.datasets.ISRUCDataset``       2016                                      `ISRUC-SLEEP数据集 \u003Chttps:\u002F\u002Fsleeptight.isr.uc.pt\u002F?page_id=48>`_\n===================  =======================================  ========================================  ========================================================================================================\n\n\n8. 机器学习\u002F深度学习模型 :airplane:\n------------------------------------------------------------\n\n**深度学习模型**\n\n==================================    ======  ============================================================================================================\n模型                                 年份    关键创新\n==================================    ======  ============================================================================================================\n**RETAIN**                            2016    面向临床决策的可解释注意力机制\n**GAMENet**                           2019    用于药物推荐的记忆网络\n**SafeDrug**                          2021    基于分子图的安全药物组合方法\n**MoleRec**                           2023    子结构感知的药物推荐\n**AdaCare**                           2020    尺度自适应特征提取\n**ConCare**                           2020    基于Transformer的患者建模\n**StageNet**                          2020    疾病进展阶段建模\n**GRASP**                             2021    用于患者聚类的图神经网络\n**MICRON**                            2021    基于循环残差网络的用药变化预测\n==================================    ======  ============================================================================================================\n\n**基础模型**\n\n==================================    ======  ============================================================================================================\n模型                                 年份    描述\n==================================    ======  ============================================================================================================\n**Transformer**                       2017    基于注意力机制的序列建模\n**RNN\u002FLSTM\u002FGRU**                      2011    用于序列的循环神经网络\n**CNN**                               1989    用于结构化数据的卷积网络\n**TCN**                               2018    时间卷积网络\n**MLP**                               1986    用于表格数据的多层感知机\n==================================    ======  ============================================================================================================\n\n**专用模型**\n\n==================================    ======  ============================================================================================================\n模型                                 年份    专长领域\n==================================    ======  ============================================================================================================\n**ContraWR**                          2021    生物信号分析（脑电图、心电图）\n**SparcNet**                          2023    癫痫发作检测与睡眠分期\n**Deepr**                             2017    电子健康记录\n**Dr. Agent**                         2020    用于临床决策的强化学习\n==================================    ======  ============================================================================================================\n\n* 请查看基准EHR预测任务的交互式地图 \u003Chttps:\u002F\u002Fpyhealth.readthedocs.io\u002Fen\u002Flatest\u002Findex.html#benchmark-on-healthcare-tasks>。\n\n\n9. 研究计划 :microscope:\n--------------------------------------------\n\n**PyHealth研究计划**是一项全年开放的研究项目，汇聚来自不同背景的优秀人才，共同开展医疗AI领域的前沿研究。\n\n**参与方式：**\n\n1. 加入我们的`Discord服务器 \u003Chttps:\u002F\u002Fdiscord.gg\u002Fmpb835EHaX>`_\n2. 向`PyHealth仓库 \u003Chttps:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth>`_ 提交高质量的代码合并请求\n3. 查阅`文档 \u003Chttps:\u002F\u002Fpyhealth.readthedocs.io\u002Fen\u002Flatest\u002Fresearch_initiative.html>`_ 获取更多详情\n\n该计划近期的研究成果已发表在包括**ML4H 2025**在内的顶级会议上。\n\n\n10. 关于我们 :busts_in_silhouette:\n--------------------------------------------\n\n我们是伊利诺伊大学厄巴纳-香槟分校的`SunLab \u003Chttp:\u002F\u002Fsunlab.org\u002F>`_ 医疗健康研究团队。\n\n**当前维护者：**\n\n- `吴振邦 \u003Chttps:\u002F\u002Fzzachw.github.io\u002F>`_ （UIUC博士生）\n- `约翰·吴 \u003Chttps:\u002F\u002Fjhnwu3.github.io\u002F>`_ （UIUC博士生）\n- `高俊毅 \u003Chttp:\u002F\u002Faboutme.vixerunt.org\u002F>`_ （爱丁堡大学博士生）\n- `孙继明 \u003Chttp:\u002F\u002Fsunlab.org\u002F>`_ （UIUC教授）\n\n**联系我们：**\n\n- `Discord社区 \u003Chttps:\u002F\u002Fdiscord.gg\u002Fmpb835EHaX>`_ （响应最快）\n- `GitHub问题 \u003Chttps:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fissues>`_\n- `邮件列表 \u003Chttps:\u002F\u002Fdocs.google.com\u002Fforms\u002Fd\u002Fe\u002F1FAIpQLSfpJB5tdkI7BccTCReoszV9cyyX2rF99SgznzwlOepi5v-xLw\u002Fviewform?usp=header>`_","# PyHealth 快速上手指南\n\nPyHealth 是一个专为医疗预测建模设计的综合深度学习工具包，适用于机器学习研究人员和医疗从业者。它提供了模块化的五阶段流程，支持多种主流医疗数据集（如 MIMIC、eICU、OMOP）和 33+ 种预建模型，旨在让医疗 AI 应用的开发、测试和部署更加灵活高效。\n\n## 1. 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**：Linux, macOS, 或 Windows\n*   **Python 版本**：\n    *   **PyHealth 2.0 (推荐)**：需要 **Python 3.12** 或 **3.13** (`>=3.12, \u003C3.14`)。此版本针对并行处理和内存管理进行了优化。\n    *   **PyHealth 1.16 (旧版)**：支持 Python 3.9+，仅用于向后兼容。\n*   **前置依赖**：安装过程中会自动安装 PyTorch 及其他必要的深度学习库，无需手动预先安装。\n\n> **提示**：国内用户建议使用国内镜像源加速安装过程（如下方安装命令所示）。\n\n## 2. 安装步骤\n\n### 推荐安装（最新稳定版 PyHealth 2.0）\n\n使用 pip 从 PyPI 安装最新版本。国内用户可添加 `-i` 参数使用清华或阿里镜像源。\n\n```bash\n# 使用默认源\npip install pyhealth\n\n# 【推荐】国内用户使用清华镜像源加速\npip install pyhealth -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n\n### 开发者安装（源码安装）\n\n如果您计划贡献代码或需要使用最新的开发功能：\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth.git\ncd PyHealth\npip install -e .\n```\n\n### 安装旧版本（可选）\n\n如需兼容旧项目，可安装 1.16 版本：\n\n```bash\npip install pyhealth==1.16\n```\n\n## 3. 基本使用\n\nPyHealth 的核心优势在于其标准化的**五阶段流水线**（数据加载 -> 任务定义 -> 模型构建 -> 训练 -> 评估）。以下是一个基于 MIMIC-III 数据集进行**再入院预测**的最小化示例（约 10 行核心代码）：\n\n### 步骤 1: 加载数据集\n初始化数据集对象，指定根目录和需要的表格。\n\n```python\nfrom pyhealth.datasets import MIMIC3Dataset\n\nmimic3base = MIMIC3Dataset(\n    root=\"https:\u002F\u002Fstorage.googleapis.com\u002Fpyhealth\u002FSynthetic_MIMIC-III\u002F\",\n    tables=[\"DIAGNOSES_ICD\", \"PROCEDURES_ICD\", \"PRESCRIPTIONS\"],\n    code_mapping={\"NDC\": \"CCSCM\"},\n)\n```\n\n### 步骤 2: 定义任务与数据划分\n将原始数据转换为特定任务（如再入院预测）的样本，并划分为训练集、验证集和测试集。\n\n```python\nfrom pyhealth.tasks import ReadmissionPredictionMIMIC3\nfrom pyhealth.datasets import split_by_patient, get_dataloader\n\n# 设置任务\nmimic3sample = mimic3base.set_task(ReadmissionPredictionMIMIC3())\n\n# 划分数据集 (80% 训练，10% 验证，10% 测试)\ntrain_ds, val_ds, test_ds = split_by_patient(mimic3sample, [0.8, 0.1, 0.1])\n\n# 创建 DataLoader\ntrain_loader = get_dataloader(train_ds, batch_size=32, shuffle=True)\nval_loader = get_dataloader(val_ds, batch_size=32, shuffle=False)\ntest_loader = get_dataloader(test_ds, batch_size=32, shuffle=False)\n```\n\n### 步骤 3: 构建模型\n选择预建模型（例如 Transformer），传入数据集样本以自动推断输入维度。\n\n```python\nfrom pyhealth.models import Transformer\n\nmodel = Transformer(\n    dataset=mimic3sample,\n)\n```\n\n### 步骤 4: 训练模型\n使用内置 Trainer 进行训练，自动保存最佳模型。\n\n```python\nfrom pyhealth.trainer import Trainer\n\ntrainer = Trainer(model=model)\ntrainer.train(\n    train_dataloader=train_loader,\n    val_dataloader=val_loader,\n    epochs=50,\n    monitor=\"pr_auc_samples\",\n)\n```\n\n### 步骤 5: 评估模型\n在测试集上评估模型性能。\n\n```python\n# 方法 1: 直接使用 trainer 评估\ntrainer.evaluate(test_loader)\n\n# 方法 2: 获取预测结果并自定义评估\nfrom pyhealth.metrics.binary import binary_metrics_fn\n\ny_true, y_prob, loss = trainer.inference(test_loader)\nbinary_metrics_fn(y_true, y_prob, metrics=[\"pr_auc\", \"roc_auc\"])\n```\n\n---\n*更多详细教程、API 文档及支持的模型列表，请访问官方文档：[pyhealth.readthedocs.io](https:\u002F\u002Fpyhealth.readthedocs.io\u002F)*","某三甲医院的数据科学团队正试图利用电子病历（EHR）中的时序数据，构建一个深度学习模型来预测重症患者的败血症发病风险。\n\n### 没有 PyHealth 时\n- **数据清洗耗时极长**：研究人员需手动编写大量脚本将非标准化的原始病历数据转换为模型可接受的张量格式，极易出错且难以复用。\n- **算法复现门槛高**：想要对比不同的医疗专用模型（如 GRU-D 或 Transformer 变体），必须从零阅读论文并重新实现底层逻辑，开发周期长达数周。\n- **评估标准不统一**：缺乏针对医疗场景的标准化评估模块，团队需自行定义指标计算逻辑，导致实验结果难以与其他研究进行公平对比。\n- **协作与维护困难**：由于代码高度定制化且缺乏文档，新成员加入后难以快速理解数据流向，模型迭代效率低下。\n\n### 使用 PyHealth 后\n- **数据处理自动化**：直接调用 PyHealth 内置的数据加载器，一键完成从原始 EHR 到标准化数据集的转换，将数据准备时间从数天缩短至几小时。\n- **模型调用模块化**：通过简单的 API 即可加载预实现的多种前沿医疗深度学习模型，无需重复造轮子，能快速开展多模型对比实验。\n- **评估流程标准化**：利用工具自带的医疗专用评估指标（如早期预警评分、死亡率预测准确率等），确保实验结果的可复现性和学术严谨性。\n- **生态协作更顺畅**：依托 PyHealth 清晰的架构和活跃社区，团队成员能基于统一框架快速迭代算法，显著提升了从原型到临床验证的速度。\n\nPyHealth 通过将复杂的医疗数据工程与前沿算法封装为标准化模块，让研究人员能从繁琐的代码工程中解放出来，专注于提升临床预测模型的准确性与落地价值。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsunlabuiuc_PyHealth_79f4416a.png","sunlabuiuc","SunLab","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fsunlabuiuc_404ab69f.png","",null,"http:\u002F\u002Fsunlab.org","https:\u002F\u002Fgithub.com\u002Fsunlabuiuc",[80,84,88,92],{"name":81,"color":82,"percentage":83},"Python","#3572A5",99.2,{"name":85,"color":86,"percentage":87},"Cython","#fedf5b",0.7,{"name":89,"color":90,"percentage":91},"Makefile","#427819",0.1,{"name":93,"color":94,"percentage":95},"Dockerfile","#384d54",0,1516,636,"2026-04-08T06:21:00","MIT","未说明",{"notes":102,"python":103,"dependencies":104},"PyHealth 2.0 会自动安装 PyTorch 和其他深度学习依赖。旧版本 (1.16) 仍可用于向后兼容。该工具支持多种医疗数据集（如 MIMIC-III, MIMIC-IV, eICU）和预建模型。","3.12, 3.13 (PyHealth 2.0); 3.9+ (PyHealth 1.16)",[105,106],"torch","pandas",[16,14,52,108],"其他",[110,111,112,113,114,115,116,117,118],"healthcare","data-mining","deep-learning","preprocessing","clinical-data","clinical-research","electronic-medical-record","medical-code","electronic-health-record","2026-03-27T02:49:30.150509","2026-04-08T20:10:19.821512",[122,127,132,137,142,147],{"id":123,"question_zh":124,"answer_zh":125,"source_url":126},24982,"解析处方数据时程序死锁或挂起怎么办？","这通常是由于 `pandas` 和 `pandarallel` 版本不兼容导致的。请检查项目 `develop` 分支中 `requires.txt` 文件指定的具体版本，并安装对应的 `pandas` 和 `pandarallel` 版本。如果问题仍然存在，建议尝试调整并行 worker 的数量或检查系统内存文件系统配置。","https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fissues\u002F150",{"id":128,"question_zh":129,"answer_zh":130,"source_url":131},24983,"为什么计算出的药物相互作用（DDI）率比预期低，且与 SafeDrug\u002FGAMEnet 论文中的结果不一致？","这是因为 PyHealth 改进了 `atc2smiles` 的映射逻辑。在原始的 SafeDrug 实现中，部分映射缺失导致相关药物记录被直接移除（剩余约 110 种药物）；而 PyHealth 使用了更全面的映射方式，保留了更多药物（约 191 种），从而导致最终的 DDI 矩阵形状（191x191）和计算出的 DDI 率（约 0.024）与原论文（110x110，约 0.058）不同。这是预期行为，反映了更完整的数据处理流程。","https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fissues\u002F79",{"id":133,"question_zh":134,"answer_zh":135,"source_url":136},24984,"运行 SafeDrug 模型得到的结果（如 Jaccard 系数）远低于论文报告值，甚至低于 GAMEnet，如何解决？","这是一个已知的 Bug，原因是 SafeDrug 的自适应损失函数（adaptive loss）实现存在问题。维护者已修复该问题。解决方法是：不要使用 pip 安装的旧版本，而是通过源码安装最新开发版：\n1. `git clone https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth.git`\n2. `cd PyHealth`\n3. `pip install .`\n重新运行后指标应恢复正常。","https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fissues\u002F209",{"id":138,"question_zh":139,"answer_zh":140,"source_url":141},24985,"PyHealth 的模型是否支持将文本报告（如放射学报告）作为输入特征？","支持。您可以将文本报告视为一种特殊的“代码”序列输入到 Transformer 等模型中。遵循案例 2 的格式，即每个就诊记录包含一个代码列表，其中每个“代码”可以是一整段文本报告（例如：`[[\"报告文本 1\", \"报告文本 2\"], [\"报告文本 3\"]]`）。模型会像处理语言任务一样从中学习特征，但这取决于具体的嵌入层配置和预处理方式。","https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fissues\u002F271",{"id":143,"question_zh":144,"answer_zh":145,"source_url":146},24986,"如何启用数据缓存以提高数据集加载速度？","PyHealth 已支持数据缓存功能。对于生成的任务样本（SampleDataset），系统可以将其缓存为 `.parquet` 文件以加速后续加载。对于基础数据集（BaseDataset），由于默认采用懒加载（lazy-loading）策略，通常不需要额外缓存 DataFrame，因为主要耗时在于任务构建阶段。如需优化内存使用，可结合分块加载（chunk loading）功能将部分 DataFrame 卸载到磁盘。","https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fissues\u002F326",{"id":148,"question_zh":149,"answer_zh":150,"source_url":131},24987,"SafeDrug 模型的 DDI 邻接矩阵维度为什么是 191x191 而不是论文中的 110x110？","维度差异源于药物过滤策略的不同。原 SafeDrug 代码因 `atc2smiles` 映射缺失丢弃了大量记录，仅保留 110 种药物；PyHealth 修复了映射逻辑，保留了 191 种药物。因此，生成的 `ddi_adj` 矩阵自然为 191x191。这代表使用了更完整的药物集合，无需强制对齐到 110 维，除非您需要严格复现旧版实验环境。",[152,157,162,167,172],{"id":153,"version":154,"summary_zh":155,"released_at":156},154419,"v2.0.1","## 变更内容\n* 在 PyHealth 页面顶部添加关于我们新项目的全新引用……由 @jhnwu3 在 https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fpull\u002F910 中完成\n* 【共形 EEG】共形检验修复，由 @lehendo 在 https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fpull\u002F909 中完成\n* 功能：为图和 NLP 附加组件添加可选依赖组，由 @haoyu-haoyu 在 https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fpull\u002F904 中完成\n* 添加\u002Fmm 保留 adacare，由 @jhnwu3 在 https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fpull\u002F885 中完成\n* concare 修复，由 @jhnwu3 在 https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fpull\u002F920 中完成\n\n作者注，简而言之：\n\n1. 修复了 PyHealth BaseDataset 在多个并发 PyHealth 作业及数据处理时的行为。（如果你同时提交过多作业，仍可能出现因文件写入锁而导致的崩溃。）不过，至少现在会进行检查，并尽量避免覆盖已存在的进程。\n2. 修复了此处 concare 和 Transformer 模型中的错误。\n3. 此外还包含一些 eICU 的修复以及对旧文件的清理工作。\n\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fcompare\u002Fv2.0.0...v2.0.1","2026-04-01T00:43:46",{"id":158,"version":159,"summary_zh":160,"released_at":161},154420,"v2.0.0","从 1.1.6 到 2.0.0，发生了巨大的变化。但从功能上看，我们对整个框架进行了全面重构，使其更快、更易用、更具可扩展性，并且在研究人员可能执行的任何任务中都更加实用。\n\n\n## 变更内容\n* 在 \u002Fdocs 中，将 jinja2 从 3.0.3 升级到 3.1.3，由 @dependabot[bot] 在 https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fpull\u002F258 中完成。\n* 在 \u002Fchat-assistant 中，将 gradio 从 3.44.2 升级到 4.19.2，由 @dependabot[bot] 在 https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fpull\u002F272 中完成。\n* 在 \u002Fchat-assistant 中，将 langchain 从 0.0.329 升级到 0.1.11，由 @dependabot[bot] 在 https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fpull\u002F275 中完成。\n* 修复 omop.py 中的 minor bugs，由 @ycq091044 在 https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fpull\u002F287 中完成。\n* 在 \u002Fdocs 中，将 jinja2 从 3.1.3 升级到 3.1.4，由 @dependabot[bot] 在 https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fpull\u002F291 中完成。\n* 更新文档，由 @zzachw 在 https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fpull\u002F312 中完成。\n* 开发工作，由 @jhnwu3 在 https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fpull\u002F320 中完成。\n* 更新文档以反映新的通信平台，由 @jhnwu3 在 https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fpull\u002F322 中完成。\n* 修复或更新文档，由 @zzachw 在 https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fpull\u002F323 中完成。\n* 更新 pyhealth.datasets.TUABDataset.rst，由 @mosheber 在 https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fpull\u002F296 中完成。\n* 使用 Pydantic 验证 YAML 配置文件，由 @zzachw 在 https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fpull\u002F333 中完成。\n* 重构 MedicalTranscriptionsDataset，由 @zzachw 在 https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fpull\u002F336 中完成。\n* 重构 COVID19CXRDataset，由 @zzachw 在 https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fpull\u002F337 中完成。\n* MIMIC4 重构以涵盖视觉、语言和 EHR 数据，由 @jhnwu3 在 https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fpull\u002F335 中完成。\n* 添加 EHRShot 数据集及基准测试任务，由 @zzachw 在 https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fpull\u002F350 中完成。\n* 修复 `BaseDataset.load_table()` 的问题，由 @zzachw 在 https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fpull\u002F368 中完成。\n* 对 about.rst、index.rst 和 tutorials.rst 的文档进行更新，由 @jhnwu3 在 https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fpull\u002F374 中完成。\n* 修复当 hospital_expire_flag 为字符串时，mortality label 始终为零的 bug，由 @PranavHerur 在 https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fpull\u002F391 中完成。\n* 将 `BaseDataset.set_task()` 的速度提升 2-3 倍，由 @zzachw 在 https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fpull\u002F378 中完成。\n* 添加 NLP 指标包，由 @plandes 在 https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fpull\u002F513 中完成。\n* 修复 readthedoc 的依赖错误，由 @jhnwu3 在 https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fpull\u002F519 中完成。\n* 更新 readthedocs 的 Python 版本，以便 Hugging Face 不再出现崩溃，由 @jhnwu3 在 https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fpull\u002F520 中完成。\n* 修复文档中 Python 版本不兼容的问题，由 @jhnwu3 在 https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fpull\u002F521 中完成。\n* 修复因与 numpy 不兼容而导致的文档依赖项中断问题，由 @jhnwu3 在 https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fpull\u002F522 中完成。\n* 测试依赖项，由 @jhnwu3 在 https:\u002F\u002Fgithub.com\u002Fsunlabuiuc\u002FPyHealth\u002Fpull\u002F523 中完成。\n* 修复构建 autodocs 时的依赖错误，由 @jhnwu3 在 https:\u002F\u002Fg","2026-03-23T19:34:36",{"id":163,"version":164,"summary_zh":165,"released_at":166},154421,"v1.1.6","1. 增加更多脑电图\u002F心电图数据集（TUEV、TUAB、cpsc_2018、cpsc_2018_extra 等）  \n2. 添加基础的公平性指标  \n3. 添加图神经网络模型  \n4. 添加生成模型（变分自编码器、生成对抗网络）  \n5. 更改为 MIT 许可证  \n6. ....","2024-03-07T19:26:08",{"id":168,"version":169,"summary_zh":170,"released_at":171},154422,"v1.1.4","1. 使用 pandarallel 并行加载电子健康记录（EHR）数据集  \n2. 生物信号数据流水线支持（例如：SleepEDF、ISRUC、SHHS）  \n3. 不确定性量化模块（例如：校准、预测集）  \n4. 数据和数据集的单元测试。","2023-05-31T23:26:48",{"id":173,"version":174,"summary_zh":175,"released_at":176},154423,"v1.1.3","- 添加每周的 PyHealth 实时信息\n- 新增 deepr 模型并清理模型代码\n- 修复样本数据类型检查和药物推荐任务函数中的问题\n- 开始添加单元测试模块","2023-01-24T21:23:09"]