Datasets:
Dataset Preview
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed because of a cast error
Error code: DatasetGenerationCastError
Exception: DatasetGenerationCastError
Message: An error occurred while generating the dataset
All the data files must have the same columns, but at some point there are 8 new columns ({'wexp', 'fin', 'arrest', 'prio', 'week', 'mar', 'paro', 'race'}) and 9 missing columns ({'ph.ecog', 'time', 'sex', 'inst', 'ph.karno', 'status', 'meal.cal', 'wt.loss', 'pat.karno'}).
This happened while the csv dataset builder was generating data using
hf://datasets/wkaandemir/biostat-survival/rossi_recidivism.csv (at revision 00c80d3321ed52f8bb33258a8c91ef7441da56ed), ['hf://datasets/wkaandemir/biostat-survival@00c80d3321ed52f8bb33258a8c91ef7441da56ed/lung_cancer.csv', 'hf://datasets/wkaandemir/biostat-survival@00c80d3321ed52f8bb33258a8c91ef7441da56ed/rossi_recidivism.csv']
Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)
Traceback: Traceback (most recent call last):
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1837, in _prepare_split_single
writer.write_table(table)
~~~~~~~~~~~~~~~~~~^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/arrow_writer.py", line 765, in write_table
self._write_table(pa_table, writer_batch_size=writer_batch_size)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/arrow_writer.py", line 773, in _write_table
pa_table = table_cast(pa_table, self._schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2369, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2297, in cast_table_to_schema
raise CastError(
...<3 lines>...
)
datasets.table.CastError: Couldn't cast
week: int64
arrest: int64
fin: int64
age: int64
race: int64
wexp: int64
mar: int64
paro: int64
prio: int64
-- schema metadata --
pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 1222
to
{'inst': Value('float64'), 'time': Value('int64'), 'status': Value('int64'), 'age': Value('int64'), 'sex': Value('int64'), 'ph.ecog': Value('float64'), 'ph.karno': Value('float64'), 'pat.karno': Value('float64'), 'meal.cal': Value('float64'), 'wt.loss': Value('float64')}
because column names don't match
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1369, in compute_config_parquet_and_info_response
parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
~~~~~~~~~~~~~~~~~~~~~~~~~^
builder, max_dataset_size_bytes=max_dataset_size_bytes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 948, in stream_convert_to_parquet
builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1683, in _prepare_split
for job_id, done, content in self._prepare_split_single(
~~~~~~~~~~~~~~~~~~~~~~~~~~^
gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
):
^
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1839, in _prepare_split_single
raise DatasetGenerationCastError.from_cast_error(
...<4 lines>...
)
datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset
All the data files must have the same columns, but at some point there are 8 new columns ({'wexp', 'fin', 'arrest', 'prio', 'week', 'mar', 'paro', 'race'}) and 9 missing columns ({'ph.ecog', 'time', 'sex', 'inst', 'ph.karno', 'status', 'meal.cal', 'wt.loss', 'pat.karno'}).
This happened while the csv dataset builder was generating data using
hf://datasets/wkaandemir/biostat-survival/rossi_recidivism.csv (at revision 00c80d3321ed52f8bb33258a8c91ef7441da56ed), ['hf://datasets/wkaandemir/biostat-survival@00c80d3321ed52f8bb33258a8c91ef7441da56ed/lung_cancer.csv', 'hf://datasets/wkaandemir/biostat-survival@00c80d3321ed52f8bb33258a8c91ef7441da56ed/rossi_recidivism.csv']
Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
inst float64 | time int64 | status int64 | age int64 | sex int64 | ph.ecog float64 | ph.karno float64 | pat.karno float64 | meal.cal float64 | wt.loss float64 |
|---|---|---|---|---|---|---|---|---|---|
3 | 306 | 1 | 74 | 1 | 1 | 90 | 100 | 1,175 | null |
3 | 455 | 1 | 68 | 1 | 0 | 90 | 90 | 1,225 | 15 |
3 | 1,010 | 0 | 56 | 1 | 0 | 90 | 90 | null | 15 |
5 | 210 | 1 | 57 | 1 | 1 | 90 | 60 | 1,150 | 11 |
1 | 883 | 1 | 60 | 1 | 0 | 100 | 90 | null | 0 |
12 | 1,022 | 0 | 74 | 1 | 1 | 50 | 80 | 513 | 0 |
7 | 310 | 1 | 68 | 2 | 2 | 70 | 60 | 384 | 10 |
11 | 361 | 1 | 71 | 2 | 2 | 60 | 80 | 538 | 1 |
1 | 218 | 1 | 53 | 1 | 1 | 70 | 80 | 825 | 16 |
7 | 166 | 1 | 61 | 1 | 2 | 70 | 70 | 271 | 34 |
6 | 170 | 1 | 57 | 1 | 1 | 80 | 80 | 1,025 | 27 |
16 | 654 | 1 | 68 | 2 | 2 | 70 | 70 | null | 23 |
11 | 728 | 1 | 68 | 2 | 1 | 90 | 90 | null | 5 |
21 | 71 | 1 | 60 | 1 | null | 60 | 70 | 1,225 | 32 |
12 | 567 | 1 | 57 | 1 | 1 | 80 | 70 | 2,600 | 60 |
1 | 144 | 1 | 67 | 1 | 1 | 80 | 90 | null | 15 |
22 | 613 | 1 | 70 | 1 | 1 | 90 | 100 | 1,150 | -5 |
16 | 707 | 1 | 63 | 1 | 2 | 50 | 70 | 1,025 | 22 |
1 | 61 | 1 | 56 | 2 | 2 | 60 | 60 | 238 | 10 |
21 | 88 | 1 | 57 | 1 | 1 | 90 | 80 | 1,175 | null |
11 | 301 | 1 | 67 | 1 | 1 | 80 | 80 | 1,025 | 17 |
6 | 81 | 1 | 49 | 2 | 0 | 100 | 70 | 1,175 | -8 |
11 | 624 | 1 | 50 | 1 | 1 | 70 | 80 | null | 16 |
15 | 371 | 1 | 58 | 1 | 0 | 90 | 100 | 975 | 13 |
12 | 394 | 1 | 72 | 1 | 0 | 90 | 80 | null | 0 |
12 | 520 | 1 | 70 | 2 | 1 | 90 | 80 | 825 | 6 |
4 | 574 | 1 | 60 | 1 | 0 | 100 | 100 | 1,025 | -13 |
13 | 118 | 1 | 70 | 1 | 3 | 60 | 70 | 1,075 | 20 |
13 | 390 | 1 | 53 | 1 | 1 | 80 | 70 | 875 | -7 |
1 | 12 | 1 | 74 | 1 | 2 | 70 | 50 | 305 | 20 |
12 | 473 | 1 | 69 | 2 | 1 | 90 | 90 | 1,025 | -1 |
1 | 26 | 1 | 73 | 1 | 2 | 60 | 70 | 388 | 20 |
7 | 533 | 1 | 48 | 1 | 2 | 60 | 80 | null | -11 |
16 | 107 | 1 | 60 | 2 | 2 | 50 | 60 | 925 | -15 |
12 | 53 | 1 | 61 | 1 | 2 | 70 | 100 | 1,075 | 10 |
1 | 122 | 1 | 62 | 2 | 2 | 50 | 50 | 1,025 | null |
22 | 814 | 1 | 65 | 1 | 2 | 70 | 60 | 513 | 28 |
15 | 965 | 0 | 66 | 2 | 1 | 70 | 90 | 875 | 4 |
1 | 93 | 1 | 74 | 1 | 2 | 50 | 40 | 1,225 | 24 |
1 | 731 | 1 | 64 | 2 | 1 | 80 | 100 | 1,175 | 15 |
5 | 460 | 1 | 70 | 1 | 1 | 80 | 60 | 975 | 10 |
11 | 153 | 1 | 73 | 2 | 2 | 60 | 70 | 1,075 | 11 |
10 | 433 | 1 | 59 | 2 | 0 | 90 | 90 | 363 | 27 |
12 | 145 | 1 | 60 | 2 | 2 | 70 | 60 | null | null |
7 | 583 | 1 | 68 | 1 | 1 | 60 | 70 | 1,025 | 7 |
7 | 95 | 1 | 76 | 2 | 2 | 60 | 60 | 625 | -24 |
1 | 303 | 1 | 74 | 1 | 0 | 90 | 70 | 463 | 30 |
3 | 519 | 1 | 63 | 1 | 1 | 80 | 70 | 1,025 | 10 |
13 | 643 | 1 | 74 | 1 | 0 | 90 | 90 | 1,425 | 2 |
22 | 765 | 1 | 50 | 2 | 1 | 90 | 100 | 1,175 | 4 |
3 | 735 | 1 | 72 | 2 | 1 | 90 | 90 | null | 9 |
12 | 189 | 1 | 63 | 1 | 0 | 80 | 70 | null | 0 |
21 | 53 | 1 | 68 | 1 | 0 | 90 | 100 | 1,025 | 0 |
1 | 246 | 1 | 58 | 1 | 0 | 100 | 90 | 1,175 | 7 |
6 | 689 | 1 | 59 | 1 | 1 | 90 | 80 | 1,300 | 15 |
1 | 65 | 1 | 62 | 1 | 0 | 90 | 80 | 725 | null |
5 | 5 | 1 | 65 | 2 | 0 | 100 | 80 | 338 | 5 |
22 | 132 | 1 | 57 | 1 | 2 | 70 | 60 | null | 18 |
3 | 687 | 1 | 58 | 2 | 1 | 80 | 80 | 1,225 | 10 |
1 | 345 | 1 | 64 | 2 | 1 | 90 | 80 | 1,075 | -3 |
22 | 444 | 1 | 75 | 2 | 2 | 70 | 70 | 438 | 8 |
12 | 223 | 1 | 48 | 1 | 1 | 90 | 80 | 1,300 | 68 |
21 | 175 | 1 | 73 | 1 | 1 | 80 | 100 | 1,025 | null |
11 | 60 | 1 | 65 | 2 | 1 | 90 | 80 | 1,025 | 0 |
3 | 163 | 1 | 69 | 1 | 1 | 80 | 60 | 1,125 | 0 |
3 | 65 | 1 | 68 | 1 | 2 | 70 | 50 | 825 | 8 |
16 | 208 | 1 | 67 | 2 | 2 | 70 | null | 538 | 2 |
5 | 821 | 0 | 64 | 2 | 0 | 90 | 70 | 1,025 | 3 |
22 | 428 | 1 | 68 | 1 | 0 | 100 | 80 | 1,039 | 0 |
6 | 230 | 1 | 67 | 1 | 1 | 80 | 100 | 488 | 23 |
13 | 840 | 0 | 63 | 1 | 0 | 90 | 90 | 1,175 | -1 |
3 | 305 | 1 | 48 | 2 | 1 | 80 | 90 | 538 | 29 |
5 | 11 | 1 | 74 | 1 | 2 | 70 | 100 | 1,175 | 0 |
2 | 132 | 1 | 40 | 1 | 1 | 80 | 80 | null | 3 |
21 | 226 | 1 | 53 | 2 | 1 | 90 | 80 | 825 | 3 |
12 | 426 | 1 | 71 | 2 | 1 | 90 | 90 | 1,075 | 19 |
1 | 705 | 1 | 51 | 2 | 0 | 100 | 80 | 1,300 | 0 |
6 | 363 | 1 | 56 | 2 | 1 | 80 | 70 | 1,225 | -2 |
3 | 11 | 1 | 81 | 1 | 0 | 90 | null | 731 | 15 |
1 | 176 | 1 | 73 | 1 | 0 | 90 | 70 | 169 | 30 |
4 | 791 | 1 | 59 | 1 | 0 | 100 | 80 | 768 | 5 |
13 | 95 | 1 | 55 | 1 | 1 | 70 | 90 | 1,500 | 15 |
11 | 196 | 0 | 42 | 1 | 1 | 80 | 80 | 1,425 | 8 |
21 | 167 | 1 | 44 | 2 | 1 | 80 | 90 | 588 | -1 |
16 | 806 | 0 | 44 | 1 | 1 | 80 | 80 | 1,025 | 1 |
6 | 284 | 1 | 71 | 1 | 1 | 80 | 90 | 1,100 | 14 |
22 | 641 | 1 | 62 | 2 | 1 | 80 | 80 | 1,150 | 1 |
21 | 147 | 1 | 61 | 1 | 0 | 100 | 90 | 1,175 | 4 |
13 | 740 | 0 | 44 | 2 | 1 | 90 | 80 | 588 | 39 |
1 | 163 | 1 | 72 | 1 | 2 | 70 | 70 | 910 | 2 |
11 | 655 | 1 | 63 | 1 | 0 | 100 | 90 | 975 | -1 |
22 | 239 | 1 | 70 | 1 | 1 | 80 | 100 | null | 23 |
5 | 88 | 1 | 66 | 1 | 1 | 90 | 80 | 875 | 8 |
10 | 245 | 1 | 57 | 2 | 1 | 80 | 60 | 280 | 14 |
1 | 588 | 0 | 69 | 2 | 0 | 100 | 90 | null | 13 |
12 | 30 | 1 | 72 | 1 | 2 | 80 | 60 | 288 | 7 |
3 | 179 | 1 | 69 | 1 | 1 | 80 | 80 | null | 25 |
12 | 310 | 1 | 71 | 1 | 1 | 90 | 100 | null | 0 |
11 | 477 | 1 | 64 | 1 | 1 | 90 | 100 | 910 | 0 |
3 | 166 | 1 | 70 | 2 | 0 | 90 | 70 | null | 10 |
End of preview.
Biostatistics Survival Analysis Datasets
Two classic time-to-event datasets for survival analysis benchmarking.
Datasets
1. Rossi Recidivism (rossi_recidivism.csv)
Recidivism study of 432 former prisoners released from Maryland state prisons. Duration measured in weeks; event is arrest.
- Rows: 432
- Duration column:
week - Event column:
arrest(1=arrested, 0=censored) - Censoring: 73.6%
- Source: Rossi et al. (1980). Money, Work, and Crime: Some Experimental Results.
2. NCCTG Lung Cancer (lung_cancer.csv)
North Central Cancer Treatment Group advanced lung cancer survival data. Duration measured in days; event is death.
- Rows: 228 (167 complete cases)
- Duration column:
time - Event column:
status(2=dead, 1=alive/censored) - Censoring: 27.6%
- Source: Loprinzi et al. (1994). Prospective evaluation of prognostic variables. J Clin Oncol.
Benchmark Results
Cox Proportional Hazards Model
| Dataset | C-Index | Logrank p | Median Survival |
|---|---|---|---|
| rossi_recidivism | 0.6403 | 0.0501 | inf |
| lung_cancer | 0.6532 | 0.0139 | 310.0 |
Key Hazard Ratios (Cox PH)
Rossi Recidivism
fin(financial aid): HR=0.684, p=0.047 -- financial aid reduces recidivism riskage: HR=0.944, p=0.009 -- older prisoners less likely to reoffendprio(prior arrests): HR=1.096, p=0.001 -- more prior arrests increases risk
Lung Cancer
sex: HR=0.575, p=0.006 -- females have lower mortality riskph.ecog(ECOG performance score): HR=2.095, p=0.001 -- stronger predictorph.karno(Karnofsky score): HR=1.023, p=0.046
Methods
- Kaplan-Meier estimator for survival curves
- Logrank test for group comparisons
- Cox Proportional Hazards regression for hazard ratios
- 5-fold cross-validation for C-index estimation
Citation
See source references above. These datasets are repackaged for HF datasets format.
- Downloads last month
- 16