Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
1420 lines (1337 loc) · 66.2 KB
/
Copy pathindex.html
File metadata and controls
1420 lines (1337 loc) · 66.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>PyHealth — Open-Source Healthcare AI Toolkit</title>
<meta name="description" content="PyHealth is an open-source Python toolkit for clinical deep learning, unifying datasets, tasks, and models across EHR, signals, and imaging modalities.">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=Source+Serif+4:opsz,wght@8..60,500;8..60,600&display=swap" rel="stylesheet">
<link rel="stylesheet" href="assets/css/styles.css">
<style>
/* ── PyHealth page-specific styles ── */
/* Wider canvas than the personal site */
:root { --maxw: 1140px; }
/* Highlighted "Join Us" nav call-to-action */
.nav a.nav-cta {
background: var(--accent);
color: #fff;
padding: 0.34rem 0.9rem;
border-radius: 8px;
font-weight: 600;
transition: filter 0.15s, transform 0.1s;
}
.nav a.nav-cta:hover { filter: brightness(1.08); transform: translateY(-1px); }
.landing-card {
border-radius: 20px;
overflow: hidden;
border: 1px solid var(--line);
box-shadow: 0 20px 48px rgba(22, 33, 31, 0.15);
animation: rise 420ms ease;
}
.ph-hero {
background: linear-gradient(140deg, #1c2b3a 0%, #28425e 60%, #1e3348 100%);
padding: 3.5rem 3rem 3.2rem;
color: white;
position: relative;
overflow: hidden;
}
/* Decorative blobs */
.ph-hero::before {
content: "";
position: absolute;
top: -80px;
right: -80px;
width: 340px;
height: 340px;
border-radius: 50%;
background: radial-gradient(circle, rgba(201,95,38,0.22) 0%, transparent 70%);
pointer-events: none;
}
.ph-hero::after {
content: "";
position: absolute;
bottom: -100px;
left: -60px;
width: 280px;
height: 280px;
border-radius: 50%;
background: radial-gradient(circle, rgba(90,160,230,0.1) 0%, transparent 70%);
pointer-events: none;
}
.ph-logo { height: 110px; width: auto; display: block; margin-bottom: 0.6rem; }
.ph-eyebrow {
font-size: 0.8rem;
font-weight: 600;
letter-spacing: 0.1em;
text-transform: uppercase;
color: rgba(201,95,38,0.9);
margin: 0 0 0.6rem;
}
.ph-hero h1 {
color: white;
font-size: clamp(2.6rem, 5.5vw, 4.5rem);
margin: 0 0 0.5rem;
letter-spacing: -0.01em;
}
.ph-tagline {
color: rgba(255,255,255,0.72);
font-size: 1.15rem;
line-height: 1.55;
max-width: 580px;
margin: 0 0 2rem;
}
.ph-cta-row {
display: flex;
gap: 0.7rem;
flex-wrap: wrap;
position: relative;
z-index: 1;
}
.ph-btn {
display: inline-flex;
align-items: center;
gap: 0.5rem;
text-decoration: none;
border-radius: 10px;
padding: 0.64rem 1.15rem;
font-size: 0.95rem;
font-weight: 500;
font-family: "IBM Plex Sans", sans-serif;
transition: filter 0.15s, transform 0.1s;
cursor: pointer;
}
.ph-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.ph-btn svg { flex-shrink: 0; }
.ph-btn.primary {
background: var(--accent);
color: white;
border: 1px solid rgba(255,255,255,0.1);
box-shadow: 0 4px 12px rgba(201,95,38,0.35);
}
.ph-btn.outline {
background: rgba(255,255,255,0.09);
color: rgba(255,255,255,0.9);
border: 1px solid rgba(255,255,255,0.22);
backdrop-filter: blur(6px);
}
/* ── Stats ── */
.stats-row {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
gap: 0.85rem;
margin-top: 1.2rem;
animation: rise 500ms ease;
}
.stat-card {
background: var(--paper);
border: 1px solid var(--line);
border-radius: 14px;
padding: 1.5rem 1rem;
text-align: center;
}
.stat-number {
font-family: "Source Serif 4", Georgia, serif;
font-size: 2.4rem;
font-weight: 600;
color: var(--accent);
line-height: 1;
margin-bottom: 0.35rem;
}
.stat-label {
font-size: 0.9rem;
color: var(--muted);
line-height: 1.3;
}
/* ── Resource link cards ── */
.link-cards {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 0.85rem;
margin-top: 1rem;
}
.link-card {
background: var(--paper);
border: 1px solid var(--line);
border-radius: 14px;
padding: 1.8rem 1.6rem;
text-decoration: none;
color: var(--ink);
display: flex;
flex-direction: column;
gap: 0.4rem;
transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
animation: rise 560ms ease;
}
.link-card:hover {
border-color: var(--accent);
box-shadow: 0 6px 20px rgba(201,95,38,0.11);
transform: translateY(-2px);
}
.lc-icon {
color: var(--accent);
margin-bottom: 0.2rem;
}
.link-card h3 {
font-size: 1.15rem;
margin: 0;
}
.link-card p {
font-size: 0.95rem;
color: var(--muted);
margin: 0;
line-height: 1.45;
}
.lc-arrow {
display: inline-flex;
align-items: center;
gap: 0.3rem;
color: var(--accent);
font-size: 0.88rem;
font-weight: 500;
margin-top: auto;
padding-top: 0.5rem;
}
/* ── Back nav ── */
.back-link {
display: inline-flex;
align-items: center;
gap: 0.35rem;
text-decoration: none;
color: var(--muted);
font-size: 0.94rem;
padding: 0.35rem 0.65rem;
border-radius: 999px;
border: 1px solid transparent;
transition: color 0.12s, background 0.12s, border-color 0.12s;
}
.back-link:hover {
color: var(--accent);
border-color: var(--line);
background: var(--paper);
}
.section-h2 {
font-size: clamp(1.4rem, 2.5vw, 2rem);
margin: 0 0 0.3rem;
}
.section-sub {
color: var(--muted);
font-size: 1rem;
margin: 0 0 1rem;
}
/* ── Pipeline grid ── */
.pipeline-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 0.75rem;
margin-top: 0.85rem;
}
.pipeline-row-label {
grid-column: 1 / -1;
font-size: 0.74rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.09em;
color: var(--muted);
margin: 0.65rem 0 0;
padding-left: 0.15rem;
}
.pipeline-row-label:first-child { margin-top: 0; }
.pipeline-card {
background: var(--paper);
border: 1px solid var(--line);
border-radius: 14px;
padding: 1.3rem 1.2rem 1.1rem;
text-decoration: none;
color: var(--ink);
display: flex;
flex-direction: column;
gap: 0.18rem;
transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
animation: rise 520ms ease;
}
.pipeline-card:hover {
border-color: var(--accent);
box-shadow: 0 5px 18px rgba(201,95,38,0.11);
transform: translateY(-2px);
}
.pipeline-step {
font-size: 0.71rem;
font-weight: 700;
color: var(--accent);
letter-spacing: 0.08em;
opacity: 0.85;
}
.pipeline-name {
font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
font-size: 0.97rem;
font-weight: 600;
color: var(--ink);
margin-bottom: 0.2rem;
}
.pipeline-desc {
font-size: 0.9rem;
color: var(--muted);
line-height: 1.45;
margin: 0;
}
@media (max-width: 600px) {
.pipeline-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 380px) {
.pipeline-grid { grid-template-columns: 1fr; }
}
/* ── Pip install bar ── */
.ph-install-row {
display: flex;
align-items: center;
gap: 0.6rem;
margin-bottom: 1.2rem;
position: relative;
z-index: 1;
}
.ph-install-cmd {
font-family: "IBM Plex Mono", "Menlo", monospace;
font-size: 0.92rem;
background: rgba(0,0,0,0.35);
color: #a6e3a1;
padding: 0.5rem 1rem;
border-radius: 8px;
border: 1px solid rgba(255,255,255,0.1);
letter-spacing: 0.01em;
}
.ph-copy-btn {
background: rgba(255,255,255,0.09);
border: 1px solid rgba(255,255,255,0.18);
border-radius: 7px;
color: rgba(255,255,255,0.75);
font-family: "IBM Plex Sans", sans-serif;
font-size: 0.8rem;
font-weight: 500;
padding: 0.42rem 0.8rem;
cursor: pointer;
transition: background 0.15s, color 0.15s;
display: inline-flex;
align-items: center;
gap: 0.4rem;
}
.ph-copy-btn:hover { background: rgba(255,255,255,0.15); color: white; }
.ph-copy-btn.copied { background: rgba(74,222,128,0.15); color: #4ade80; border-color: rgba(74,222,128,0.3); }
/* ── Badges ── */
.ph-badges {
display: flex;
gap: 0.5rem;
flex-wrap: wrap;
margin-top: 1rem;
position: relative;
z-index: 1;
}
.ph-badges a { display: inline-block; line-height: 0; }
.ph-badges img { border-radius: 4px; }
/* ── Quickstart code section ── */
.ph-quickstart {
background: var(--paper);
border: 1px solid var(--line);
border-radius: 16px;
overflow: hidden;
}
.ph-quickstart-header {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 0.6rem;
padding: 1.1rem 1.4rem 0.9rem;
border-bottom: 1px solid var(--line);
}
.ph-quickstart-header h3 {
margin: 0;
font-size: 0.95rem;
font-weight: 600;
color: var(--ink);
}
.ph-quickstart-actions {
display: flex;
gap: 0.5rem;
flex-wrap: wrap;
align-items: center;
}
.ph-quickstart-copy {
font-family: "IBM Plex Sans", sans-serif;
font-size: 0.8rem;
font-weight: 500;
padding: 0.3rem 0.7rem;
border-radius: 6px;
border: 1.5px solid var(--line);
background: transparent;
color: var(--muted);
cursor: pointer;
transition: all 0.15s;
display: inline-flex;
align-items: center;
gap: 0.35rem;
}
.ph-quickstart-copy:hover { border-color: var(--accent); color: var(--accent); }
.ph-quickstart-copy.copied { border-color: #16a34a; color: #16a34a; }
.colab-inline-link {
font-size: 0.8rem;
font-weight: 500;
text-decoration: none;
color: #c95f26;
padding: 0.3rem 0.7rem;
border-radius: 6px;
border: 1.5px solid rgba(201,95,38,0.3);
background: rgba(201,95,38,0.06);
transition: opacity 0.15s;
}
.colab-inline-link:hover { opacity: 0.8; }
.ph-code {
background: #0f1923;
padding: 1.2rem 1.4rem;
margin: 0;
font-family: "IBM Plex Mono", "Menlo", monospace;
font-size: 0.82rem;
line-height: 1.7;
color: #cdd6f4;
overflow-x: auto;
white-space: pre;
}
.cite-stack { display: grid; gap: 1rem; }
.cite-stack .ph-code { white-space: pre-wrap; overflow-wrap: anywhere; }
.tok-kw { color: #89b4fa; }
.tok-cl { color: #cba6f7; }
.tok-fn { color: #89dceb; }
.tok-str { color: #a6e3a1; }
.tok-num { color: #fab387; }
.tok-op { color: #cdd6f4; }
.tok-cm { color: #585b70; font-style: italic; }
/* ── Explore button ── */
@keyframes chevron-bounce {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(5px); }
}
@keyframes explore-reveal {
from { opacity: 0; transform: translateY(18px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes btn-fade-out {
to { opacity: 0; transform: translateY(8px); pointer-events: none; }
}
.explore-btn-wrap {
display: flex;
justify-content: center;
margin: 2.8rem 0 1rem;
}
.explore-btn {
display: inline-flex;
flex-direction: column;
align-items: center;
gap: 0.4rem;
background: none;
border: none;
cursor: pointer;
color: var(--muted);
font-family: inherit;
font-size: 0.85rem;
font-weight: 500;
letter-spacing: 0.04em;
padding: 0.5rem 1rem;
transition: color 0.15s;
}
.explore-btn:hover { color: var(--ink); }
.explore-chevron {
display: block;
animation: chevron-bounce 1.4s ease-in-out infinite;
color: var(--accent);
}
.explore-btn-wrap.hiding {
animation: btn-fade-out 0.3s ease forwards;
}
.explore-content-hidden {
opacity: 0;
pointer-events: none;
user-select: none;
}
.explore-content-visible {
animation: explore-reveal 0.55s ease both;
pointer-events: auto;
}
.landing-card .stats-row {
margin-top: 0;
background: var(--bg);
border-top: 1px solid var(--line);
padding: 1.5rem 2rem;
}
/* ── Used by ── */
.used-by {
background: var(--bg);
border-top: 1px solid var(--line);
padding: 1.3rem 2rem 1.5rem;
text-align: center;
}
.used-by-label {
font-size: 0.78rem;
font-weight: 600;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--muted);
margin: 0 0 0.7rem;
}
.used-by-names {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 0.35rem 1.1rem;
margin: 0 auto 0.8rem;
max-width: 860px;
font-family: "Source Serif 4", Georgia, serif;
font-size: 0.98rem;
color: var(--ink);
}
.used-by-link {
display: inline-flex;
align-items: center;
gap: 0.35rem;
font-size: 0.88rem;
font-weight: 500;
color: var(--accent);
text-decoration: none;
}
.used-by-link:hover { text-decoration: underline; }
@media (max-width: 600px) { .used-by { padding: 1.2rem 1rem 1.3rem; } }
/* ── GitHub stars badge (counts fetched from the GitHub API) ── */
.gh-star-badge { display: inline-flex; height: 20px; font: 600 11px/20px "IBM Plex Sans", "Segoe UI", sans-serif; text-decoration: none; }
.gh-star-label { display: inline-flex; align-items: center; gap: 4px; padding: 0 6px; background: #1c2b3a; color: #fff; }
.gh-star-count { padding: 0 6px; background: #c95f26; color: #fff; }
/* ── Release banner ── */
.release-banner { display: inline-flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; margin: 0 0 1rem; padding: 0.35rem 0.8rem 0.35rem 0.4rem; border-radius: 999px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18); color: rgba(255,255,255,0.88); font-size: 0.85rem; text-decoration: none; position: relative; z-index: 1; }
.release-banner:hover { background: rgba(255,255,255,0.14); }
.release-pill { background: var(--accent); color: #fff; border-radius: 999px; padding: 0.1rem 0.55rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
/* ── What PyHealth saves you ── */
.roi-section { margin-top: 2.2rem; }
.roi-table { display: grid; gap: 0.5rem; margin-top: 1rem; }
.roi-row { display: grid; grid-template-columns: 0.9fr 1.3fr 1.5fr; gap: 0.75rem; align-items: stretch; }
.roi-row > div { padding: 0.75rem 0.95rem; border-radius: 10px; font-size: 0.92rem; line-height: 1.5; }
.roi-step { font-weight: 600; color: var(--ink); align-self: center; }
.roi-without { background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.roi-with { background: var(--paper); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); color: var(--ink); }
.roi-head > div { background: none; border: none; padding-bottom: 0; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.roi-head .roi-with { color: var(--accent); }
.roi-cta { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-top: 1.2rem; }
.roi-star { color: var(--accent); font-weight: 600; text-decoration: none; }
.roi-star:hover { text-decoration: underline; }
@media (max-width: 720px) {
.roi-row { grid-template-columns: 1fr; gap: 0.35rem; }
.roi-head { display: none; }
.roi-without::before { content: "Without: "; font-weight: 600; }
.roi-with::before { content: "With PyHealth: "; font-weight: 600; color: var(--accent); }
}
/* ── Linkable stat cards ── */
a.stat-card {
text-decoration: none;
color: inherit;
transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}
a.stat-card:hover {
border-color: var(--accent);
box-shadow: 0 4px 14px rgba(201,95,38,0.12);
transform: translateY(-2px);
}
a.stat-card .stat-label { color: var(--muted); }
/* ── Scroll anchor offset for sticky header ── */
#exploreAnchor { scroll-margin-top: 4rem; }
/* ── Wider section spacing in revealed content ── */
#exploreContent .page-section { margin-top: 4rem; }
/* ── Performance charts ── */
.perf-charts {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1rem;
margin-top: 1rem;
}
.perf-panel {
background: var(--paper);
border: 1px solid var(--line);
border-radius: 14px;
padding: 1.5rem 1.6rem;
}
.perf-panel-title {
font-size: 1.08rem;
margin: 0 0 1rem;
font-family: "IBM Plex Sans", sans-serif;
font-weight: 600;
color: var(--ink);
}
.perf-metric-label {
font-size: 0.75rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.06em;
color: var(--muted);
margin: 0.8rem 0 0.45rem;
}
.perf-metric-label:first-of-type { margin-top: 0; }
.bar-group { margin-bottom: 0.3rem; }
.bar-row {
display: flex;
align-items: center;
gap: 0.5rem;
margin-bottom: 0.38rem;
}
.bar-name {
width: 96px;
font-size: 0.83rem;
color: var(--muted);
text-align: right;
flex-shrink: 0;
line-height: 1.2;
}
.perf-bar-track {
flex: 1;
background: var(--bg);
border-radius: 4px;
height: 20px;
overflow: hidden;
}
.perf-bar-fill {
height: 100%;
border-radius: 4px;
width: 0%;
transition: width 1.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.perf-bar-fill.pyhealth2 { background: var(--accent); }
.perf-bar-fill.laptop-m2 { background: #e8a06a; }
.perf-bar-fill.laptop-g16 { background: #e8a06a; }
.perf-bar-fill.pyhealth116 { background: #5a9fd4; }
.perf-bar-fill.meds { background: #a0aec0; }
.perf-bar-fill.pandas {
background: repeating-linear-gradient(
45deg,
#b0bec5,
#b0bec5 3px,
#dde3e8 3px,
#dde3e8 7px
);
}
.perf-highlights {
display: flex;
flex-wrap: wrap;
gap: 1rem;
margin: 0 0 1.6rem;
}
.perf-highlight {
flex: 1;
min-width: 160px;
background: var(--paper);
border: 1px solid var(--line);
border-radius: 14px;
padding: 1.2rem 1.4rem;
text-align: center;
}
.perf-highlight-number {
font-family: "Source Serif 4", Georgia, serif;
font-size: clamp(2rem, 4vw, 2.8rem);
font-weight: 600;
color: var(--accent);
line-height: 1;
}
.perf-highlight-label {
font-size: 0.9rem;
color: var(--muted);
margin-top: 0.4rem;
}
.bar-val {
font-size: 0.83rem;
color: var(--ink);
font-weight: 500;
width: 60px;
flex-shrink: 0;
}
.perf-legend {
display: flex;
gap: 1rem;
flex-wrap: wrap;
margin-top: 0.9rem;
font-size: 0.8rem;
color: var(--muted);
}
.perf-legend-item { display: flex; align-items: center; gap: 0.35rem; }
.perf-legend-dot { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
.perf-footnote {
font-size: 0.83rem;
color: var(--muted);
margin-top: 0.9rem;
}
@media (max-width: 900px) {
.perf-charts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 580px) {
.perf-charts { grid-template-columns: 1fr; }
}
</style>
<link rel="icon" href="/favicon.ico" sizes="any">
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
<link rel="icon" href="/favicon-32x32.png" type="image/png" sizes="32x32">
<link rel="apple-touch-icon" href="/apple-touch-icon.png" sizes="180x180">
</head>
<body>
<header class="site-header">
<div class="site-wrap header-inner">
<span style="color: var(--ink); font-size: 0.95rem; font-weight: 600;">PyHealth</span>
<nav class="nav" aria-label="Main navigation">
<a href="datasets.html">Datasets</a>
<a href="tasks.html">Tasks</a>
<a href="models.html">Models</a>
<a href="roadmap.html">Roadmap</a>
<a href="tutorials.html">Tutorials</a>
<a href="news.html">News</a>
<a href="blog_list.html">Blog</a>
<a href="how_to_contribute.html">Contribute</a>
<a href="research.html" class="nav-cta">Join Us</a>
</nav>
</div>
</header>
<main class="site-wrap" style="padding: 2.2rem 0 3.5rem;">
<div class="landing-card">
<!-- ── Hero ── -->
<section class="ph-hero">
<a href="news.html#pyhealth-2-1-0" class="release-banner">
<span class="release-pill">New</span>
PyHealth 2.1.0: leakage-free splits, calibration with confidence intervals, XGBoost + TreeSHAP, and nine Colab tutorials
<span aria-hidden="true">→</span>
</a>
<p class="ph-eyebrow">Open-Source Healthcare AI</p>
<img src="images/pyhealth-logo.png" alt="PyHealth" class="ph-logo">
<p class="ph-tagline">A Python toolkit for clinical deep learning — unifying datasets, tasks, and models across electronic health records, physiological signals, and medical imaging.</p>
<div class="ph-install-row">
<span class="ph-install-cmd">pip install pyhealth</span>
<button class="ph-copy-btn" onclick="copyInstall(this)" aria-label="Copy install command">
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg>
Copy
</button>
</div>
<div class="ph-cta-row">
<a href="https://colab.research.google.com/drive/1KXloapcMeYubw4dT_fPJKTY1pepH2vvl" class="ph-btn primary" target="_blank" rel="noopener">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="5 3 19 12 5 21 5 3"/></svg>
Get Started in 5 Minutes
</a>
<a href="https://github.com/sunlabuiuc/PyHealth" class="ph-btn outline" target="_blank" rel="noopener">
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0 1 12 6.844a9.59 9.59 0 0 1 2.504.337c1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0 0 22 12.017C22 6.484 17.522 2 12 2z"/></svg>
GitHub
</a>
<a href="https://discord.gg/mpb835EHaX" class="ph-btn outline" target="_blank" rel="noopener">
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.055 20.03 20.03 0 0 0 5.993 3.029.078.078 0 0 0 .084-.026 13.83 13.83 0 0 0 1.185-1.93.076.076 0 0 0-.041-.106 13.201 13.201 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.184 1.929a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.029.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"/></svg>
Discord Community
</a>
<a href="research.html" class="ph-btn outline">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M23 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/></svg>
Research Initiative
</a>
<a href="https://openreview.net/forum?id=gMLVFN9hl8" class="ph-btn outline" target="_blank" rel="noopener">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/><polyline points="10 9 9 9 8 9"/></svg>
ICML 2026 Paper
</a>
</div>
<div class="ph-badges">
<a href="https://github.com/sunlabuiuc/PyHealth" target="_blank" rel="noopener" class="gh-star-badge" aria-label="Star PyHealth on GitHub">
<span class="gh-star-label"><svg width="11" height="11" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg> Stars</span><span class="gh-star-count" id="ghStarCount">GitHub</span>
</a>
<a href="https://pypi.org/project/pyhealth/" target="_blank" rel="noopener">
<img src="https://img.shields.io/pypi/v/pyhealth.svg?style=flat-square&labelColor=1c2b3a&color=5a9fd4&label=PyPI" alt="PyPI version">
</a>
<a href="https://pepy.tech/project/pyhealth" target="_blank" rel="noopener">
<img src="https://img.shields.io/pypi/dm/pyhealth?style=flat-square&labelColor=1c2b3a&color=5a9fd4&label=Downloads%2Fmo" alt="Monthly downloads">
</a>
</div>
</section>
<!-- ── Stats ── -->
<section class="stats-row">
<a href="datasets.html" class="stat-card">
<div class="stat-number">25+</div>
<div class="stat-label">Clinical<br>Datasets</div>
</a>
<a href="tasks.html" class="stat-card">
<div class="stat-number">50+</div>
<div class="stat-label">Clinical<br>Tasks</div>
</a>
<a href="models.html" class="stat-card">
<div class="stat-number">50+</div>
<div class="stat-label">ML<br>Models</div>
</a>
<a href="https://discord.gg/mpb835EHaX" class="stat-card" target="_blank" rel="noopener">
<div class="stat-number">750+</div>
<div class="stat-label">Discord<br>Members</div>
</a>
<a href="research.html" class="stat-card">
<div class="stat-number">10+</div>
<div class="stat-label">Active<br>Researchers</div>
</a>
</section>
<!-- ── Used by (from data/citations.json; institutions with a paper that uses PyHealth) ── -->
<section class="used-by">
<p class="used-by-label">Used in published research by teams at</p>
<p class="used-by-names">
<span>Stanford University</span><span>Harvard University</span><span>Cornell University</span>
<span>Weill Cornell Medicine</span><span>University of Pennsylvania</span><span>Duke University</span>
<span>Emory University</span><span>The Ohio State University</span><span>Georgia Tech</span>
<span>UNC Chapel Hill</span><span>Washington University in St. Louis</span>
<span>Cincinnati Children's Hospital</span><span>Oak Ridge National Laboratory</span>
<span>AstraZeneca</span><span>King's College London</span><span>Heidelberg University</span>
<span>Inserm</span><span>Tsinghua University</span><span>Peking University</span>
<span>Chinese Academy of Sciences</span><span>University of Hong Kong</span>
<span>Nanyang Technological University</span><span>Korea University</span>
<span>Ben-Gurion University of the Negev</span>
</p>
<a href="citations.html" class="used-by-link">
and 42 more institutions · 81 papers using or citing PyHealth
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="5" y1="12" x2="19" y2="12"/><polyline points="12 5 19 12 12 19"/></svg>
</a>
</section>
</div> <!-- /landing-card -->
<!-- ── What PyHealth saves you (ROI) ── -->
<section class="roi-section fade-up" id="why">
<h2 class="section-h2">What PyHealth saves you</h2>
<p class="section-sub">Most of a clinical ML project is the work around the model. PyHealth ships that work, tested and shared, so your time goes to the idea.</p>
<div class="roi-table" role="table" aria-label="Clinical ML work without and with PyHealth">
<div class="roi-row roi-head" role="row">
<div></div>
<div class="roi-without">Without PyHealth</div>
<div class="roi-with">With PyHealth</div>
</div>
<div class="roi-row">
<div class="roi-step">Load the data</div>
<div class="roi-without">Write and debug a custom ETL for MIMIC, eICU or OMOP, for every project</div>
<div class="roi-with">25+ dataset loaders: one line per dataset, cached after the first run</div>
</div>
<div class="roi-row">
<div class="roi-step">Define the cohort and label</div>
<div class="roi-without">Re-derive cohort, label and time window from a paper's methods section</div>
<div class="roi-with">50+ ready-made, tested clinical tasks, or your own as one small class</div>
</div>
<div class="roi-row">
<div class="roi-step">Compare against baselines</div>
<div class="roi-without">Re-implement each baseline and hope it matches the original</div>
<div class="roi-with">50+ models behind one API: swapping models is a one-line change</div>
</div>
<div class="roi-row">
<div class="roi-step">Evaluate so reviewers trust it</div>
<div class="roi-without">Patients leak across splits; one test number with no interval</div>
<div class="roi-with">Leakage-free patient splits, calibration and patient-level bootstrap confidence intervals</div>
</div>
<div class="roi-row">
<div class="roi-step">Scale to real data</div>
<div class="roi-without">Pandas pipelines that need a server for full MIMIC-IV</div>
<div class="roi-with">Full MIMIC-IV mortality on a laptop in about 5 GB, up to 39× faster than pandas</div>
</div>
<div class="roi-row">
<div class="roi-step">Get your work used</div>
<div class="roi-without">Research code that stops working when the student graduates</div>
<div class="roi-with">Your method in a library used in 81 papers at 60+ institutions</div>
</div>
</div>
<div class="roi-cta">
<a href="https://colab.research.google.com/drive/1KXloapcMeYubw4dT_fPJKTY1pepH2vvl" class="ph-btn primary" target="_blank" rel="noopener">Try it: 10-minute Quickstart in Colab →</a>
<a href="https://github.com/sunlabuiuc/PyHealth" class="roi-star" target="_blank" rel="noopener">★ Star PyHealth on GitHub</a>
</div>
</section>
<!-- ── Explore button ── -->
<div class="explore-btn-wrap fade-up" id="exploreBtnWrap">
<button class="explore-btn" onclick="revealExplore()" aria-label="See how PyHealth works">
<span class="explore-btn-text">See how PyHealth simplifies healthcare AI development</span>
<span class="explore-chevron" aria-hidden="true">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>
</span>
</button>
</div>
<!-- ── Reveal content ── -->
<div id="exploreContent" class="explore-content-hidden">
<!-- ── Quickstart ── -->
<section class="page-section fade-up" id="exploreAnchor">
<h2 class="section-h2">5-Stage Pipeline in <15 Lines</h2>
<p class="section-sub">The same pattern works for any task — swap the dataset and task class to move between mortality, readmission, drug recommendation, or imaging.</p>
<div class="ph-quickstart">
<div class="ph-quickstart-header">
<h3>Mortality prediction on MIMIC-III</h3>
<div class="ph-quickstart-actions">
<button class="ph-quickstart-copy" onclick="copyCode(this)" aria-label="Copy code">
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg>
Copy
</button>
<a href="https://colab.research.google.com/drive/1KXloapcMeYubw4dT_fPJKTY1pepH2vvl" class="colab-inline-link" target="_blank" rel="noopener">Open in Colab →</a>
</div>
</div>
<pre class="ph-code" id="quickstartCode"><span class="tok-kw">from</span> pyhealth.datasets <span class="tok-kw">import</span> <span class="tok-cl">MIMIC3Dataset</span>, <span class="tok-cl">PatientSplit</span>, <span class="tok-fn">get_dataloader</span>
<span class="tok-kw">from</span> pyhealth.models <span class="tok-kw">import</span> <span class="tok-cl">Transformer</span>
<span class="tok-kw">from</span> pyhealth.tasks <span class="tok-kw">import</span> <span class="tok-cl">MortalityPredictionMIMIC3</span>
<span class="tok-kw">from</span> pyhealth.trainer <span class="tok-kw">import</span> <span class="tok-cl">Trainer</span>
<span class="tok-kw">if</span> __name__ <span class="tok-op">==</span> <span class="tok-str">"__main__"</span>:
<span class="tok-cm"># 1. Load data: raw tables are processed once and cached</span>
dataset <span class="tok-op">=</span> <span class="tok-cl">MIMIC3Dataset</span>(
root<span class="tok-op">=</span><span class="tok-str">"data/mimic3"</span>,
tables<span class="tok-op">=</span>[<span class="tok-str">"diagnoses_icd"</span>, <span class="tok-str">"procedures_icd"</span>, <span class="tok-str">"prescriptions"</span>],
cache_dir<span class="tok-op">=</span><span class="tok-str">"cache/"</span>,
)
<span class="tok-cm"># 2. Task + patient split: preprocessing is fit on training patients only</span>
train_ds, val_ds, test_ds <span class="tok-op">=</span> dataset.<span class="tok-fn">set_task</span>(
<span class="tok-cl">MortalityPredictionMIMIC3</span>(), split<span class="tok-op">=</span><span class="tok-cl">PatientSplit</span>((<span class="tok-num">0.8</span>, <span class="tok-num">0.1</span>, <span class="tok-num">0.1</span>), seed<span class="tok-op">=</span><span class="tok-num">0</span>)
)
train_loader <span class="tok-op">=</span> <span class="tok-fn">get_dataloader</span>(train_ds, batch_size<span class="tok-op">=</span><span class="tok-num">32</span>, shuffle<span class="tok-op">=</span><span class="tok-num">True</span>)
val_loader <span class="tok-op">=</span> <span class="tok-fn">get_dataloader</span>(val_ds, batch_size<span class="tok-op">=</span><span class="tok-num">32</span>)
test_loader <span class="tok-op">=</span> <span class="tok-fn">get_dataloader</span>(test_ds, batch_size<span class="tok-op">=</span><span class="tok-num">32</span>)
<span class="tok-cm"># 3. Train and evaluate</span>
model <span class="tok-op">=</span> <span class="tok-cl">Transformer</span>(dataset<span class="tok-op">=</span>train_ds)
trainer <span class="tok-op">=</span> <span class="tok-cl">Trainer</span>(model<span class="tok-op">=</span>model, metrics<span class="tok-op">=</span>[<span class="tok-str">"pr_auc"</span>, <span class="tok-str">"roc_auc"</span>])
trainer.<span class="tok-fn">train</span>(train_loader, val_loader, epochs<span class="tok-op">=</span><span class="tok-num">50</span>, monitor<span class="tok-op">=</span><span class="tok-str">"pr_auc"</span>)
<span class="tok-fn">print</span>(trainer.<span class="tok-fn">evaluate</span>(test_loader))</pre>
</div>
</section>
<!-- ── Performance ── -->
<section class="page-section fade-up" id="perfSection">
<h2 class="section-h2">Built for Scale — Efficient by Design</h2>
<p class="section-sub">Benchmarked on MIMIC-IV at 4 parallel workers. PyHealth 2.0 uses a memory-mapped architecture that dynamically adapts to your hardware — whether you have 2 cores or 64, it scales without manual memory management so you can focus on the ML, not the infrastructure. Pandas values shown at 1 worker only (†) as it could not scale beyond single-threaded execution. PyHealth 2.0 even runs the full in-hospital mortality task on a consumer laptop in roughly 5 GB of memory.</p>
<div class="perf-highlights">
<div class="perf-highlight">
<div class="perf-highlight-number">39×</div>
<div class="perf-highlight-label">Faster than pandas</div>
</div>
<div class="perf-highlight">
<div class="perf-highlight-number">20×</div>
<div class="perf-highlight-label">Less memory than pandarallel</div>
</div>
</div>
<div class="perf-charts">
<div class="perf-panel">
<p class="perf-panel-title">Drug Recommendation</p>
<p class="perf-metric-label">Wall Time (hours · lower is better)</p>
<div class="bar-group">
<div class="bar-row">
<span class="bar-name">PyHealth 2.0</span>
<div class="perf-bar-track"><div class="perf-bar-fill pyhealth2" data-frac="0.080"></div></div>
<span class="bar-val">0.23h</span>
</div>
<div class="bar-row">
<span class="bar-name">PyHealth 1.16</span>
<div class="perf-bar-track"><div class="perf-bar-fill pyhealth116" data-frac="0.094"></div></div>
<span class="bar-val">0.27h</span>
</div>
<div class="bar-row">
<span class="bar-name">Pandas †</span>
<div class="perf-bar-track"><div class="perf-bar-fill pandas" data-frac="0.451"></div></div>
<span class="bar-val">1.31h</span>
</div>
<div class="bar-row">
<span class="bar-name">MEDS</span>
<div class="perf-bar-track"><div class="perf-bar-fill meds" data-frac="1.0"></div></div>
<span class="bar-val">2.91h</span>
</div>
</div>
<p class="perf-metric-label">Peak Memory (GB · lower is better)</p>
<div class="bar-group">
<div class="bar-row">
<span class="bar-name">PyHealth 2.0</span>
<div class="perf-bar-track"><div class="perf-bar-fill pyhealth2" data-frac="0.106"></div></div>
<span class="bar-val">8.9 GB</span>
</div>
<div class="bar-row">
<span class="bar-name">Pandas †</span>
<div class="perf-bar-track"><div class="perf-bar-fill pandas" data-frac="0.125"></div></div>
<span class="bar-val">10.4 GB</span>
</div>
<div class="bar-row">
<span class="bar-name">MEDS</span>
<div class="perf-bar-track"><div class="perf-bar-fill meds" data-frac="0.741"></div></div>