|
32 | 32 | to cluster-by-variable |
33 | 33 | setup |
34 | 34 |
|
35 | | - ; Cluster agents by variable "wealth", with at least 3 members to constitute a cluster, and a maximum value difference of 3 |
36 | | - let clusters dbscan:cluster-by-variable agents "wealth" 3 3 |
| 35 | + ; Cluster agents by variable "wealth", with at least *minimum-number-of-members* members to constitute a cluster, and a maximum value difference of *maximum-distance* |
| 36 | + let clusters dbscan:cluster-by-variable agents "wealth" minimum-number-of-members maximum-distance |
37 | 37 |
|
38 | 38 | ; Show number of clusters |
39 | 39 | output-print (word "Number of clusters: " (length clusters)) |
|
58 | 58 | to cluster-by-location |
59 | 59 | setup |
60 | 60 |
|
61 | | - ; Cluster agents by location, with at least 3 members to constitute a cluster, and a maximum distance of 3 |
62 | | - let clusters dbscan:cluster-by-location agents 3 3 |
| 61 | + ; Cluster agents by location, with at least *minimum-number-of-members* members to constitute a cluster, and a maximum distance of *maximum-distance* |
| 62 | + let clusters dbscan:cluster-by-location agents minimum-number-of-members maximum-distance |
63 | 63 |
|
64 | 64 | ; Show number of clusters |
65 | 65 | output-print (word "Number of clusters: " (length clusters)) |
@@ -90,7 +90,7 @@ GRAPHICS-WINDOW |
90 | 90 | 12 |
91 | 91 | 13.0 |
92 | 92 | 1 |
93 | | -8 |
| 93 | +9 |
94 | 94 | 1 |
95 | 95 | 1 |
96 | 96 | 1 |
@@ -149,42 +149,58 @@ NIL |
149 | 149 | NIL |
150 | 150 | 1 |
151 | 151 |
|
| 152 | +SLIDER |
| 153 | +185 |
| 154 | +12 |
| 155 | +357 |
| 156 | +45 |
| 157 | +maximum-distance |
| 158 | +maximum-distance |
| 159 | +0 |
| 160 | +20 |
| 161 | +3 |
| 162 | +1 |
| 163 | +1 |
| 164 | +NIL |
| 165 | +HORIZONTAL |
| 166 | + |
| 167 | +SLIDER |
| 168 | +185 |
| 169 | +54 |
| 170 | +397 |
| 171 | +87 |
| 172 | +minimum-number-of-members |
| 173 | +minimum-number-of-members |
| 174 | +0 |
| 175 | +20 |
| 176 | +3 |
| 177 | +1 |
| 178 | +1 |
| 179 | +NIL |
| 180 | +HORIZONTAL |
| 181 | + |
152 | 182 | @#$#@#$#@ |
153 | 183 | ## WHAT IS IT? |
154 | 184 |
|
155 | | -(a general understanding of what the model is trying to show or explain) |
| 185 | +This model demontrates the use of the DBSCAN extension. It highlights both clustering by variable as well as location. |
156 | 186 |
|
157 | 187 | ## HOW IT WORKS |
158 | 188 |
|
159 | | -(what rules the agents use to create the overall behavior of the model) |
160 | | - |
161 | | -## HOW TO USE IT |
| 189 | +For variable-based clustering, individuals are clustered based on the value difference of their wealth levels. |
162 | 190 |
|
163 | | -(how to use the model, including a description of each of the items in the Interface tab) |
| 191 | +For location-based clustering, individuals are clustered based on their proximity. |
164 | 192 |
|
165 | | -## THINGS TO NOTICE |
| 193 | +## HOW TO USE IT |
166 | 194 |
|
167 | | -(suggested things for the user to notice while running the model) |
| 195 | +Click either button and observe how the clustering works both for variable-based clustering and location-based clustering. |
168 | 196 |
|
169 | 197 | ## THINGS TO TRY |
170 | 198 |
|
171 | | -(suggested things for the user to try to do (move sliders, switches, etc.) with the model) |
172 | | - |
173 | | -## EXTENDING THE MODEL |
174 | | - |
175 | | -(suggested things to add or change in the Code tab to make the model more complicated, detailed, accurate, etc.) |
| 199 | +Try varying the permissive distance (i.e. wealth difference levels for variable-based clustering, and spatial distance for location-based clustering) as well as the number of members required to form a cluster. |
176 | 200 |
|
177 | 201 | ## NETLOGO FEATURES |
178 | 202 |
|
179 | | -(interesting or unusual features of NetLogo that the model uses, particularly in the Code tab; or where workarounds were needed for missing features) |
180 | | - |
181 | | -## RELATED MODELS |
182 | | - |
183 | | -(models in the NetLogo Models Library and elsewhere which are of related interest) |
184 | | - |
185 | | -## CREDITS AND REFERENCES |
186 | | - |
187 | | -(a reference to the model's URL on the web if it has one, as well as any other necessary credits, citations, and links) |
| 203 | +Note that this model relies on the DBSCAN extension found under https://github.com/chrfrantz/NetLogo-Extension-DBSCAN/ |
188 | 204 | @#$#@#$#@ |
189 | 205 | default |
190 | 206 | true |
|
0 commit comments