File size: 2,238 Bytes
d9b9470
 
5131857
 
 
 
 
d9b9470
43febea
5131857
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43febea
5131857
 
43febea
 
 
 
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
---
license: mit
language:
- en
base_model:
- ViniMig/stroke-risk-package
pipeline_tag: tabular-classification
---
# Model Card for stroke-risk-package

## Model Details

### Model Description

<!-- Provide a longer summary of what this model is. -->



- **Developed by:** [Vini](https://gitlab.com/ViniMig)

### Model Sources

- **Repository:** [Gitlab repo](https://gitlab.com/ViniMig/ml_full_project)

## Uses

This model was developed to be used for stroke risk predictions. It is currently used in my stroke-risk-prediction HF space.


## Bias, Risks, and Limitations

Limitations are mostly around the train dataset. It is a limited size dataset and highly imbalanced (imbalanced class is < 5%).

### Recommendations

The dataset could benefit from improved quality and more data collected, such as new features and new categories for existing ones, and especially from individuals from the positive class.

## How to Get Started with the Model

Use the code below to get started with the model. The purpose of this project is to have a fully reproducible pipeline.

[Reproducible repo](https://gitlab.com/ViniMig/ml_full_project)

## Training Details

### Training Data

Even though this should link to a Dataset card, the data used for training this model was obtained from kaggle.

[Stroke risk dataset](https://www.kaggle.com/datasets/ranaghulamnabi/stroke-risk-dataset)

### Training Procedure

#### Preprocessing

For preprocessing this relied on a first EDA step and a previous version of the model. Upon further exploration the main steps of the preprocessing stage are:
- Imputation
- Binning continuous features
- OrdinalEncoding
- Over sampling with SMOTE on train set.

[Preprocessing code](https://gitlab.com/ViniMig/ml_full_project/-/blob/master/src/etl_pipeline/transform_load.py?ref_type=heads)

Some artifacts are saved with joblib, one of which is the custom function to apply pandas cut method for generating the bins. This joblib file is currently appearing as unsafe on HF space, which is probably expected, but all the code can be seen in the linked project repository above.

This artifact is saved and stored here to be used in the streamlit app which will handle user input and preprocessing for inference.