Silke Szymczak
The goal of medical4pred is to provide publicly available medical data
sets from different resources that were consistently prepared as R
data.frame. They can be used for benchmarking prediction modeling
algorithms for classification and regression tasks.
You can install the development version of medical4pred from
GitHub with:
# install.packages("pak")
pak::pak("imbs-hl/medical4pred")The package contains meta information about each data set.
library(medical4pred)
data(list = "metainfo", package="medical4pred")
knitr::kable(
metainfo,
row.names = FALSE)| name | source | source_id | source_name | topic | other_sources | remark | no_individuals | task | freq_individuals_smallest_class | no_pred_var | no_pred_var_cat | no_pred_var_ordinal | no_pred_var_num | missing | missing_freq |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| bodyfat | Vanderbilt Biostatistics Datasets | NA | Body Fat Data | anthropology | Kaggle | NA | 252 | regression | NA | 13 | 0 | 0 | 13 | FALSE | 0.0000000 |
| BreastCancerWisconsinOriginal | UC Irvine ML Repository | 15 | Breast Cancer Wisconsin (Original) | oncology | NA | NA | 699 | classification_binary | 0.3447783 | 9 | 0 | 9 | 0 | TRUE | 0.0022890 |
| Dermatology | UC Irvine ML Repository | 33 | Dermatology | dermatology | NA | NA | 366 | classification_multi | 0.0546448 | 34 | 1 | 32 | 1 | TRUE | 0.0006245 |
| GliomaGradingClinicalandMutationFeatures | UC Irvine ML Repository | 759 | Glioma Grading Clinical and Mutation Features | oncology | NA | NA | 839 | classification_binary | 0.4195471 | 23 | 22 | 0 | 1 | FALSE | 0.0000000 |
| heartdisease | UC Irvine ML Repository | 45 | Heart Disease | cardiology | NA | NA | 303 | classification_multi | 0.0429043 | 13 | 7 | 0 | 6 | TRUE | 0.0014144 |
| HeartFailureClinicalRecords | UC Irvine ML Repository | 519 | Heart Failure Clinical Records | cardiology | NA | NA | 299 | classification_binary | 0.3210702 | 12 | 5 | 0 | 7 | FALSE | 0.0000000 |
| LiverDisorders | UC Irvine ML Repository | 60 | Liver Disorders | nephrology | NA | NA | 345 | regression | NA | 5 | 0 | 0 | 5 | FALSE | 0.0000000 |
| lowbirthweight | OpenML | 203 | lowbwt | neonatology | NA | NA | 189 | regression | NA | 8 | 6 | 0 | 2 | TRUE | 0.0035273 |
| NationalPollonHealthyAgingNPHA | UC Irvine ML Repository | 936 | National Poll on Healthy Aging (NPHA) | aging/geriatrics(?) | NA | NA | 714 | classification_multi | 0.1834734 | 11 | 11 | 0 | 0 | FALSE | 0.0000000 |
| primarytumor | OpenML | 171 | primary-tumor | oncology | NA | NA | 339 | classification_multi | 0.0000000 | 17 | 17 | 0 | 0 | TRUE | 0.0368732 |
Use meta information to select data set, e.g. for a binary classification task.
data_sets_binary = subset(
metainfo,
task == "classification_binary",
"name",
drop = TRUE)
print(data_sets_binary)
#> [1] "BreastCancerWisconsinOriginal"
#> [2] "GliomaGradingClinicalandMutationFeatures"
#> [3] "HeartFailureClinicalRecords"Load data sets into a list (using a temporary environment).
e = new.env()
data(
list = data_sets_binary,
package = "medical4pred",
envir = e)
data_l = as.list(e)
lapply(data_l, dim)
#> $HeartFailureClinicalRecords
#> [1] 299 13
#>
#> $BreastCancerWisconsinOriginal
#> [1] 699 10
#>
#> $GliomaGradingClinicalandMutationFeatures
#> [1] 839 24