Datasets:
id string | esl_train bool | lcavol float64 | lweight float64 | age int32 | lbph float64 | svi int32 | lcp float64 | gleason int32 | pgg45 int32 | lpsa float64 |
|---|---|---|---|---|---|---|---|---|---|---|
1 | true | -0.579818 | 2.769459 | 50 | -1.386294 | 0 | -1.386294 | 6 | 0 | -0.430783 |
2 | true | -0.994252 | 3.319626 | 58 | -1.386294 | 0 | -1.386294 | 6 | 0 | -0.162519 |
3 | true | -0.510826 | 2.691243 | 74 | -1.386294 | 0 | -1.386294 | 7 | 20 | -0.162519 |
4 | true | -1.203973 | 3.282789 | 58 | -1.386294 | 0 | -1.386294 | 6 | 0 | -0.162519 |
5 | true | 0.751416 | 3.432373 | 62 | -1.386294 | 0 | -1.386294 | 6 | 0 | 0.371564 |
6 | true | -1.049822 | 3.228826 | 50 | -1.386294 | 0 | -1.386294 | 6 | 0 | 0.765468 |
7 | false | 0.737164 | 3.473518 | 64 | 0.615186 | 0 | -1.386294 | 6 | 0 | 0.765468 |
8 | true | 0.693147 | 3.539509 | 58 | 1.536867 | 0 | -1.386294 | 6 | 0 | 0.854415 |
9 | false | -0.776529 | 3.539509 | 47 | -1.386294 | 0 | -1.386294 | 6 | 0 | 1.047319 |
10 | false | 0.223144 | 3.244544 | 63 | -1.386294 | 0 | -1.386294 | 6 | 0 | 1.047319 |
11 | true | 0.254642 | 3.604138 | 65 | -1.386294 | 0 | -1.386294 | 6 | 0 | 1.266948 |
12 | true | -1.347074 | 3.598681 | 63 | 1.266948 | 0 | -1.386294 | 6 | 0 | 1.266948 |
13 | true | 1.61343 | 3.022861 | 63 | -1.386294 | 0 | -0.597837 | 7 | 30 | 1.266948 |
14 | true | 1.477049 | 2.998229 | 67 | -1.386294 | 0 | -1.386294 | 7 | 5 | 1.348073 |
15 | false | 1.205971 | 3.442019 | 57 | -1.386294 | 0 | -0.430783 | 7 | 5 | 1.398717 |
16 | true | 1.541159 | 3.061052 | 66 | -1.386294 | 0 | -1.386294 | 6 | 0 | 1.446919 |
17 | true | -0.415515 | 3.516013 | 70 | 1.244155 | 0 | -0.597837 | 7 | 30 | 1.470176 |
18 | true | 2.288486 | 3.649359 | 66 | -1.386294 | 0 | 0.371564 | 6 | 0 | 1.492904 |
19 | true | -0.562119 | 3.267666 | 41 | -1.386294 | 0 | -1.386294 | 6 | 0 | 1.558145 |
20 | true | 0.182322 | 3.825375 | 70 | 1.658228 | 0 | -1.386294 | 6 | 0 | 1.599388 |
21 | true | 1.147402 | 3.419365 | 59 | -1.386294 | 0 | -1.386294 | 6 | 0 | 1.638997 |
22 | false | 2.059239 | 3.501043 | 60 | 1.474763 | 0 | 1.348073 | 7 | 20 | 1.658228 |
23 | true | -0.544727 | 3.37588 | 59 | -0.798508 | 0 | -1.386294 | 6 | 0 | 1.695616 |
24 | true | 1.781709 | 3.451574 | 63 | 0.438255 | 0 | 1.178655 | 7 | 60 | 1.713798 |
25 | false | 0.385262 | 3.6674 | 69 | 1.599388 | 0 | -1.386294 | 6 | 0 | 1.731656 |
26 | false | 1.446919 | 3.124565 | 68 | 0.300105 | 0 | -1.386294 | 6 | 0 | 1.766442 |
27 | true | 0.512824 | 3.719651 | 65 | -1.386294 | 0 | -0.798508 | 7 | 70 | 1.800058 |
28 | false | -0.400478 | 3.865979 | 67 | 1.816452 | 0 | -1.386294 | 7 | 20 | 1.816452 |
29 | true | 1.040277 | 3.128951 | 67 | 0.223144 | 0 | 0.04879 | 7 | 80 | 1.848455 |
30 | true | 2.409644 | 3.37588 | 65 | -1.386294 | 0 | 1.619388 | 6 | 0 | 1.894617 |
31 | true | 0.285179 | 4.090169 | 65 | 1.962908 | 0 | -0.798508 | 6 | 0 | 1.924249 |
32 | false | 0.182322 | 3.804438 | 65 | 1.704748 | 0 | -1.386294 | 6 | 0 | 2.008214 |
33 | true | 1.275363 | 3.037354 | 71 | 1.266948 | 0 | -1.386294 | 6 | 0 | 2.008214 |
34 | false | 0.00995 | 3.267666 | 54 | -1.386294 | 0 | -1.386294 | 6 | 0 | 2.021548 |
35 | true | -0.01005 | 3.216874 | 63 | -1.386294 | 0 | -0.798508 | 6 | 0 | 2.047693 |
36 | false | 1.308333 | 4.11985 | 64 | 2.171337 | 0 | -1.386294 | 7 | 5 | 2.085672 |
37 | true | 1.423108 | 3.657131 | 73 | -0.579819 | 0 | 1.658228 | 8 | 15 | 2.157559 |
38 | true | 0.457425 | 2.374906 | 64 | -1.386294 | 0 | -1.386294 | 7 | 15 | 2.191654 |
39 | true | 2.660959 | 4.085136 | 68 | 1.373716 | 1 | 1.832581 | 7 | 35 | 2.213754 |
40 | true | 0.797507 | 3.013081 | 56 | 0.936093 | 0 | -0.162519 | 7 | 5 | 2.277267 |
41 | true | 0.620576 | 3.141995 | 60 | -1.386294 | 0 | -1.386294 | 9 | 80 | 2.297573 |
42 | false | 1.442202 | 3.68261 | 68 | -1.386294 | 0 | -1.386294 | 7 | 10 | 2.307573 |
43 | true | 0.582216 | 3.865979 | 62 | 1.713798 | 0 | -0.430783 | 6 | 0 | 2.327278 |
44 | false | 1.771557 | 3.896909 | 61 | -1.386294 | 0 | 0.81093 | 7 | 6 | 2.374906 |
45 | true | 1.48614 | 3.409496 | 66 | 1.7492 | 0 | -0.430783 | 7 | 20 | 2.521721 |
46 | true | 1.663926 | 3.392829 | 61 | 0.615186 | 0 | -1.386294 | 7 | 15 | 2.553344 |
47 | true | 2.727853 | 3.995445 | 79 | 1.879465 | 1 | 2.656757 | 9 | 100 | 2.568788 |
48 | false | 1.163151 | 4.035125 | 68 | 1.713798 | 0 | -0.430783 | 7 | 40 | 2.568788 |
49 | false | 1.745716 | 3.498022 | 43 | -1.386294 | 0 | -1.386294 | 6 | 0 | 2.591516 |
50 | false | 1.22083 | 3.568123 | 70 | 1.373716 | 0 | -0.798508 | 6 | 0 | 2.591516 |
51 | true | 1.091923 | 3.993603 | 68 | -1.386294 | 0 | -1.386294 | 7 | 50 | 2.656757 |
52 | true | 1.660131 | 4.234831 | 64 | 2.073172 | 0 | -1.386294 | 6 | 0 | 2.677591 |
53 | false | 0.512824 | 3.633631 | 64 | 1.492904 | 0 | 0.04879 | 7 | 70 | 2.68444 |
54 | false | 2.127041 | 4.121473 | 68 | 1.766442 | 0 | 1.446919 | 7 | 40 | 2.691243 |
55 | false | 3.15359 | 3.516013 | 59 | -1.386294 | 0 | -1.386294 | 7 | 5 | 2.704711 |
56 | true | 1.266948 | 4.280132 | 66 | 2.122262 | 0 | -1.386294 | 7 | 15 | 2.718001 |
57 | false | 0.97456 | 2.865054 | 47 | -1.386294 | 0 | 0.500775 | 7 | 4 | 2.788093 |
58 | true | 0.463734 | 3.764682 | 49 | 1.423108 | 0 | -1.386294 | 6 | 0 | 2.794228 |
59 | true | 0.542324 | 4.178226 | 70 | 0.438255 | 0 | -1.386294 | 7 | 20 | 2.806386 |
60 | true | 1.061257 | 3.851211 | 61 | 1.294727 | 0 | -1.386294 | 7 | 40 | 2.81241 |
61 | true | 0.457425 | 4.524502 | 73 | 2.326302 | 0 | -1.386294 | 6 | 0 | 2.841998 |
62 | false | 1.997418 | 3.719651 | 63 | 1.619388 | 1 | 1.909543 | 7 | 40 | 2.853593 |
63 | true | 2.775709 | 3.524889 | 72 | -1.386294 | 0 | 1.558145 | 9 | 95 | 2.853593 |
64 | false | 2.034706 | 3.917011 | 66 | 2.008214 | 1 | 2.110213 | 7 | 60 | 2.882004 |
65 | false | 2.073172 | 3.623007 | 64 | -1.386294 | 0 | -1.386294 | 6 | 0 | 2.882004 |
66 | false | 1.458615 | 3.836221 | 61 | 1.321756 | 0 | -0.430783 | 7 | 20 | 2.88759 |
67 | true | 2.022871 | 3.878466 | 68 | 1.783391 | 0 | 1.321756 | 7 | 70 | 2.92047 |
68 | true | 2.198335 | 4.050915 | 72 | 2.307573 | 0 | -0.430783 | 7 | 10 | 2.962692 |
69 | true | -0.446287 | 4.408547 | 69 | -1.386294 | 0 | -1.386294 | 6 | 0 | 2.962692 |
70 | true | 1.193922 | 4.780383 | 72 | 2.326302 | 0 | -0.798508 | 7 | 5 | 2.972975 |
71 | true | 1.86408 | 3.593194 | 60 | -1.386294 | 1 | 1.321756 | 7 | 60 | 3.013081 |
72 | true | 1.160021 | 3.341093 | 77 | 1.7492 | 0 | -1.386294 | 7 | 25 | 3.037354 |
73 | false | 1.214913 | 3.825375 | 69 | -1.386294 | 1 | 0.223144 | 7 | 20 | 3.056357 |
74 | false | 1.838961 | 3.236716 | 60 | 0.438255 | 1 | 1.178655 | 9 | 90 | 3.075006 |
75 | true | 2.999226 | 3.849083 | 69 | -1.386294 | 1 | 1.909543 | 7 | 20 | 3.275256 |
76 | true | 3.14113 | 3.263849 | 68 | -0.051293 | 1 | 2.420368 | 7 | 50 | 3.337547 |
77 | true | 2.010895 | 4.433789 | 72 | 2.122262 | 0 | 0.500775 | 7 | 60 | 3.392829 |
78 | true | 2.537657 | 4.354784 | 78 | 2.326302 | 0 | -1.386294 | 7 | 10 | 3.435599 |
79 | true | 2.6483 | 3.582129 | 69 | -1.386294 | 1 | 2.583998 | 7 | 70 | 3.457893 |
80 | false | 2.77944 | 3.823192 | 63 | -1.386294 | 0 | 0.371564 | 7 | 50 | 3.513037 |
81 | true | 1.467874 | 3.070376 | 66 | 0.559616 | 0 | 0.223144 | 7 | 40 | 3.516013 |
82 | true | 2.513656 | 3.473518 | 57 | 0.438255 | 0 | 2.327278 | 7 | 60 | 3.530763 |
83 | true | 2.613007 | 3.888754 | 77 | -0.527633 | 1 | 0.559616 | 7 | 30 | 3.565298 |
84 | false | 2.677591 | 3.838376 | 65 | 1.115142 | 0 | 1.7492 | 9 | 70 | 3.57094 |
85 | true | 1.562346 | 3.709907 | 60 | 1.695616 | 0 | 0.81093 | 7 | 30 | 3.587677 |
86 | true | 3.302849 | 3.51898 | 64 | -1.386294 | 1 | 2.327278 | 7 | 60 | 3.630986 |
87 | true | 2.024193 | 3.731699 | 58 | 1.638997 | 0 | -1.386294 | 6 | 0 | 3.680091 |
88 | true | 1.731656 | 3.369018 | 62 | -1.386294 | 1 | 0.300105 | 7 | 30 | 3.712352 |
89 | true | 2.807594 | 4.718052 | 65 | -1.386294 | 1 | 2.463853 | 7 | 60 | 3.984344 |
90 | true | 1.562346 | 3.69511 | 76 | 0.936093 | 1 | 0.81093 | 7 | 75 | 3.993603 |
91 | true | 3.246491 | 4.101817 | 68 | -1.386294 | 0 | -1.386294 | 6 | 0 | 4.029806 |
92 | true | 2.532903 | 3.677566 | 61 | 1.348073 | 1 | -1.386294 | 7 | 15 | 4.129551 |
93 | true | 2.830268 | 3.876396 | 68 | -1.386294 | 1 | 1.321756 | 7 | 60 | 4.385147 |
94 | true | 3.821004 | 3.896909 | 44 | -1.386294 | 1 | 2.169054 | 7 | 40 | 4.684443 |
95 | false | 2.907447 | 3.396185 | 52 | -1.386294 | 1 | 2.463853 | 7 | 10 | 5.143125 |
96 | true | 2.882564 | 3.77391 | 68 | 1.558145 | 1 | 1.558145 | 7 | 80 | 5.477509 |
97 | false | 3.471966 | 3.974998 | 68 | 0.438255 | 1 | 2.904165 | 7 | 20 | 5.582932 |
Prostate cancer
Serum prostate-specific antigen (PSA) and eight clinical measures in 97 men with prostate cancer who were about to receive a radical prostatectomy (Stamey et al., 1989). The outcome is the log of PSA. The dataset is the prostate data of The Elements of Statistical Learning (ESL; Hastie, Tibshirani, and Friedman, 2009), with the book's train/test indicator, in a single Parquet file with one row per patient.
Structure
data/prostate-cancer.parquet: 97 rows, 11 columns. There are no missing
values.
| Column | Type | Description |
|---|---|---|
id |
string | Subject number, 1 to 97, in the order of the ESL file. |
esl_train |
logical | TRUE for the 67 training and FALSE for the 30 test cases of ESL Section 3.2.1. |
lcavol |
double | Natural log of cancer volume. |
lweight |
double | Natural log of prostate weight, in grams. |
age |
integer | Age, in years. |
lbph |
double | Natural log of the amount of benign prostatic hyperplasia. |
svi |
integer | Seminal vesicle invasion: 1 (present) or 0 (absent). |
lcp |
double | Natural log of capsular penetration. |
gleason |
integer | Gleason score. |
pgg45 |
integer | Percentage of Gleason scores 4 or 5. |
lpsa |
double | Natural log of serum PSA. |
lpsa is the last column. id and esl_train identify cases and are not
predictors: drop them before training, or use esl_train to reproduce the
ESL split. The dataset has one train split that holds all 97 patients.
Load
R - using rtemis (1.4.3 or later):
dat <- read("hf://datasets/rtemis/prostate-cancer")
R - using croissant:
library(croissant)
dat <- read_record_set(
"hf://datasets/rtemis/prostate-cancer/croissant.json",
"patients"
)
R - using nanoparquet:
url <- "https://huggingface.co/datasets/rtemis/prostate-cancer/resolve/main/data/prostate-cancer.parquet"
path <- file.path(tempdir(), "prostate-cancer.parquet")
download.file(url, path, mode = "wb")
dat <- nanoparquet::read_parquet(path)
Python - using polars:
import polars as pl
dat = pl.read_parquet("hf://datasets/rtemis/prostate-cancer/data/prostate-cancer.parquet")
Notes
lbphandlcptake the value log(0.25) = -1.386 where the measure is 0: 43 values oflbphand 45 oflcp.gleasontakes the values 6 (35 patients), 7 (56), 8 (1), and 9 (5).sviis 1 in 21 patients.- Subject 32 carries the corrected prostate weight of 44.9 g, as in the ESL second edition.
- ESL standardizes the features to mean 0 and variance 1 before the analyses of Section 3.2.1 and beyond.
Source and processing
The file prostate.data of ESL was read without changes to the values. The
unnamed row number column was named id. The train column (T or F) was
stored as the logical column esl_train, placed after id.
Metadata
croissant.json is the dataset's Croissant 1.1 metadata, written with the
croissant R package. It describes the file with its SHA-256 checksum, each
field, and the Responsible AI properties of the data.
License
The source file and the publication state no license. The data are distributed by the ESL authors for use with the book, and are reproduced here for teaching.
Citation
Cite the study that collected the data and the book that distributes them:
@article{stamey1989prostate,
author = {Stamey, Thomas A. and Kabalin, John N. and McNeal, John E. and Johnstone, Iain M. and Freiha, Fuad and Redwine, Elise A. and Yang, Norman},
title = {Prostate specific antigen in the diagnosis and treatment of adenocarcinoma of the prostate. {II}. Radical prostatectomy treated patients},
journal = {The Journal of Urology},
year = {1989},
volume = {141},
number = {5},
pages = {1076--1083},
doi = {10.1016/s0022-5347(17)41175-x}
}
@book{hastie2009elements,
author = {Hastie, Trevor and Tibshirani, Robert and Friedman, Jerome},
title = {The Elements of Statistical Learning: Data Mining, Inference, and Prediction},
edition = {2},
publisher = {Springer},
address = {New York},
year = {2009},
doi = {10.1007/978-0-387-84858-7}
}
- Downloads last month
- 23