Update README.md
Browse files
README.md
CHANGED
@@ -37,7 +37,9 @@ widget:
|
|
37 |
|
38 |
# Model description
|
39 |
|
40 |
-
This model was created following the instructions in the following Kaggle notebook:
|
|
|
|
|
41 |
|
42 |
The possible classified predictions are: 'Non liver patient', 'Liver patient'
|
43 |
|
@@ -97,34 +99,9 @@ This model follows the limitations of the Apache 2.0 license.
|
|
97 |
|
98 |
# How to Get Started with the Model
|
99 |
|
|
|
100 |
|
101 |
-
|
102 |
-
!pip install skops
|
103 |
-
```
|
104 |
-
|
105 |
-
```python
|
106 |
-
import pickle
|
107 |
-
import pandas as pd
|
108 |
-
from skops import hub_utils
|
109 |
-
```
|
110 |
-
|
111 |
-
```python
|
112 |
-
repo_id = "gianlab/model-liver-disease-prediction"
|
113 |
-
download_repo = "downloaded-model"
|
114 |
-
hub_utils.download(repo_id=repo_id, dst=download_repo)```
|
115 |
-
```
|
116 |
-
|
117 |
-
```python
|
118 |
-
pickled_model = pickle.load(open('downloaded-model/skops-xwel2v4p.pkl', 'rb'))
|
119 |
-
|
120 |
-
# gender 0 = Female , gender 1 = Male
|
121 |
-
row = {'age': 42, 'gender': 0, 'total_bilirubin':2.5, 'alkaline_phosphotase': 300, 'alamine_aminotransferase': 200, 'albumin_and_globulin_ratio' :1.2 }
|
122 |
-
df_example = pd.DataFrame([row])
|
123 |
-
pred=pickled_model.predict(df_example)
|
124 |
-
print("The prediction: ",pred[0])
|
125 |
-
|
126 |
-
# The prediction: Non liver patient
|
127 |
-
```
|
128 |
|
129 |
|
130 |
|
|
|
37 |
|
38 |
# Model description
|
39 |
|
40 |
+
This model was created following the instructions in the following Kaggle notebook:
|
41 |
+
|
42 |
+
https://www.kaggle.com/code/michalbrezk/xgboost-classifier-and-hyperparameter-tuning-85
|
43 |
|
44 |
The possible classified predictions are: 'Non liver patient', 'Liver patient'
|
45 |
|
|
|
99 |
|
100 |
# How to Get Started with the Model
|
101 |
|
102 |
+
To use the AI model run the following code on Google Colab:
|
103 |
|
104 |
+
https://colab.research.google.com/drive/1OKyEMTrrBqjdc9_3wgnn_ZHaRYMmr7mx?usp=sharing
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
|
106 |
|
107 |
|