Chuyển đến nội dung
Skillpedia
Học máy33k · #9003

pyhealth

Skill này làm gì

Skill này cho agent của bạn PyHealth, một bộ công cụ Python cho AI y tế. Nó bao gồm bộ dữ liệu, tác vụ dự đoán, mô hình và hệ thống mã y khoa. Skill dành cho nhà khoa học dữ liệu y tế và nhà nghiên cứu lâm sàng.

Khi nào nên dùng

  • ✓Khi bạn muốn dự đoán tái nhập viện hoặc tử vong từ dữ liệu EHR.
  • ✓Khi bạn cần chuyển mã y khoa giữa các hệ thống như ICD, NDC hoặc ATC.
  • ✓Khi bạn muốn kiểm tra một mô hình y tế về tính công bằng hoặc độ hiệu chuẩn.

Liên kết skill

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/scientific/pyhealth/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/scientific/pyhealth/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Xây dựng mô hình dự đoán tử vong trên dữ liệu MIMIC-IV bằng PyHealth, và báo cáo kết quả hiệu chuẩn cùng tính công bằng.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent tải bộ dữ liệu lâm sàng, định nghĩa tác vụ dự đoán, chọn mô hình, rồi huấn luyện và đánh giá. Nó cũng kiểm tra tính công bằng và độ hiệu chuẩn.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

PyHealth: Healthcare AI Toolkit

Overview

PyHealth is a comprehensive Python library for healthcare AI that provides specialized tools, models, and datasets for clinical machine learning. Use this skill when developing healthcare prediction models, processing clinical data, working with medical coding systems, or deploying AI solutions in healthcare settings.

When to Use This Skill

Invoke this skill when:

  • Working with healthcare datasets: MIMIC-III, MIMIC-IV, eICU, OMOP, sleep EEG data, medical images
  • Clinical prediction tasks: Mortality prediction, hospital readmission, length of stay, drug recommendation
  • Medical coding: Translating between ICD-9/10, NDC, RxNorm, ATC coding systems
  • Processing clinical data: Sequential events, physiological signals, clinical text, medical images
  • Implementing healthcare models: RETAIN, SafeDrug, GAMENet, StageNet, Transformer for EHR
  • Evaluating clinical models: Fairness metrics, calibration, interpretability, uncertainty quantification

Core Capabilities

PyHealth operates through a modular 5-stage pipeline optimized for healthcare AI:

  1. Data Loading: Access 10+ healthcare datasets with standardized interfaces
  2. Task Definition: Apply 20+ predefined clinical prediction tasks or create custom tasks
  3. Model Selection: Choose from 33+ models (baselines, deep learning, healthcare-specific)
  4. Training: Train with automatic checkpointing, monitoring, and evaluation
  5. Deployment: Calibrate, interpret, and validate for clinical use

Performance: 3x faster than pandas for healthcare data processing

Quick Start Workflow

from pyhealth.datasets import MIMIC4Dataset
from pyhealth.tasks import mortality_prediction_mimic4_fn
from pyhealth.datasets import split_by_patient, get_dataloader
from pyhealth.models import Transformer
from pyhealth.trainer import Trainer

# 1. Load dataset and set task
dataset = MIMIC4Dataset(root="/path/to/data")
sample_dataset = dataset.set_task(mortality_prediction_mimic4_fn)

# 2. Split data
train, val, test = split_by_patient(sample_dataset, [0.7, 0.1, 0.2])

# 3. Create data loaders
train_loader = get_dataloader(train, batch_size=64, shuffle=True)
val_loader = get_dataloader(val, batch_size=64, shuffle=False)
test_loader = get_dataloader(test, batch_size=64, shuffle=False)

# 4. Initialize and train model
model = Transformer(
    dataset=sample_dataset,
    feature_keys=["diagnoses", "medications"],
    mode="binary",
    embedding_dim=128
)

trainer = Trainer(model=model, device="cuda")
trainer.train(
    train_dataloader=train_loader,
    val_dataloader=val_loader,
    epochs=50,
    monitor="pr_auc_score"
)

# 5. Evaluate
results = trainer.evaluate(test_loader)

Detailed Documentation

This skill includes comprehensive reference documentation organized by functionality. Read specific reference files as needed:

1. Datasets and Data Structures

File: references/datasets.md

Read when:

  • Loading healthcare datasets (MIMIC, eICU, OMOP, sleep EEG, etc.)
  • Understanding Event, Patient, Visit data structures
  • Processing different data types (EHR, signals, images, text)
  • Splitting data for training/validation/testing
  • Working with SampleDataset for task-specific formatting

Key Topics:

  • Core data structures (Event, Patient, Visit)
  • 10+ available datasets (EHR, physiological signals, imaging, text)
  • Data loading and iteration
  • Train/val/test splitting strategies
  • Performance optimization for large datasets

2. Medical Coding Translation

File: references/medical_coding.md

Read when:

  • Translating between medical coding systems
  • Working with diagnosis codes (ICD-9-CM, ICD-10-CM, CCS)
  • Processing medication codes (NDC, RxNorm, ATC)
  • Standardizing procedure codes (ICD-9-PROC, ICD-10-PROC)
  • Grouping codes into clinical categories
  • Handling hierarchical drug classifications

Key Topics:

  • InnerMap for within-system lookups
  • CrossMap for cross-system translation
  • Supported coding systems (ICD, NDC, ATC, CCS, RxNorm)
  • Code standardization and hierarchy traversal
  • Medication classification by therapeutic class
  • Integration with datasets

3. Clinical Prediction Tasks

File: references/tasks.md

Read when:

  • Defining clinical prediction objectives
  • Using predefined tasks (mortality, readmission, drug recommendation)
  • Working with EHR, signal, imaging, or text-based tasks
  • Creating custom prediction tasks
  • Setti
Câu hỏi thường gặp

Những bộ dữ liệu nào được hỗ trợ?

Skill đề cập đến MIMIC-III, MIMIC-IV, eICU, OMOP và dữ liệu EEG giấc ngủ.

Những mô hình nào được bao gồm?

Skill đề cập đến các mô hình như RETAIN, SafeDrug và GAMENet, cùng các mô hình khác.

Nó có chuyển được mã y khoa không?

Có. Skill bao gồm chuyển đổi giữa các hệ thống mã ICD, NDC, RxNorm và ATC.

Chi tiết

Mô tả gốc của tác giả

Comprehensive healthcare AI toolkit for developing, testing, and deploying machine learning models with clinical data. This skill should be used when working with electronic health records (EHR), clinical prediction tasks (mortality, readmission, drug recommendation), medical coding systems (ICD, NDC, ATC), physiological signals (EEG, ECG), healthcare datasets (MIMIC-III/IV, eICU, OMOP), or implementing deep learning models for healthcare applications (RETAIN, SafeDrug, Transformer, GNN).

repo: davila7/claude-code-templates

Độ phổ biến

Sao GitHub
33k
Vị trí xếp hạng
#9003
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự