Chandan Singh
commited on
Commit
•
8477b23
1
Parent(s):
6849df4
add widget
Browse files
README.md
CHANGED
@@ -1,14 +1,52 @@
|
|
1 |
---
|
2 |
license: mit
|
3 |
-
---
|
4 |
-
|
5 |
-
---
|
6 |
tags:
|
7 |
- tabular-classification
|
8 |
- sklearn
|
9 |
datasets:
|
10 |
-
- wine-quality
|
11 |
- imodels/compas-recidivism
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
---
|
13 |
|
14 |
|
@@ -31,14 +69,6 @@ X_test = df.drop(columns=['is_recid'])
|
|
31 |
y_test = df['is_recid'].values
|
32 |
```
|
33 |
|
34 |
-
### Load the model
|
35 |
-
## Wine Quality classification
|
36 |
-
|
37 |
-
### A Simple Example of Scikit-learn Pipeline
|
38 |
-
|
39 |
-
> Inspired by https://towardsdatascience.com/a-simple-example-of-pipeline-in-machine-learning-with-scikit-learn-e726ffbb6976 by Saptashwa Bhattacharyya
|
40 |
-
|
41 |
-
|
42 |
### Load the model
|
43 |
|
44 |
```python
|
@@ -61,4 +91,5 @@ model = joblib.load(cached_download(
|
|
61 |
```
|
62 |
preds = model.predict(X_test)
|
63 |
print('accuracy', np.mean(preds==y_test))
|
|
|
64 |
```
|
|
|
1 |
---
|
2 |
license: mit
|
|
|
|
|
|
|
3 |
tags:
|
4 |
- tabular-classification
|
5 |
- sklearn
|
6 |
datasets:
|
|
|
7 |
- imodels/compas-recidivism
|
8 |
+
widget:
|
9 |
+
structuredData:
|
10 |
+
age:
|
11 |
+
- 40.0
|
12 |
+
priors_count:
|
13 |
+
- 0.0
|
14 |
+
days_b_screening_arrest:
|
15 |
+
- -1.0
|
16 |
+
c_jail_time:
|
17 |
+
- 0.0
|
18 |
+
juv_fel_count:
|
19 |
+
- 0.0
|
20 |
+
juv_other_count:
|
21 |
+
- 0.0
|
22 |
+
juv_misd_count:
|
23 |
+
- 0.0
|
24 |
+
c_charge_degree:F:
|
25 |
+
- 0.0
|
26 |
+
c_charge_degree:M:
|
27 |
+
- 1.0
|
28 |
+
race:African-American:
|
29 |
+
- 0.0
|
30 |
+
race:Asian:
|
31 |
+
- 0.0
|
32 |
+
race:Caucasian:
|
33 |
+
- 1.0
|
34 |
+
race:Hispanic:
|
35 |
+
- 0.0
|
36 |
+
race:Native_American:
|
37 |
+
- 0.0
|
38 |
+
race:Other:
|
39 |
+
- 0.0
|
40 |
+
age_cat:25_-_45:
|
41 |
+
- 1.0
|
42 |
+
age_cat:Greater_than_45:
|
43 |
+
- 0.0
|
44 |
+
age_cat:Less_than_25:
|
45 |
+
- 0.0
|
46 |
+
sex:Female:
|
47 |
+
- 0.0
|
48 |
+
sex:Male:
|
49 |
+
- 1.0
|
50 |
---
|
51 |
|
52 |
|
|
|
69 |
y_test = df['is_recid'].values
|
70 |
```
|
71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
### Load the model
|
73 |
|
74 |
```python
|
|
|
91 |
```
|
92 |
preds = model.predict(X_test)
|
93 |
print('accuracy', np.mean(preds==y_test))
|
94 |
+
# accuracy 0.6759165485112416
|
95 |
```
|