Datasets:
|
Download README.md from codehammad/preprocessed-insurance-costs: direct link, hf CLI and curl.
- Browser
- Download file 3.21 kB
-
https://huggingface.co/datasets/codehammad/preprocessed-insurance-costs/resolve/main/README.md
- Command line
-
hf download hf://datasets/codehammad/preprocessed-insurance-costs/README.md
-
curl -L -o README.md https://huggingface.co/datasets/codehammad/preprocessed-insurance-costs/resolve/main/README.md
3.21 kB
| license: cc0-1.0 | |
| task_categories: | |
| - tabular-regression | |
| tags: | |
| - insurance | |
| - healthcare | |
| - medical-costs | |
| - regression | |
| - tabular | |
| - preprocessed | |
| pretty_name: Preprocessed Medical Insurance Cost Dataset | |
| size_categories: | |
| - 1K<n<10K | |
| # Preprocessed Medical Insurance Cost Dataset | |
| ## Dataset Summary | |
| This dataset contains **1,337** preprocessed records for predicting individual medical insurance costs (`charges`) based on demographic and health indicators. Derived from the classic US Medical Cost Personal Dataset, this version has been cleaned, deduplicated (1 duplicate removed from the original 1,338 rows), feature-engineered, and standardized for immediate use in tabular regression pipelines. | |
| - **Rows:** 1,337 | |
| - **Columns:** 9 (1 index column, 7 features, 1 target) | |
| - **Missing Values:** None (0 nulls across all columns) | |
| - **Task:** Tabular Regression (predicting `charges`) | |
| --- | |
| ## Dataset Structure | |
| ### Data Fields | |
| | Column Name | Data Type | Description | Value Range / Distribution | | |
| | :--- | :--- | :--- | :--- | | |
| | `Unnamed: 0` | `int64` | Sequential row index exported from pandas (`0` to `1336`). *Note: Drop before model training.* | `0` – `1336` | | |
| | `age` | `float64` | Standardized age of the primary beneficiary ($z$-score scaled: $\mu = 0, \sigma = 1$). | `-1.51` to `1.76` | | |
| | `is_female` | `int64` | Binary sex indicator (`1` = female, `0` = male). | `0` (50.5%), `1` (49.5%) | | |
| | `bmi` | `float64` | Standardized Body Mass Index ($z$-score scaled: $\mu = 0, \sigma = 1$). | `-2.48` to `3.73` | | |
| | `children` | `int64` / `float64` | Standardized number of dependents/children covered by health insurance ($z$-score scaled: $\mu = 0, \sigma = 1$). | `-0.91` to `3.24` | | |
| | `is_smoker` | `int64` | Binary smoking status (`1` = smoker, `0` = non-smoker). | `0` (79.5%), `1` (20.5%) | | |
| | `charges` | `int64` | **[Target]** Individual medical costs billed by health insurance (truncated to integer dollars). | `1,121` – `63,770` (Mean: `13,279`, Median: `9,386`) | | |
| | `region_southeast` | `int64` | One-hot encoded indicator for the US Southeast residential region (`1` = Southeast, `0` = Other). | `0` (72.8%), `1` (27.2%) | | |
| | `bmi_categary_Obese` | `int64` | Engineered binary indicator for obesity (`1` = BMI $\ge 30$, `0` = BMI $< 30$). *(Preserves original column spelling).* | `0` (47.2%), `1` (52.8%) | | |
| ### Sample Rows | |
| | Unnamed: 0 | age | is_female | bmi | children | is_smoker | charges | region_southeast | bmi_categary_Obese | | |
| | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | | |
| | 0 | -1.440418 | 1 | -0.517949 | -0.909234 | 1 | 16884 | 0 | 0 | | |
| | 1 | -1.511647 | 0 | 0.462463 | -0.079442 | 0 | 1725 | 1 | 1 | | |
| | 2 | -0.799350 | 0 | 0.462463 | 1.580143 | 0 | 4449 | 1 | 1 | | |
| | 3 | -0.443201 | 0 | -1.334960 | -0.909234 | 0 | 21984 | 0 | 0 | | |
| | 4 | -0.514431 | 0 | -0.354547 | -0.909234 | 0 | 3866 | 0 | 0 | | |
| --- | |
| ## Usage | |
| Load with Hugging Face `datasets` | |
| ```python | |
| from datasets import load_dataset | |
| dataset = load_dataset("codehammad/preprocessed-insurance-costs", split="train") | |
| df = dataset.to_pandas() | |
| # Drop the exported index column before training | |
| X = df.drop(columns=["Unnamed: 0", "charges"], errors="ignore") | |
| y = df["charges"] |