Instructions to use ShaimaAli1/Smoker_Classifier_Model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use ShaimaAli1/Smoker_Classifier_Model with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("ShaimaAli1/Smoker_Classifier_Model", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - Notebooks
- Google Colab
- Kaggle
File size: 1,729 Bytes
3387a6c c6029af 4609bb6 3387a6c a02d83e e7039bd a02d83e 3387a6c | 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 | ---
language:
- en
metrics:
- accuracy
- precision
base_model:
- Hemg/logistic_Regression_model
library_name: sklearn
tags:
- Smoker_Classifier_Model
---
## Smoker Classifier Model
**Objective**:
This machine learning model classifies individuals as smokers or non-smokers based on various features such as age, gender, BMI, number of children, region, and medical charges. The model uses logistic regression for classification and was trained on an insurance dataset.
**Dataset Description**:
The dataset includes the following features:
- **Age**: Age of the primary beneficiary.
- **Sex**: Gender of the insurance contractor (female or male).
- **BMI**: Body Mass Index, an objective measure of body weight (kg/m²).
- **Children**: Number of children or dependents covered by health insurance.
- **Smoker**: Whether the individual is a smoker or not.
- **Region**: The region where the beneficiary resides in the US (northeast, southeast, southwest, northwest).
- **Charges**: The individual medical costs billed by the health insurance company.
**Model Information**:
- **Algorithm**: Logistic Regression
- **Accuracy**: 89.89%
- **Precision**: 95.24%
**Preprocessing**:
- Missing data handling (e.g., filling missing BMI values).
- Categorical data conversion (e.g., gender and smoker columns converted to numeric).
- Data normalization for better performance.
**How to Use**:
To use this model, download the model from the Hugging Face repository and load it using the joblib library.
```python
from huggingface_hub import hf_hub_download
import joblib
model_path = hf_hub_download(
repo_id="ShaimaAli1/Smoker_Classifier_Model",
filename="Smoker_Classifier_Model.pkl"
)
model = joblib.load(model_path) |