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
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: sklearn
|
3 |
+
tags:
|
4 |
+
- sklearn
|
5 |
+
- skops
|
6 |
+
- tabular-classification
|
7 |
+
model_file: model.pkl
|
8 |
+
widget:
|
9 |
+
structuredData:
|
10 |
+
x0:
|
11 |
+
- 19.89
|
12 |
+
- 12.89
|
13 |
+
- 17.14
|
14 |
+
x1:
|
15 |
+
- 20.26
|
16 |
+
- 13.12
|
17 |
+
- 16.4
|
18 |
+
x10:
|
19 |
+
- 0.5079
|
20 |
+
- 0.1532
|
21 |
+
- 1.046
|
22 |
+
x11:
|
23 |
+
- 0.8737
|
24 |
+
- 0.469
|
25 |
+
- 0.976
|
26 |
+
x12:
|
27 |
+
- 3.654
|
28 |
+
- 1.115
|
29 |
+
- 7.276
|
30 |
+
x13:
|
31 |
+
- 59.7
|
32 |
+
- 12.68
|
33 |
+
- 111.4
|
34 |
+
x14:
|
35 |
+
- 0.005089
|
36 |
+
- 0.004731
|
37 |
+
- 0.008029
|
38 |
+
x15:
|
39 |
+
- 0.02303
|
40 |
+
- 0.01345
|
41 |
+
- 0.03799
|
42 |
+
x16:
|
43 |
+
- 0.03052
|
44 |
+
- 0.01652
|
45 |
+
- 0.03732
|
46 |
+
x17:
|
47 |
+
- 0.01178
|
48 |
+
- 0.005905
|
49 |
+
- 0.02397
|
50 |
+
x18:
|
51 |
+
- 0.01057
|
52 |
+
- 0.01619
|
53 |
+
- 0.02308
|
54 |
+
x19:
|
55 |
+
- 0.003391
|
56 |
+
- 0.002081
|
57 |
+
- 0.007444
|
58 |
+
x2:
|
59 |
+
- 130.5
|
60 |
+
- 81.89
|
61 |
+
- 116.0
|
62 |
+
x20:
|
63 |
+
- 23.73
|
64 |
+
- 13.62
|
65 |
+
- 22.25
|
66 |
+
x21:
|
67 |
+
- 25.23
|
68 |
+
- 15.54
|
69 |
+
- 21.4
|
70 |
+
x22:
|
71 |
+
- 160.5
|
72 |
+
- 87.4
|
73 |
+
- 152.4
|
74 |
+
x23:
|
75 |
+
- 1646.0
|
76 |
+
- 577.0
|
77 |
+
- 1461.0
|
78 |
+
x24:
|
79 |
+
- 0.1417
|
80 |
+
- 0.09616
|
81 |
+
- 0.1545
|
82 |
+
x25:
|
83 |
+
- 0.3309
|
84 |
+
- 0.1147
|
85 |
+
- 0.3949
|
86 |
+
x26:
|
87 |
+
- 0.4185
|
88 |
+
- 0.1186
|
89 |
+
- 0.3853
|
90 |
+
x27:
|
91 |
+
- 0.1613
|
92 |
+
- 0.05366
|
93 |
+
- 0.255
|
94 |
+
x28:
|
95 |
+
- 0.2549
|
96 |
+
- 0.2309
|
97 |
+
- 0.4066
|
98 |
+
x29:
|
99 |
+
- 0.09136
|
100 |
+
- 0.06915
|
101 |
+
- 0.1059
|
102 |
+
x3:
|
103 |
+
- 1214.0
|
104 |
+
- 515.9
|
105 |
+
- 912.7
|
106 |
+
x4:
|
107 |
+
- 0.1037
|
108 |
+
- 0.06955
|
109 |
+
- 0.1186
|
110 |
+
x5:
|
111 |
+
- 0.131
|
112 |
+
- 0.03729
|
113 |
+
- 0.2276
|
114 |
+
x6:
|
115 |
+
- 0.1411
|
116 |
+
- 0.0226
|
117 |
+
- 0.2229
|
118 |
+
x7:
|
119 |
+
- 0.09431
|
120 |
+
- 0.01171
|
121 |
+
- 0.1401
|
122 |
+
x8:
|
123 |
+
- 0.1802
|
124 |
+
- 0.1337
|
125 |
+
- 0.304
|
126 |
+
x9:
|
127 |
+
- 0.06188
|
128 |
+
- 0.05581
|
129 |
+
- 0.07413
|
130 |
+
---
|
131 |
+
|
132 |
+
# Model description
|
133 |
+
|
134 |
+
This is a Decision Tree Classifier trained on breast cancer dataset and pruned with CCP.
|
135 |
+
|
136 |
+
## Intended uses & limitations
|
137 |
+
|
138 |
+
This model is trained for educational purposes.
|
139 |
+
|
140 |
+
## Training Procedure
|
141 |
+
|
142 |
+
### Hyperparameters
|
143 |
+
|
144 |
+
The model is trained with below hyperparameters.
|
145 |
+
|
146 |
+
<details>
|
147 |
+
<summary> Click to expand </summary>
|
148 |
+
|
149 |
+
| Hyperparameter | Value |
|
150 |
+
|--------------------------|---------|
|
151 |
+
| ccp_alpha | 0.0 |
|
152 |
+
| class_weight | |
|
153 |
+
| criterion | gini |
|
154 |
+
| max_depth | |
|
155 |
+
| max_features | |
|
156 |
+
| max_leaf_nodes | |
|
157 |
+
| min_impurity_decrease | 0.0 |
|
158 |
+
| min_impurity_split | |
|
159 |
+
| min_samples_leaf | 1 |
|
160 |
+
| min_samples_split | 2 |
|
161 |
+
| min_weight_fraction_leaf | 0.0 |
|
162 |
+
| random_state | 0 |
|
163 |
+
| splitter | best |
|
164 |
+
|
165 |
+
</details>
|
166 |
+
|
167 |
+
### Model Plot
|
168 |
+
|
169 |
+
The model plot is below.
|
170 |
+
|
171 |
+
<style>div.sk-top-container {color: black;background-color: white;}div.sk-toggleable {background-color: white;}label.sk-toggleable__label {cursor: pointer;display: block;width: 100%;margin-bottom: 0;padding: 0.2em 0.3em;box-sizing: border-box;text-align: center;}div.sk-toggleable__content {max-height: 0;max-width: 0;overflow: hidden;text-align: left;background-color: #f0f8ff;}div.sk-toggleable__content pre {margin: 0.2em;color: black;border-radius: 0.25em;background-color: #f0f8ff;}input.sk-toggleable__control:checked~div.sk-toggleable__content {max-height: 200px;max-width: 100%;overflow: auto;}div.sk-estimator input.sk-toggleable__control:checked~label.sk-toggleable__label {background-color: #d4ebff;}div.sk-label input.sk-toggleable__control:checked~label.sk-toggleable__label {background-color: #d4ebff;}input.sk-hidden--visually {border: 0;clip: rect(1px 1px 1px 1px);clip: rect(1px, 1px, 1px, 1px);height: 1px;margin: -1px;overflow: hidden;padding: 0;position: absolute;width: 1px;}div.sk-estimator {font-family: monospace;background-color: #f0f8ff;margin: 0.25em 0.25em;border: 1px dotted black;border-radius: 0.25em;box-sizing: border-box;}div.sk-estimator:hover {background-color: #d4ebff;}div.sk-parallel-item::after {content: "";width: 100%;border-bottom: 1px solid gray;flex-grow: 1;}div.sk-label:hover label.sk-toggleable__label {background-color: #d4ebff;}div.sk-serial::before {content: "";position: absolute;border-left: 1px solid gray;box-sizing: border-box;top: 2em;bottom: 0;left: 50%;}div.sk-serial {display: flex;flex-direction: column;align-items: center;background-color: white;}div.sk-item {z-index: 1;}div.sk-parallel {display: flex;align-items: stretch;justify-content: center;background-color: white;}div.sk-parallel-item {display: flex;flex-direction: column;position: relative;background-color: white;}div.sk-parallel-item:first-child::after {align-self: flex-end;width: 50%;}div.sk-parallel-item:last-child::after {align-self: flex-start;width: 50%;}div.sk-parallel-item:only-child::after {width: 0;}div.sk-dashed-wrapped {border: 1px dashed gray;margin: 0.2em;box-sizing: border-box;padding-bottom: 0.1em;background-color: white;position: relative;}div.sk-label label {font-family: monospace;font-weight: bold;background-color: white;display: inline-block;line-height: 1.2em;}div.sk-label-container {position: relative;z-index: 2;text-align: center;}div.sk-container {display: inline-block;position: relative;}</style><div class="sk-top-container"><div class="sk-container"><div class="sk-item"><div class="sk-estimator sk-toggleable"><input class="sk-toggleable__control sk-hidden--visually" id="2f21b6bf-6c69-42c6-8cc3-1024ae9f4a92" type="checkbox" checked><label class="sk-toggleable__label" for="2f21b6bf-6c69-42c6-8cc3-1024ae9f4a92">DecisionTreeClassifier</label><div class="sk-toggleable__content"><pre>DecisionTreeClassifier(random_state=0)</pre></div></div></div></div></div>
|
172 |
+
|
173 |
+
## Evaluation Results
|
174 |
+
|
175 |
+
You can find the details about evaluation process and the evaluation results.
|
176 |
+
|
177 |
+
|
178 |
+
|
179 |
+
| Metric | Value |
|
180 |
+
|----------|----------|
|
181 |
+
| accuracy | 0.937063 |
|
182 |
+
| f1 score | 0.937063 |
|
183 |
+
|
184 |
+
# How to Get Started with the Model
|
185 |
+
|
186 |
+
Use the code below to get started with the model.
|
187 |
+
|
188 |
+
```python
|
189 |
+
import joblib
|
190 |
+
import json
|
191 |
+
import pandas as pd
|
192 |
+
clf = joblib.load(model.pkl)
|
193 |
+
with open("config.json") as f:
|
194 |
+
config = json.load(f)
|
195 |
+
clf.predict(pd.DataFrame.from_dict(config["sklearn"]["example_input"]))
|
196 |
+
```
|
197 |
+
|
198 |
+
|
199 |
+
# Model Card Authors
|
200 |
+
|
201 |
+
This model card is written by following authors:
|
202 |
+
|
203 |
+
[More Information Needed]
|
204 |
+
|
205 |
+
# Model Card Contact
|
206 |
+
|
207 |
+
You can contact the model card authors through following channels:
|
208 |
+
[More Information Needed]
|
209 |
+
|
210 |
+
# Citation
|
211 |
+
|
212 |
+
Below you can find information related to citation.
|
213 |
+
|
214 |
+
**BibTeX:**
|
215 |
+
```
|
216 |
+
[More Information Needed]
|
217 |
+
```
|
218 |
+
|
219 |
+
|
220 |
+
# Additional Content
|
221 |
+
|
222 |
+
## Feature Importances
|
223 |
+
|
224 |
+
![Feature Importances](feature_importances.png)
|
225 |
+
|
226 |
+
## Tree Splits
|
227 |
+
|
228 |
+
![Tree Splits](tree.png)
|
229 |
+
|
230 |
+
## Confusion Matrix
|
231 |
+
|
232 |
+
![Confusion Matrix](confusion_matrix.png)
|
config.json
ADDED
@@ -0,0 +1,195 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"sklearn": {
|
3 |
+
"columns": [
|
4 |
+
"x0",
|
5 |
+
"x1",
|
6 |
+
"x2",
|
7 |
+
"x3",
|
8 |
+
"x4",
|
9 |
+
"x5",
|
10 |
+
"x6",
|
11 |
+
"x7",
|
12 |
+
"x8",
|
13 |
+
"x9",
|
14 |
+
"x10",
|
15 |
+
"x11",
|
16 |
+
"x12",
|
17 |
+
"x13",
|
18 |
+
"x14",
|
19 |
+
"x15",
|
20 |
+
"x16",
|
21 |
+
"x17",
|
22 |
+
"x18",
|
23 |
+
"x19",
|
24 |
+
"x20",
|
25 |
+
"x21",
|
26 |
+
"x22",
|
27 |
+
"x23",
|
28 |
+
"x24",
|
29 |
+
"x25",
|
30 |
+
"x26",
|
31 |
+
"x27",
|
32 |
+
"x28",
|
33 |
+
"x29"
|
34 |
+
],
|
35 |
+
"environment": [
|
36 |
+
"scikit-learn"
|
37 |
+
],
|
38 |
+
"example_input": {
|
39 |
+
"x0": [
|
40 |
+
19.89,
|
41 |
+
12.89,
|
42 |
+
17.14
|
43 |
+
],
|
44 |
+
"x1": [
|
45 |
+
20.26,
|
46 |
+
13.12,
|
47 |
+
16.4
|
48 |
+
],
|
49 |
+
"x10": [
|
50 |
+
0.5079,
|
51 |
+
0.1532,
|
52 |
+
1.046
|
53 |
+
],
|
54 |
+
"x11": [
|
55 |
+
0.8737,
|
56 |
+
0.469,
|
57 |
+
0.976
|
58 |
+
],
|
59 |
+
"x12": [
|
60 |
+
3.654,
|
61 |
+
1.115,
|
62 |
+
7.276
|
63 |
+
],
|
64 |
+
"x13": [
|
65 |
+
59.7,
|
66 |
+
12.68,
|
67 |
+
111.4
|
68 |
+
],
|
69 |
+
"x14": [
|
70 |
+
0.005089,
|
71 |
+
0.004731,
|
72 |
+
0.008029
|
73 |
+
],
|
74 |
+
"x15": [
|
75 |
+
0.02303,
|
76 |
+
0.01345,
|
77 |
+
0.03799
|
78 |
+
],
|
79 |
+
"x16": [
|
80 |
+
0.03052,
|
81 |
+
0.01652,
|
82 |
+
0.03732
|
83 |
+
],
|
84 |
+
"x17": [
|
85 |
+
0.01178,
|
86 |
+
0.005905,
|
87 |
+
0.02397
|
88 |
+
],
|
89 |
+
"x18": [
|
90 |
+
0.01057,
|
91 |
+
0.01619,
|
92 |
+
0.02308
|
93 |
+
],
|
94 |
+
"x19": [
|
95 |
+
0.003391,
|
96 |
+
0.002081,
|
97 |
+
0.007444
|
98 |
+
],
|
99 |
+
"x2": [
|
100 |
+
130.5,
|
101 |
+
81.89,
|
102 |
+
116.0
|
103 |
+
],
|
104 |
+
"x20": [
|
105 |
+
23.73,
|
106 |
+
13.62,
|
107 |
+
22.25
|
108 |
+
],
|
109 |
+
"x21": [
|
110 |
+
25.23,
|
111 |
+
15.54,
|
112 |
+
21.4
|
113 |
+
],
|
114 |
+
"x22": [
|
115 |
+
160.5,
|
116 |
+
87.4,
|
117 |
+
152.4
|
118 |
+
],
|
119 |
+
"x23": [
|
120 |
+
1646.0,
|
121 |
+
577.0,
|
122 |
+
1461.0
|
123 |
+
],
|
124 |
+
"x24": [
|
125 |
+
0.1417,
|
126 |
+
0.09616,
|
127 |
+
0.1545
|
128 |
+
],
|
129 |
+
"x25": [
|
130 |
+
0.3309,
|
131 |
+
0.1147,
|
132 |
+
0.3949
|
133 |
+
],
|
134 |
+
"x26": [
|
135 |
+
0.4185,
|
136 |
+
0.1186,
|
137 |
+
0.3853
|
138 |
+
],
|
139 |
+
"x27": [
|
140 |
+
0.1613,
|
141 |
+
0.05366,
|
142 |
+
0.255
|
143 |
+
],
|
144 |
+
"x28": [
|
145 |
+
0.2549,
|
146 |
+
0.2309,
|
147 |
+
0.4066
|
148 |
+
],
|
149 |
+
"x29": [
|
150 |
+
0.09136,
|
151 |
+
0.06915,
|
152 |
+
0.1059
|
153 |
+
],
|
154 |
+
"x3": [
|
155 |
+
1214.0,
|
156 |
+
515.9,
|
157 |
+
912.7
|
158 |
+
],
|
159 |
+
"x4": [
|
160 |
+
0.1037,
|
161 |
+
0.06955,
|
162 |
+
0.1186
|
163 |
+
],
|
164 |
+
"x5": [
|
165 |
+
0.131,
|
166 |
+
0.03729,
|
167 |
+
0.2276
|
168 |
+
],
|
169 |
+
"x6": [
|
170 |
+
0.1411,
|
171 |
+
0.0226,
|
172 |
+
0.2229
|
173 |
+
],
|
174 |
+
"x7": [
|
175 |
+
0.09431,
|
176 |
+
0.01171,
|
177 |
+
0.1401
|
178 |
+
],
|
179 |
+
"x8": [
|
180 |
+
0.1802,
|
181 |
+
0.1337,
|
182 |
+
0.304
|
183 |
+
],
|
184 |
+
"x9": [
|
185 |
+
0.06188,
|
186 |
+
0.05581,
|
187 |
+
0.07413
|
188 |
+
]
|
189 |
+
},
|
190 |
+
"model": {
|
191 |
+
"file": "model.pkl"
|
192 |
+
},
|
193 |
+
"task": "tabular-classification"
|
194 |
+
}
|
195 |
+
}
|
confusion_matrix.png
ADDED
feature_importances.png
ADDED
model.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:63d7dab53252fa382eef394c93d5768be35eacbb0416ca85fa125386b52e8a16
|
3 |
+
size 3887
|
tree.png
ADDED