Port of the diabetes-readmission dataset from UCI (link here). See details there and use carefully.
Basic preprocessing done by the imodels team in this notebook.
The target is the binary outcome readmitted.
Load the data:
from datasets import load_dataset
dataset = load_dataset("imodels/diabetes-readmission")
df = pd.DataFrame(dataset['train'])
X = df.drop(columns=['readmitted'])
y = df['readmitted'].values
Fit a model:
import imodels
import numpy as np