Downloads · 30 days
0
shijiabraham/insurance-predictor
insurance-predictor is a machine learning model from shijiabraham. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
Predicts medical insurance charges using age, sex, BMI, number of children, smoking status and region.
Downloads · 30 days
0
Access
Public
Updated Aug 6, 2026
Repo size
1.7 KB
Likes
0
Public
Click a slice to open those files.
.py2 KB · 33%
From the Hugging Face model README
Predicts medical insurance charges using age, sex, BMI, number of children, smoking status and region.
The model uses linear regression. Sex and smoking status are converted to binary values, while region is one-hot encoded. The input features are standardized using StandardScaler before prediction.
The model achieved an R2 score of 0.8069 on the test data.
from huggingface_hub import hf_hub_download
import joblib
path = hf_hub_download(
"shijiabraham/insurance-predictor",
"insurance_predictor.joblib"
)
model = joblib.load(path)
model.predict_charges(
age=35,
sex="Female",
bmi=25,
children=1,
smoker="No",
region="Northeast"
)