Datasets:
File size: 3,211 Bytes
6c76391 1f705f4 6c76391 1f705f4 6c76391 1f705f4 6c76391 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | ---
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"] |