2021-04-12 09:42:43 +02:00
|
|
|
{
|
|
|
|
"cells": [
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": 1,
|
|
|
|
"id": "filled-multiple",
|
|
|
|
"metadata": {},
|
2021-04-13 19:04:46 +02:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"name": "stdout",
|
|
|
|
"output_type": "stream",
|
|
|
|
"text": [
|
|
|
|
"The root path: /Users/xuanyidong/Desktop/AutoDL-Projects\n",
|
|
|
|
"The library path: /Users/xuanyidong/Desktop/AutoDL-Projects/lib\n"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2021-04-12 09:42:43 +02:00
|
|
|
"source": [
|
2021-04-13 19:04:46 +02:00
|
|
|
"import os, sys\n",
|
|
|
|
"import torch\n",
|
2021-04-12 09:42:43 +02:00
|
|
|
"from pathlib import Path\n",
|
|
|
|
"import numpy as np\n",
|
|
|
|
"import matplotlib\n",
|
|
|
|
"from matplotlib import cm\n",
|
|
|
|
"matplotlib.use(\"agg\")\n",
|
|
|
|
"import matplotlib.pyplot as plt\n",
|
2021-04-13 19:04:46 +02:00
|
|
|
"import matplotlib.ticker as ticker\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"__file__ = os.path.dirname(os.path.realpath(\"__file__\"))\n",
|
|
|
|
"root_dir = (Path(__file__).parent / \"..\").resolve()\n",
|
|
|
|
"lib_dir = (root_dir / \"lib\").resolve()\n",
|
|
|
|
"print(\"The root path: {:}\".format(root_dir))\n",
|
|
|
|
"print(\"The library path: {:}\".format(lib_dir))\n",
|
|
|
|
"assert lib_dir.exists(), \"{:} does not exist\".format(lib_dir)\n",
|
|
|
|
"if str(lib_dir) not in sys.path:\n",
|
|
|
|
" sys.path.insert(0, str(lib_dir))\n",
|
|
|
|
"\n",
|
|
|
|
"from datasets import SynAdaptiveEnv\n",
|
2021-04-22 13:12:21 +02:00
|
|
|
"from xlayers.super_core import SuperSequential, SuperMLPv1"
|
2021-04-12 09:42:43 +02:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": 2,
|
|
|
|
"id": "supreme-basis",
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
2021-04-13 19:04:46 +02:00
|
|
|
"def optimize_fn(xs, ys, test_sets):\n",
|
|
|
|
" xs = torch.FloatTensor(xs).view(-1, 1)\n",
|
|
|
|
" ys = torch.FloatTensor(ys).view(-1, 1)\n",
|
|
|
|
" \n",
|
2021-04-22 13:12:21 +02:00
|
|
|
" model = SuperSequential(\n",
|
|
|
|
" SuperMLPv1(1, 10, 20, torch.nn.ReLU),\n",
|
|
|
|
" SuperMLPv1(20, 10, 1, torch.nn.ReLU)\n",
|
|
|
|
" )\n",
|
2021-04-13 19:04:46 +02:00
|
|
|
" optimizer = torch.optim.Adam(\n",
|
|
|
|
" model.parameters(),\n",
|
|
|
|
" lr=0.01, weight_decay=1e-4, amsgrad=True\n",
|
|
|
|
" )\n",
|
|
|
|
" for _iter in range(100):\n",
|
|
|
|
" preds = model(ys)\n",
|
|
|
|
"\n",
|
|
|
|
" optimizer.zero_grad()\n",
|
|
|
|
" loss = torch.nn.functional.mse_loss(preds, ys)\n",
|
|
|
|
" loss.backward()\n",
|
|
|
|
" optimizer.step()\n",
|
|
|
|
" \n",
|
|
|
|
" with torch.no_grad():\n",
|
|
|
|
" answers = []\n",
|
|
|
|
" for test_set in test_sets:\n",
|
|
|
|
" test_set = torch.FloatTensor(test_set).view(-1, 1)\n",
|
|
|
|
" preds = model(test_set).view(-1).numpy()\n",
|
|
|
|
" answers.append(preds.tolist())\n",
|
|
|
|
" return answers\n",
|
|
|
|
"\n",
|
|
|
|
"def f(x):\n",
|
2021-04-22 13:12:21 +02:00
|
|
|
" return np.cos( 0.5 * x + x * x)\n",
|
2021-04-13 19:04:46 +02:00
|
|
|
"\n",
|
|
|
|
"def get_data(mode):\n",
|
|
|
|
" dataset = SynAdaptiveEnv(mode=mode)\n",
|
|
|
|
" times, xs, ys = [], [], []\n",
|
|
|
|
" for i, (_, t, x) in enumerate(dataset):\n",
|
|
|
|
" times.append(t)\n",
|
|
|
|
" xs.append(x)\n",
|
|
|
|
" dataset.set_transform(f)\n",
|
|
|
|
" for i, (_, _, y) in enumerate(dataset):\n",
|
|
|
|
" ys.append(y)\n",
|
|
|
|
" return times, xs, ys\n",
|
|
|
|
"\n",
|
2021-04-12 09:42:43 +02:00
|
|
|
"def visualize_syn(save_path):\n",
|
|
|
|
" save_dir = (save_path / '..').resolve()\n",
|
|
|
|
" save_dir.mkdir(parents=True, exist_ok=True)\n",
|
|
|
|
" \n",
|
2021-04-13 19:04:46 +02:00
|
|
|
" dpi, width, height = 40, 2000, 900\n",
|
2021-04-12 09:42:43 +02:00
|
|
|
" figsize = width / float(dpi), height / float(dpi)\n",
|
2021-04-13 19:04:46 +02:00
|
|
|
" LabelSize, LegendFontsize, font_gap = 40, 40, 5\n",
|
2021-04-12 09:42:43 +02:00
|
|
|
" \n",
|
|
|
|
" fig = plt.figure(figsize=figsize)\n",
|
|
|
|
" \n",
|
2021-04-13 19:04:46 +02:00
|
|
|
" times, xs, ys = get_data(None)\n",
|
2021-04-12 09:42:43 +02:00
|
|
|
" \n",
|
2021-04-13 19:04:46 +02:00
|
|
|
" def draw_ax(cur_ax, xaxis, yaxis, xlabel, ylabel,\n",
|
|
|
|
" alpha=0.1, color='k', linestyle='-', legend=None, plot_only=False):\n",
|
|
|
|
" if legend is not None:\n",
|
|
|
|
" cur_ax.plot(xaxis[:1], yaxis[:1], color=color, label=legend)\n",
|
|
|
|
" cur_ax.plot(xaxis, yaxis, color=color, linestyle=linestyle, alpha=alpha, label=None)\n",
|
|
|
|
" if not plot_only:\n",
|
|
|
|
" cur_ax.set_xlabel(xlabel, fontsize=LabelSize)\n",
|
|
|
|
" cur_ax.set_ylabel(ylabel, rotation=0, fontsize=LabelSize)\n",
|
|
|
|
" for tick in cur_ax.xaxis.get_major_ticks():\n",
|
|
|
|
" tick.label.set_fontsize(LabelSize - font_gap)\n",
|
|
|
|
" tick.label.set_rotation(10)\n",
|
|
|
|
" for tick in cur_ax.yaxis.get_major_ticks():\n",
|
|
|
|
" tick.label.set_fontsize(LabelSize - font_gap)\n",
|
2021-04-12 09:42:43 +02:00
|
|
|
" \n",
|
2021-04-13 19:04:46 +02:00
|
|
|
" cur_ax = fig.add_subplot(2, 1, 1)\n",
|
|
|
|
" draw_ax(cur_ax, times, xs, \"time\", \"x\", alpha=1.0, legend=None)\n",
|
|
|
|
"\n",
|
2021-04-12 09:42:43 +02:00
|
|
|
" cur_ax = fig.add_subplot(2, 1, 2)\n",
|
2021-04-13 19:04:46 +02:00
|
|
|
" draw_ax(cur_ax, times, ys, \"time\", \"y\", alpha=0.1, legend=\"ground truth\")\n",
|
|
|
|
" \n",
|
|
|
|
" train_times, train_xs, train_ys = get_data(\"train\")\n",
|
|
|
|
" draw_ax(cur_ax, train_times, train_ys, None, None, alpha=1.0, color='r', legend=None, plot_only=True)\n",
|
|
|
|
" \n",
|
|
|
|
" valid_times, valid_xs, valid_ys = get_data(\"valid\")\n",
|
|
|
|
" draw_ax(cur_ax, valid_times, valid_ys, None, None, alpha=1.0, color='g', legend=None, plot_only=True)\n",
|
|
|
|
" \n",
|
|
|
|
" test_times, test_xs, test_ys = get_data(\"test\")\n",
|
|
|
|
" draw_ax(cur_ax, test_times, test_ys, None, None, alpha=1.0, color='b', legend=None, plot_only=True)\n",
|
|
|
|
" \n",
|
|
|
|
" # optimize MLP models\n",
|
|
|
|
" [train_preds, valid_preds, test_preds] = optimize_fn(train_xs, train_ys, [train_xs, valid_xs, test_xs])\n",
|
|
|
|
" draw_ax(cur_ax, train_times, train_preds, None, None,\n",
|
|
|
|
" alpha=1.0, linestyle='--', color='r', legend=\"MLP\", plot_only=True)\n",
|
2021-04-22 13:12:21 +02:00
|
|
|
" import pdb; pdb.set_trace()\n",
|
2021-04-13 19:04:46 +02:00
|
|
|
" draw_ax(cur_ax, valid_times, valid_preds, None, None,\n",
|
|
|
|
" alpha=1.0, linestyle='--', color='g', legend=None, plot_only=True)\n",
|
|
|
|
" draw_ax(cur_ax, test_times, test_preds, None, None,\n",
|
|
|
|
" alpha=1.0, linestyle='--', color='b', legend=None, plot_only=True)\n",
|
|
|
|
"\n",
|
|
|
|
" plt.legend(loc=1, fontsize=LegendFontsize)\n",
|
|
|
|
"\n",
|
2021-04-12 09:42:43 +02:00
|
|
|
" fig.savefig(save_path, dpi=dpi, bbox_inches=\"tight\", format=\"pdf\")\n",
|
|
|
|
" plt.close(\"all\")\n",
|
|
|
|
" # plt.show()"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": 3,
|
|
|
|
"id": "shared-envelope",
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"name": "stdout",
|
|
|
|
"output_type": "stream",
|
|
|
|
"text": [
|
2021-04-22 13:12:21 +02:00
|
|
|
"The Desktop is at: /Users/xuanyidong/Desktop\n",
|
|
|
|
"> \u001b[0;32m<ipython-input-2-dec7d637caaa>\u001b[0m(89)\u001b[0;36mvisualize_syn\u001b[0;34m()\u001b[0m\n",
|
|
|
|
"\u001b[0;32m 87 \u001b[0;31m alpha=1.0, linestyle='--', color='r', legend=\"MLP\", plot_only=True)\n",
|
|
|
|
"\u001b[0m\u001b[0;32m 88 \u001b[0;31m \u001b[0;32mimport\u001b[0m \u001b[0mpdb\u001b[0m\u001b[0;34m;\u001b[0m \u001b[0mpdb\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mset_trace\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
|
|
|
"\u001b[0m\u001b[0;32m---> 89 \u001b[0;31m draw_ax(cur_ax, valid_times, valid_preds, None, None,\n",
|
|
|
|
"\u001b[0m\u001b[0;32m 90 \u001b[0;31m alpha=1.0, linestyle='--', color='g', legend=None, plot_only=True)\n",
|
|
|
|
"\u001b[0m\u001b[0;32m 91 \u001b[0;31m draw_ax(cur_ax, test_times, test_preds, None, None,\n",
|
|
|
|
"\u001b[0m\n",
|
|
|
|
"ipdb> train_times\n",
|
|
|
|
"[0.0, 0.1, 0.2, 0.30000000000000004, 0.4, 0.5, 0.6000000000000001, 0.7000000000000001, 0.8, 0.9, 1.0, 1.1, 1.2000000000000002, 1.3, 1.4000000000000001, 1.5, 1.6, 1.7000000000000002, 1.8, 1.9000000000000001, 2.0, 2.1, 2.2, 2.3000000000000003, 2.4000000000000004, 2.5, 2.6, 2.7, 2.8000000000000003, 2.9000000000000004, 3.0, 3.1, 3.2, 3.3000000000000003, 3.4000000000000004, 3.5, 3.6, 3.7, 3.8000000000000003, 3.9000000000000004, 4.0, 4.1000000000000005, 4.2, 4.3, 4.4, 4.5, 4.6000000000000005, 4.7, 4.800000000000001, 4.9, 5.0, 5.1000000000000005, 5.2, 5.300000000000001, 5.4, 5.5, 5.6000000000000005, 5.7, 5.800000000000001, 5.9, 6.0, 6.1000000000000005, 6.2, 6.300000000000001, 6.4, 6.5, 6.6000000000000005, 6.7, 6.800000000000001, 6.9, 7.0, 7.1000000000000005, 7.2, 7.300000000000001, 7.4, 7.5, 7.6000000000000005, 7.7, 7.800000000000001, 7.9, 8.0, 8.1, 8.200000000000001, 8.3, 8.4, 8.5, 8.6, 8.700000000000001, 8.8, 8.9, 9.0, 9.1, 9.200000000000001, 9.3, 9.4, 9.5, 9.600000000000001, 9.700000000000001, 9.8, 9.9, 10.0, 10.100000000000001, 10.200000000000001, 10.3, 10.4, 10.5, 10.600000000000001, 10.700000000000001, 10.8, 10.9, 11.0, 11.100000000000001, 11.200000000000001, 11.3, 11.4, 11.5, 11.600000000000001, 11.700000000000001, 11.8, 11.9, 12.0, 12.100000000000001, 12.200000000000001, 12.3, 12.4, 12.5, 12.600000000000001, 12.700000000000001, 12.8, 12.9, 13.0, 13.100000000000001, 13.200000000000001, 13.3, 13.4, 13.5, 13.600000000000001, 13.700000000000001, 13.8, 13.9, 14.0, 14.100000000000001, 14.200000000000001, 14.3, 14.4, 14.5, 14.600000000000001, 14.700000000000001, 14.8, 14.9, 15.0, 15.100000000000001, 15.200000000000001, 15.3, 15.4, 15.5, 15.600000000000001, 15.700000000000001, 15.8, 15.9, 16.0, 16.1, 16.2, 16.3, 16.400000000000002, 16.5, 16.6, 16.7, 16.8, 16.900000000000002, 17.0, 17.1, 17.2, 17.3, 17.400000000000002, 17.5, 17.6, 17.7, 17.8, 17.900000000000002, 18.0, 18.1, 18.2, 18.3, 18.400000000000002, 18.5, 18.6, 18.7, 18.8, 18.900000000000002, 19.0, 19.1, 19.200000000000003, 19.3, 19.400000000000002, 19.5, 19.6, 19.700000000000003, 19.8, 19.900000000000002, 20.0, 20.1, 20.200000000000003, 20.3, 20.400000000000002, 20.5, 20.6, 20.700000000000003, 20.8, 20.900000000000002, 21.0, 21.1, 21.200000000000003, 21.3, 21.400000000000002, 21.5, 21.6, 21.700000000000003, 21.8, 21.900000000000002, 22.0, 22.1, 22.200000000000003, 22.3, 22.400000000000002, 22.5, 22.6, 22.700000000000003, 22.8, 22.900000000000002, 23.0, 23.1, 23.200000000000003, 23.3, 23.400000000000002, 23.5, 23.6, 23.700000000000003, 23.8, 23.900000000000002, 24.0, 24.1, 24.200000000000003, 24.3, 24.400000000000002, 24.5, 24.6, 24.700000000000003, 24.8, 24.900000000000002, 25.0, 25.1, 25.200000000000003, 25.3, 25.400000000000002, 25.5, 25.6, 25.700000000000003, 25.8, 25.900000000000002, 26.0, 26.1, 26.200000000000003, 26.3, 26.400000000000002, 26.5, 26.6, 26.700000000000003, 26.8, 26.900000000000002, 27.0, 27.1, 27.200000000000003, 27.3, 27.400000000000002, 27.5, 27.6, 27.700000000000003, 27.8, 27.900000000000002, 28.0, 28.1, 28.200000000000003, 28.3, 28.400000000000002, 28.5, 28.6, 28.700000000000003, 28.8, 28.900000000000002, 29.0, 29.1, 29.200000000000003, 29.3, 29.400000000000002, 29.5, 29.6, 29.700000000000003, 29.8, 29.900000000000002, 30.0, 30.1, 30.200000000000003, 30.3, 30.400000000000002, 30.5, 30.6, 30.700000000000003, 30.8, 30.900000000000002, 31.0, 31.1, 31.200000000000003, 31.3, 31.400000000000002, 31.5, 31.6, 31.700000000000003, 31.8, 31.900000000000002, 32.0, 32.1, 32.2, 32.300000000000004, 32.4, 32.5, 32.6, 32.7, 32.800000000000004, 32.9, 33.0, 33.1, 33.2, 33.300000000000004, 33.4, 33.5, 33.6, 33.7, 33.800000000000004, 33.9, 34.0, 34.1, 34.2, 34.300000000000004, 34.4, 34.5, 34.6, 34.7, 34.800000000000004, 34.9, 35.0, 35.1, 35.2, 35.300000000000004, 35.4, 35.5, 35.6, 35.7, 35.800000000000004, 35.9, 36.0, 36.1, 36.2, 36.300000000000004, 36.4, 36.5, 36.6, 36.7, 36.800000000000004, 36.9, 37.0, 37.1, 37.2, 37.300000000000004, 37.4, 37.5, 37.6, 37.7, 37.800000000000004, 37.9, 38.0, 38.1, 38.2, 38.300000000000004, 38.400000000000006, 38.5, 38.6, 38.7, 3
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "stdout",
|
|
|
|
"output_type": "stream",
|
|
|
|
"text": [
|
|
|
|
"ipdb> train_preds\n",
|
|
|
|
"[-0.04611632227897644, -0.045859843492507935, -0.045347750186920166, -0.04458075761795044, -0.04355984926223755, -0.04228568077087402, -0.04075917601585388, -0.03898113965988159, -0.036952465772628784, -0.03467392921447754, -0.03214627504348755, -0.029370546340942383, -0.026347368955612183, -0.023629456758499146, -0.021652281284332275, -0.019537389278411865, -0.01728537678718567, -0.014701485633850098, -0.011017769575119019, -0.007136136293411255, -0.0030573904514312744, 0.0012176334857940674, 0.00568816065788269, 0.01035335659980774, 0.015212282538414001, 0.024441495537757874, 0.034274160861968994, 0.04434235394001007, 0.05476266145706177, 0.06553322076797485, 0.07665219902992249, 0.08811751008033752, 0.09992708265781403, 0.11207878589630127, 0.12457036972045898, 0.1348687708377838, 0.14432348310947418, 0.15401709079742432, 0.1639476716518402, 0.1741131991147995, 0.1845117211341858, 0.1951409876346588, 0.20599885284900665, 0.2170828878879547, 0.22839070856571198, 0.23991985619068146, 0.25166743993759155, 0.2636308968067169, 0.27580732107162476, 0.2881937026977539, 0.3007868230342865, 0.31358349323272705, 0.326580286026001, 0.3397737145423889, 0.35316002368927, 0.36673545837402344, 0.3804960250854492, 0.3944375216960907, 0.4085557162761688, 0.4228460490703583, 0.43730393052101135, 0.45192456245422363, 0.4667028784751892, 0.4816338121891022, 0.4967120289802551, 0.5119316577911377, 0.5272871851921082, 0.542772650718689, 0.5583819150924683, 0.5741086006164551, 0.5899459719657898, 0.6058872938156128, 0.6219258308410645, 0.6380539536476135, 0.6542644500732422, 0.6705495119094849, 0.686901330947876, 0.703311562538147, 0.7197721600532532, 0.7362741231918335, 0.7528088092803955, 0.7693670392036438, 0.7859395742416382, 0.8025166988372803, 0.8190886378288269, 0.8356451988220215, 0.8521762490272522, 0.8686710596084595, 0.8851190209388733, 0.9015086889266968, 0.9178289771080017, 0.934068500995636, 0.950215220451355, 0.9619203209877014, 0.9724005460739136, 0.9827953577041626, 0.9930967688560486, 1.0032958984375, 1.0133841037750244, 1.0223143100738525, 1.0289654731750488, 1.035523772239685, 1.041982650756836, 1.0483357906341553, 1.0545767545700073, 1.0606989860534668, 1.066696286201477, 1.072561502456665, 1.0782880783081055, 1.0838695764541626, 1.0892987251281738, 1.0942928791046143, 1.0983036756515503, 1.1021784543991089, 1.1059117317199707, 1.1094977855682373, 1.112931251525879, 1.1162065267562866, 1.119317650794983, 1.1222593784332275, 1.1250262260437012, 1.127611756324768, 1.1300114393234253, 1.1322190761566162, 1.134229063987732, 1.1360361576080322, 1.137634515762329, 1.139019250869751, 1.1401841640472412, 1.1411248445510864, 1.1418354511260986, 1.1423108577728271, 1.1425459384918213, 1.142535924911499, 1.1422756910324097, 1.1417604684829712, 1.1409857273101807, 1.139946699142456, 1.1386388540267944, 1.1370586156845093, 1.135201096534729, 1.1330630779266357, 1.1306400299072266, 1.1279289722442627, 1.1249263286590576, 1.121628761291504, 1.1180336475372314, 1.114138126373291, 1.1099395751953125, 1.105436086654663, 1.1006255149841309, 1.0955058336257935, 1.0892024040222168, 1.081896424293518, 1.0741932392120361, 1.0660918951034546, 1.0575921535491943, 1.048694372177124, 1.0393991470336914, 1.029707431793213, 1.0193676948547363, 1.00386381149292, 0.9877821803092957, 0.9711267948150635, 0.9539030194282532, 0.9270477294921875, 0.899175763130188, 0.8704700469970703, 0.8409428596496582, 0.8106081485748291, 0.7794802784919739, 0.7475759387016296, 0.7149122953414917, 0.6815081238746643, 0.6473833918571472, 0.61255943775177, 0.5770588517189026, 0.540905773639679, 0.5041252374649048, 0.466744065284729, 0.42879006266593933, 0.39029255509376526, 0.3512822985649109, 0.31179079413414, 0.27185162901878357, 0.23149913549423218, 0.19076907634735107, 0.14969851076602936, 0.10044234991073608, 0.04247118532657623, -0.0015277862548828125, -0.030001014471054077, -0.06862908601760864, -0.10734251141548157, -0.14174914360046387, -0.1752888262271881, -0.20879262685775757, -0.24222278594970703, -0.2841641306877136, -0.32651621103286743, -0.368622720
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "stdout",
|
|
|
|
"output_type": "stream",
|
|
|
|
"text": [
|
|
|
|
"ipdb> train_ys\n",
|
|
|
|
"[1.0, 0.9999999910945311, 0.9999999198522608, 0.9999996790771866, 0.9999991066924582, 0.9999979837910936, 0.9999960318551232, 0.9999929091393012, 0.9999882062104364, 0.9999814406286233, 0.9999720507522349, 0.99995938864448, 0.9999427120556592, 0.9999211754520029, 0.9998938200591698, 0.9998595628861638, 0.9998171846936232, 0.9997653168692014, 0.9997024271721292, 0.9996268043090873, 0.9995365413042816, 0.9994295176281586, 0.9993033800516088, 0.9991555221958434, 0.9989830627524896, 0.9987828223539091, 0.9985512990804113, 0.9982846425989912, 0.9979786269375996, 0.9976286219098381, 0.9972295632174979, 0.9967759212726425, 0.9962616687970814, 0.9956802472752349, 0.9950245323566472, 0.994286798326904, 0.9934586817905299, 0.9925311447367143, 0.9914944371884851, 0.9903380596683096, 0.9890507257480735, 0.9876203249889757, 0.9860338866170509, 0.9842775443227177, 0.9823365026177825, 0.9801950052305569, 0.9778363060688365, 0.9752426433311261, 0.9723952173981886, 0.9692741731891905, 0.9658585877187169, 0.9621264636419244, 0.9580547296241031, 0.9536192484168413, 0.9487948335645304, 0.9435552757006918, 0.9378733794219011, 0.9317210117462336, 0.925069163171124, 0.9178880223403417, 0.9101470653091464, 0.9018151603583608, 0.8928606892496839, 0.8832516857336673, 0.8729559920161116, 0.8619414337558884, 0.8501760140053676, 0.8376281263119683, 0.824266786974378, 0.8100618861889562, 0.7949844575302867, 0.7790069648853952, 0.7621036056049999, 0.744250628249673, 0.7254266628974063, 0.7056130615464159, 0.6847942456990141, 0.6629580577564328, 0.6400961123992553, 0.6162041436838025, 0.5912823431627549, 0.5653356839512562, 0.5383742253214271, 0.5104133921328258, 0.48147422320926164, 0.4515835826679898, 0.42077432821062954, 0.3890854305094812, 0.35656203808065917, 0.32325548243632124, 0.28922321885981783, 0.2545286988535653, 0.2192411711698261, 0.18343540934504937, 0.14719136480963987, 0.11059374592245369, 0.07373152466343098, 0.03669737418363381, -0.00041295807017589786, -0.037501335403378626, -0.0744679673249738, -0.11121218617802132, -0.14763325437115177, -0.18363119042396353, -0.21910760101532972, -0.25396650542254123, -0.28811513819510126, -0.32146471564699186, -0.35393115179635093, -0.3854357097437049, -0.4159055751627377, -0.44527433957463, -0.4734823823726119, -0.5004771421328761, -0.5262132695579935, -0.5506526564099944, -0.5737643369561705, -0.595524260723435, -0.6159149376859064, -0.6349249593466324, -0.6525484014717374, -0.6687841164531488, -0.6836349253803936, -0.6971067218673693, -0.7092075014898059, -0.7199463323362644, -0.729332283661256, -0.7373733309626591, -0.7440752570013993, -0.7494405693569872, -0.7534674560850376, -0.7561488019255895, -0.7574712883086907, -0.7574146011093805, -0.7559507706940899, -0.7530436692313542, -0.7486486904453411, -0.7427126368804504, -0.7351738392038212, -0.7259625309616335, -0.7150015003673365, -0.7022070379653861, -0.6874901952098658, -0.6707583639596291, -0.6519171804808083, -0.6308727496660278, -0.6075341757907845, -0.5818163752757692, -0.5536431347543069, -0.5229503645189311, -0.4896894835321019, -0.4538308581604776, -0.4153672032883422, -0.374316842259938, -0.33072671205774057, -0.28467499315924344, -0.23627324053889967, -0.18566789413561363, -0.13304105448858364, -0.07861042263614869, -0.02262832296265693, 0.03462024669768518, 0.09282056229772219, 0.15163210717465353, 0.21069344235514711, 0.2696279239039355, 0.3280501383319103, 0.38557289064752537, 0.4418145483056956, 0.49640652015508874, 0.5490006342782053, 0.5992761736707294, 0.6469463347462272, 0.6917638907377248, 0.7335258695516799, 0.7720770921834346, 0.8073124614920122, 0.8391779395538649, 0.8676702022693104, 0.8928350095859888, 0.9147643759465568, 0.9335926659860233, 0.9494917731958721, 0.9626655629323815, 0.973343775136797, 0.9817755864937774, 0.9882230271528751, 0.9929544347853346, 0.9962381102625714, 0.9983363164933309, 0.999499736903073, 0.9999624845720818, 0.9999377288491531, 0.9996139846831834, 0.9991520919190354, 0.9986828978907165, 0.9983056468593409, 0.9980870737964366, 0.9980611969363409, 0.9982298023477425, 0.9985636132407
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "stdout",
|
|
|
|
"output_type": "stream",
|
|
|
|
"text": [
|
|
|
|
"--KeyboardInterrupt--\n",
|
|
|
|
"\n",
|
|
|
|
"KeyboardInterrupt: Interrupted by user\n"
|
2021-04-12 09:42:43 +02:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"# Visualization\n",
|
|
|
|
"home_dir = Path.home()\n",
|
|
|
|
"desktop_dir = home_dir / 'Desktop'\n",
|
|
|
|
"print('The Desktop is at: {:}'.format(desktop_dir))\n",
|
|
|
|
"visualize_syn(desktop_dir / 'tot-synthetic-v0.pdf')"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"kernelspec": {
|
|
|
|
"display_name": "Python 3",
|
|
|
|
"language": "python",
|
|
|
|
"name": "python3"
|
|
|
|
},
|
|
|
|
"language_info": {
|
|
|
|
"codemirror_mode": {
|
|
|
|
"name": "ipython",
|
|
|
|
"version": 3
|
|
|
|
},
|
|
|
|
"file_extension": ".py",
|
|
|
|
"mimetype": "text/x-python",
|
|
|
|
"name": "python",
|
|
|
|
"nbconvert_exporter": "python",
|
|
|
|
"pygments_lexer": "ipython3",
|
|
|
|
"version": "3.8.8"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"nbformat": 4,
|
|
|
|
"nbformat_minor": 5
|
|
|
|
}
|