aboutsummaryrefslogtreecommitdiffstats
path: root/Metrics/Metrics-Calculation/metrics_plot/model_evolve_comparison/src/metrics_distance_with_selector.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Metrics/Metrics-Calculation/metrics_plot/model_evolve_comparison/src/metrics_distance_with_selector.ipynb')
-rw-r--r--Metrics/Metrics-Calculation/metrics_plot/model_evolve_comparison/src/metrics_distance_with_selector.ipynb1600
1 files changed, 1600 insertions, 0 deletions
diff --git a/Metrics/Metrics-Calculation/metrics_plot/model_evolve_comparison/src/metrics_distance_with_selector.ipynb b/Metrics/Metrics-Calculation/metrics_plot/model_evolve_comparison/src/metrics_distance_with_selector.ipynb
new file mode 100644
index 00000000..000822bf
--- /dev/null
+++ b/Metrics/Metrics-Calculation/metrics_plot/model_evolve_comparison/src/metrics_distance_with_selector.ipynb
@@ -0,0 +1,1600 @@
1{
2 "cells": [
3 {
4 "cell_type": "markdown",
5 "metadata": {},
6 "source": [
7 "# Measuremments with Representative"
8 ]
9 },
10 {
11 "cell_type": "markdown",
12 "metadata": {},
13 "source": [
14 "### Imports"
15 ]
16 },
17 {
18 "cell_type": "code",
19 "execution_count": 1,
20 "metadata": {},
21 "outputs": [],
22 "source": [
23 "import os, sys\n",
24 "lib_path = os.path.abspath(os.path.join('..', '..', 'utils'))\n",
25 "sys.path.append(lib_path)\n",
26 "from GraphType import GraphStat\n",
27 "from GraphType import GraphCollection\n",
28 "from scipy import stats\n",
29 "from ipywidgets import interact, fixed, interactive\n",
30 "import readCSV as reader\n",
31 "import ipywidgets as widgets\n",
32 "import matplotlib.pyplot as plt\n",
33 "import random\n",
34 "import numpy as np\n",
35 "import constants\n"
36 ]
37 },
38 {
39 "cell_type": "markdown",
40 "metadata": {},
41 "source": [
42 "### Classes"
43 ]
44 },
45 {
46 "cell_type": "markdown",
47 "metadata": {},
48 "source": [
49 "* Record the distances of different metrics using a representative"
50 ]
51 },
52 {
53 "cell_type": "code",
54 "execution_count": 2,
55 "metadata": {},
56 "outputs": [],
57 "source": [
58 "class GraphDistanceWithRep:\n",
59 " #init with a graph stat and a collection of graph stats\n",
60 " def __init__(self, graphStat, rep):\n",
61 " self.graph = graphStat\n",
62 " self.rep = rep\n",
63 " self.out_d_distance, _ = stats.ks_2samp(graphStat.out_d, rep.out_d)\n",
64 " self.na_distance,_ = stats.ks_2samp(graphStat.na, rep.na)\n",
65 " self.mpc_distance,_ = stats.ks_2samp(graphStat.mpc, rep.mpc)\n"
66 ]
67 },
68 {
69 "cell_type": "markdown",
70 "metadata": {},
71 "source": [
72 "### Methods\n"
73 ]
74 },
75 {
76 "cell_type": "markdown",
77 "metadata": {},
78 "source": [
79 "* Find the median ks distance of the same number of nodes"
80 ]
81 },
82 {
83 "cell_type": "code",
84 "execution_count": 3,
85 "metadata": {},
86 "outputs": [],
87 "source": [
88 "def find_median(x, metric_distances):\n",
89 " distance_dic = {}\n",
90 " for index, num_of_nodes in enumerate(x):\n",
91 " if num_of_nodes[0] not in distance_dic:\n",
92 " distance_dic[num_of_nodes[0]] = []\n",
93 " distance_dic[num_of_nodes[0]].append(metric_distances[index])\n",
94 " median_x = []\n",
95 " y = []\n",
96 " for num_of_nodes, distances in distance_dic.items():\n",
97 " median_x.append(num_of_nodes)\n",
98 " y.append(np.median(distances))\n",
99 " order = np.argsort(median_x)\n",
100 " median_x = np.array(median_x)[order]\n",
101 " median_y = np.array(y)[order]\n",
102 " return median_x, median_y\n"
103 ]
104 },
105 {
106 "cell_type": "markdown",
107 "metadata": {},
108 "source": [
109 "* Plot Diagram"
110 ]
111 },
112 {
113 "cell_type": "code",
114 "execution_count": 4,
115 "metadata": {},
116 "outputs": [],
117 "source": [
118 "# metric_selector: GraphDistance -> float\n",
119 "def plot(infos, lines, id, metric_selector,colors, title, foldername):\n",
120 " metric_distances = retrive_info_from_list(metric_selector, list(infos.values()))\n",
121 " x = retrive_info_from_list(lambda a : a.graph.num_nodes, list(infos.values()))\n",
122 " graph = plt.figure(id,figsize=(18, 10))\n",
123 " plt.title(title)\n",
124 " plt.plot(x, metric_distances, color='red', linestyle='', marker='o',alpha=0.7)\n",
125 " #plot ks distance median\n",
126 " median_x, median_y = find_median(x, metric_distances)\n",
127 " plt.plot(median_x, median_y, color='black',marker='o')\n",
128 " for i in range(0, len(lines)):\n",
129 " line_infos = retrive_info_from_list(lambda a: infos[a], lines[i])\n",
130 " line_y = retrive_info_from_list(metric_selector, line_infos)\n",
131 " line_x = retrive_info_from_list(lambda a : a.graph.num_nodes, line_infos)\n",
132 " plt.plot(line_x, line_y, marker='o', color=colors[i])\n",
133 " mkdir_p(foldername)\n",
134 " plt.savefig(fname = foldername+title+'.jpg', dpi=150)\n",
135 " #graph.show()"
136 ]
137 },
138 {
139 "cell_type": "markdown",
140 "metadata": {},
141 "source": [
142 "* Retrieve information from a list "
143 ]
144 },
145 {
146 "cell_type": "code",
147 "execution_count": 5,
148 "metadata": {},
149 "outputs": [],
150 "source": [
151 "def retrive_info_from_list(selector, distances):\n",
152 " return list(map(selector, distances))"
153 ]
154 },
155 {
156 "cell_type": "code",
157 "execution_count": 6,
158 "metadata": {},
159 "outputs": [],
160 "source": [
161 "def readStats(path, numModels):\n",
162 " names = reader.readmultiplefiles(path, numModels, False)\n",
163 " stats = []\n",
164 " for name in names:\n",
165 " stats.append(GraphStat(name))\n",
166 " return stats"
167 ]
168 },
169 {
170 "cell_type": "code",
171 "execution_count": 7,
172 "metadata": {},
173 "outputs": [],
174 "source": [
175 "def calDistanceDic(stats, rep):\n",
176 " dic = {}\n",
177 " for info in stats:\n",
178 " info = GraphDistanceWithRep(info, rep)\n",
179 " dic[info.graph.id] = info\n",
180 " return dic"
181 ]
182 },
183 {
184 "cell_type": "code",
185 "execution_count": 8,
186 "metadata": {},
187 "outputs": [],
188 "source": [
189 "def createRandomColors(size):\n",
190 " #generate random color for each line\n",
191 " colors = []\n",
192 "\n",
193 " for i in range(0, size):\n",
194 " color = \"#%06x\" % random.randint(0, 0xFFFFFF)\n",
195 " colors.append(color)\n",
196 " return colors"
197 ]
198 },
199 {
200 "cell_type": "code",
201 "execution_count": 9,
202 "metadata": {},
203 "outputs": [],
204 "source": [
205 "def createSelectionWidge(options):\n",
206 " w = widgets.SelectMultiple(\n",
207 " options = options,\n",
208 " value = [],\n",
209 " description='Trajectory:',\n",
210 " disabled=False,\n",
211 " )\n",
212 " return w"
213 ]
214 },
215 {
216 "cell_type": "code",
217 "execution_count": 10,
218 "metadata": {},
219 "outputs": [],
220 "source": [
221 "def mkdir_p(mypath):\n",
222 " '''Creates a directory. equivalent to using mkdir -p on the command line'''\n",
223 "\n",
224 " from errno import EEXIST\n",
225 " from os import makedirs,path\n",
226 "\n",
227 " try:\n",
228 " makedirs(mypath)\n",
229 " except OSError as exc: # Python >2.5\n",
230 " if exc.errno == EEXIST and path.isdir(mypath):\n",
231 " pass\n",
232 " else: raise"
233 ]
234 },
235 {
236 "cell_type": "markdown",
237 "metadata": {},
238 "source": [
239 "## Metrics During GenerationPlots"
240 ]
241 },
242 {
243 "cell_type": "markdown",
244 "metadata": {},
245 "source": [
246 "### Read Human Representatives"
247 ]
248 },
249 {
250 "cell_type": "code",
251 "execution_count": 11,
252 "metadata": {},
253 "outputs": [],
254 "source": [
255 "### Read Models\n",
256 "#read representative\n",
257 "human_rep = GraphStat(constants.HUMAN_OUT_D_REP)\n",
258 "human_na = GraphStat(constants.HUMAN_NA_REP)\n",
259 "human_mpc = GraphStat(constants.HUMAN_MPC_REP)\n",
260 "\n",
261 "# assign rep distributions to human_rep\n",
262 "human_rep.na = human_na.na\n",
263 "human_rep.mpc = human_mpc.mpc"
264 ]
265 },
266 {
267 "cell_type": "markdown",
268 "metadata": {},
269 "source": [
270 "## Viatra No Constraint"
271 ]
272 },
273 {
274 "cell_type": "code",
275 "execution_count": 12,
276 "metadata": {},
277 "outputs": [],
278 "source": [
279 "# Read generated models\n",
280 "viatra_no_con_stats = readStats('../input/viatra_nocon_output/', 5000)\n",
281 "viatra_no_con_dic = calDistanceDic(viatra_no_con_stats, human_rep)"
282 ]
283 },
284 {
285 "cell_type": "code",
286 "execution_count": 13,
287 "metadata": {},
288 "outputs": [],
289 "source": [
290 "filenames = reader.readmultiplefiles('../input/viatra_nocon_output/trajectories/', 15, False)\n",
291 "trajectories = {}\n",
292 "for name in filenames:\n",
293 " trajectories[name] = reader.readTrajectory(name)\n",
294 "w = createSelectionWidge(trajectories)\n",
295 "colors = createRandomColors(len(trajectories))"
296 ]
297 },
298 {
299 "cell_type": "code",
300 "execution_count": 14,
301 "metadata": {},
302 "outputs": [
303 {
304 "data": {
305 "application/vnd.jupyter.widget-view+json": {
306 "model_id": "a8471e4dd66a47ecb6abb2371be43321",
307 "version_major": 2,
308 "version_minor": 0
309 },
310 "text/plain": [
311 "interactive(children=(SelectMultiple(description='Trajectory:', options={'../input/viatra_nocon_output/traject…"
312 ]
313 },
314 "metadata": {},
315 "output_type": "display_data"
316 },
317 {
318 "data": {
319 "text/plain": [
320 "<function __main__.plot_out_degree(lines)>"
321 ]
322 },
323 "execution_count": 14,
324 "metadata": {},
325 "output_type": "execute_result"
326 }
327 ],
328 "source": [
329 "def plot_out_degree(lines):\n",
330 " plot(viatra_no_con_dic, lines, 0, lambda a: a.out_d_distance, colors, 'out degree', '../output/viatra_no_constraints/')\n",
331 "interact(plot_out_degree, lines=w)"
332 ]
333 },
334 {
335 "cell_type": "code",
336 "execution_count": 15,
337 "metadata": {},
338 "outputs": [
339 {
340 "data": {
341 "application/vnd.jupyter.widget-view+json": {
342 "model_id": "ad6e466cc3fe44d393d2c82d48244d83",
343 "version_major": 2,
344 "version_minor": 0
345 },
346 "text/plain": [
347 "interactive(children=(SelectMultiple(description='Trajectory:', options={'../input/viatra_nocon_output/traject…"
348 ]
349 },
350 "metadata": {},
351 "output_type": "display_data"
352 },
353 {
354 "data": {
355 "text/plain": [
356 "<function __main__.plot_out_na(lines)>"
357 ]
358 },
359 "execution_count": 15,
360 "metadata": {},
361 "output_type": "execute_result"
362 }
363 ],
364 "source": [
365 "def plot_out_na(lines):\n",
366 " plot(viatra_no_con_dic, lines, 0, lambda a: a.na_distance, colors, 'node activity', '../output/viatra_no_constraints/')\n",
367 "interact(plot_out_na, lines=w)"
368 ]
369 },
370 {
371 "cell_type": "code",
372 "execution_count": 16,
373 "metadata": {},
374 "outputs": [
375 {
376 "data": {
377 "application/vnd.jupyter.widget-view+json": {
378 "model_id": "d88ebc8e4062473a96ac35fe800028ef",
379 "version_major": 2,
380 "version_minor": 0
381 },
382 "text/plain": [
383 "interactive(children=(SelectMultiple(description='Trajectory:', options={'../input/viatra_nocon_output/traject…"
384 ]
385 },
386 "metadata": {},
387 "output_type": "display_data"
388 },
389 {
390 "data": {
391 "text/plain": [
392 "<function __main__.plot_out_mpc(lines)>"
393 ]
394 },
395 "execution_count": 16,
396 "metadata": {},
397 "output_type": "execute_result"
398 }
399 ],
400 "source": [
401 "def plot_out_mpc(lines):\n",
402 " plot(viatra_no_con_dic, lines, 0, lambda a: a.mpc_distance, colors, 'MPC', '../output/viatra_no_constraints/')\n",
403 "interact(plot_out_mpc, lines=w)"
404 ]
405 },
406 {
407 "cell_type": "markdown",
408 "metadata": {},
409 "source": [
410 "## Viatra with constraints"
411 ]
412 },
413 {
414 "cell_type": "code",
415 "execution_count": 17,
416 "metadata": {},
417 "outputs": [],
418 "source": [
419 "viatra_con_stats = readStats('../input/viatra_con_output/',5000)\n",
420 "viatra_con_dic = calDistanceDic(viatra_con_stats, human_rep)\n",
421 "\n",
422 "# trajectories and colors\n",
423 "trajectories = {}\n",
424 "w = createSelectionWidge(trajectories)\n",
425 "colors = createRandomColors(len(trajectories))"
426 ]
427 },
428 {
429 "cell_type": "code",
430 "execution_count": 18,
431 "metadata": {},
432 "outputs": [
433 {
434 "data": {
435 "application/vnd.jupyter.widget-view+json": {
436 "model_id": "1eb2ba5848a048389bca8d804fc8340a",
437 "version_major": 2,
438 "version_minor": 0
439 },
440 "text/plain": [
441 "interactive(children=(Dropdown(description='lines', options=([],), value=[]), Output()), _dom_classes=('widget…"
442 ]
443 },
444 "metadata": {},
445 "output_type": "display_data"
446 },
447 {
448 "data": {
449 "text/plain": [
450 "<function __main__.plot_out_degree(lines)>"
451 ]
452 },
453 "execution_count": 18,
454 "metadata": {},
455 "output_type": "execute_result"
456 }
457 ],
458 "source": [
459 "def plot_out_degree(lines):\n",
460 " plot(viatra_con_dic, lines, 0, lambda a: a.out_d_distance, colors, 'out degree', '../output/viatra_constraints/')\n",
461 "interact(plot_out_degree, lines=[[]])"
462 ]
463 },
464 {
465 "cell_type": "code",
466 "execution_count": 19,
467 "metadata": {},
468 "outputs": [
469 {
470 "data": {
471 "application/vnd.jupyter.widget-view+json": {
472 "model_id": "6e5840f7a5ad4515bce9080088b644f2",
473 "version_major": 2,
474 "version_minor": 0
475 },
476 "text/plain": [
477 "interactive(children=(Dropdown(description='lines', options=([],), value=[]), Output()), _dom_classes=('widget…"
478 ]
479 },
480 "metadata": {},
481 "output_type": "display_data"
482 },
483 {
484 "data": {
485 "text/plain": [
486 "<function __main__.plot_na(lines)>"
487 ]
488 },
489 "execution_count": 19,
490 "metadata": {},
491 "output_type": "execute_result"
492 }
493 ],
494 "source": [
495 "def plot_na(lines):\n",
496 " plot(viatra_con_dic, lines, 0, lambda a: a.na_distance, colors, 'node activity', '../output/viatra_constraints/')\n",
497 "interact(plot_na, lines=[[]])"
498 ]
499 },
500 {
501 "cell_type": "code",
502 "execution_count": 20,
503 "metadata": {},
504 "outputs": [
505 {
506 "data": {
507 "application/vnd.jupyter.widget-view+json": {
508 "model_id": "9e30f267b092491ba1ffe8f83c5f68ce",
509 "version_major": 2,
510 "version_minor": 0
511 },
512 "text/plain": [
513 "interactive(children=(Dropdown(description='lines', options=([],), value=[]), Output()), _dom_classes=('widget…"
514 ]
515 },
516 "metadata": {},
517 "output_type": "display_data"
518 },
519 {
520 "data": {
521 "text/plain": [
522 "<function __main__.plot_mpc(lines)>"
523 ]
524 },
525 "execution_count": 20,
526 "metadata": {},
527 "output_type": "execute_result"
528 }
529 ],
530 "source": [
531 "def plot_mpc(lines):\n",
532 " plot(viatra_con_dic, lines, 0, lambda a: a.mpc_distance, colors, 'MPC', '../output/viatra_constraints/')\n",
533 "interact(plot_mpc, lines=[[]])"
534 ]
535 },
536 {
537 "cell_type": "markdown",
538 "metadata": {},
539 "source": [
540 "## Controlled RandomEMF"
541 ]
542 },
543 {
544 "cell_type": "code",
545 "execution_count": 21,
546 "metadata": {},
547 "outputs": [],
548 "source": [
549 "random_emf_stats = readStats('../input/random_emf_output/',5000)\n",
550 "random_emf_dic = calDistanceDic(random_emf_stats, human_rep)\n",
551 "\n",
552 "# trajectories and colors\n",
553 "trajectories = {}\n",
554 "w = createSelectionWidge(trajectories)\n",
555 "colors = createRandomColors(len(trajectories))"
556 ]
557 },
558 {
559 "cell_type": "code",
560 "execution_count": 22,
561 "metadata": {},
562 "outputs": [
563 {
564 "data": {
565 "application/vnd.jupyter.widget-view+json": {
566 "model_id": "cc1f64c92e814c32a81cd5ec5d4e50dc",
567 "version_major": 2,
568 "version_minor": 0
569 },
570 "text/plain": [
571 "interactive(children=(Dropdown(description='lines', options=([],), value=[]), Output()), _dom_classes=('widget…"
572 ]
573 },
574 "metadata": {},
575 "output_type": "display_data"
576 },
577 {
578 "data": {
579 "text/plain": [
580 "<function __main__.plot_out_degree(lines)>"
581 ]
582 },
583 "execution_count": 22,
584 "metadata": {},
585 "output_type": "execute_result"
586 }
587 ],
588 "source": [
589 "def plot_out_degree(lines):\n",
590 " plot(random_emf_dic, lines, 0, lambda a: a.out_d_distance, colors, 'out degree', '../output/random_emf/')\n",
591 "interact(plot_out_degree, lines=[[]])"
592 ]
593 },
594 {
595 "cell_type": "code",
596 "execution_count": 23,
597 "metadata": {},
598 "outputs": [
599 {
600 "data": {
601 "application/vnd.jupyter.widget-view+json": {
602 "model_id": "75021f4f68db4a809ce7c86c0d25ef1b",
603 "version_major": 2,
604 "version_minor": 0
605 },
606 "text/plain": [
607 "interactive(children=(Dropdown(description='lines', options=([],), value=[]), Output()), _dom_classes=('widget…"
608 ]
609 },
610 "metadata": {},
611 "output_type": "display_data"
612 },
613 {
614 "data": {
615 "text/plain": [
616 "<function __main__.plot_node_activity(lines)>"
617 ]
618 },
619 "execution_count": 23,
620 "metadata": {},
621 "output_type": "execute_result"
622 }
623 ],
624 "source": [
625 "def plot_node_activity(lines):\n",
626 " plot(random_emf_dic, lines, 0, lambda a: a.na_distance, colors, 'node activity', '../output/random_emf/')\n",
627 "interact(plot_node_activity, lines=[[]])"
628 ]
629 },
630 {
631 "cell_type": "code",
632 "execution_count": 24,
633 "metadata": {},
634 "outputs": [
635 {
636 "data": {
637 "application/vnd.jupyter.widget-view+json": {
638 "model_id": "86f5c376905a4759a7b44ad52804424d",
639 "version_major": 2,
640 "version_minor": 0
641 },
642 "text/plain": [
643 "interactive(children=(Dropdown(description='lines', options=([],), value=[]), Output()), _dom_classes=('widget…"
644 ]
645 },
646 "metadata": {},
647 "output_type": "display_data"
648 },
649 {
650 "data": {
651 "text/plain": [
652 "<function __main__.plot_mpc(lines)>"
653 ]
654 },
655 "execution_count": 24,
656 "metadata": {},
657 "output_type": "execute_result"
658 }
659 ],
660 "source": [
661 "def plot_mpc(lines):\n",
662 " plot(random_emf_dic, lines, 0, lambda a: a.mpc_distance, colors, 'mpc', '../output/random_emf/')\n",
663 "interact(plot_mpc, lines=[[]])"
664 ]
665 },
666 {
667 "cell_type": "markdown",
668 "metadata": {},
669 "source": [
670 "## Controlled Viatra with MPC"
671 ]
672 },
673 {
674 "cell_type": "code",
675 "execution_count": 25,
676 "metadata": {},
677 "outputs": [],
678 "source": [
679 "con_viatra_stats = readStats('../input/controled_viatra_mpc/',5000)\n",
680 "con_viatra_dic = calDistanceDic(con_viatra_stats, human_rep)\n",
681 "\n",
682 "# trajectories and colors\n",
683 "trajectories = {}\n",
684 "w = createSelectionWidge(trajectories)\n",
685 "colors = createRandomColors(len(trajectories))"
686 ]
687 },
688 {
689 "cell_type": "code",
690 "execution_count": 26,
691 "metadata": {},
692 "outputs": [
693 {
694 "data": {
695 "application/vnd.jupyter.widget-view+json": {
696 "model_id": "57ba4d8443c145ad845fb862e3ef7519",
697 "version_major": 2,
698 "version_minor": 0
699 },
700 "text/plain": [
701 "interactive(children=(SelectMultiple(description='Trajectory:', options={}, value=()), Output()), _dom_classes…"
702 ]
703 },
704 "metadata": {},
705 "output_type": "display_data"
706 },
707 {
708 "data": {
709 "text/plain": [
710 "<function __main__.plot_out_degree(lines)>"
711 ]
712 },
713 "execution_count": 26,
714 "metadata": {},
715 "output_type": "execute_result"
716 }
717 ],
718 "source": [
719 "def plot_out_degree(lines):\n",
720 " plot(con_viatra_dic, lines, 0, lambda a: a.out_d_distance, colors, 'out_degree', '../output/controled_viatra_with_mpc/')\n",
721 "interact(plot_out_degree, lines=w)"
722 ]
723 },
724 {
725 "cell_type": "code",
726 "execution_count": 27,
727 "metadata": {},
728 "outputs": [
729 {
730 "data": {
731 "application/vnd.jupyter.widget-view+json": {
732 "model_id": "c020ecb466c14f3ca1bfc0fd2fe03b7b",
733 "version_major": 2,
734 "version_minor": 0
735 },
736 "text/plain": [
737 "interactive(children=(SelectMultiple(description='Trajectory:', options={}, value=()), Output()), _dom_classes…"
738 ]
739 },
740 "metadata": {},
741 "output_type": "display_data"
742 },
743 {
744 "data": {
745 "text/plain": [
746 "<function __main__.plot_na(lines)>"
747 ]
748 },
749 "execution_count": 27,
750 "metadata": {},
751 "output_type": "execute_result"
752 }
753 ],
754 "source": [
755 "def plot_na(lines):\n",
756 " plot(con_viatra_dic, lines, 0, lambda a: a.na_distance, colors, 'Node Activity', '../output/controled_viatra_with_mpc/')\n",
757 "interact(plot_na, lines=w)"
758 ]
759 },
760 {
761 "cell_type": "code",
762 "execution_count": 28,
763 "metadata": {},
764 "outputs": [
765 {
766 "data": {
767 "application/vnd.jupyter.widget-view+json": {
768 "model_id": "2165668057fd47ad92459e749ec68bad",
769 "version_major": 2,
770 "version_minor": 0
771 },
772 "text/plain": [
773 "interactive(children=(SelectMultiple(description='Trajectory:', options={}, value=()), Output()), _dom_classes…"
774 ]
775 },
776 "metadata": {},
777 "output_type": "display_data"
778 },
779 {
780 "data": {
781 "text/plain": [
782 "<function __main__.plot_mpc(lines)>"
783 ]
784 },
785 "execution_count": 28,
786 "metadata": {},
787 "output_type": "execute_result"
788 }
789 ],
790 "source": [
791 "def plot_mpc(lines):\n",
792 " plot(con_viatra_dic, lines, 0, lambda a: a.mpc_distance, colors, 'mpc', '../output/controled_viatra_with_mpc/')\n",
793 "interact(plot_mpc, lines=w)"
794 ]
795 },
796 {
797 "cell_type": "markdown",
798 "metadata": {},
799 "source": [
800 "## (Pseudo) Random EMF instantiator"
801 ]
802 },
803 {
804 "cell_type": "code",
805 "execution_count": 29,
806 "metadata": {},
807 "outputs": [],
808 "source": [
809 "random_emf_stats = readStats('../input/real_random_output/',5000)\n",
810 "random_emf_dic = calDistanceDic(random_emf_stats, human_rep)\n",
811 "\n",
812 "# trajectories and colors\n",
813 "trajectories = {}\n",
814 "w = createSelectionWidge(trajectories)\n",
815 "colors = createRandomColors(len(trajectories))"
816 ]
817 },
818 {
819 "cell_type": "code",
820 "execution_count": 30,
821 "metadata": {},
822 "outputs": [
823 {
824 "data": {
825 "application/vnd.jupyter.widget-view+json": {
826 "model_id": "907d7824033b4dfe980c391db0da63eb",
827 "version_major": 2,
828 "version_minor": 0
829 },
830 "text/plain": [
831 "interactive(children=(SelectMultiple(description='Trajectory:', options={}, value=()), Output()), _dom_classes…"
832 ]
833 },
834 "metadata": {},
835 "output_type": "display_data"
836 },
837 {
838 "data": {
839 "text/plain": [
840 "<function __main__.plot_out_degree(lines)>"
841 ]
842 },
843 "execution_count": 30,
844 "metadata": {},
845 "output_type": "execute_result"
846 }
847 ],
848 "source": [
849 "def plot_out_degree(lines):\n",
850 " plot(random_emf_dic, lines, 0, lambda a: a.out_d_distance, colors, 'out_degree', '../output/random_emf_instantiator/')\n",
851 "interact(plot_out_degree, lines=w)"
852 ]
853 },
854 {
855 "cell_type": "code",
856 "execution_count": 31,
857 "metadata": {},
858 "outputs": [
859 {
860 "data": {
861 "application/vnd.jupyter.widget-view+json": {
862 "model_id": "08a32c21d0b64217a556715caa8db7b5",
863 "version_major": 2,
864 "version_minor": 0
865 },
866 "text/plain": [
867 "interactive(children=(SelectMultiple(description='Trajectory:', options={}, value=()), Output()), _dom_classes…"
868 ]
869 },
870 "metadata": {},
871 "output_type": "display_data"
872 },
873 {
874 "data": {
875 "text/plain": [
876 "<function __main__.plot_na(lines)>"
877 ]
878 },
879 "execution_count": 31,
880 "metadata": {},
881 "output_type": "execute_result"
882 }
883 ],
884 "source": [
885 "def plot_na(lines):\n",
886 " plot(random_emf_dic, lines, 0, lambda a: a.na_distance, colors, 'Node Activity', '../output/random_emf_instantiator/')\n",
887 "interact(plot_na, lines=w)"
888 ]
889 },
890 {
891 "cell_type": "code",
892 "execution_count": 32,
893 "metadata": {},
894 "outputs": [
895 {
896 "data": {
897 "application/vnd.jupyter.widget-view+json": {
898 "model_id": "9dad041ff05d46ce969cfacb07c2ba98",
899 "version_major": 2,
900 "version_minor": 0
901 },
902 "text/plain": [
903 "interactive(children=(SelectMultiple(description='Trajectory:', options={}, value=()), Output()), _dom_classes…"
904 ]
905 },
906 "metadata": {},
907 "output_type": "display_data"
908 },
909 {
910 "data": {
911 "text/plain": [
912 "<function __main__.plot_mpc(lines)>"
913 ]
914 },
915 "execution_count": 32,
916 "metadata": {},
917 "output_type": "execute_result"
918 }
919 ],
920 "source": [
921 "def plot_mpc(lines):\n",
922 " plot(random_emf_dic, lines, 0, lambda a: a.mpc_distance, colors, 'mpc', '../output/random_emf_instantiator/')\n",
923 "interact(plot_mpc, lines=w)"
924 ]
925 },
926 {
927 "cell_type": "markdown",
928 "metadata": {},
929 "source": [
930 "## Controlled Viatra with Out Degree"
931 ]
932 },
933 {
934 "cell_type": "code",
935 "execution_count": 33,
936 "metadata": {},
937 "outputs": [],
938 "source": [
939 "con_viatra_stats = readStats('../input/controlled_viatra_out_degree/',10000)\n",
940 "con_viatra_dic = calDistanceDic(con_viatra_stats, human_rep)\n",
941 "\n",
942 "# trajectories and colors\n",
943 "trajectories = {}\n",
944 "w = createSelectionWidge(trajectories)\n",
945 "colors = createRandomColors(len(trajectories))"
946 ]
947 },
948 {
949 "cell_type": "code",
950 "execution_count": 34,
951 "metadata": {},
952 "outputs": [
953 {
954 "data": {
955 "application/vnd.jupyter.widget-view+json": {
956 "model_id": "cd77560284d9419daec57192a64b75ec",
957 "version_major": 2,
958 "version_minor": 0
959 },
960 "text/plain": [
961 "interactive(children=(SelectMultiple(description='Trajectory:', options={}, value=()), Output()), _dom_classes…"
962 ]
963 },
964 "metadata": {},
965 "output_type": "display_data"
966 },
967 {
968 "data": {
969 "text/plain": [
970 "<function __main__.plot_out_degree(lines)>"
971 ]
972 },
973 "execution_count": 34,
974 "metadata": {},
975 "output_type": "execute_result"
976 }
977 ],
978 "source": [
979 "def plot_out_degree(lines):\n",
980 " plot(con_viatra_dic, lines, 0, lambda a: a.out_d_distance, colors, 'out_degree', '../output/controled_viatra_with_out_degree/')\n",
981 "interact(plot_out_degree, lines=w)"
982 ]
983 },
984 {
985 "cell_type": "code",
986 "execution_count": 35,
987 "metadata": {},
988 "outputs": [
989 {
990 "data": {
991 "application/vnd.jupyter.widget-view+json": {
992 "model_id": "ab11afebf7674cebae8d7318c661cf3c",
993 "version_major": 2,
994 "version_minor": 0
995 },
996 "text/plain": [
997 "interactive(children=(SelectMultiple(description='Trajectory:', options={}, value=()), Output()), _dom_classes…"
998 ]
999 },
1000 "metadata": {},
1001 "output_type": "display_data"
1002 },
1003 {
1004 "data": {
1005 "text/plain": [
1006 "<function __main__.plot_na(lines)>"
1007 ]
1008 },
1009 "execution_count": 35,
1010 "metadata": {},
1011 "output_type": "execute_result"
1012 }
1013 ],
1014 "source": [
1015 "def plot_na(lines):\n",
1016 " plot(con_viatra_dic, lines, 0, lambda a: a.na_distance, colors, 'Node Activity', '../output/controled_viatra_with_out_degree/')\n",
1017 "interact(plot_na, lines=w)"
1018 ]
1019 },
1020 {
1021 "cell_type": "code",
1022 "execution_count": 36,
1023 "metadata": {
1024 "scrolled": false
1025 },
1026 "outputs": [
1027 {
1028 "data": {
1029 "application/vnd.jupyter.widget-view+json": {
1030 "model_id": "c20b42abcba646c18d7caa6eeb54c403",
1031 "version_major": 2,
1032 "version_minor": 0
1033 },
1034 "text/plain": [
1035 "interactive(children=(SelectMultiple(description='Trajectory:', options={}, value=()), Output()), _dom_classes…"
1036 ]
1037 },
1038 "metadata": {},
1039 "output_type": "display_data"
1040 },
1041 {
1042 "data": {
1043 "text/plain": [
1044 "<function __main__.plot_mpc(lines)>"
1045 ]
1046 },
1047 "execution_count": 36,
1048 "metadata": {},
1049 "output_type": "execute_result"
1050 }
1051 ],
1052 "source": [
1053 "def plot_mpc(lines):\n",
1054 " plot(con_viatra_dic, lines, 0, lambda a: a.mpc_distance, colors, 'mpc', '../output/controled_viatra_with_out_degree/')\n",
1055 "interact(plot_mpc, lines=w)"
1056 ]
1057 },
1058 {
1059 "cell_type": "markdown",
1060 "metadata": {},
1061 "source": [
1062 "## Controlled Viatra with Node Activity"
1063 ]
1064 },
1065 {
1066 "cell_type": "code",
1067 "execution_count": 37,
1068 "metadata": {},
1069 "outputs": [],
1070 "source": [
1071 "con_viatra_stats = readStats('../input/controlled_viatra_out_degree_node_activity/',20000)\n",
1072 "con_viatra_dic = calDistanceDic(con_viatra_stats, human_rep)\n",
1073 "\n",
1074 "# trajectories and colors\n",
1075 "trajectories = {}\n",
1076 "w = createSelectionWidge(trajectories)\n",
1077 "colors = createRandomColors(len(trajectories))"
1078 ]
1079 },
1080 {
1081 "cell_type": "code",
1082 "execution_count": 38,
1083 "metadata": {},
1084 "outputs": [
1085 {
1086 "data": {
1087 "application/vnd.jupyter.widget-view+json": {
1088 "model_id": "902b580a11fa4c8db9d03508ad629067",
1089 "version_major": 2,
1090 "version_minor": 0
1091 },
1092 "text/plain": [
1093 "interactive(children=(SelectMultiple(description='Trajectory:', options={}, value=()), Output()), _dom_classes…"
1094 ]
1095 },
1096 "metadata": {},
1097 "output_type": "display_data"
1098 },
1099 {
1100 "data": {
1101 "text/plain": [
1102 "<function __main__.plot_out_degree(lines)>"
1103 ]
1104 },
1105 "execution_count": 38,
1106 "metadata": {},
1107 "output_type": "execute_result"
1108 }
1109 ],
1110 "source": [
1111 "def plot_out_degree(lines):\n",
1112 " plot(con_viatra_dic, lines, 0, lambda a: a.out_d_distance, colors, 'out_degree', '../output/controled_viatra_with_node_activity/')\n",
1113 "interact(plot_out_degree, lines=w)"
1114 ]
1115 },
1116 {
1117 "cell_type": "code",
1118 "execution_count": 39,
1119 "metadata": {},
1120 "outputs": [
1121 {
1122 "data": {
1123 "application/vnd.jupyter.widget-view+json": {
1124 "model_id": "851b567e745940288b577d9bd27e6f08",
1125 "version_major": 2,
1126 "version_minor": 0
1127 },
1128 "text/plain": [
1129 "interactive(children=(SelectMultiple(description='Trajectory:', options={}, value=()), Output()), _dom_classes…"
1130 ]
1131 },
1132 "metadata": {},
1133 "output_type": "display_data"
1134 },
1135 {
1136 "data": {
1137 "text/plain": [
1138 "<function __main__.plot_na(lines)>"
1139 ]
1140 },
1141 "execution_count": 39,
1142 "metadata": {},
1143 "output_type": "execute_result"
1144 }
1145 ],
1146 "source": [
1147 "def plot_na(lines):\n",
1148 " plot(con_viatra_dic, lines, 0, lambda a: a.na_distance, colors, 'Node Activity', '../output/controled_viatra_with_node_activity/')\n",
1149 "interact(plot_na, lines=w)"
1150 ]
1151 },
1152 {
1153 "cell_type": "code",
1154 "execution_count": 40,
1155 "metadata": {},
1156 "outputs": [
1157 {
1158 "data": {
1159 "application/vnd.jupyter.widget-view+json": {
1160 "model_id": "7de173291f394b10b5113e3312b7b2e1",
1161 "version_major": 2,
1162 "version_minor": 0
1163 },
1164 "text/plain": [
1165 "interactive(children=(SelectMultiple(description='Trajectory:', options={}, value=()), Output()), _dom_classes…"
1166 ]
1167 },
1168 "metadata": {},
1169 "output_type": "display_data"
1170 },
1171 {
1172 "data": {
1173 "text/plain": [
1174 "<function __main__.plot_mpc(lines)>"
1175 ]
1176 },
1177 "execution_count": 40,
1178 "metadata": {},
1179 "output_type": "execute_result"
1180 }
1181 ],
1182 "source": [
1183 "def plot_mpc(lines):\n",
1184 " plot(con_viatra_dic, lines, 0, lambda a: a.mpc_distance, colors, 'mpc', '../output/controled_viatra_with_node_activity/')\n",
1185 "interact(plot_mpc, lines=w)"
1186 ]
1187 },
1188 {
1189 "cell_type": "markdown",
1190 "metadata": {},
1191 "source": [
1192 "# Random EMF With Normal(2,1)"
1193 ]
1194 },
1195 {
1196 "cell_type": "code",
1197 "execution_count": 41,
1198 "metadata": {},
1199 "outputs": [],
1200 "source": [
1201 "random_emf_stats = readStats('../input/random_emf_normal/',6000)\n",
1202 "random_emf_dic = calDistanceDic(random_emf_stats, human_rep)\n",
1203 "\n",
1204 "# trajectories and colors\n",
1205 "trajectories = {}\n",
1206 "w = createSelectionWidge(trajectories)\n",
1207 "colors = createRandomColors(len(trajectories))"
1208 ]
1209 },
1210 {
1211 "cell_type": "code",
1212 "execution_count": 42,
1213 "metadata": {},
1214 "outputs": [
1215 {
1216 "data": {
1217 "application/vnd.jupyter.widget-view+json": {
1218 "model_id": "6b9ee873d9ca41649cf05f3b713d9142",
1219 "version_major": 2,
1220 "version_minor": 0
1221 },
1222 "text/plain": [
1223 "interactive(children=(Dropdown(description='lines', options=([],), value=[]), Output()), _dom_classes=('widget…"
1224 ]
1225 },
1226 "metadata": {},
1227 "output_type": "display_data"
1228 },
1229 {
1230 "data": {
1231 "text/plain": [
1232 "<function __main__.plot_out_degree(lines)>"
1233 ]
1234 },
1235 "execution_count": 42,
1236 "metadata": {},
1237 "output_type": "execute_result"
1238 }
1239 ],
1240 "source": [
1241 "def plot_out_degree(lines):\n",
1242 " plot(random_emf_dic, lines, 0, lambda a: a.out_d_distance, colors, 'out degree', '../output/random_emf_normal/')\n",
1243 "interact(plot_out_degree, lines=[[]])"
1244 ]
1245 },
1246 {
1247 "cell_type": "code",
1248 "execution_count": 43,
1249 "metadata": {},
1250 "outputs": [
1251 {
1252 "data": {
1253 "application/vnd.jupyter.widget-view+json": {
1254 "model_id": "88f258a0b0ac4417aba320beca7508cf",
1255 "version_major": 2,
1256 "version_minor": 0
1257 },
1258 "text/plain": [
1259 "interactive(children=(Dropdown(description='lines', options=([],), value=[]), Output()), _dom_classes=('widget…"
1260 ]
1261 },
1262 "metadata": {},
1263 "output_type": "display_data"
1264 },
1265 {
1266 "data": {
1267 "text/plain": [
1268 "<function __main__.plot_node_activity(lines)>"
1269 ]
1270 },
1271 "execution_count": 43,
1272 "metadata": {},
1273 "output_type": "execute_result"
1274 }
1275 ],
1276 "source": [
1277 "def plot_node_activity(lines):\n",
1278 " plot(random_emf_dic, lines, 0, lambda a: a.na_distance, colors, 'node activity', '../output/random_emf_normal/')\n",
1279 "interact(plot_node_activity, lines=[[]])"
1280 ]
1281 },
1282 {
1283 "cell_type": "code",
1284 "execution_count": 44,
1285 "metadata": {},
1286 "outputs": [
1287 {
1288 "data": {
1289 "application/vnd.jupyter.widget-view+json": {
1290 "model_id": "d71cf26018184ee6953c50b74908f52d",
1291 "version_major": 2,
1292 "version_minor": 0
1293 },
1294 "text/plain": [
1295 "interactive(children=(Dropdown(description='lines', options=([],), value=[]), Output()), _dom_classes=('widget…"
1296 ]
1297 },
1298 "metadata": {},
1299 "output_type": "display_data"
1300 },
1301 {
1302 "data": {
1303 "text/plain": [
1304 "<function __main__.plot_mpc(lines)>"
1305 ]
1306 },
1307 "execution_count": 44,
1308 "metadata": {},
1309 "output_type": "execute_result"
1310 }
1311 ],
1312 "source": [
1313 "def plot_mpc(lines):\n",
1314 " plot(random_emf_dic, lines, 0, lambda a: a.mpc_distance, colors, 'mpc', '../output/random_emf_normal/')\n",
1315 "interact(plot_mpc, lines=[[]])"
1316 ]
1317 },
1318 {
1319 "cell_type": "code",
1320 "execution_count": 45,
1321 "metadata": {},
1322 "outputs": [],
1323 "source": [
1324 "con_viatra_stats = readStats('../input/controlled_viatra_all/',20000)\n",
1325 "con_viatra_dic = calDistanceDic(con_viatra_stats, human_rep)\n",
1326 "\n",
1327 "# trajectories and colors\n",
1328 "trajectories = {}\n",
1329 "w = createSelectionWidge(trajectories)\n",
1330 "colors = createRandomColors(len(trajectories))"
1331 ]
1332 },
1333 {
1334 "cell_type": "code",
1335 "execution_count": 46,
1336 "metadata": {},
1337 "outputs": [
1338 {
1339 "data": {
1340 "application/vnd.jupyter.widget-view+json": {
1341 "model_id": "db15ac26aad84683b9da99fc54749850",
1342 "version_major": 2,
1343 "version_minor": 0
1344 },
1345 "text/plain": [
1346 "interactive(children=(SelectMultiple(description='Trajectory:', options={}, value=()), Output()), _dom_classes…"
1347 ]
1348 },
1349 "metadata": {},
1350 "output_type": "display_data"
1351 },
1352 {
1353 "data": {
1354 "text/plain": [
1355 "<function __main__.plot_out_degree(lines)>"
1356 ]
1357 },
1358 "execution_count": 46,
1359 "metadata": {},
1360 "output_type": "execute_result"
1361 }
1362 ],
1363 "source": [
1364 "def plot_out_degree(lines):\n",
1365 " plot(con_viatra_dic, lines, 0, lambda a: a.out_d_distance, colors, 'out_degree', '../output/controled_viatra_all/')\n",
1366 "interact(plot_out_degree, lines=w)"
1367 ]
1368 },
1369 {
1370 "cell_type": "code",
1371 "execution_count": 47,
1372 "metadata": {},
1373 "outputs": [
1374 {
1375 "data": {
1376 "application/vnd.jupyter.widget-view+json": {
1377 "model_id": "30bfaf8dd45d4b21b0b43afe5e9fdb8a",
1378 "version_major": 2,
1379 "version_minor": 0
1380 },
1381 "text/plain": [
1382 "interactive(children=(SelectMultiple(description='Trajectory:', options={}, value=()), Output()), _dom_classes…"
1383 ]
1384 },
1385 "metadata": {},
1386 "output_type": "display_data"
1387 },
1388 {
1389 "data": {
1390 "text/plain": [
1391 "<function __main__.plot_na(lines)>"
1392 ]
1393 },
1394 "execution_count": 47,
1395 "metadata": {},
1396 "output_type": "execute_result"
1397 }
1398 ],
1399 "source": [
1400 "def plot_na(lines):\n",
1401 " plot(con_viatra_dic, lines, 0, lambda a: a.na_distance, colors, 'Node Activity', '../output/controled_viatra_all/')\n",
1402 "interact(plot_na, lines=w)"
1403 ]
1404 },
1405 {
1406 "cell_type": "code",
1407 "execution_count": 48,
1408 "metadata": {},
1409 "outputs": [
1410 {
1411 "data": {
1412 "application/vnd.jupyter.widget-view+json": {
1413 "model_id": "5636d37b4416474db5441fe47e7a8a30",
1414 "version_major": 2,
1415 "version_minor": 0
1416 },
1417 "text/plain": [
1418 "interactive(children=(SelectMultiple(description='Trajectory:', options={}, value=()), Output()), _dom_classes…"
1419 ]
1420 },
1421 "metadata": {},
1422 "output_type": "display_data"
1423 },
1424 {
1425 "data": {
1426 "text/plain": [
1427 "<function __main__.plot_mpc(lines)>"
1428 ]
1429 },
1430 "execution_count": 48,
1431 "metadata": {},
1432 "output_type": "execute_result"
1433 }
1434 ],
1435 "source": [
1436 "def plot_mpc(lines):\n",
1437 " plot(con_viatra_dic, lines, 0, lambda a: a.mpc_distance, colors, 'mpc', '../output/controled_viatra_all/')\n",
1438 "interact(plot_mpc, lines=w)"
1439 ]
1440 },
1441 {
1442 "cell_type": "markdown",
1443 "metadata": {},
1444 "source": [
1445 "### Viatra With Both metric and consistency"
1446 ]
1447 },
1448 {
1449 "cell_type": "code",
1450 "execution_count": 53,
1451 "metadata": {},
1452 "outputs": [],
1453 "source": [
1454 "con_viatra_stats = readStats('../input/viatra_control_all_with_consistency_1/',20000)\n",
1455 "con_viatra_dic = calDistanceDic(con_viatra_stats, human_rep)\n",
1456 "\n",
1457 "# trajectories and colors\n",
1458 "trajectories = {}\n",
1459 "w = createSelectionWidge(trajectories)\n",
1460 "colors = createRandomColors(len(trajectories))"
1461 ]
1462 },
1463 {
1464 "cell_type": "code",
1465 "execution_count": 54,
1466 "metadata": {},
1467 "outputs": [
1468 {
1469 "data": {
1470 "application/vnd.jupyter.widget-view+json": {
1471 "model_id": "e5c7231686544d959527cff36c1f1a5e",
1472 "version_major": 2,
1473 "version_minor": 0
1474 },
1475 "text/plain": [
1476 "interactive(children=(SelectMultiple(description='Trajectory:', options={}, value=()), Output()), _dom_classes…"
1477 ]
1478 },
1479 "metadata": {},
1480 "output_type": "display_data"
1481 },
1482 {
1483 "data": {
1484 "text/plain": [
1485 "<function __main__.plot_out_degree(lines)>"
1486 ]
1487 },
1488 "execution_count": 54,
1489 "metadata": {},
1490 "output_type": "execute_result"
1491 }
1492 ],
1493 "source": [
1494 "def plot_out_degree(lines):\n",
1495 " plot(con_viatra_dic, lines, 0, lambda a: a.out_d_distance, colors, 'out_degree', '../output/viatra_control_all_with_consistency_1/')\n",
1496 "interact(plot_out_degree, lines=w)"
1497 ]
1498 },
1499 {
1500 "cell_type": "code",
1501 "execution_count": 55,
1502 "metadata": {},
1503 "outputs": [
1504 {
1505 "data": {
1506 "application/vnd.jupyter.widget-view+json": {
1507 "model_id": "e043705333bb474e89582ea9358c57c3",
1508 "version_major": 2,
1509 "version_minor": 0
1510 },
1511 "text/plain": [
1512 "interactive(children=(SelectMultiple(description='Trajectory:', options={}, value=()), Output()), _dom_classes…"
1513 ]
1514 },
1515 "metadata": {},
1516 "output_type": "display_data"
1517 },
1518 {
1519 "data": {
1520 "text/plain": [
1521 "<function __main__.plot_na(lines)>"
1522 ]
1523 },
1524 "execution_count": 55,
1525 "metadata": {},
1526 "output_type": "execute_result"
1527 }
1528 ],
1529 "source": [
1530 "def plot_na(lines):\n",
1531 " plot(con_viatra_dic, lines, 0, lambda a: a.na_distance, colors, 'Node Activity', '../output/viatra_control_all_with_consistency_1/')\n",
1532 "interact(plot_na, lines=w)"
1533 ]
1534 },
1535 {
1536 "cell_type": "code",
1537 "execution_count": 56,
1538 "metadata": {},
1539 "outputs": [
1540 {
1541 "data": {
1542 "application/vnd.jupyter.widget-view+json": {
1543 "model_id": "ee4723b62293402e87e6a3f798019b36",
1544 "version_major": 2,
1545 "version_minor": 0
1546 },
1547 "text/plain": [
1548 "interactive(children=(SelectMultiple(description='Trajectory:', options={}, value=()), Output()), _dom_classes…"
1549 ]
1550 },
1551 "metadata": {},
1552 "output_type": "display_data"
1553 },
1554 {
1555 "data": {
1556 "text/plain": [
1557 "<function __main__.plot_mpc(lines)>"
1558 ]
1559 },
1560 "execution_count": 56,
1561 "metadata": {},
1562 "output_type": "execute_result"
1563 }
1564 ],
1565 "source": [
1566 "def plot_mpc(lines):\n",
1567 " plot(con_viatra_dic, lines, 0, lambda a: a.mpc_distance, colors, 'mpc', '../output/viatra_control_all_with_consistency_1/')\n",
1568 "interact(plot_mpc, lines=w)"
1569 ]
1570 },
1571 {
1572 "cell_type": "code",
1573 "execution_count": null,
1574 "metadata": {},
1575 "outputs": [],
1576 "source": []
1577 }
1578 ],
1579 "metadata": {
1580 "kernelspec": {
1581 "display_name": "Python 3",
1582 "language": "python",
1583 "name": "python3"
1584 },
1585 "language_info": {
1586 "codemirror_mode": {
1587 "name": "ipython",
1588 "version": 3
1589 },
1590 "file_extension": ".py",
1591 "mimetype": "text/x-python",
1592 "name": "python",
1593 "nbconvert_exporter": "python",
1594 "pygments_lexer": "ipython3",
1595 "version": "3.7.3"
1596 }
1597 },
1598 "nbformat": 4,
1599 "nbformat_minor": 2
1600}