Initial model upload
Browse files
README.md
CHANGED
@@ -7,7 +7,7 @@ tags:
|
|
7 |
- healthcare
|
8 |
license: mit
|
9 |
widget:
|
10 |
-
- text: "Patient details: Age
|
11 |
datasets:
|
12 |
- stroke-prediction-dataset
|
13 |
---
|
@@ -36,4 +36,37 @@ weighted avg 0.95 0.95 0.92 982
|
|
36 |
```
|
37 |
|
38 |
## How to Use
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
Download the model and load it using `joblib
|
|
|
|
|
|
|
|
7 |
- healthcare
|
8 |
license: mit
|
9 |
widget:
|
10 |
+
- text: "Patient details: Age 45, Hypertension 1, Avg_glucose_level 170, BMI 26"
|
11 |
datasets:
|
12 |
- stroke-prediction-dataset
|
13 |
---
|
|
|
36 |
```
|
37 |
|
38 |
## How to Use
|
39 |
+
This model i created in google colab. Relavant libraries include:
|
40 |
+
## How to Use
|
41 |
+
This runs in google colab.
|
42 |
+
|
43 |
+
Import as per below:
|
44 |
+
|
45 |
+
|
46 |
+
import pandas as pd
|
47 |
+
import numpy as np
|
48 |
+
import matplotlib.pyplot as plt
|
49 |
+
import seaborn as sns
|
50 |
+
import random
|
51 |
+
from sklearn.model_selection import GridSearchCV
|
52 |
+
from sklearn.preprocessing import StandardScaler, LabelEncoder
|
53 |
+
from sklearn.ensemble import RandomForestClassifier
|
54 |
+
from sklearn.model_selection import train_test_split
|
55 |
+
from sklearn.linear_model import LogisticRegression
|
56 |
+
from sklearn.metrics import accuracy_score, classification_report, confusion_matrix
|
57 |
+
from sklearn.preprocessing import MinMaxScaler
|
58 |
+
|
59 |
+
# For kaggle
|
60 |
+
import os
|
61 |
+
import zipfile
|
62 |
+
|
63 |
+
# For Hugging face
|
64 |
+
# from sklearn.externals import joblib # to save the model
|
65 |
+
from huggingface_hub import notebook_login
|
66 |
+
from huggingface_hub import Repository
|
67 |
+
|
68 |
+
|
69 |
Download the model and load it using `joblib
|
70 |
+
Replace input_data with your data, e.g. [[45, 1, 170, 26]] # Age, Hypertension, Avg_glucose_level, BMI
|
71 |
+
|
72 |
+
|