aboutsummaryrefslogtreecommitdiffstats
path: root/Metrics/Metrics-Calculation/metrics_plot/model_evolve_comparison/src/representative_selector .ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Metrics/Metrics-Calculation/metrics_plot/model_evolve_comparison/src/representative_selector .ipynb')
-rw-r--r--Metrics/Metrics-Calculation/metrics_plot/model_evolve_comparison/src/representative_selector .ipynb80
1 files changed, 51 insertions, 29 deletions
diff --git a/Metrics/Metrics-Calculation/metrics_plot/model_evolve_comparison/src/representative_selector .ipynb b/Metrics/Metrics-Calculation/metrics_plot/model_evolve_comparison/src/representative_selector .ipynb
index 9653b2a0..78f408fc 100644
--- a/Metrics/Metrics-Calculation/metrics_plot/model_evolve_comparison/src/representative_selector .ipynb
+++ b/Metrics/Metrics-Calculation/metrics_plot/model_evolve_comparison/src/representative_selector .ipynb
@@ -63,16 +63,16 @@
63 }, 63 },
64 { 64 {
65 "cell_type": "code", 65 "cell_type": "code",
66 "execution_count": 4, 66 "execution_count": 3,
67 "metadata": {}, 67 "metadata": {},
68 "outputs": [ 68 "outputs": [
69 { 69 {
70 "data": { 70 "data": {
71 "text/plain": [ 71 "text/plain": [
72 "1253" 72 "304"
73 ] 73 ]
74 }, 74 },
75 "execution_count": 4, 75 "execution_count": 3,
76 "metadata": {}, 76 "metadata": {},
77 "output_type": "execute_result" 77 "output_type": "execute_result"
78 } 78 }
@@ -90,7 +90,7 @@
90 ")\n", 90 ")\n",
91 "\n", 91 "\n",
92 "\n", 92 "\n",
93 "humanFiles = reader.readmultiplefiles('../input/humanOutput/', 1300, False)\n", 93 "humanFiles = reader.readmultiplefiles('../input/human_output_100/', 1300, False)\n",
94 "modelToFileName = {}\n", 94 "modelToFileName = {}\n",
95 "for name in humanFiles:\n", 95 "for name in humanFiles:\n",
96 " modelToFileName[GraphStat(name)] = name\n", 96 " modelToFileName[GraphStat(name)] = name\n",
@@ -115,7 +115,7 @@
115 }, 115 },
116 { 116 {
117 "cell_type": "code", 117 "cell_type": "code",
118 "execution_count": 5, 118 "execution_count": 4,
119 "metadata": {}, 119 "metadata": {},
120 "outputs": [], 120 "outputs": [],
121 "source": [ 121 "source": [
@@ -144,21 +144,26 @@
144 "cell_type": "markdown", 144 "cell_type": "markdown",
145 "metadata": {}, 145 "metadata": {},
146 "source": [ 146 "source": [
147 "#### For all human models\n",
147 "* the rep found is ../input/humanOutput\\R_20158_run_1.csv\n", 148 "* the rep found is ../input/humanOutput\\R_20158_run_1.csv\n",
148 "* the average distance between it and others is 0.05515988287586802" 149 "* the average distance between it and others is 0.05515988287586802\n",
150 "\n",
151 "#### For human models with $100 \\pm 10$ nodes\n",
152 "* the rep found is ../input/human_output_100\\R_2015225_run_1.csv\n",
153 "* the average distance between it and others is $0.046150929558524685$"
149 ] 154 ]
150 }, 155 },
151 { 156 {
152 "cell_type": "code", 157 "cell_type": "code",
153 "execution_count": 6, 158 "execution_count": 5,
154 "metadata": {}, 159 "metadata": {},
155 "outputs": [ 160 "outputs": [
156 { 161 {
157 "name": "stdout", 162 "name": "stdout",
158 "output_type": "stream", 163 "output_type": "stream",
159 "text": [ 164 "text": [
160 "../input/humanOutput\\R_20158_run_1.csv\n", 165 "../input/human_output_100\\R_2015225_run_1.csv\n",
161 "../input/humanOutput\\R_20158_run_1.csv\n" 166 "../input/human_output_100\\R_2015225_run_1.csv\n"
162 ] 167 ]
163 } 168 }
164 ], 169 ],
@@ -171,14 +176,14 @@
171 }, 176 },
172 { 177 {
173 "cell_type": "code", 178 "cell_type": "code",
174 "execution_count": 19, 179 "execution_count": 6,
175 "metadata": {}, 180 "metadata": {},
176 "outputs": [ 181 "outputs": [
177 { 182 {
178 "name": "stdout", 183 "name": "stdout",
179 "output_type": "stream", 184 "output_type": "stream",
180 "text": [ 185 "text": [
181 "0.05515988287586802\n" 186 "0.046150929558524685\n"
182 ] 187 ]
183 } 188 }
184 ], 189 ],
@@ -201,41 +206,46 @@
201 "cell_type": "markdown", 206 "cell_type": "markdown",
202 "metadata": {}, 207 "metadata": {},
203 "source": [ 208 "source": [
209 "#### For all human models\n",
204 "* the rep found is ../input/humanOutput\\R_2016176_run_1.csv\n", 210 "* the rep found is ../input/humanOutput\\R_2016176_run_1.csv\n",
205 "* the average distance between it and others is 0.05275267434589047" 211 "* the average distance between it and others is 0.05275267434589047\n",
212 "\n",
213 "#### For human models with $100 \\pm 10$ nodes\n",
214 "* the rep found is ../input/human_output_100\\R_2017419_run_1.csv\n",
215 "* the average distance between it and others is $0.04679429311806747$"
206 ] 216 ]
207 }, 217 },
208 { 218 {
209 "cell_type": "code", 219 "cell_type": "code",
210 "execution_count": 7, 220 "execution_count": 13,
211 "metadata": {}, 221 "metadata": {},
212 "outputs": [ 222 "outputs": [
213 { 223 {
214 "name": "stdout", 224 "name": "stdout",
215 "output_type": "stream", 225 "output_type": "stream",
216 "text": [ 226 "text": [
217 "../input/humanOutput\\R_2016176_run_1.csv\n", 227 "../input/human_output_100\\R_2017419_run_1.csv\n",
218 "../input/humanOutput\\R_2016176_run_1.csv\n" 228 "../input/human_output_100\\R_2017419_run_1.csv\n"
219 ] 229 ]
220 } 230 }
221 ], 231 ],
222 "source": [ 232 "source": [
223 "total_distance = 0\n", 233 "na_rep_index = findRep(models, lambda m: m.na)\n",
224 "for model in models:\n", 234 "print(list(modelToFileName.values())[na_rep_index])\n",
225 " total_distance += ks_value(od_rep_model.mpc, model.mpc)\n", 235 "na_rep_model = models[na_rep_index]\n",
226 "print(total_distance / len(models))" 236 "print(modelToFileName[na_rep_model])\n"
227 ] 237 ]
228 }, 238 },
229 { 239 {
230 "cell_type": "code", 240 "cell_type": "code",
231 "execution_count": 18, 241 "execution_count": 14,
232 "metadata": {}, 242 "metadata": {},
233 "outputs": [ 243 "outputs": [
234 { 244 {
235 "name": "stdout", 245 "name": "stdout",
236 "output_type": "stream", 246 "output_type": "stream",
237 "text": [ 247 "text": [
238 "0.05275267434589047\n" 248 "0.04679429311806747\n"
239 ] 249 ]
240 } 250 }
241 ], 251 ],
@@ -243,7 +253,7 @@
243 "total_distance = 0\n", 253 "total_distance = 0\n",
244 "count = 0\n", 254 "count = 0\n",
245 "for model in models:\n", 255 "for model in models:\n",
246 " total_distance += ks_value(od_rep_model.na, model.na)\n", 256 " total_distance += ks_value(na_rep_model.na, model.na)\n",
247 "print(total_distance / len(models))" 257 "print(total_distance / len(models))"
248 ] 258 ]
249 }, 259 },
@@ -258,21 +268,26 @@
258 "cell_type": "markdown", 268 "cell_type": "markdown",
259 "metadata": {}, 269 "metadata": {},
260 "source": [ 270 "source": [
271 "#### For all human models\n",
261 "* the rep found is ../input/humanOutput\\R_2015246_run_1.csv\n", 272 "* the rep found is ../input/humanOutput\\R_2015246_run_1.csv\n",
262 "* the average distance between it and others is 0.08556632702185384" 273 "* the average distance between it and others is 0.08556632702185384\n",
274 "\n",
275 "#### For human models with $100 \\pm 10$ nodes\n",
276 "* the rep found is ../input/human_output_100\\R_2016324_run_1.csv\n",
277 "* the average distance between it and others is $0.07028909225833631$"
263 ] 278 ]
264 }, 279 },
265 { 280 {
266 "cell_type": "code", 281 "cell_type": "code",
267 "execution_count": 8, 282 "execution_count": 16,
268 "metadata": {}, 283 "metadata": {},
269 "outputs": [ 284 "outputs": [
270 { 285 {
271 "name": "stdout", 286 "name": "stdout",
272 "output_type": "stream", 287 "output_type": "stream",
273 "text": [ 288 "text": [
274 "../input/humanOutput\\R_2015246_run_1.csv\n", 289 "../input/human_output_100\\R_2016324_run_1.csv\n",
275 "../input/humanOutput\\R_2015246_run_1.csv\n" 290 "../input/human_output_100\\R_2016324_run_1.csv\n"
276 ] 291 ]
277 } 292 }
278 ], 293 ],
@@ -285,14 +300,14 @@
285 }, 300 },
286 { 301 {
287 "cell_type": "code", 302 "cell_type": "code",
288 "execution_count": 20, 303 "execution_count": 18,
289 "metadata": {}, 304 "metadata": {},
290 "outputs": [ 305 "outputs": [
291 { 306 {
292 "name": "stdout", 307 "name": "stdout",
293 "output_type": "stream", 308 "output_type": "stream",
294 "text": [ 309 "text": [
295 "0.08556632702185384\n" 310 "0.07028909225833631\n"
296 ] 311 ]
297 } 312 }
298 ], 313 ],
@@ -300,7 +315,7 @@
300 "total_distance = 0\n", 315 "total_distance = 0\n",
301 "count = 0\n", 316 "count = 0\n",
302 "for model in models:\n", 317 "for model in models:\n",
303 " total_distance += ks_value(od_rep_model.mpc, model.mpc)\n", 318 " total_distance += ks_value(mpc_rep_model.mpc, model.mpc)\n",
304 "print(total_distance / len(models))" 319 "print(total_distance / len(models))"
305 ] 320 ]
306 }, 321 },
@@ -310,6 +325,13 @@
310 "metadata": {}, 325 "metadata": {},
311 "outputs": [], 326 "outputs": [],
312 "source": [] 327 "source": []
328 },
329 {
330 "cell_type": "code",
331 "execution_count": null,
332 "metadata": {},
333 "outputs": [],
334 "source": []
313 } 335 }
314 ], 336 ],
315 "metadata": { 337 "metadata": {