pppereira3
commited on
Commit
•
5f9878c
1
Parent(s):
7974415
pushing files to the repo from the example!
Browse files- NYC_SQF_ARR_KNN.pkl +2 -2
- README.md +69 -69
- config.json +27 -27
NYC_SQF_ARR_KNN.pkl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:885c809bd65745845aa2c3f00667e2db70ce4d7fc6280a29612418fcdd665668
|
3 |
+
size 1269275
|
README.md
CHANGED
@@ -9,11 +9,11 @@ model_file: NYC_SQF_ARR_KNN.pkl
|
|
9 |
widget:
|
10 |
- structuredData:
|
11 |
ASK_FOR_CONSENT_FLG:
|
12 |
-
-
|
13 |
- 1
|
14 |
- 1
|
15 |
CONSENT_GIVEN_FLG:
|
16 |
-
-
|
17 |
- 1
|
18 |
- 1
|
19 |
FIREARM_FLAG:
|
@@ -21,20 +21,20 @@ widget:
|
|
21 |
- 0
|
22 |
- 0
|
23 |
FRISKED_FLAG:
|
24 |
-
- 1
|
25 |
-
- 1
|
26 |
- 0
|
|
|
|
|
27 |
ISSUING_OFFICER_RANK:
|
28 |
- 11
|
29 |
-
-
|
30 |
- 9
|
31 |
KNIFE_CUTTER_FLAG:
|
32 |
-
-
|
33 |
- 0
|
34 |
- 0
|
35 |
OTHER_CONTRABAND_FLAG:
|
36 |
- 0
|
37 |
-
-
|
38 |
- 0
|
39 |
OTHER_WEAPON_FLAG:
|
40 |
- 0
|
@@ -43,39 +43,39 @@ widget:
|
|
43 |
SEARCHED_FLAG:
|
44 |
- 0
|
45 |
- 0
|
46 |
-
-
|
47 |
STOP_LOCATION_PRECINCT:
|
48 |
-
- 52
|
49 |
-
- 48
|
50 |
- 115
|
|
|
|
|
51 |
SUPERVISING_OFFICER_RANK:
|
52 |
- 12
|
53 |
-
-
|
54 |
- 12
|
55 |
SUSPECT_BODY_BUILD_TYPE:
|
56 |
-
- 2
|
57 |
-
- 2
|
58 |
- 3
|
|
|
|
|
59 |
SUSPECT_HEIGHT:
|
60 |
- 6.0
|
61 |
-
- 5.5
|
62 |
- 5.7
|
|
|
63 |
SUSPECT_RACE_DESCRIPTION:
|
64 |
-
-
|
65 |
-
-
|
66 |
- 7
|
67 |
SUSPECT_REPORTED_AGE:
|
68 |
-
-
|
69 |
-
-
|
70 |
-
-
|
71 |
SUSPECT_SEX:
|
72 |
-
-
|
73 |
- 2
|
74 |
- 2
|
75 |
SUSPECT_WEIGHT:
|
|
|
|
|
76 |
- 200.0
|
77 |
-
- 140.0
|
78 |
-
- 120.0
|
79 |
---
|
80 |
|
81 |
# Model description
|
@@ -118,57 +118,57 @@ widget:
|
|
118 |
|
119 |
### Model Plot
|
120 |
|
121 |
-
<style>#sk-container-id-
|
122 |
-
}#sk-container-id-
|
123 |
-
}#sk-container-id-
|
124 |
-
}#sk-container-id-
|
125 |
-
}#sk-container-id-
|
126 |
-
}#sk-container-id-
|
127 |
-
}#sk-container-id-
|
128 |
}div.sk-parallel-item,
|
129 |
div.sk-serial,
|
130 |
div.sk-item {/* draw centered vertical line to link estimators */background-image: linear-gradient(var(--sklearn-color-text-on-default-background), var(--sklearn-color-text-on-default-background));background-size: 2px 100%;background-repeat: no-repeat;background-position: center center;
|
131 |
-
}/* Parallel-specific style estimator block */#sk-container-id-
|
132 |
-
}#sk-container-id-
|
133 |
-
}#sk-container-id-
|
134 |
-
}#sk-container-id-
|
135 |
-
}#sk-container-id-
|
136 |
-
}#sk-container-id-
|
137 |
-
}/* Serial-specific style estimator block */#sk-container-id-
|
138 |
}/* Toggleable style: style used for estimator/Pipeline/ColumnTransformer box that is
|
139 |
clickable and can be expanded/collapsed.
|
140 |
- Pipeline and ColumnTransformer use this feature and define the default style
|
141 |
- Estimators will overwrite some part of the style using the `sk-estimator` class
|
142 |
-
*//* Pipeline and ColumnTransformer style (default) */#sk-container-id-
|
143 |
}/* Toggleable label */
|
144 |
-
#sk-container-id-
|
145 |
-
}#sk-container-id-
|
146 |
-
}#sk-container-id-
|
147 |
-
}/* Toggleable content - dropdown */#sk-container-id-
|
148 |
-
}#sk-container-id-
|
149 |
-
}#sk-container-id-
|
150 |
-
}#sk-container-id-
|
151 |
-
}#sk-container-id-
|
152 |
-
}#sk-container-id-
|
153 |
-
}/* Pipeline/ColumnTransformer-specific style */#sk-container-id-
|
154 |
-
}#sk-container-id-
|
155 |
}/* Estimator-specific style *//* Colorize estimator box */
|
156 |
-
#sk-container-id-
|
157 |
-
}#sk-container-id-
|
158 |
-
}#sk-container-id-
|
159 |
-
#sk-container-id-
|
160 |
}/* On hover, darken the color of the background */
|
161 |
-
#sk-container-id-
|
162 |
}/* Label box, darken color on hover, fitted */
|
163 |
-
#sk-container-id-
|
164 |
-
}/* Estimator label */#sk-container-id-
|
165 |
-
}#sk-container-id-
|
166 |
}/* Estimator-specific */
|
167 |
-
#sk-container-id-
|
168 |
-
}#sk-container-id-
|
169 |
}/* on hover */
|
170 |
-
#sk-container-id-
|
171 |
-
}#sk-container-id-
|
172 |
}/* Specification for estimator info (e.g. "i" and "?") *//* Common style for "i" and "?" */.sk-estimator-doc-link,
|
173 |
a:link.sk-estimator-doc-link,
|
174 |
a:visited.sk-estimator-doc-link {float: right;font-size: smaller;line-height: 1em;font-family: monospace;background-color: var(--sklearn-color-background);border-radius: 1em;height: 1em;width: 1em;text-decoration: none !important;margin-left: 1ex;/* unfitted */border: var(--sklearn-color-unfitted-level-1) 1pt solid;color: var(--sklearn-color-unfitted-level-1);
|
@@ -188,22 +188,22 @@ div.sk-label-container:hover .sk-estimator-doc-link.fitted:hover,
|
|
188 |
.sk-estimator-doc-link span {display: none;z-index: 9999;position: relative;font-weight: normal;right: .2ex;padding: .5ex;margin: .5ex;width: min-content;min-width: 20ex;max-width: 50ex;color: var(--sklearn-color-text);box-shadow: 2pt 2pt 4pt #999;/* unfitted */background: var(--sklearn-color-unfitted-level-0);border: .5pt solid var(--sklearn-color-unfitted-level-3);
|
189 |
}.sk-estimator-doc-link.fitted span {/* fitted */background: var(--sklearn-color-fitted-level-0);border: var(--sklearn-color-fitted-level-3);
|
190 |
}.sk-estimator-doc-link:hover span {display: block;
|
191 |
-
}/* "?"-specific style due to the `<a>` HTML tag */#sk-container-id-
|
192 |
-
}#sk-container-id-
|
193 |
}/* On hover */
|
194 |
-
#sk-container-id-
|
195 |
-
}#sk-container-id-
|
196 |
}
|
197 |
-
</style><div id="sk-container-id-
|
198 |
|
199 |
## Evaluation Results
|
200 |
|
201 |
| Metric | Value |
|
202 |
|-----------|----------|
|
203 |
-
| accuracy | 0.
|
204 |
-
| f1 score | 0.
|
205 |
-
| precision | 0.
|
206 |
-
| recall | 0.
|
207 |
|
208 |
# How to Get Started with the Model
|
209 |
|
|
|
9 |
widget:
|
10 |
- structuredData:
|
11 |
ASK_FOR_CONSENT_FLG:
|
12 |
+
- 1
|
13 |
- 1
|
14 |
- 1
|
15 |
CONSENT_GIVEN_FLG:
|
16 |
+
- 1
|
17 |
- 1
|
18 |
- 1
|
19 |
FIREARM_FLAG:
|
|
|
21 |
- 0
|
22 |
- 0
|
23 |
FRISKED_FLAG:
|
|
|
|
|
24 |
- 0
|
25 |
+
- 0
|
26 |
+
- 1
|
27 |
ISSUING_OFFICER_RANK:
|
28 |
- 11
|
29 |
+
- 9
|
30 |
- 9
|
31 |
KNIFE_CUTTER_FLAG:
|
32 |
+
- 0
|
33 |
- 0
|
34 |
- 0
|
35 |
OTHER_CONTRABAND_FLAG:
|
36 |
- 0
|
37 |
+
- 0
|
38 |
- 0
|
39 |
OTHER_WEAPON_FLAG:
|
40 |
- 0
|
|
|
43 |
SEARCHED_FLAG:
|
44 |
- 0
|
45 |
- 0
|
46 |
+
- 0
|
47 |
STOP_LOCATION_PRECINCT:
|
|
|
|
|
48 |
- 115
|
49 |
+
- 83
|
50 |
+
- 45
|
51 |
SUPERVISING_OFFICER_RANK:
|
52 |
- 12
|
53 |
+
- 12
|
54 |
- 12
|
55 |
SUSPECT_BODY_BUILD_TYPE:
|
|
|
|
|
56 |
- 3
|
57 |
+
- 3
|
58 |
+
- 2
|
59 |
SUSPECT_HEIGHT:
|
60 |
- 6.0
|
|
|
61 |
- 5.7
|
62 |
+
- 6.1
|
63 |
SUSPECT_RACE_DESCRIPTION:
|
64 |
+
- 5
|
65 |
+
- 4
|
66 |
- 7
|
67 |
SUSPECT_REPORTED_AGE:
|
68 |
+
- 26.0
|
69 |
+
- 41.0
|
70 |
+
- 27.757022471910112
|
71 |
SUSPECT_SEX:
|
72 |
+
- 2
|
73 |
- 2
|
74 |
- 2
|
75 |
SUSPECT_WEIGHT:
|
76 |
+
- 150.0
|
77 |
+
- 150.0
|
78 |
- 200.0
|
|
|
|
|
79 |
---
|
80 |
|
81 |
# Model description
|
|
|
118 |
|
119 |
### Model Plot
|
120 |
|
121 |
+
<style>#sk-container-id-5 {/* Definition of color scheme common for light and dark mode */--sklearn-color-text: black;--sklearn-color-line: gray;/* Definition of color scheme for unfitted estimators */--sklearn-color-unfitted-level-0: #fff5e6;--sklearn-color-unfitted-level-1: #f6e4d2;--sklearn-color-unfitted-level-2: #ffe0b3;--sklearn-color-unfitted-level-3: chocolate;/* Definition of color scheme for fitted estimators */--sklearn-color-fitted-level-0: #f0f8ff;--sklearn-color-fitted-level-1: #d4ebff;--sklearn-color-fitted-level-2: #b3dbfd;--sklearn-color-fitted-level-3: cornflowerblue;/* Specific color for light theme */--sklearn-color-text-on-default-background: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, black)));--sklearn-color-background: var(--sg-background-color, var(--theme-background, var(--jp-layout-color0, white)));--sklearn-color-border-box: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, black)));--sklearn-color-icon: #696969;@media (prefers-color-scheme: dark) {/* Redefinition of color scheme for dark theme */--sklearn-color-text-on-default-background: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, white)));--sklearn-color-background: var(--sg-background-color, var(--theme-background, var(--jp-layout-color0, #111)));--sklearn-color-border-box: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, white)));--sklearn-color-icon: #878787;}
|
122 |
+
}#sk-container-id-5 {color: var(--sklearn-color-text);
|
123 |
+
}#sk-container-id-5 pre {padding: 0;
|
124 |
+
}#sk-container-id-5 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;
|
125 |
+
}#sk-container-id-5 div.sk-dashed-wrapped {border: 1px dashed var(--sklearn-color-line);margin: 0 0.4em 0.5em 0.4em;box-sizing: border-box;padding-bottom: 0.4em;background-color: var(--sklearn-color-background);
|
126 |
+
}#sk-container-id-5 div.sk-container {/* jupyter's `normalize.less` sets `[hidden] { display: none; }`but bootstrap.min.css set `[hidden] { display: none !important; }`so we also need the `!important` here to be able to override thedefault hidden behavior on the sphinx rendered scikit-learn.org.See: https://github.com/scikit-learn/scikit-learn/issues/21755 */display: inline-block !important;position: relative;
|
127 |
+
}#sk-container-id-5 div.sk-text-repr-fallback {display: none;
|
128 |
}div.sk-parallel-item,
|
129 |
div.sk-serial,
|
130 |
div.sk-item {/* draw centered vertical line to link estimators */background-image: linear-gradient(var(--sklearn-color-text-on-default-background), var(--sklearn-color-text-on-default-background));background-size: 2px 100%;background-repeat: no-repeat;background-position: center center;
|
131 |
+
}/* Parallel-specific style estimator block */#sk-container-id-5 div.sk-parallel-item::after {content: "";width: 100%;border-bottom: 2px solid var(--sklearn-color-text-on-default-background);flex-grow: 1;
|
132 |
+
}#sk-container-id-5 div.sk-parallel {display: flex;align-items: stretch;justify-content: center;background-color: var(--sklearn-color-background);position: relative;
|
133 |
+
}#sk-container-id-5 div.sk-parallel-item {display: flex;flex-direction: column;
|
134 |
+
}#sk-container-id-5 div.sk-parallel-item:first-child::after {align-self: flex-end;width: 50%;
|
135 |
+
}#sk-container-id-5 div.sk-parallel-item:last-child::after {align-self: flex-start;width: 50%;
|
136 |
+
}#sk-container-id-5 div.sk-parallel-item:only-child::after {width: 0;
|
137 |
+
}/* Serial-specific style estimator block */#sk-container-id-5 div.sk-serial {display: flex;flex-direction: column;align-items: center;background-color: var(--sklearn-color-background);padding-right: 1em;padding-left: 1em;
|
138 |
}/* Toggleable style: style used for estimator/Pipeline/ColumnTransformer box that is
|
139 |
clickable and can be expanded/collapsed.
|
140 |
- Pipeline and ColumnTransformer use this feature and define the default style
|
141 |
- Estimators will overwrite some part of the style using the `sk-estimator` class
|
142 |
+
*//* Pipeline and ColumnTransformer style (default) */#sk-container-id-5 div.sk-toggleable {/* Default theme specific background. It is overwritten whether we have aspecific estimator or a Pipeline/ColumnTransformer */background-color: var(--sklearn-color-background);
|
143 |
}/* Toggleable label */
|
144 |
+
#sk-container-id-5 label.sk-toggleable__label {cursor: pointer;display: block;width: 100%;margin-bottom: 0;padding: 0.5em;box-sizing: border-box;text-align: center;
|
145 |
+
}#sk-container-id-5 label.sk-toggleable__label-arrow:before {/* Arrow on the left of the label */content: "▸";float: left;margin-right: 0.25em;color: var(--sklearn-color-icon);
|
146 |
+
}#sk-container-id-5 label.sk-toggleable__label-arrow:hover:before {color: var(--sklearn-color-text);
|
147 |
+
}/* Toggleable content - dropdown */#sk-container-id-5 div.sk-toggleable__content {max-height: 0;max-width: 0;overflow: hidden;text-align: left;/* unfitted */background-color: var(--sklearn-color-unfitted-level-0);
|
148 |
+
}#sk-container-id-5 div.sk-toggleable__content.fitted {/* fitted */background-color: var(--sklearn-color-fitted-level-0);
|
149 |
+
}#sk-container-id-5 div.sk-toggleable__content pre {margin: 0.2em;border-radius: 0.25em;color: var(--sklearn-color-text);/* unfitted */background-color: var(--sklearn-color-unfitted-level-0);
|
150 |
+
}#sk-container-id-5 div.sk-toggleable__content.fitted pre {/* unfitted */background-color: var(--sklearn-color-fitted-level-0);
|
151 |
+
}#sk-container-id-5 input.sk-toggleable__control:checked~div.sk-toggleable__content {/* Expand drop-down */max-height: 200px;max-width: 100%;overflow: auto;
|
152 |
+
}#sk-container-id-5 input.sk-toggleable__control:checked~label.sk-toggleable__label-arrow:before {content: "▾";
|
153 |
+
}/* Pipeline/ColumnTransformer-specific style */#sk-container-id-5 div.sk-label input.sk-toggleable__control:checked~label.sk-toggleable__label {color: var(--sklearn-color-text);background-color: var(--sklearn-color-unfitted-level-2);
|
154 |
+
}#sk-container-id-5 div.sk-label.fitted input.sk-toggleable__control:checked~label.sk-toggleable__label {background-color: var(--sklearn-color-fitted-level-2);
|
155 |
}/* Estimator-specific style *//* Colorize estimator box */
|
156 |
+
#sk-container-id-5 div.sk-estimator input.sk-toggleable__control:checked~label.sk-toggleable__label {/* unfitted */background-color: var(--sklearn-color-unfitted-level-2);
|
157 |
+
}#sk-container-id-5 div.sk-estimator.fitted input.sk-toggleable__control:checked~label.sk-toggleable__label {/* fitted */background-color: var(--sklearn-color-fitted-level-2);
|
158 |
+
}#sk-container-id-5 div.sk-label label.sk-toggleable__label,
|
159 |
+
#sk-container-id-5 div.sk-label label {/* The background is the default theme color */color: var(--sklearn-color-text-on-default-background);
|
160 |
}/* On hover, darken the color of the background */
|
161 |
+
#sk-container-id-5 div.sk-label:hover label.sk-toggleable__label {color: var(--sklearn-color-text);background-color: var(--sklearn-color-unfitted-level-2);
|
162 |
}/* Label box, darken color on hover, fitted */
|
163 |
+
#sk-container-id-5 div.sk-label.fitted:hover label.sk-toggleable__label.fitted {color: var(--sklearn-color-text);background-color: var(--sklearn-color-fitted-level-2);
|
164 |
+
}/* Estimator label */#sk-container-id-5 div.sk-label label {font-family: monospace;font-weight: bold;display: inline-block;line-height: 1.2em;
|
165 |
+
}#sk-container-id-5 div.sk-label-container {text-align: center;
|
166 |
}/* Estimator-specific */
|
167 |
+
#sk-container-id-5 div.sk-estimator {font-family: monospace;border: 1px dotted var(--sklearn-color-border-box);border-radius: 0.25em;box-sizing: border-box;margin-bottom: 0.5em;/* unfitted */background-color: var(--sklearn-color-unfitted-level-0);
|
168 |
+
}#sk-container-id-5 div.sk-estimator.fitted {/* fitted */background-color: var(--sklearn-color-fitted-level-0);
|
169 |
}/* on hover */
|
170 |
+
#sk-container-id-5 div.sk-estimator:hover {/* unfitted */background-color: var(--sklearn-color-unfitted-level-2);
|
171 |
+
}#sk-container-id-5 div.sk-estimator.fitted:hover {/* fitted */background-color: var(--sklearn-color-fitted-level-2);
|
172 |
}/* Specification for estimator info (e.g. "i" and "?") *//* Common style for "i" and "?" */.sk-estimator-doc-link,
|
173 |
a:link.sk-estimator-doc-link,
|
174 |
a:visited.sk-estimator-doc-link {float: right;font-size: smaller;line-height: 1em;font-family: monospace;background-color: var(--sklearn-color-background);border-radius: 1em;height: 1em;width: 1em;text-decoration: none !important;margin-left: 1ex;/* unfitted */border: var(--sklearn-color-unfitted-level-1) 1pt solid;color: var(--sklearn-color-unfitted-level-1);
|
|
|
188 |
.sk-estimator-doc-link span {display: none;z-index: 9999;position: relative;font-weight: normal;right: .2ex;padding: .5ex;margin: .5ex;width: min-content;min-width: 20ex;max-width: 50ex;color: var(--sklearn-color-text);box-shadow: 2pt 2pt 4pt #999;/* unfitted */background: var(--sklearn-color-unfitted-level-0);border: .5pt solid var(--sklearn-color-unfitted-level-3);
|
189 |
}.sk-estimator-doc-link.fitted span {/* fitted */background: var(--sklearn-color-fitted-level-0);border: var(--sklearn-color-fitted-level-3);
|
190 |
}.sk-estimator-doc-link:hover span {display: block;
|
191 |
+
}/* "?"-specific style due to the `<a>` HTML tag */#sk-container-id-5 a.estimator_doc_link {float: right;font-size: 1rem;line-height: 1em;font-family: monospace;background-color: var(--sklearn-color-background);border-radius: 1rem;height: 1rem;width: 1rem;text-decoration: none;/* unfitted */color: var(--sklearn-color-unfitted-level-1);border: var(--sklearn-color-unfitted-level-1) 1pt solid;
|
192 |
+
}#sk-container-id-5 a.estimator_doc_link.fitted {/* fitted */border: var(--sklearn-color-fitted-level-1) 1pt solid;color: var(--sklearn-color-fitted-level-1);
|
193 |
}/* On hover */
|
194 |
+
#sk-container-id-5 a.estimator_doc_link:hover {/* unfitted */background-color: var(--sklearn-color-unfitted-level-3);color: var(--sklearn-color-background);text-decoration: none;
|
195 |
+
}#sk-container-id-5 a.estimator_doc_link.fitted:hover {/* fitted */background-color: var(--sklearn-color-fitted-level-3);
|
196 |
}
|
197 |
+
</style><div id="sk-container-id-5" class="sk-top-container" style="overflow: auto;"><div class="sk-text-repr-fallback"><pre>Pipeline(steps=[('scaler', MinMaxScaler()),('knn', KNeighborsClassifier(n_neighbors=15))])</pre><b>In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook. <br />On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.</b></div><div class="sk-container" hidden><div class="sk-item sk-dashed-wrapped"><div class="sk-label-container"><div class="sk-label fitted sk-toggleable"><input class="sk-toggleable__control sk-hidden--visually" id="sk-estimator-id-13" type="checkbox" ><label for="sk-estimator-id-13" class="sk-toggleable__label fitted sk-toggleable__label-arrow fitted"> Pipeline<a class="sk-estimator-doc-link fitted" rel="noreferrer" target="_blank" href="https://scikit-learn.org/1.5/modules/generated/sklearn.pipeline.Pipeline.html">?<span>Documentation for Pipeline</span></a><span class="sk-estimator-doc-link fitted">i<span>Fitted</span></span></label><div class="sk-toggleable__content fitted"><pre>Pipeline(steps=[('scaler', MinMaxScaler()),('knn', KNeighborsClassifier(n_neighbors=15))])</pre></div> </div></div><div class="sk-serial"><div class="sk-item"><div class="sk-estimator fitted sk-toggleable"><input class="sk-toggleable__control sk-hidden--visually" id="sk-estimator-id-14" type="checkbox" ><label for="sk-estimator-id-14" class="sk-toggleable__label fitted sk-toggleable__label-arrow fitted"> MinMaxScaler<a class="sk-estimator-doc-link fitted" rel="noreferrer" target="_blank" href="https://scikit-learn.org/1.5/modules/generated/sklearn.preprocessing.MinMaxScaler.html">?<span>Documentation for MinMaxScaler</span></a></label><div class="sk-toggleable__content fitted"><pre>MinMaxScaler()</pre></div> </div></div><div class="sk-item"><div class="sk-estimator fitted sk-toggleable"><input class="sk-toggleable__control sk-hidden--visually" id="sk-estimator-id-15" type="checkbox" ><label for="sk-estimator-id-15" class="sk-toggleable__label fitted sk-toggleable__label-arrow fitted"> KNeighborsClassifier<a class="sk-estimator-doc-link fitted" rel="noreferrer" target="_blank" href="https://scikit-learn.org/1.5/modules/generated/sklearn.neighbors.KNeighborsClassifier.html">?<span>Documentation for KNeighborsClassifier</span></a></label><div class="sk-toggleable__content fitted"><pre>KNeighborsClassifier(n_neighbors=15)</pre></div> </div></div></div></div></div></div>
|
198 |
|
199 |
## Evaluation Results
|
200 |
|
201 |
| Metric | Value |
|
202 |
|-----------|----------|
|
203 |
+
| accuracy | 0.854806 |
|
204 |
+
| f1 score | 0.740402 |
|
205 |
+
| precision | 0.795157 |
|
206 |
+
| recall | 0.692702 |
|
207 |
|
208 |
# How to Get Started with the Model
|
209 |
|
config.json
CHANGED
@@ -24,12 +24,12 @@
|
|
24 |
],
|
25 |
"example_input": {
|
26 |
"ASK_FOR_CONSENT_FLG": [
|
27 |
-
|
28 |
1,
|
29 |
1
|
30 |
],
|
31 |
"CONSENT_GIVEN_FLG": [
|
32 |
-
|
33 |
1,
|
34 |
1
|
35 |
],
|
@@ -39,23 +39,23 @@
|
|
39 |
0
|
40 |
],
|
41 |
"FRISKED_FLAG": [
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
],
|
46 |
"ISSUING_OFFICER_RANK": [
|
47 |
11,
|
48 |
-
|
49 |
9
|
50 |
],
|
51 |
"KNIFE_CUTTER_FLAG": [
|
52 |
-
|
53 |
0,
|
54 |
0
|
55 |
],
|
56 |
"OTHER_CONTRABAND_FLAG": [
|
57 |
0,
|
58 |
-
|
59 |
0
|
60 |
],
|
61 |
"OTHER_WEAPON_FLAG": [
|
@@ -66,47 +66,47 @@
|
|
66 |
"SEARCHED_FLAG": [
|
67 |
0,
|
68 |
0,
|
69 |
-
|
70 |
],
|
71 |
"STOP_LOCATION_PRECINCT": [
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
],
|
76 |
"SUPERVISING_OFFICER_RANK": [
|
77 |
12,
|
78 |
-
|
79 |
12
|
80 |
],
|
81 |
"SUSPECT_BODY_BUILD_TYPE": [
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
],
|
86 |
"SUSPECT_HEIGHT": [
|
87 |
6.0,
|
88 |
-
5.
|
89 |
-
|
90 |
],
|
91 |
"SUSPECT_RACE_DESCRIPTION": [
|
92 |
-
|
93 |
-
|
94 |
7
|
95 |
],
|
96 |
"SUSPECT_REPORTED_AGE": [
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
],
|
101 |
"SUSPECT_SEX": [
|
102 |
-
|
103 |
2,
|
104 |
2
|
105 |
],
|
106 |
"SUSPECT_WEIGHT": [
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
]
|
111 |
},
|
112 |
"model": {
|
|
|
24 |
],
|
25 |
"example_input": {
|
26 |
"ASK_FOR_CONSENT_FLG": [
|
27 |
+
1,
|
28 |
1,
|
29 |
1
|
30 |
],
|
31 |
"CONSENT_GIVEN_FLG": [
|
32 |
+
1,
|
33 |
1,
|
34 |
1
|
35 |
],
|
|
|
39 |
0
|
40 |
],
|
41 |
"FRISKED_FLAG": [
|
42 |
+
0,
|
43 |
+
0,
|
44 |
+
1
|
45 |
],
|
46 |
"ISSUING_OFFICER_RANK": [
|
47 |
11,
|
48 |
+
9,
|
49 |
9
|
50 |
],
|
51 |
"KNIFE_CUTTER_FLAG": [
|
52 |
+
0,
|
53 |
0,
|
54 |
0
|
55 |
],
|
56 |
"OTHER_CONTRABAND_FLAG": [
|
57 |
0,
|
58 |
+
0,
|
59 |
0
|
60 |
],
|
61 |
"OTHER_WEAPON_FLAG": [
|
|
|
66 |
"SEARCHED_FLAG": [
|
67 |
0,
|
68 |
0,
|
69 |
+
0
|
70 |
],
|
71 |
"STOP_LOCATION_PRECINCT": [
|
72 |
+
115,
|
73 |
+
83,
|
74 |
+
45
|
75 |
],
|
76 |
"SUPERVISING_OFFICER_RANK": [
|
77 |
12,
|
78 |
+
12,
|
79 |
12
|
80 |
],
|
81 |
"SUSPECT_BODY_BUILD_TYPE": [
|
82 |
+
3,
|
83 |
+
3,
|
84 |
+
2
|
85 |
],
|
86 |
"SUSPECT_HEIGHT": [
|
87 |
6.0,
|
88 |
+
5.7,
|
89 |
+
6.1
|
90 |
],
|
91 |
"SUSPECT_RACE_DESCRIPTION": [
|
92 |
+
5,
|
93 |
+
4,
|
94 |
7
|
95 |
],
|
96 |
"SUSPECT_REPORTED_AGE": [
|
97 |
+
26.0,
|
98 |
+
41.0,
|
99 |
+
27.757022471910112
|
100 |
],
|
101 |
"SUSPECT_SEX": [
|
102 |
+
2,
|
103 |
2,
|
104 |
2
|
105 |
],
|
106 |
"SUSPECT_WEIGHT": [
|
107 |
+
150.0,
|
108 |
+
150.0,
|
109 |
+
200.0
|
110 |
]
|
111 |
},
|
112 |
"model": {
|