diff --git a/rdas/AS.ipynb b/rdas/AS.ipynb new file mode 100644 index 0000000..2d3814a --- /dev/null +++ b/rdas/AS.ipynb @@ -0,0 +1,10223 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "955e580d", + "metadata": {}, + "outputs": [], + "source": [ + "import plotly.express as px\n", + "import plotly.graph_objects as go\n", + "\n", + "import numpy as np\n", + "\n", + "from sklearn.datasets import make_s_curve, make_circles" + ] + }, + { + "cell_type": "markdown", + "id": "c72b7800", + "metadata": {}, + "source": [ + "# S-curve" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "444771b7", + "metadata": { + "scrolled": false + }, + "outputs": [ + { + "data": { + "text/html": [ + " \n", + " " + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plot.ly" + }, + "data": [ + { + "mode": "markers", + "type": "scatter3d", + "x": [ + -0.993531977792775, + -0.8708172857058722, + 0.8456794744325812, + 0.7300857314725252, + 0.2867643694023354, + 0.14779639067033762, + 0.7347371871309678, + -0.2389615646381622, + 0.7176809240320599, + 1.003525670661184, + 1.0970996767231285, + -1.042124533581882, + 0.10473209368590371, + -0.3760041046679454, + -0.06017212183994654, + 0.03258230451794586, + -0.9871871481416816, + 0.1558389835024952, + -0.6872717073907637, + -1.003874681165038, + 0.8617896133890696, + 0.28742262238863836, + -0.897925012467289, + -0.8692220380336348, + -0.4010024789314612, + 0.5838026869859363, + -0.33255716929818896, + 0.4057712767629692, + 0.827531609154129, + 0.8199772169992974, + 0.7416445834883275, + 0.011899573845048333, + 0.7955237444798057, + -0.8147888945897016, + -0.9006743019862895, + 0.22557577494244163, + -1.0482698671154722, + 0.453907322822113, + 0.9416748821957329, + -0.4489728778886363, + 0.42972952971762957, + -0.17001477631065212, + 0.965254483218935, + -0.6179620891182471, + -0.8515188548132283, + 1.0146097703432206, + -0.9734867294122725, + 0.07371397538219861, + 0.46192991154559787, + -0.11449918785776182, + -0.8508890137291109, + 0.6268109996774355, + -0.97955508772068, + -0.641444583489676, + 0.8487292437561094, + -0.6895676884808556, + 0.7234069826170265, + 0.11247660179167307, + 0.9676087127973305, + -0.8836002042034473, + -0.7716206423604515, + -0.769020917740917, + 0.01177415509438013, + -0.8998413455782874, + -0.9577982258394111, + 0.36794691978631316, + 0.19170724930388733, + 0.29744694444714675, + 0.9946154615022639, + -1.1790992736948447, + 0.6130868232796416, + -0.4587542407136729, + 0.951452792249678, + 0.2765384444055075, + 0.9355414337959683, + 0.7245293496626104, + 0.48061054076210125, + 0.8341824329329197, + -1.045114534591625, + 0.4823214051215363, + -0.27235247868940865, + 0.8524627613718416, + -0.7853421999313158, + 0.8892785877072682, + -1.1804087732983766, + -0.9784059734212799, + 0.7629825004412638, + 1.0478454557510355, + -0.5655093864067966, + -0.2703591184208844, + 0.479735084800109, + 0.9917575812623348, + 0.5116759963237818, + 0.5125010381601381, + 0.5070263822691963, + -0.12377473120471365, + 0.38916188670247676, + -0.590554779119505, + 0.8453517906029955, + 0.6178313521994017 + ], + "y": [ + 0.27507399107473185, + 1.3760673485826755, + 0.47677496555725196, + 0.9687179750427803, + 1.9418240627708483, + 0.4278175117358718, + 0.8651477888858823, + 1.588565682429031, + 0.36490328382543663, + 0.14800728405140598, + 0.2553761718206288, + 0.22000381037457983, + 1.8341384895458301, + 1.491462440932349, + 1.4300486434140105, + 1.5999070425793722, + 1.5633397051285305, + 0.3862141755006808, + 1.9292453258865672, + 0.9350982687133575, + 1.731196685543621, + 1.7932059059489451, + 0.5378560848389327, + 0.2663141964816806, + 0.4757762946412304, + 0.7941938895366332, + 1.643009740343988, + 1.6829298068265108, + 0.025255995587506214, + 1.087707672607236, + 0.9934236879120932, + 0.3204340710587756, + 0.4530340721329923, + 0.48002156285500575, + 1.87064089832148, + 0.7052375846899681, + 1.0656804302602354, + 1.3437679658082964, + 0.7064469797228604, + 1.894264071976038, + 1.8659581141898014, + 0.5885248013528308, + 1.0301985603812756, + 0.5324656601074739, + 0.6596409762982602, + 0.10450384679672653, + 1.3004148798436896, + 1.0683209306500843, + 0.020058001407771475, + 0.5012748244535259, + 1.8912611324456337, + 0.5401608078772914, + 0.28769958478603136, + 0.9906382588860042, + 2.099067397800044, + 0.42495340413941785, + 1.398980832928761, + 1.5030199654140457, + 0.4535069676620773, + 1.5663103824224383, + 0.8181079003373094, + 1.3459626247872227, + 1.3976073022372224, + 1.0736497523127928, + 0.248774837238313, + 1.6395783155191304, + 0.6739767651923159, + 0.36002271536294, + 0.09124987960879966, + 1.241301588920175, + 1.2733066553612176, + 0.24241438542425833, + 0.9235843784485918, + 0.3315726891171027, + 1.4061566681689066, + 0.42789912740627645, + 1.4442874579101475, + 0.8363052435275028, + 1.8722353001887775, + 0.18531645114340334, + 0.6897131579198896, + 0.15923087132996697, + 1.9468992098989006, + 1.7399729686117482, + 0.43333353575106004, + 1.2878295079030588, + 1.6757375458299941, + 1.0540291679185272, + 0.9770791171553699, + 0.5080733029500946, + 0.2107021927226707, + 1.7437371983695404, + 1.7537322837648286, + 1.2894079082822996, + 0.5332511479476689, + 0.5576727717876663, + 1.380066935615235, + 1.7728758047339694, + 1.805263605090035, + 1.707286713410203 + ], + "z": [ + 0.7070904624536677, + -1.463975694465423, + -1.5794277126816711, + -0.5022861399740245, + 1.993117319777704, + 1.9660799686203558, + 1.5527622301154136, + -2.035198043473573, + -0.36881414283475844, + -1.2271378955269698, + 1.1819135834562606, + -1.2396357209797269, + -1.9309503665545344, + 1.868654915418347, + 2.0122215868924695, + 1.9888424186284797, + 1.2805224438912968, + -0.10439772850414279, + 0.20119396680196666, + 1.4362896973583799, + -0.3609523187720281, + 2.0633129148838325, + 1.5938358491907865, + 0.6169818040496277, + 0.1717253388337786, + -1.8804217337639795, + 2.1709823953225915, + -0.08981531241924381, + -0.4399001843854352, + 1.363994974823974, + -0.6835693002956097, + 1.9467637030341802, + 1.4994897451833886, + -1.4482846500127706, + -1.2841004929649205, + -1.7848935029471462, + 1.3624248016228917, + 1.7382370629715276, + -1.2546452208547965, + 0.20409476314428715, + 1.7808154661447808, + 0.1841788477256159, + 1.4364037415704307, + -1.8012489612104252, + 1.4749278755439266, + -0.8255628108552806, + 1.1909234404027926, + 0.10594855282357783, + -0.254790802077451, + 1.9254067363153229, + -1.2822239377807945, + -1.8485955164661372, + -1.58481457687916, + -1.7744146223261439, + -0.5030807063892139, + -1.6858022453946369, + 1.7526694316903948, + 2.0135156290649467, + 1.4846272610074736, + 0.962890814471172, + 0.34831666928506333, + 1.6792901412761716, + -1.9658306671987327, + 0.7062110963055215, + 1.6291321743898286, + -0.06830923053224243, + 2.088642348743181, + -1.9504988630156816, + 1.8522966434343857, + -0.9477392553460453, + -1.8636827002889291, + 2.051884318343129, + 1.116558830713009, + -1.8489845482880065, + -1.4662871955194854, + -1.4857145621134946, + -1.7279083615936497, + 1.4667012129590042, + 0.6470156481506943, + 1.6836453943138436, + -1.9878366396824685, + -0.5307933822800206, + 1.1731859317316367, + 1.5712456091601836, + 1.3719603786844796, + 0.9387263903948432, + -1.7293478971987275, + -0.7346356782800612, + -1.8354091255872622, + 0.030822500992724655, + 1.6964479898701281, + -1.4339360443459963, + -1.9056553014924258, + -0.0952157430275647, + -1.7955099637258098, + -0.09227879552120408, + -0.07425095919706856, + 0.11833888859788348, + 1.2310166556227498, + 1.9459708695556424 + ] + } + ], + "layout": { + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "#2a3f5f" + }, + "error_y": { + "color": "#2a3f5f" + }, + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "baxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "fillpattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "#EBF0F8" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "#C8D4E3" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowcolor": "#2a3f5f", + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "colorscale": { + "diverging": [ + [ + 0, + "#8e0152" + ], + [ + 0.1, + "#c51b7d" + ], + [ + 0.2, + "#de77ae" + ], + [ + 0.3, + "#f1b6da" + ], + [ + 0.4, + "#fde0ef" + ], + [ + 0.5, + "#f7f7f7" + ], + [ + 0.6, + "#e6f5d0" + ], + [ + 0.7, + "#b8e186" + ], + [ + 0.8, + "#7fbc41" + ], + [ + 0.9, + "#4d9221" + ], + [ + 1, + "#276419" + ] + ], + "sequential": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "sequentialminus": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ] + }, + "colorway": [ + "#636efa", + "#EF553B", + "#00cc96", + "#ab63fa", + "#FFA15A", + "#19d3f3", + "#FF6692", + "#B6E880", + "#FF97FF", + "#FECB52" + ], + "font": { + "color": "#2a3f5f" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "#E5ECF6", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "mapbox": { + "style": "light" + }, + "paper_bgcolor": "white", + "plot_bgcolor": "#E5ECF6", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "line": { + "color": "#2a3f5f" + } + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "title": { + "x": 0.05 + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + } + } + }, + "title": { + "text": "S-curve. N_samples: 100; Noise: 0.1" + } + } + }, + "text/html": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "n_samples = 100\n", + "noise_mc = 0.1\n", + "\n", + "X, t = make_s_curve(n_samples=n_samples, noise=noise_mc, random_state=42)\n", + "\n", + "fig = go.Figure(data=[go.Scatter3d(x=X[:, 0], y=X[:, 1], z=X[:, 2],\n", + " mode='markers')])\n", + "\n", + "fig.update_layout(\n", + " title=f\"S-curve. N_samples: {n_samples}; Noise: {noise_mc}\",\n", + ")" + ] + }, + { + "cell_type": "markdown", + "id": "32e983a7", + "metadata": {}, + "source": [ + "# Circles" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "49b18125", + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plot.ly" + }, + "data": [ + { + "mode": "markers", + "type": "scatter3d", + "x": [ + -0.36503092514868, + 0.7914254474532982, + -0.6260548942673563, + 0.7193834760620176, + 0.8758627559646511, + 0.2823818541364431, + -0.8839879781882499, + -0.6145290731029565, + 0.3557964697012626, + 0.9220298119340121, + -0.652477375574668, + -0.7939680865638878, + -0.5115137068416924, + -0.6140315776089803, + 0.33448410529900957, + 1.038598729978001, + -0.7643858364870251, + -0.8358987306376383, + -0.08545190515657802, + -0.6327044984214414, + 0.5698093024253077, + 0.12264074077603868, + -0.9071225809082429, + 0.44879629952288935, + -0.7141699706583768, + -0.4186435739030831, + 0.24241093235190436, + 0.7311776241300543, + 0.35950546022725133, + -0.8284228903561718, + 0.29605401688965194, + 0.8855998835656502, + -0.1235119882063119, + -0.8959742200007371, + 0.7064426681914984, + 0.7327542979534323, + -0.47281112831540206, + -0.2609426958678851, + -0.3135572599036312, + -0.37453691832791236, + 0.994924647649298, + -0.3468120110900049, + 0.5277487598909707, + 0.7359647569415853, + -1.0406129604145125, + -0.7433148503844806, + -0.4582808320231382, + -0.8830792353047378, + 0.07079742902411772, + -0.1655616059381623, + -1.163167659166981, + 1.0298250466644618, + -0.5959665195361695, + 0.1444057918174508, + 0.5072778648803635, + -0.6584214100611109, + 0.7856580345001203, + -0.16420414513933254, + -0.17231541023739655, + 0.016897645117101623, + 0.7174917231668072, + 0.6977022978401917, + 0.7644693736615199, + 0.5055669736728787, + 0.8315890907152316, + -0.3376102141337307, + 0.6826690590454035, + -0.37349584706691996, + 0.11259313270354335, + 1.022214993359585, + -0.7022036760132901, + 0.4864768625219351, + 0.4892743722931058, + 1.0022230375072565, + 0.7531208312125026, + 0.4490018542105104, + -1.031806824818783, + -0.5277910107945807, + 0.6466861570273275, + 0.21005367784794907, + -0.15278240259546633, + -0.29564602940318435, + -0.12948485702496448, + -0.8106269469274655, + 0.873788139169036, + 0.7583355674475486, + -0.8694715549334807, + 1.1575379267412893, + -1.0599244148608726, + -0.09150857694246123, + 0.14146965459891672, + -0.847820305215579, + -0.15466942278428414, + -0.5490793730071348, + -0.6426400154301222, + 0.23649414798384535, + -0.5417471646091444, + -0.2606505347161093, + 0.4150896977513743, + 0.7568467621429127 + ], + "y": [ + -0.7661344072596052, + 0.42486576898760076, + 0.5299326664518862, + -0.5989840343431667, + -0.796936939382692, + -0.8096356038711522, + 0.1996958148480896, + -0.47834009724984744, + 1.0246687513620794, + -0.08438963603439258, + 0.6739574755862918, + -0.5991273774271128, + 0.09644282085079739, + -0.8019336185229219, + -0.5321226147403938, + 0.5641269817992295, + -0.010603548480348807, + -0.23056849941286128, + 0.97514197680437, + -0.7055163496123885, + 0.4342503873047798, + -0.8239978464385116, + -0.2564656561394152, + -0.8949922474651674, + 0.8420040263910793, + 1.0425449484877547, + -1.0024352654459783, + -0.531254631380048, + 0.8901797717918579, + 0.21225070526973597, + 1.082785938798952, + -0.3765410612027956, + -0.9034931015086781, + -0.17066743298932968, + -0.8104017160809556, + 0.6046511910118025, + 0.6570369720595745, + 0.9009773695054852, + -0.9293628436789193, + 0.9591759215902631, + -0.24504193989813408, + -0.8616781061397156, + 0.702283086383762, + -0.4096798887492106, + -0.2756832640724241, + 0.7462474835002015, + -0.5410727689318285, + 0.08733169690894234, + 0.6540730475729934, + 1.0721507919327933, + 0.1372310827539026, + 0.3833666389106039, + 0.7596664898155353, + -0.9508559992755736, + 0.95085717238661, + -0.1156402564151964, + 0.6680970625124982, + 0.592372781032846, + -0.9838587447139334, + -0.7883585631400637, + 0.4741829197481984, + 0.010226234993571892, + 0.6915124607191983, + -0.6984745185719694, + 0.005928128405319588, + 0.672489804632873, + -0.5664894269129797, + 0.7336134846010716, + 0.8361895069974328, + -0.2976183219644267, + -0.36634306876992, + -0.9397171707432947, + 0.4810393810266521, + -0.24362690607333787, + -0.24647764457193116, + 0.5350584845246291, + -0.0268018351842875, + -0.8040543451828733, + -0.6556577717469991, + 0.6487854576660483, + 0.680117421609112, + -0.5459692075842197, + -1.167208554053302, + -0.6253437560391186, + 0.17483279898347376, + 0.1302343921986328, + 0.44081279104455945, + 0.1811094137427151, + 0.2031865697660982, + -0.7388570175621851, + -0.6812590552894154, + 0.1779488872940036, + -0.733960354811173, + -0.5726083344784639, + 0.5138616091469626, + 0.7122234844608104, + 0.342008779380367, + 0.9244595593322749, + -0.7548128421688731, + 0.11598677236115121 + ], + "z": [ + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 1, + 1, + 0, + 0, + 1, + 1, + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 1, + 0, + 1, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 1, + 0, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 1, + 0, + 1, + 1 + ] + } + ], + "layout": { + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "#2a3f5f" + }, + "error_y": { + "color": "#2a3f5f" + }, + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "baxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "fillpattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "#EBF0F8" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "#C8D4E3" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowcolor": "#2a3f5f", + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "colorscale": { + "diverging": [ + [ + 0, + "#8e0152" + ], + [ + 0.1, + "#c51b7d" + ], + [ + 0.2, + "#de77ae" + ], + [ + 0.3, + "#f1b6da" + ], + [ + 0.4, + "#fde0ef" + ], + [ + 0.5, + "#f7f7f7" + ], + [ + 0.6, + "#e6f5d0" + ], + [ + 0.7, + "#b8e186" + ], + [ + 0.8, + "#7fbc41" + ], + [ + 0.9, + "#4d9221" + ], + [ + 1, + "#276419" + ] + ], + "sequential": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "sequentialminus": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ] + }, + "colorway": [ + "#636efa", + "#EF553B", + "#00cc96", + "#ab63fa", + "#FFA15A", + "#19d3f3", + "#FF6692", + "#B6E880", + "#FF97FF", + "#FECB52" + ], + "font": { + "color": "#2a3f5f" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "#E5ECF6", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "mapbox": { + "style": "light" + }, + "paper_bgcolor": "white", + "plot_bgcolor": "#E5ECF6", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "line": { + "color": "#2a3f5f" + } + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "title": { + "x": 0.05 + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + } + } + }, + "title": { + "text": "Circles. N_samples: 100; Noise: 0.1" + } + } + }, + "text/html": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "n_samples = 100\n", + "\n", + "X, y = make_circles(n_samples=n_samples, noise=0.1, random_state=42)\n", + "X = np.hstack([X, y.reshape(-1, 1)])\n", + "\n", + "fig = go.Figure(data=[go.Scatter3d(x=X[:, 0], y=X[:, 1], z=X[:, 2],\n", + " mode='markers')])\n", + "\n", + "fig.update_layout(\n", + " title=f\"Circles. N_samples: {n_samples}; Noise: {noise_mc}\",\n", + ")" + ] + }, + { + "cell_type": "markdown", + "id": "593f3b42", + "metadata": {}, + "source": [ + "# Dataset Generator" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "1b5c896b", + "metadata": {}, + "outputs": [], + "source": [ + "import numpy as np\n", + "import random\n", + "\n", + "class DatasetGenerator:\n", + " def __init__(self, dim_of_space, dim_of_manifold):\n", + " self.dim_of_space = dim_of_space\n", + " self.dim_of_manifold = dim_of_manifold\n", + "\n", + " def generate_dataset_in_subspace(self, n_samples, seed_value=42):\n", + " \"\"\"\n", + " Generate a dataset that lies along a low-dimensional subspace within a high-dimensional space.\n", + "\n", + " Parameters:\n", + " - num_samples: Number of data points to generate.\n", + " - dim_of_space: Dimension of the high-dimensional space (L).\n", + " - dim_of_subspace: Dimension of the low-dimensional subspace (l).\n", + "\n", + " Returns:\n", + " - dataset: NumPy array with shape (num_samples, dim_of_space)\n", + " \"\"\"\n", + " np.random.seed(seed_value)\n", + " # Generate a random orthonormal basis for the subspace\n", + " basis = np.linalg.qr(np.random.randn(self.dim_of_space, self.dim_of_manifold))[0]\n", + " # Generate random coefficients for the linear combination\n", + " coefficients = np.random.randn(n_samples, self.dim_of_manifold)\n", + " # Compute the dataset by projecting random points onto the subspace\n", + " dataset = np.dot(coefficients, basis.T)\n", + "\n", + " return dataset\n", + "\n", + " def generate_lines_planes(self, n_samples, scale, noise, line_params):\n", + " \"\"\"\n", + " Generate a dataset of straight lines in either a 2D plane or 3D space.\n", + "\n", + " Parameters:\n", + " - n_samples: Number of samples in the dataset.\n", + " - plane: If True, generate lines in a 2D plane. If False, generate lines in 3D space.\n", + "\n", + " Returns:\n", + " - dataset: NumPy array with shape (n_samples, dim_of_space)\n", + " \"\"\"\n", + " if self.dim_of_space not in [2, 3]:\n", + " raise ValueError(\"dim_of_space must be either 2 or 3.\")\n", + " dataset = np.zeros((n_samples, self.dim_of_space))\n", + " if self.dim_of_space == 2:\n", + " k, b = line_params\n", + " else:\n", + " if self.dim_of_manifold == 2: # plane in 3D space\n", + " a, b, c = line_params\n", + " if self.dim_of_manifold == 1:\n", + " p_0, p_1, p_2, x_0, y_0, z_0 = line_params\n", + "\n", + " for i in range(n_samples):\n", + " eps = noise * np.random.normal()\n", + " # Generate random parameters for the line\n", + " if self.dim_of_space == 2:\n", + " x = scale * np.random.rand()\n", + " y = k * x + b + eps\n", + " dataset[i] = [x, y]\n", + " else:\n", + " if self.dim_of_manifold == 2:\n", + " x = scale * np.random.rand(self.dim_of_space - 1)\n", + " y = a * x[0] + b * x[1] + c + eps\n", + " dataset[i] = [x[0], x[1], y]\n", + " if self.dim_of_manifold == 1:\n", + " t = scale * np.random.rand()\n", + " x = x_0 + p_0 * t + noise * np.random.normal()\n", + " y = y_0 + p_1 * t + noise * np.random.normal()\n", + " z = z_0 + p_2 * t + noise * np.random.normal()\n", + " dataset[i] = [x, y, z]\n", + " return dataset\n" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "e082aa2a", + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plot.ly" + }, + "data": [ + { + "mode": "markers", + "type": "scatter3d", + "x": [ + 99.45094385086011, + 76.91842287812524, + 92.99648060669378, + 78.78117608488317, + 22.911252734400588, + 46.32311987623948, + 3.5133413790836676, + 20.319355936858617, + 94.9886365393391, + 43.16880150772471, + 35.520580240824714, + 15.939191983860157, + 24.344496773047876, + 53.17297317377565, + 22.25978000262464, + 92.40666180352459, + 3.1288355726563077, + 49.92958797775131, + 14.924371628736354, + 67.42956023590453, + 68.05455730165085, + 1.3367994717038534, + 79.91042759941794, + 43.615500430373146, + 32.04949506039142, + 7.678401150009718, + 5.899847743222686, + 59.90038155387871, + 71.36818756748346, + 68.78522454370538, + 86.06894336129285, + 39.20976675987586, + 77.14756461783251, + 47.32275807124503, + 85.53278075436556, + 7.231179436596403, + 95.10253341156604, + 28.619469978295154, + 83.69686275082327, + 77.99138042906168, + 95.51582791038139, + 54.1599344945964, + 35.38712568605425, + 26.849692316181894, + 60.73821363565388, + 60.97945380777596, + 76.77895629910245, + 64.07434947141071, + 5.194626053644791, + 6.697298959393361, + 45.73508875132916, + 0.19089243948269274, + 91.2788262359939, + 18.282972918957686, + 92.6449561411171, + 45.14856078931937, + 83.34027348188985, + 70.3162539463575, + 30.62353584363674, + 76.82530795682713, + 89.01633431390626, + 44.05148624466768, + 8.87416399830493, + 61.31839931637951, + 17.68179513419024, + 69.24088960992646, + 71.03280845345567, + 17.639470087359722, + 67.02373192160148, + 8.627769063646229, + 91.67488841778408, + 90.00184006371617, + 84.29735544421695, + 96.58058471014624, + 67.97967656369774, + 50.499821551101, + 51.62756808020187, + 9.418736533754323, + 86.60718061500961, + 82.69106978300003, + 30.156130430382134, + 32.807662770296375, + 14.394721931935162, + 81.31193780307281, + 16.8158492000553, + 95.13639848496442, + 93.05624777641155, + 30.54333465985004, + 24.405734043119352, + 48.428388453468884, + 96.8516072383931, + 71.88156086541012, + 79.50901311807877, + 4.174362988582859, + 22.10143471490966, + 32.179251990613444, + 7.763777282322848, + 48.01229208457484, + 76.12082860887115, + 77.67694859393374 + ], + "y": [ + 71.26311230925234, + 45.745254862292484, + 77.139641902435, + 67.41674141811558, + 95.17305705095322, + 68.9167038234669, + 90.2306458323807, + 3.3297713823635, + 18.191472911234474, + 94.98437480731889, + 94.05920524209188, + 43.988562944657474, + 19.894802758025044, + 12.01649952273469, + 65.19510968187357, + 17.2520044661149, + 55.627431826102324, + 48.17279689989101, + 30.550952531844054, + 73.8159935543922, + 24.191831600549072, + 58.93548081199139, + 88.54643579993099, + 90.73881854436725, + 74.80936529252735, + 66.42090080172537, + 65.12068430993551, + 14.739692734179343, + 19.012979826026044, + 80.48464689569118, + 13.35115664076345, + 31.38524346570137, + 94.54946668491459, + 16.95325935078277, + 18.803243068239727, + 91.75866889729166, + 4.759292126455639, + 44.67363529859695, + 71.45568879756976, + 71.9081870384184, + 25.947490549887686, + 54.834079163071145, + 86.84506664040545, + 14.538151412605139, + 30.78537069114544, + 92.43568024921325, + 36.66518184065916, + 92.3911029919143, + 43.79516008042942, + 97.79730378115049, + 79.81867727663642, + 47.34704980801294, + 65.6381101107705, + 36.86811306211318, + 31.884417197875937, + 44.31198166809926, + 44.78560667306294, + 15.062989378638303, + 33.356113073852235, + 53.39088542952422, + 97.8730154219701, + 7.610376622714076, + 82.60623465191512, + 26.755824543885222, + 54.750881901724405, + 99.08814062414586, + 40.60310282292874, + 42.64395520167924, + 95.28293360809846, + 54.61017603358089, + 11.053724486556348, + 75.21186067157177, + 83.76623902824274, + 59.26522640392394, + 60.32128085318613, + 46.494051528355754, + 65.28199746576624, + 28.68402164401047, + 88.79946602508734, + 9.381067713340041, + 6.74597232722165, + 98.8516698724383, + 2.762074454407315, + 8.432552481890498, + 21.271435530453953, + 32.39831753122638, + 85.07150132045813, + 50.85577089001531, + 70.20825614561902, + 93.98692338070785, + 78.2784553456729, + 31.719698183750257, + 58.82786536130226, + 58.19361851935469, + 12.533064900490743, + 91.75753438672318, + 38.220363688556745, + 35.05693745033388, + 57.366717470402016, + 60.04775762059948 + ], + "z": [ + 1782.9201704590055, + 1146.8768776178629, + 1351.3864535273215, + 967.1087892640024, + 826.9790089246303, + 910.5045898510318, + 679.6370788932398, + 106.54736561832033, + 1236.7757453338666, + 1047.25390907429, + 895.1971060139944, + 514.7446313619578, + 361.9551575844288, + 762.7799738980766, + 766.8033375914855, + 1124.6103827785432, + 434.4619267540035, + 833.8105229788083, + 364.45287849552597, + 1270.2568736541084, + 890.3083618378416, + 366.28250148064507, + 1511.3465966221402, + 1136.669719695598, + 724.0589295498996, + 630.4165279841523, + 495.3800770720459, + 708.4296416744977, + 937.8061712038882, + 1334.8427948086862, + 877.7475123776592, + 542.2264474333534, + 1542.8549214046743, + 644.7763647896293, + 1234.3951822521337, + 825.4304356749915, + 1092.4497149455738, + 576.161834082306, + 1217.6697999029702, + 1343.1360431628914, + 988.948741728273, + 877.1884709278193, + 1065.029286070823, + 367.56291209318556, + 989.1120312337675, + 1214.8790467754357, + 988.9571824757766, + 1323.7191023793523, + 414.8793332140438, + 694.6892997775044, + 1125.138377837502, + 311.6143617600007, + 1262.95552954764, + 521.1952759168001, + 1118.69802114366, + 884.826376845202, + 1194.9510535715835, + 782.6764851927516, + 534.8072122634194, + 1175.5800020252275, + 1682.4213035677844, + 809.752414532863, + 704.7387096986153, + 754.9001412052784, + 481.3855384431189, + 1518.0978327138785, + 1030.000696072243, + 560.5090045553195, + 1332.1443741509675, + 515.8369119301292, + 982.1703350301743, + 1331.7964593344902, + 1541.4509317445857, + 1510.9623209640017, + 1170.396986781554, + 894.9948510006126, + 898.1013085625626, + 191.38976624258424, + 1488.6894598575204, + 859.243285029907, + 423.15461148490044, + 1154.2855971698232, + -38.52789747639602, + 851.21207668309, + 307.3764036788831, + 1278.5746138641937, + 1613.1053078790976, + 678.8813836975136, + 799.2776247667457, + 1153.085255767081, + 1788.5682242615133, + 728.0040621045171, + 1175.297433871351, + 531.0011641460574, + 485.8080055085376, + 1070.0010685204124, + 485.76250942181696, + 856.3737396740215, + 1219.8077173834104, + 1197.7350157627068 + ] + } + ], + "layout": { + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "#2a3f5f" + }, + "error_y": { + "color": "#2a3f5f" + }, + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "baxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "fillpattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "#EBF0F8" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "#C8D4E3" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowcolor": "#2a3f5f", + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "colorscale": { + "diverging": [ + [ + 0, + "#8e0152" + ], + [ + 0.1, + "#c51b7d" + ], + [ + 0.2, + "#de77ae" + ], + [ + 0.3, + "#f1b6da" + ], + [ + 0.4, + "#fde0ef" + ], + [ + 0.5, + "#f7f7f7" + ], + [ + 0.6, + "#e6f5d0" + ], + [ + 0.7, + "#b8e186" + ], + [ + 0.8, + "#7fbc41" + ], + [ + 0.9, + "#4d9221" + ], + [ + 1, + "#276419" + ] + ], + "sequential": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "sequentialminus": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ] + }, + "colorway": [ + "#636efa", + "#EF553B", + "#00cc96", + "#ab63fa", + "#FFA15A", + "#19d3f3", + "#FF6692", + "#B6E880", + "#FF97FF", + "#FECB52" + ], + "font": { + "color": "#2a3f5f" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "#E5ECF6", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "mapbox": { + "style": "light" + }, + "paper_bgcolor": "white", + "plot_bgcolor": "#E5ECF6", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "line": { + "color": "#2a3f5f" + } + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "title": { + "x": 0.05 + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + } + } + }, + "title": { + "text": "Plane. N_samples: 100; Noise: 0.1" + } + } + }, + "text/html": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# Example usage:\n", + "dim_of_space = 3\n", + "dim_of_manifold = 2\n", + "n_samples = 100\n", + "\n", + "plane_generator = DatasetGenerator(dim_of_space, dim_of_manifold)\n", + "X = plane_generator.generate_lines_planes(n_samples, scale=100, noise=100, line_params = [10,7,30])\n", + "\n", + "\n", + "fig = go.Figure(data=[go.Scatter3d(x=X[:, 0], y=X[:, 1], z=X[:, 2],\n", + " mode='markers')])\n", + "\n", + "fig.update_layout(\n", + " title=f\"Plane. N_samples: {n_samples}; Noise: {noise_mc}\",\n", + ")" + ] + }, + { + "cell_type": "markdown", + "id": "a2a7eb53", + "metadata": {}, + "source": [ + "# PDF" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "5d6a6397", + "metadata": {}, + "outputs": [], + "source": [ + "import numpy as np\n", + "from sklearn.neighbors import KernelDensity\n", + "from scipy.optimize import approx_fprime\n", + "\n", + "class KDEProbabilityDensityFunction:\n", + " def __init__(self, data, kernel='gaussian'):\n", + " self.data = data\n", + " self.kernel = kernel\n", + " self.kde_model = self._fit_kde()\n", + "\n", + " def _fit_kde(self):\n", + " kde_model = KernelDensity(kernel=self.kernel)\n", + " kde_model.fit(self.data)\n", + " return kde_model\n", + "\n", + " def value(self, x):\n", + " # Reshape x to match the input dimensions\n", + " x = np.array(x).reshape(1, -1)\n", + " return np.exp(self.kde_model.score_samples(x))\n", + "\n", + " def grad(self, x, epsilon=1e-5):\n", + " x = np.array(x)\n", + "\n", + " def func(x):\n", + " return np.log(self.value(x))\n", + "\n", + " # Use numerical approximation for gradient\n", + " gradient = approx_fprime(x, func, epsilon)\n", + " return gradient" + ] + }, + { + "cell_type": "markdown", + "id": "aec18b70", + "metadata": {}, + "source": [ + "# Active subspace" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "c9e9ebd4", + "metadata": {}, + "outputs": [], + "source": [ + "dataset = plane_generator.generate_lines_planes(1000, scale=100, noise=10, line_params = [10,7,30])\n", + "\n", + "X, y = make_circles(n_samples=n_samples, noise=0.1, random_state=42)\n", + "dataset = np.hstack([X, y.reshape(-1, 1)])\n", + "\n", + "dataset, t = make_s_curve(n_samples=100, noise=0.2, random_state=42)\n", + "\n", + "kde_pdf = KDEProbabilityDensityFunction(dataset, kernel='gaussian')\n", + "\n", + "point = np.ones(dataset.shape[1])\n", + "pdf_value = kde_pdf.value(point)\n", + "pdf_gradient = kde_pdf.grad(point)" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "2b424855", + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plot.ly" + }, + "data": [ + { + "mode": "markers", + "type": "scatter3d", + "x": [ + -1.061534449950624, + -0.8475919159897719, + 0.8749867217624493, + 0.6586505896698884, + 0.47334182051681106, + 0.19517968276151637, + 0.615606837410703, + -0.17330620377477923, + 0.6202127570093278, + 1.082234131035429, + 1.212959234623869, + -1.1241927654170532, + 0.20106970661033588, + -0.33472601197429563, + 0.022033894159502465, + 0.22226160278334062, + -1.0117259597419688, + 0.08046536706674623, + -0.7762231503533161, + -1.0854557096615818, + 0.8540794424476592, + 0.3215378198703028, + -0.8702559325342871, + -0.7865037131300325, + -0.39970228974367045, + 0.729156094701668, + -0.3590228526219846, + 0.6777881934219311, + 0.8900983439306296, + 0.7342614613576691, + 0.6345553336822163, + 0.06014681536936686, + 0.7731774659472206, + -0.7433888451804924, + -0.853350539528935, + 0.21829288367675437, + -1.1329492389223126, + 0.3024226003535265, + 0.8970233869890307, + -0.3633329984562891, + 0.45113890413065, + -0.29458865418185093, + 0.9825725758040532, + -0.5794303511453635, + -0.9399045984333416, + 1.0299822809377734, + -0.9676658575676725, + -0.04058305440086371, + 0.4977086475804262, + -0.05842073522093838, + -0.7425838894115832, + 0.7321912048809257, + -1.117322024516389, + -0.7352270874811883, + 0.9002327704769754, + -0.6381890933896347, + 0.7749117512476313, + 0.49774975085714523, + 1.0246977638666472, + -0.7700436401853874, + -0.6762204660111312, + -0.7038817926103372, + -0.019752769369654435, + -0.8239444235289607, + -1.0350807472931685, + 0.3442650591123123, + 0.14317089452097698, + 0.305634358385779, + 1.2260813181696149, + -1.3658257929540194, + 0.681712842317093, + -0.620025827832638, + 0.9042596056707347, + 0.38543350410224414, + 0.9419694357055146, + 0.6167548718696798, + 0.4090801698361044, + 0.9021422078263873, + -1.1181511977633387, + 0.5039672640797338, + -0.26779529469902724, + 0.78730272661126, + -0.5709477909987832, + 0.9526704899390693, + -1.3829230319641375, + -0.9597605419443371, + 0.696803853964425, + 1.133088789230658, + -0.6447614602500666, + -0.2818327625675743, + 0.5302338126981547, + 1.078333100679347, + 0.39164635561820416, + 0.4790509145760433, + 0.45953185115310063, + -0.18910765446208483, + 0.5657073107305864, + -0.5500566080234095, + 0.719263395169491, + 0.7096175469048793 + ], + "y": [ + 0.4872896107759952, + 1.47931387463779, + 0.32483796896185063, + 0.9202945677561553, + 2.0685151776895108, + 0.3570505651739937, + 0.9095297317005051, + 1.6660290877719648, + 0.27221023666762834, + 0.14205474844522598, + -0.06875056218627851, + 0.11756504624115086, + 1.8088816744065142, + 1.366684122735864, + 1.593289773807174, + 1.4568929047833088, + 1.5193352564588323, + 0.39928823322928997, + 2.073372654793179, + 0.7915120535954135, + 1.847513060759117, + 1.7942292120509038, + 0.43970521973413756, + 0.31252454390800766, + 0.49568226419857736, + 0.7341722018207537, + 1.64998994884299, + 1.6443984471403348, + 0.03660773011263102, + 1.1539207400593408, + 1.1520253695266285, + 0.19665252117609067, + 0.666337409598619, + 0.2848127829027555, + 1.8554623888179216, + 0.7640693053384258, + 1.0937796170337388, + 1.2814980138262368, + 0.6856347546871329, + 1.8449639785101548, + 1.8070216384953801, + 0.6734850110549333, + 1.0659001089777804, + 0.46317470058140847, + 0.7496009638415854, + 0.13523379888438747, + 1.3817010917275856, + 1.1312838148424453, + -0.06284149968443575, + 0.44525672043382897, + 1.9659904929579597, + 0.6011978344206378, + 0.28560942538961653, + 1.0023709972168824, + 2.2268338873788864, + 0.36579626525583486, + 1.4536905710457646, + 1.4828007001706562, + 0.4317388473393553, + 1.6761880676211571, + 0.9006495352361125, + 1.4273135883872867, + 1.5281551829526552, + 1.0757501364760689, + 0.3169701343678094, + 1.6085516398597848, + 0.7063934004411601, + 0.34700840992617155, + 0.10094947610807148, + 1.3008172914638663, + 1.1914845870378703, + 0.45165311299280436, + 0.8229826402986216, + 0.21015382783832948, + 1.5219677555189133, + 0.50706539680257, + 1.506699439615363, + 0.8991397944539308, + 1.8710106229040862, + 0.09559101399482017, + 0.6972936137392622, + 0.09151470017875579, + 2.0444111832406757, + 1.7252672304615344, + 0.35078381607180886, + 1.2556909237377594, + 1.7170306912575566, + 0.9976567126381297, + 0.8948570775987267, + 0.5324420240992859, + 0.23519884983354297, + 1.6930428808324276, + 1.7066284532029963, + 1.3126129020180632, + 0.38844271379793655, + 0.4169263943500107, + 1.3082225134899916, + 1.7515310895627847, + 1.8363543616498355, + 1.8548223351051583 + ], + "z": [ + 0.7928564247738696, + -1.4799695474617656, + -1.58132933347194, + -0.6025390764378054, + 1.991266006178465, + 1.937214104728342, + 1.5850340861492227, + -2.1179211378288056, + -0.3168794914106412, + -1.073864004226712, + 1.1710375686105747, + -1.1994645487698326, + -1.861935967383423, + 1.8285328682297635, + 2.034630835073511, + 1.9901016587066591, + 1.2902900537461799, + -0.18169870688968945, + 0.20364498422786095, + 1.4860895264829248, + -0.21583795799252392, + 2.1592399974923535, + 1.8091540949419422, + 0.5402470477608228, + 0.2589574025058464, + -1.8620875331901443, + 2.3899626886443586, + -0.17064514095475897, + -0.5238723686035128, + 1.3040557102795716, + -0.8959588727265904, + 1.894188200866104, + 1.4235764790280188, + -1.43324527136515, + -1.2499248953872046, + -1.5972764190255577, + 1.4574671854414967, + 1.6805466974052874, + -1.3444866879896322, + 0.2532866802949377, + 1.6487921454427166, + 0.3673247243110513, + 1.5543477536425594, + -1.8481665264208957, + 1.303614422634839, + -0.6901755734387394, + 1.1794694558775307, + 0.22973018402092402, + -0.4142335679568877, + 1.8654692340199455, + -1.2816995678089762, + -1.8438974570896631, + -1.6298211240270843, + -1.7121296290913939, + -0.6098427493274734, + -1.7000401938967662, + 1.7646989948615845, + 2.0649595124708213, + 1.5557887488163626, + 0.8504266052873851, + 0.19490525221150107, + 1.8070578234660226, + -1.9325992660007734, + 0.6313624426498662, + 1.784247371942081, + -0.056741767102956565, + 2.2065720671495637, + -1.9437470148746707, + 2.0583714359225844, + -0.7722051711017248, + -1.8885791151368365, + 2.1490414134385643, + 1.1810964256715237, + -1.7121213925347716, + -1.5627795415774959, + -1.4171094161136508, + -1.622065912908691, + 1.2908272643166927, + 0.5286897968841168, + 1.4797221765378337, + -2.0147773231269244, + -0.45903915670042433, + 1.3234216369412395, + 1.5786550872021612, + 1.5348219332416089, + 0.800716244573354, + -1.899686141134243, + -0.740190448169723, + -1.7970025806933316, + 0.027553026183315343, + 1.4897037798661403, + -1.4428480482972752, + -2.036102251542911, + -0.02824848814456085, + -1.7588501391161249, + -0.1862667741539396, + -0.12563765093073792, + 0.012417536408988322, + 1.2247487458954327, + 2.0414851016057662 + ] + } + ], + "layout": { + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "#2a3f5f" + }, + "error_y": { + "color": "#2a3f5f" + }, + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "baxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "fillpattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "#EBF0F8" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "#C8D4E3" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowcolor": "#2a3f5f", + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "colorscale": { + "diverging": [ + [ + 0, + "#8e0152" + ], + [ + 0.1, + "#c51b7d" + ], + [ + 0.2, + "#de77ae" + ], + [ + 0.3, + "#f1b6da" + ], + [ + 0.4, + "#fde0ef" + ], + [ + 0.5, + "#f7f7f7" + ], + [ + 0.6, + "#e6f5d0" + ], + [ + 0.7, + "#b8e186" + ], + [ + 0.8, + "#7fbc41" + ], + [ + 0.9, + "#4d9221" + ], + [ + 1, + "#276419" + ] + ], + "sequential": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "sequentialminus": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ] + }, + "colorway": [ + "#636efa", + "#EF553B", + "#00cc96", + "#ab63fa", + "#FFA15A", + "#19d3f3", + "#FF6692", + "#B6E880", + "#FF97FF", + "#FECB52" + ], + "font": { + "color": "#2a3f5f" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "#E5ECF6", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "mapbox": { + "style": "light" + }, + "paper_bgcolor": "white", + "plot_bgcolor": "#E5ECF6", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "line": { + "color": "#2a3f5f" + } + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "title": { + "x": 0.05 + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + } + } + }, + "title": { + "text": "Dataset" + } + } + }, + "text/html": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "fig = go.Figure(data=[go.Scatter3d(x=dataset[:, 0], y=dataset[:, 1], z=dataset[:, 2],\n", + " mode='markers')])\n", + "fig.update_layout(\n", + " title=f\"Dataset\",\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "id": "765df221", + "metadata": {}, + "outputs": [], + "source": [ + "from typing import Callable\n", + "import numpy as np\n", + "\n", + "def check_input(X):\n", + " # X : ndarray of input samples\n", + "\n", + " assert len(X.shape) == 2 and type(X) == np.ndarray, 'X should be a 2d numpy array'\n", + " N, d = X.shape\n", + " return X, N, d\n", + "\n", + "def get_n(S, eps=1e-8):\n", + " ediff = np.fabs(np.diff(S.reshape((S.size,))))\n", + " n = np.argmax(ediff)+1\n", + "\n", + " return n\n", + "\n", + "def compute_AS(X: np.ndarray, kde_pdf) -> np.ndarray:\n", + " # X : ndarray - input samples\n", + " # f_deriv : Callable - function derivative\n", + "\n", + " X, N, d = check_input(X)\n", + "\n", + " G = 1/np.sqrt(N) * np.column_stack([kde_pdf.grad(x) for x in dataset])\n", + " U, S, Vh = np.linalg.svd(G)\n", + " \n", + " # print(S)\n", + " \n", + " return get_n(S)" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "4ff1d51a", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2\n" + ] + } + ], + "source": [ + "n = compute_AS(dataset, kde_pdf)\n", + "print(n)" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "836481bf", + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plot.ly" + }, + "data": [ + { + "hovertemplate": "x=%{x}
y=%{y}", + "legendgroup": "", + "marker": { + "color": "#636efa", + "symbol": "circle" + }, + "mode": "markers", + "name": "", + "orientation": "v", + "showlegend": false, + "type": "scatter", + "x": [ + 0.6500366140453336, + 1.8327578503228605, + 0.2773498162906553, + 0.7770301926045837, + 1.5860389648392552, + 0.03634636011732543, + 0.4947915778732158, + 1.9105316345345509, + 0.13235337727489263, + -0.019020563291676153, + -0.5466330470038216, + 0.5727797368718262, + 1.9119621263577191, + 1.1571396171438528, + 1.2496943065103383, + 1.0710425249200914, + 1.5562647435012673, + 0.38251600426102506, + 2.1616239192823725, + 0.8567728749782332, + 1.55812006515368, + 1.3438783120192916, + 0.4209591949984172, + 0.44147159529486757, + 0.5476346278819559, + 0.7437126473209857, + 1.3611204196650406, + 1.4064015181197767, + -0.13874991025934436, + 0.7320921438234297, + 1.042615381242907, + -0.0743933280520294, + 0.24103016862353932, + 0.6592371594026657, + 2.163219400777696, + 0.8765467027557529, + 1.1616433741610206, + 0.9221524458341295, + 0.5847449490573357, + 1.825289964809716, + 1.3870899424383283, + 0.6746210327080836, + 0.5482968087979112, + 0.8386382142563844, + 0.8009582200482166, + -0.06109497931120576, + 1.427415853756138, + 1.0601165388024527, + -0.14130714404777994, + 0.19860263777730788, + 2.2426843039845648, + 0.6137143851218081, + 0.7869793870324261, + 1.377509288954676, + 1.958435440859003, + 0.7425110238814105, + 0.9472151088377588, + 1.0112707221769583, + -0.06811455151279952, + 1.6972911871918328, + 1.0172044844434422, + 1.3179421645570415, + 1.7133355642866486, + 1.1676968911227943, + 0.35187484524963714, + 1.447970472312142, + 0.34869932279678423, + 0.5000208781833281, + -0.5034116740276615, + 1.7114139958095684, + 1.1961573251895294, + 0.320364093044611, + 0.38628376186261576, + 0.31781129868992886, + 1.3984502482532595, + 0.4999331886741645, + 1.5362136256697747, + 0.4452600662721313, + 2.019292856563998, + -0.23749386126266933, + 0.9989339087088855, + -0.06689175175382679, + 1.9330901181976927, + 1.1820903500905362, + 0.5108761931716985, + 1.354207687713618, + 1.6947076141238422, + 0.7398859244179281, + 1.2614257051425826, + 0.5807051256073099, + -0.11277535114158019, + 1.5090392255337493, + 1.7853017780652194, + 1.125459491365464, + 0.4737903027752212, + 0.4730972581235535, + 1.1103802391046094, + 1.8180976244266749, + 1.397273951318366, + 1.3116012125781034 + ], + "xaxis": "x", + "y": [ + -0.8061650699630208, + -0.5191364867437732, + 0.7894715367381973, + 0.8373492165201767, + 1.212822819941436, + 0.4569979822012522, + 0.9844094603780905, + 0.1219606792291185, + 0.6417778446020436, + 0.9798885578000984, + 1.2411540055461985, + -1.145026118123924, + 0.5423619063087126, + 0.2278664419581811, + 0.6508422795251015, + 0.7994635885748295, + -0.4223701674572477, + 0.17421865306221004, + -0.1353072073379487, + -0.682116420521244, + 1.3207872642649292, + 1.0047390273619359, + -0.5481692891544068, + -0.6151839013962044, + -0.21844785414624007, + 0.7417835285496875, + 0.33410218998646474, + 1.0987758529618514, + 0.814575973097651, + 1.1424800161728619, + 0.8544245424607099, + 0.27879125200789284, + 1.0517817193398313, + -0.7543775115359048, + -0.39782890257308245, + 0.2855715531681779, + -0.644230236711386, + 0.7992009622698912, + 0.933561297201791, + 0.19852390272539736, + 1.0875093403492002, + -0.05816340718287332, + 1.3765107219439923, + -0.58348268543902, + -0.5709637196269727, + 0.961595270881627, + -0.4290239663789893, + 0.3022267701419477, + 0.4212440995210775, + 0.2335759379337694, + -0.2634792650148235, + 0.7085523591781163, + -1.1284154033079972, + -0.567418563537782, + 1.4380184167479235, + -0.6542678389525491, + 1.3065962394645214, + 1.076428609702073, + 1.2369772308562659, + -0.18553581451397, + -0.37322993667243337, + -0.10933146417854347, + 0.24568370508738085, + -0.4264762299806096, + -0.7425580351775178, + 0.7800718128234322, + 0.5299724868346062, + 0.2203879984739525, + 1.3793844484875406, + -1.0027809678028, + 0.8238839850291951, + -0.27611740664911216, + 1.2001949226452868, + 0.2780172386280118, + 1.1946347747233774, + 0.6089227469486291, + 0.676248134468211, + 1.2293673551592423, + -0.490815020057348, + 0.6377139456469192, + -0.23404562687435296, + 0.7376551196556286, + 0.15038237990074804, + 1.5371170298134167, + -1.086934895869182, + -0.490326112478001, + 0.986400404161205, + 1.300318059118558, + -0.5189461972548133, + -0.11569038083345558, + 0.7032703861796639, + 1.3838633723376694, + 0.680120596875148, + 0.8273278741202905, + 0.3952649894444146, + -0.07860148408518045, + 0.9003206464934487, + -0.027342320965424338, + 1.3148046855086475, + 1.3822238133297384 + ], + "yaxis": "y" + } + ], + "layout": { + "legend": { + "tracegroupgap": 0 + }, + "margin": { + "t": 60 + }, + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "#2a3f5f" + }, + "error_y": { + "color": "#2a3f5f" + }, + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "baxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "fillpattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "#EBF0F8" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "#C8D4E3" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowcolor": "#2a3f5f", + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "colorscale": { + "diverging": [ + [ + 0, + "#8e0152" + ], + [ + 0.1, + "#c51b7d" + ], + [ + 0.2, + "#de77ae" + ], + [ + 0.3, + "#f1b6da" + ], + [ + 0.4, + "#fde0ef" + ], + [ + 0.5, + "#f7f7f7" + ], + [ + 0.6, + "#e6f5d0" + ], + [ + 0.7, + "#b8e186" + ], + [ + 0.8, + "#7fbc41" + ], + [ + 0.9, + "#4d9221" + ], + [ + 1, + "#276419" + ] + ], + "sequential": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "sequentialminus": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ] + }, + "colorway": [ + "#636efa", + "#EF553B", + "#00cc96", + "#ab63fa", + "#FFA15A", + "#19d3f3", + "#FF6692", + "#B6E880", + "#FF97FF", + "#FECB52" + ], + "font": { + "color": "#2a3f5f" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "#E5ECF6", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "mapbox": { + "style": "light" + }, + "paper_bgcolor": "white", + "plot_bgcolor": "#E5ECF6", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "line": { + "color": "#2a3f5f" + } + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "title": { + "x": 0.05 + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + } + } + }, + "xaxis": { + "anchor": "y", + "domain": [ + 0, + 1 + ], + "title": { + "text": "x" + } + }, + "yaxis": { + "anchor": "x", + "domain": [ + 0, + 1 + ], + "title": { + "text": "y" + } + } + } + }, + "text/html": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "new = np.array([U[:, :n].T @ x for x in dataset])\n", + "\n", + "px.scatter(x=new[:, 0], y=new[:, 1])" + ] + }, + { + "cell_type": "markdown", + "id": "f423aad3", + "metadata": {}, + "source": [ + "# Sub-sample" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "id": "73845bf2", + "metadata": {}, + "outputs": [], + "source": [ + "n_samples = 1000\n", + "dim_of_space = 50\n", + "dim_of_manifold = 15\n", + "\n", + "# plane_generator = DatasetGenerator(dim_of_space, dim_of_manifold)\n", + "# dataset = plane_generator.generate_dataset_in_subspace(n_samples, seed_value=71)\n", + "\n", + "plane_generator = DatasetGenerator(3, 1)\n", + "dataset = plane_generator.generate_lines_planes(n_samples, scale = 100, noise=0.3, line_params = [1,2,3,4,5,6])\n", + "\n", + "fig = go.Figure(data=[go.Scatter3d(x=dataset[:, 0], y=dataset[:, 1], z=dataset[:, 2],\n", + " mode='markers')])\n", + "fig.update_layout(\n", + " title=f\"Dataset\",\n", + ")\n", + "\n", + "kde_pdf = KDEProbabilityDensityFunction(dataset, kernel='gaussian')\n", + "\n", + "point = np.ones(dataset.shape[1])\n", + "pdf_value = kde_pdf.value(point)\n", + "pdf_gradient = kde_pdf.grad(point)" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "id": "02eacc1c", + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plot.ly" + }, + "data": [ + { + "mode": "markers", + "type": "scatter3d", + "x": [ + 31.809957719906446, + 59.364890670792455, + 101.17019046724079, + 76.02646852025157, + 86.71430288567149, + 24.392113123695182, + 21.76006534745804, + 94.71125488406382, + 89.70386744360938, + 93.60403918290379, + 88.80525853552886, + 30.82369574363796, + 5.951087827771372, + 30.463495239904827, + 53.838590918866736, + 57.56135609589969, + 76.35382122044767, + 9.271051075825318, + 77.77511625134818, + 29.348136877759462, + 100.73908938570696, + 32.62827365289338, + 75.96335422289937, + 99.5101224531976, + 91.4455091843094, + 51.56521581417891, + 15.127388167897358, + 48.252535853068935, + 4.748532373130166, + 32.22781071900877, + 41.05681935108626, + 38.798254759441086, + 92.52910588736252, + 30.31531975722982, + 90.13179068910958, + 93.24722188544257, + 82.25665848343179, + 78.1060161093862, + 18.955036532343854, + 55.40971546504622, + 11.821754294235292, + 67.20603224346873, + 24.66293133675002, + 19.81556179855502, + 42.06440223860363, + 99.2338944005658, + 46.40463491894559, + 94.28101556533002, + 102.32214584219462, + 56.752750661889486, + 93.29090645460697, + 79.64330066698035, + 64.25313098602851, + 8.977910171203504, + 78.78328612461306, + 86.11768713249612, + 7.877121505145686, + 7.779277534525676, + 101.42463462784345, + 89.80101743738898, + 57.82519655292404, + 90.65153311410714, + 32.108003951201574, + 47.39399758646098, + 45.47021950092165, + 88.25648347582768, + 66.8582137203559, + 11.660340279681314, + 17.391654994484583, + 61.10356501039801, + 65.9674973061954, + 72.40738145103101, + 48.41128012303152, + 21.9590323141615, + 52.111212386494934, + 85.79413935411348, + 18.04231344573376, + 96.9341430430785, + 9.54706474853724, + 19.241126145470744, + 71.19392292659859, + 25.1846523280724, + 63.90911156595581, + 17.34309312190083, + 85.63280997150126, + 39.759660429375764, + 61.45668214424085, + 103.36323665563359, + 74.61676950356764, + 66.16340715053313, + 59.60245743111404, + 73.9239603275646, + 101.04281084524035, + 25.579261167614796, + 47.074365290159, + 25.455973251145608, + 99.25312659477486, + 8.200062416881106, + 40.781658468307874, + 41.11495997800034, + 82.4399452574639, + 4.147518752957524, + 95.79277445507931, + 48.07323585132799, + 90.24666579170207, + 100.27667188464133, + 70.12049339133027, + 54.5351729931702, + 58.062044604936, + 9.15761612674985, + 87.37350057541032, + 27.300905434478302, + 69.12934094014713, + 28.346885882205086, + 51.34521408256009, + 79.92329905460987, + 92.6822633590503, + 25.548297725692805, + 101.68344692783144, + 34.82088140371517, + 19.258840447301296, + 25.956543313981346, + 40.063559819515106, + 27.120570291868646, + 19.78298519027815, + 41.025594065511925, + 9.123691926225073, + 76.84916664839209, + 5.640581763183892, + 71.75119965160872, + 57.46201370215051, + 55.51090894983568, + 37.68280069197305, + 81.55035326702803, + 56.51631069381371, + 89.32978198560617, + 32.0318695747759, + 102.39424192029699, + 98.32751682090331, + 36.340276998774875, + 68.24646445586129, + 70.97887682655039, + 38.05356246911161, + 90.17022072165898, + 60.71509341996728, + 95.47364276114867, + 102.15593058681823, + 33.21903436280719, + 28.2609806018283, + 34.694854618812876, + 90.29042373714172, + 88.40976695030056, + 30.133199738699133, + 32.65376392822731, + 43.25124476899707, + 38.60826064870928, + 102.85164917455816, + 59.957605241673214, + 14.838833984290694, + 70.35028918742323, + 32.24140031207822, + 47.32380882530192, + 48.31041018889296, + 33.34812144202931, + 91.94636612470731, + 64.13697175902149, + 59.880345163871276, + 6.8321628247274235, + 48.155534269214016, + 57.280676141209334, + 84.98684497691418, + 52.49981512978784, + 49.9918277524833, + 39.44771531741793, + 92.63422155847474, + 44.95270420727644, + 67.78051106395992, + 47.77495324586716, + 50.63615282783094, + 91.19367844285641, + 98.8324088351369, + 8.91354982382013, + 90.85747346892367, + 87.41647691477323, + 37.57075843497773, + 87.4650363103398, + 86.12057028331203, + 56.31611613571731, + 26.832033759998378, + 76.6975403197934, + 19.320860234190235, + 9.139379519429232, + 27.823408019842468, + 43.35842291744931, + 21.42904466909615, + 31.63172457577052, + 62.022243916674064, + 76.90829564681016, + 89.73169004424011, + 78.95148878068666, + 61.00191919791217, + 67.48921000492683, + 46.54395489046381, + 88.12468819478286, + 65.94865778626576, + 91.52698926508307, + 66.03621635650963, + 85.91875809238654, + 93.45316736336713, + 12.744778413828424, + 92.73530273996278, + 103.48850790822621, + 18.438080328938018, + 30.192619550157225, + 15.507154997750199, + 93.11351507904124, + 39.02866196367358, + 84.28648551642964, + 84.18256148384754, + 69.45998626993462, + 87.43204467462262, + 13.621815653722125, + 25.701190682447542, + 75.96631090990809, + 59.11633399777502, + 56.46778413245063, + 44.46928672097823, + 67.59208376635326, + 39.83270298401187, + 32.78186952790654, + 8.238987555491866, + 37.686291467204626, + 36.17986635611311, + 66.85320304098524, + 85.02253818379313, + 80.13195282645455, + 102.48838681095219, + 27.609000465942866, + 6.507652214837869, + 65.5044599438765, + 90.68291314186703, + 58.454516867354734, + 45.14387959158418, + 57.63093555236779, + 60.02713165078957, + 55.156824991192074, + 78.23455532480196, + 98.34686645519893, + 92.41630395064291, + 7.515700838252683, + 5.961990636346048, + 72.82851159818482, + 90.0033568689486, + 5.678762510735846, + 19.758011601488455, + 54.804402838910605, + 38.24679026234296, + 39.94399132561218, + 102.52940883404086, + 55.97146480175431, + 89.30362188748674, + 91.41272257308857, + 96.28333421903348, + 43.381149279558855, + 28.86154143583435, + 22.616290598950734, + 90.79168925422003, + 65.78419102314527, + 34.364170870353156, + 64.37696700337557, + 30.201614306481048, + 73.43627823207382, + 94.7284206503381, + 90.62975334146701, + 74.17924576196765, + 4.699917797344608, + 57.91578491717123, + 23.948599449386922, + 20.655472496494447, + 57.91654506167575, + 45.59419829498932, + 91.8086616312663, + 6.742366678226722, + 16.709079544179165, + 42.97226077459945, + 45.48655438148265, + 58.78525947158182, + 44.32710108522091, + 83.15038359668894, + 57.71629713160555, + 18.121907017532635, + 98.57394487493308, + 57.212224493177295, + 65.83773052266186, + 93.72578790536909, + 31.9664560005372, + 57.99616527175914, + 43.85604740339832, + 71.52683145104145, + 20.17005689086966, + 11.127072447061092, + 97.0806481470805, + 11.155858466929592, + 21.37921538708096, + 8.4910239176451, + 9.6900416436383, + 32.9869424459344, + 37.217063367252294, + 79.2722001549624, + 56.9052212850413, + 36.18346962657373, + 99.58364265624799, + 40.93141273893933, + 40.30367887983947, + 72.14981385277228, + 40.992498382672416, + 44.62019106224471, + 10.691190238781592, + 81.19491380496868, + 101.99987101410038, + 40.98153024893086, + 90.41243804741697, + 23.38556106185786, + 58.56881276187167, + 34.31600826567646, + 90.78681280206317, + 49.44410034638807, + 82.5496056076495, + 79.18816980312822, + 79.0726049603305, + 74.3922847634256, + 27.961593865703094, + 36.26873833801073, + 36.763939922711636, + 34.155468782161485, + 61.31670370824835, + 90.51990887161281, + 47.75968269449174, + 38.68212824009352, + 45.62526369911467, + 100.4284948461141, + 83.1132202513801, + 6.272704402301903, + 81.50072525472426, + 86.81176279680346, + 8.557451232767123, + 42.821617132658574, + 75.09554244351129, + 63.17856059454541, + 98.01784149666021, + 28.82228991495176, + 7.872684363345664, + 10.187727833840558, + 97.98202705021265, + 74.28000548767845, + 74.31251531714652, + 65.56473042159912, + 83.59250744012863, + 78.66469755574225, + 34.6675142935233, + 89.46265753541765, + 95.51132274945083, + 68.43731257704135, + 88.06919822728656, + 98.26740431582041, + 26.556255254123275, + 6.871652869582562, + 55.16709363167906, + 68.61981524553494, + 22.881510791123638, + 48.703486408547214, + 37.360776724501214, + 75.25775558013535, + 11.167976194834582, + 77.6178904285918, + 63.49187700329292, + 58.973159660806104, + 12.657027306832376, + 10.038986792825796, + 93.78595076737322, + 49.91532887536866, + 16.915613571447587, + 58.034359297160094, + 7.970362623524764, + 14.091721489653102, + 55.30085848315652, + 103.07593376622661, + 78.55507583237733, + 84.6936866000912, + 92.06830046368167, + 40.48859239194991, + 40.668233845948436, + 40.22760501560079, + 74.09310480465577, + 44.92552924848598, + 85.23437766381765, + 81.80378542470646, + 12.982229920630198, + 35.63744265674085, + 42.882608220652834, + 7.715415375919953, + 80.41711639180079, + 20.973255387032776, + 86.26716137396645, + 14.79944724468558, + 88.06222249970533, + 92.23150026974325, + 69.78061743804112, + 80.15707658989933, + 22.58048603134874, + 13.842689314951299, + 5.8862518636650805, + 90.356008623366, + 87.43002487902186, + 89.13141218143319, + 83.96845444633863, + 58.97407159733107, + 56.54219828277958, + 18.57333075274841, + 17.452378087443186, + 75.06770110366979, + 7.2781295507277655, + 55.52705835779052, + 5.592440540805948, + 16.216412722246194, + 102.00831757779825, + 101.71188411011471, + 95.5742996610323, + 55.9077186721896, + 24.474928810474317, + 74.0981549145404, + 23.41464982003384, + 91.0155337110778, + 4.803132540135769, + 47.91689790496348, + 87.58859690887488, + 14.667551356597448, + 70.46792025197794, + 22.627434044178013, + 47.90958266388691, + 16.640391612806447, + 12.666096300868949, + 21.308918831854132, + 10.21408772177768, + 83.44382834897571, + 88.00853028920915, + 8.795952316615415, + 85.02500839045126, + 38.811983069219636, + 45.16162196976117, + 8.009332095810393, + 10.893915237597517, + 17.088960848964312, + 99.48922433326874, + 94.13232876908751, + 54.32737813640235, + 35.35475897264315, + 47.97916929097545, + 74.21480478127312, + 39.608640638521884, + 51.80859294792952, + 7.871094420270032, + 26.981846667867448, + 77.01802776260628, + 59.32591848211673, + 10.623065858626767, + 67.96989239123371, + 57.05123257636253, + 47.15533906261703, + 5.019285413628936, + 24.840746733568686, + 73.61844984378882, + 97.92367142822191, + 13.799363838106236, + 10.672085099546706, + 47.57055222471783, + 89.23501366086013, + 74.00995121312506, + 47.49711259078265, + 59.36937705768074, + 101.99463986135152, + 46.631486101969095, + 44.359745214794, + 35.30504816212841, + 95.99855266875875, + 46.213864665688604, + 68.23779027959813, + 47.895838772119845, + 84.72453510389413, + 8.369010767880956, + 87.22820093829093, + 90.20672656678454, + 59.94727570606214, + 30.52935077498343, + 40.24666060646633, + 25.045780529853523, + 37.237507410205936, + 74.64047973524701, + 81.66667647202996, + 10.08158661592658, + 27.809138929199673, + 4.308507698467768, + 20.165263150755116, + 40.759788113084106, + 38.74081965910882, + 74.4407420400546, + 88.14380095113452, + 57.721979827304324, + 47.25148968207615, + 4.211651755955608, + 95.5406093295762, + 26.079025706004156, + 74.03310816989547, + 56.76635694546512, + 98.49805332261427, + 29.937870149553646, + 80.53138300732408, + 42.06682479714346, + 47.03927497914846, + 30.378158190538606, + 35.631069175440956, + 84.33685302132218, + 69.59312134548453, + 39.517033840094214, + 10.826744813875084, + 64.79863746848639, + 50.69941782006032, + 97.80764168398807, + 75.98909442833641, + 86.29896532423302, + 38.32584619337545, + 98.68871920735674, + 82.06766826992009, + 56.90449977337875, + 15.385704783480811, + 40.09927407544899, + 74.71481102054028, + 21.742697083461586, + 56.89917100304963, + 44.756715032324756, + 9.041269138371884, + 18.39995139825318, + 67.76629219880766, + 5.592079440424428, + 17.25523979742149, + 24.018196607684636, + 69.91516777628503, + 99.48927819867443, + 62.596592319245204, + 96.6330977632965, + 53.95042584123517, + 45.56166941814254, + 16.029685384829325, + 102.62194594972271, + 41.14353094714301, + 36.78759615530768, + 55.44014241456856, + 49.535693359246636, + 81.50354699541404, + 100.48895299534108, + 19.052919968063105, + 97.82869602318848, + 70.59006379637496, + 14.79387767136879, + 83.8198629882788, + 44.780588601317746, + 14.656039178838693, + 82.45448280750016, + 23.957320347161726, + 72.52855363116937, + 50.95639212768729, + 38.27674799088245, + 80.6200005544138, + 17.649736588078554, + 18.989891455262907, + 46.74339562010725, + 75.97553048229797, + 79.47847635736017, + 26.41801325195577, + 44.71874510871168, + 11.097670642706527, + 104.09546936717382, + 13.312003784205992, + 21.259505232794, + 49.484516042938466, + 91.03019963338235, + 16.644022428848213, + 64.53035197993107, + 17.499723354027108, + 28.213308287385793, + 69.63410539832105, + 49.96514961803376, + 41.22415420743139, + 87.48072895186613, + 83.76293582938183, + 68.49929242877182, + 56.474594167428606, + 48.86378934140207, + 69.8407263374103, + 55.81971992305454, + 55.143206126991004, + 80.66439521196519, + 60.13857095535591, + 23.938378789795955, + 12.368636350068813, + 8.91571696693964, + 47.318216174630784, + 28.705164848865362, + 8.438807696971873, + 13.832796765562838, + 7.566512574575647, + 85.59292980822843, + 100.94344750621904, + 69.98778294312025, + 33.8588133509902, + 56.421273003855035, + 11.2526102075789, + 62.47877884341292, + 9.127391517796998, + 58.55313149617247, + 79.86383534790416, + 12.801143603266372, + 77.58294758471831, + 39.119725424912716, + 79.32351536162199, + 7.291283216074156, + 103.37352644616413, + 46.27538652872123, + 68.4986641138165, + 48.27703272434601, + 69.2805352733905, + 55.250367036932836, + 88.61107399251382, + 76.4761773928064, + 74.1963256148221, + 53.367402813874364, + 80.82090152805297, + 27.952546757968754, + 23.637718913704106, + 100.75265580297734, + 15.71438220916335, + 77.32893566949112, + 68.60312296981716, + 33.55395676618524, + 98.46095738381551, + 47.805662883796664, + 100.64360220351831, + 50.495032363227914, + 96.08243260336242, + 66.01340268904308, + 38.69158153136531, + 71.84549342505183, + 70.47063438371123, + 83.75078660132097, + 11.839709391801003, + 76.3728768184546, + 86.42296488074831, + 91.77757459957459, + 74.41486023454048, + 93.70226453996071, + 42.31998004463595, + 42.87084023403298, + 85.10897079629828, + 63.303890720884986, + 102.54225224173787, + 9.399565925588572, + 60.591090687028775, + 86.05553758925723, + 12.69423695248228, + 69.59262295294052, + 84.17196881761294, + 83.65146665222166, + 5.979047159348819, + 81.87649627333705, + 28.71590225147617, + 68.92200691633222, + 23.554022056125323, + 55.81098144177867, + 70.44515049234528, + 86.2405023501644, + 12.205309624048859, + 10.415229402878323, + 100.83527095887554, + 28.894432887246715, + 89.13409082174685, + 57.0219011562553, + 98.83423401214266, + 46.338884830369594, + 5.03032546021598, + 19.934298829767496, + 29.92722357107496, + 45.84392801688846, + 83.53723962885587, + 40.76429791645822, + 20.87855070244025, + 75.31542189466387, + 38.495905787122574, + 34.0918696559138, + 96.32795370025549, + 26.486579892268814, + 27.044858816459417, + 78.6552350158085, + 97.69064626386027, + 32.76352718200038, + 45.92450099260042, + 72.34546177481016, + 101.4127279399428, + 82.23256970277949, + 25.92027159864353, + 31.674183649535035, + 50.7214270450931, + 31.32128739988147, + 46.553780169479545, + 58.58975592248015, + 24.433894631788625, + 82.39258754148315, + 49.757907342138644, + 55.07503241191067, + 10.781800806371317, + 25.563063597782545, + 46.30944287873224, + 25.508912847420202, + 18.988572952261713, + 77.51244767034909, + 38.496161951268355, + 34.12685130414801, + 45.98834633666287, + 103.83713926620435, + 20.582641076889377, + 91.4570917163526, + 70.16823733510445, + 18.95069199926468, + 27.17463435486359, + 13.113857417612047, + 87.59312165814593, + 69.26387257394006, + 103.62628719879082, + 79.79004255358551, + 53.810696637697596, + 69.18879899197312, + 102.14939918141823, + 29.887376727916788, + 65.53011647935531, + 72.30908089867287, + 32.965490692303035, + 49.58253110133211, + 75.39623068664562, + 43.54777034114424, + 101.5935000172996, + 85.35475026605542, + 54.599657438948334, + 100.68669890232135, + 35.37427453693118, + 57.114980217364426, + 44.48659981694783, + 46.585088822624925, + 42.39669159526385, + 16.051947709843965, + 63.68883657466291, + 48.07101544606024, + 31.201499234713317, + 7.367708036205358, + 39.61041087638291, + 19.46601105241361, + 89.33087415740627, + 102.94496165772227, + 70.95325242235583, + 57.247114795149194, + 38.118986295777894, + 70.74058825277464, + 92.99727134724682, + 53.05600197487987, + 11.90361658223116, + 100.4252503358212, + 15.237976162262893, + 69.6879201871152, + 73.04862913812528, + 82.62910548754769, + 70.65965601984084, + 90.38383964849346, + 93.35702428000778, + 17.845820568618862, + 92.59296681456429, + 71.37378998849151, + 29.059998634896093, + 35.336621865547336, + 15.84271117542956, + 71.47262607893421, + 21.784133106937038, + 22.671451429883415, + 45.484760230454185, + 65.60742661962308, + 65.08752417835254, + 50.272112128687056, + 9.12120488287983, + 26.473091002944205, + 77.24315099236537, + 70.61516575182178, + 70.03304865268679, + 7.74488323704268, + 88.92597969854295, + 15.325305905195279, + 91.45530873709824, + 54.3584250375885, + 74.74389203012628, + 6.523647183082762, + 45.943516366248204, + 87.96032019010877, + 44.02457550324233, + 65.0194830278071, + 23.479384320685504, + 8.449082438881113, + 90.46727648474346, + 63.08174475778996, + 22.789968053909483, + 54.260821868639376, + 35.19066842130923, + 48.87790543968255, + 31.977450425471083, + 64.46845978085443, + 16.585970913965674, + 83.78305790894848, + 62.86503843352775, + 56.313136163501795, + 46.886303497836664, + 69.91765904994978, + 67.63121544635544, + 20.41880147177725, + 102.94018260589988, + 76.57757116206618, + 68.33352861362076, + 25.101035370732696, + 61.72307664977292, + 46.79444210907274, + 75.69254356128786, + 42.555830211398245, + 100.65724655385338, + 11.409411172720457, + 9.996401379833934, + 67.52609835898456, + 44.737002031161936, + 5.370611752634352, + 41.86062237112771, + 40.30681753182013, + 95.82390660109539, + 86.6449394158778, + 62.86538519586006, + 46.49255062567945, + 73.270487877212, + 78.73854620363122, + 71.38268495419123, + 23.613565604811726, + 94.51943891194827, + 23.065216343609492, + 87.83820297779836, + 56.563755770532005, + 40.900901431275024, + 71.47527897019881, + 92.35977276603427, + 87.97739800625266, + 35.76335823991886, + 52.95967814261677, + 27.407853990482433, + 61.323536833395245, + 57.32722196686135, + 25.168354964035046, + 15.917291768879954, + 58.55995298276618, + 30.947619215170047, + 93.77522019399979, + 102.95200126724299, + 102.97343577110168, + 64.94219413736438, + 22.09910036728715, + 7.854800009931781, + 74.99787733917167, + 52.30228569447361, + 63.610123354354194, + 57.87312031201934, + 11.592558882449566, + 45.72863293774591, + 32.60821307867592, + 20.15409148783279, + 81.54981739900951, + 67.18354724525767, + 55.211639419483426, + 31.36992375347982, + 15.942882196775848, + 91.96641815710632, + 32.819314371626085, + 79.19582016598807, + 34.09717471844235, + 73.45759285668791, + 89.36271308133102, + 38.24220651817059, + 72.13969342327717, + 84.34842775377294, + 65.4773291390509, + 79.27841088324467, + 98.37461267880596, + 62.968946072979435, + 37.13812231657073, + 75.80546224796254, + 56.25527329793574, + 59.768043605050195, + 14.987772932234444, + 22.487683166265008, + 81.77547035448626, + 28.974120179067807, + 62.58960631133617, + 92.36280053866177, + 55.621994454430904, + 93.46562445587372, + 66.83306062084857, + 61.07812099184737, + 83.67250265535488, + 92.86057442121101, + 47.7210929581673, + 91.36091003521534, + 94.44917496047675, + 7.647762506621521, + 74.48302239067013, + 92.76315957075693, + 103.12529969504244, + 44.036381181891706, + 60.827527083307125, + 23.430995107337512, + 12.551949008106824, + 76.50890867807334, + 12.566494315851017, + 52.967560546761774, + 6.752356877920179, + 47.57412079675208, + 9.819976030082758, + 48.190232827044134, + 90.77922370435252, + 22.13221125027948, + 22.782827010422398, + 76.73179805423182, + 86.29347836986774, + 51.623156602095364, + 73.5754216917939, + 57.76914339557737, + 81.19919546717384, + 10.28402650188889, + 82.29149039820443, + 93.82881656430939, + 98.59803826566912, + 57.717046335360095, + 99.96810290420315, + 60.91697757767405, + 56.57056654204452, + 87.16136665966526, + 52.77779845222472, + 80.0913665970692, + 20.905869112929732, + 35.05705029041302, + 68.69735878505647, + 46.267677582897875, + 22.702760600008908, + 94.56629456757841, + 55.809331296656204, + 85.10416034434391, + 99.8478221245452, + 68.95873497903335, + 26.976143300912707, + 6.9162679814331325, + 76.26042772816957, + 91.22768805386075, + 69.93318309256804, + 84.36820788169862, + 25.837227679648606, + 17.54017486970436, + 30.86740311870042, + 26.519951117246162, + 21.950186793861608, + 87.6773946715227, + 52.493039903399996, + 63.72787547905874, + 32.98974240784614, + 62.88819727848004, + 12.44280935831116, + 78.01077403359312, + 45.17929885386, + 86.8594400901982, + 44.38432389316228, + 29.935115968054326, + 18.048360347141838, + 50.75707031884902, + 26.64653416013559, + 99.27327035900312, + 80.82302877525396, + 67.70425706867091, + 55.8594417099269, + 44.52015448316087, + 15.208092322457746, + 64.1184576021878, + 92.5437500612613, + 24.915947442428863, + 63.453990282917665 + ], + "y": [ + 60.48916657658131, + 116.87379539367863, + 199.5831913407742, + 148.73822836504218, + 170.5051619948583, + 46.32464991438366, + 40.02223017560554, + 186.68425841449135, + 176.7587856458963, + 183.87285763697918, + 173.63596132894693, + 58.71032772089354, + 8.818967840656406, + 58.43531317888237, + 105.05967800956824, + 111.1641482253972, + 148.99689797938603, + 16.336442078774375, + 152.3365710162724, + 56.39529028068566, + 198.22773649470818, + 63.872378798277396, + 149.71968395454175, + 196.4273608843294, + 179.8433942489864, + 99.11004443244983, + 27.39114991294399, + 92.88678722792696, + 6.325173562062829, + 61.34156650292851, + 79.75646352857147, + 74.5586938447141, + 182.1205105871667, + 57.27407456821193, + 176.16491582062207, + 184.06476739546395, + 160.89810571930713, + 154.00795408442806, + 34.74602460188675, + 108.04657609008702, + 20.111381213239447, + 130.38269517728105, + 45.314113830698496, + 37.12660568297987, + 80.96298178967068, + 195.04064605527444, + 89.45969342368585, + 185.11917853324786, + 200.6075035959673, + 110.13165534997829, + 184.1855608210564, + 154.83685390369658, + 124.70271419545439, + 14.719216193013537, + 155.3983187232002, + 169.21677660256918, + 12.617790846362459, + 11.325708178922769, + 201.09734334940256, + 176.64842220474404, + 113.66885303954729, + 177.83893452112514, + 60.866141497500706, + 92.34683396985967, + 87.68001402930119, + 173.8570678198956, + 131.32205552669657, + 20.67059739858139, + 31.360385847163585, + 118.53656249569427, + 128.52368452103278, + 140.90032479540167, + 93.90686884968049, + 41.10777468266023, + 101.95125435433725, + 167.6758158067652, + 33.17178243478737, + 192.2338218024453, + 15.926238203568175, + 35.08677397130201, + 139.0559970792469, + 47.984163151830934, + 125.59950350850582, + 32.134646120862456, + 168.84175371585135, + 76.27186963070241, + 120.01172118086511, + 203.33852370542743, + 145.09462564769674, + 128.6973275381865, + 116.97412507571232, + 144.8754809855764, + 199.4226881941778, + 49.68269481860906, + 90.96874457499041, + 47.63570246849071, + 195.3019483795546, + 12.768865537758243, + 79.02026077016322, + 79.7561696543119, + 161.69261234754924, + 5.218229932759444, + 187.96979537730618, + 93.56981029718898, + 177.58485561417965, + 196.43774857616907, + 136.7290864831335, + 106.43533723282724, + 113.74836957737985, + 15.187749988769216, + 171.8279825028486, + 52.2583165431473, + 134.91544572460737, + 53.663148426536345, + 99.29831860835299, + 157.5282791462794, + 183.1994818931151, + 48.27570212495404, + 201.36306538930623, + 65.3781313410135, + 35.07834088875944, + 49.855261491148575, + 77.26291945383421, + 51.10285405785039, + 36.009894815142324, + 79.03925409644037, + 16.408325727484765, + 150.06723955880486, + 7.835242597394314, + 140.57359529367002, + 111.80643347929252, + 107.96122090652756, + 71.99510758564914, + 159.52350314195402, + 109.76231767885615, + 175.06327043712457, + 61.79389944239078, + 201.67077048719275, + 193.4712001433668, + 68.52984302202579, + 134.11352236126956, + 139.9988417021281, + 72.94993639655212, + 177.17569251878984, + 118.08242985136381, + 188.51793847676709, + 200.771205052625, + 64.0778465847065, + 53.20630698447481, + 66.28435733814494, + 178.01559505972375, + 174.23737787440922, + 56.55096891608479, + 62.8218289075034, + 83.88306981244173, + 74.23170505356926, + 201.76739075837162, + 116.77550652338718, + 27.28827178368599, + 136.85965566216595, + 61.03663141368388, + 92.09865197513157, + 94.5008089010372, + 63.11008036036672, + 180.99288297372536, + 125.146655812328, + 116.96776224886214, + 10.78881153073126, + 93.31031116329105, + 111.20921643964314, + 167.5784824221464, + 103.06804116131892, + 97.61741937543368, + 75.44008247990136, + 183.30334196285972, + 86.49648103668346, + 132.11533571783968, + 92.5264211550773, + 98.89216609910453, + 179.8035206593077, + 194.83849570161314, + 14.355775116807944, + 179.45035071281035, + 172.22065813693303, + 72.06395918070548, + 171.81078187993495, + 169.35886631579206, + 108.72204610827248, + 50.70231097783644, + 149.85176383857473, + 35.48508852199589, + 15.910278313579747, + 52.14787277732794, + 84.35712974096161, + 40.76577069847823, + 61.12750580280385, + 120.31786396572939, + 150.75456750326256, + 176.88399572180523, + 154.5420171141852, + 118.20198374564302, + 131.62661369344096, + 89.61375686242494, + 172.21449824060085, + 129.50792358794556, + 179.89812387605042, + 129.23867220741244, + 167.6588841087917, + 182.9313079191612, + 22.20814815393088, + 181.2561178969766, + 203.2853225154211, + 33.60015280275568, + 58.26781653547254, + 27.984392884485306, + 184.58565826104748, + 75.51540115645145, + 165.8056893071166, + 166.58805831032504, + 134.73522111903918, + 171.56356807368115, + 24.339505727133893, + 49.83110877274648, + 148.74322231056382, + 114.21096839654814, + 109.3960689563768, + 86.59648381285875, + 132.5741301691965, + 77.38209111918083, + 62.835901613530936, + 13.857107326975385, + 72.60419708722358, + 69.35762359427781, + 132.09822726223254, + 166.05615043627088, + 156.5565569317058, + 201.91741357887162, + 52.05518448262021, + 11.472823933551325, + 129.1976188902067, + 178.9477018808556, + 114.35418097834413, + 87.03923094229836, + 113.16349493223042, + 115.89733689516476, + 107.35555459922485, + 153.8976736298238, + 193.50607839954813, + 180.4810034389535, + 12.859908261237734, + 7.981661670733228, + 142.32366079159237, + 177.97240629244953, + 8.430544822121021, + 37.639099812815715, + 106.54742280207222, + 75.23518546183314, + 77.66446542996238, + 201.8407448936906, + 108.12574118585493, + 175.5299096477008, + 179.46715773554607, + 188.63679985209907, + 82.77536060996682, + 54.781888222418196, + 41.52943755683805, + 179.24726852054997, + 128.9639839956068, + 66.63145674550395, + 124.97840947920106, + 57.59001372103214, + 143.96656614122983, + 186.59330625543123, + 178.23451841296628, + 145.1432346737456, + 7.687299381435848, + 113.455513590248, + 44.64514383958851, + 37.76022050602857, + 113.38613121476332, + 87.53968887348344, + 181.07015785569834, + 10.197122799029266, + 30.097689628329388, + 83.20236394038551, + 87.92993521426234, + 114.71682732208637, + 85.73657496630243, + 163.900328653582, + 113.16008581098792, + 32.24114457289023, + 194.020964534962, + 110.69763981432928, + 129.14335189280314, + 184.21551498377892, + 61.279822316670085, + 113.57362689365884, + 84.22704799526733, + 139.4115156341355, + 37.6069710800554, + 20.438703995541502, + 190.58913949974334, + 19.62343350011416, + 40.47803622866357, + 14.038710333476585, + 16.746262424947194, + 63.84655611062064, + 71.14037552817956, + 156.13644239650094, + 111.13859449670427, + 68.79374444911177, + 196.47019324863814, + 79.90381058678264, + 77.83426031025058, + 140.35505379261642, + 79.16953836539292, + 85.82842432052601, + 18.089696121335407, + 159.75149883473412, + 200.41486887863925, + 78.48446842442861, + 178.29202062879844, + 43.95883510789751, + 114.33177837362089, + 65.54107719087479, + 178.58559008784155, + 96.24643320391665, + 162.63451443714652, + 154.77440846846847, + 154.53284689371077, + 145.86992512301128, + 51.959926413547194, + 69.7471919469477, + 69.63322703198027, + 65.97813592832698, + 119.95450590056254, + 176.33755314908962, + 93.03767021645503, + 74.67205268500173, + 88.91583793192349, + 196.9827079873686, + 163.30708581343467, + 7.557008075522667, + 162.0522309298962, + 171.0998262420103, + 14.576208723448683, + 82.63489374794555, + 147.0308181376428, + 123.20737493254984, + 194.3003795247558, + 54.23180869085822, + 14.004256235171374, + 17.532996697963057, + 192.2858500282665, + 145.71543597865448, + 146.26451813969734, + 128.98358390362213, + 164.21321626268156, + 154.12709387633106, + 66.88425604409743, + 176.06169335867074, + 188.19214681710255, + 132.81668939433848, + 171.9068798090722, + 193.25762267948025, + 50.10420559534344, + 9.854119313382693, + 106.68160977382828, + 133.1750634218454, + 42.6557302639518, + 94.0503532696266, + 71.75787837108123, + 147.94451774158267, + 19.802316469332666, + 152.34876698079418, + 124.83340996049058, + 114.54561895527861, + 22.989447739863465, + 16.72122784442797, + 186.0186918697451, + 95.84198521825185, + 30.53060789478798, + 113.81537284097773, + 12.060361762505483, + 25.25082671014929, + 107.34072150539416, + 203.11649904244365, + 153.48598190723914, + 166.03510145567313, + 181.31114948170676, + 76.61343008232868, + 77.25920386528402, + 77.10776923170604, + 144.32367347699403, + 86.35945651229677, + 167.99225266505684, + 160.76229597554297, + 23.330783414894295, + 68.91679974435266, + 83.1715070172301, + 11.757572523212968, + 158.86935720399083, + 39.21697766924576, + 170.03972102172526, + 26.306846272324833, + 172.00614720834662, + 182.81330388639498, + 138.17692096577224, + 158.34210733663366, + 42.63871112298479, + 24.41981444350779, + 9.338443329831133, + 175.49716568353386, + 172.51563060670202, + 176.3169657060688, + 164.61247479865042, + 115.82080447993077, + 109.48534554527258, + 33.88657043627398, + 31.95000293500397, + 147.2310027871242, + 12.332859626178962, + 107.78141922318773, + 7.51573837130068, + 28.574209394174286, + 199.96062682093935, + 200.26724025318984, + 187.81498982038528, + 108.71034782543202, + 46.01894986372233, + 144.21851173663015, + 43.7729386492639, + 178.7383140061487, + 6.708186043381344, + 93.30090490690303, + 171.85694092989624, + 25.71891601938296, + 137.1197128774809, + 42.11686944391903, + 92.0223086200015, + 30.768503037234023, + 22.272033293698247, + 40.760054057189116, + 17.681275334352165, + 164.47884399579127, + 173.56683916306147, + 14.887943554333464, + 168.0099498720986, + 74.94891247630386, + 86.30675966896322, + 12.797174021347582, + 17.587394018415846, + 31.75610817864615, + 195.46690253183058, + 184.73172576834315, + 106.48321062657122, + 68.32529859116387, + 92.57411270783511, + 145.34442893590546, + 76.34167552962205, + 100.6097401527174, + 12.498460448835376, + 50.613253943939, + 151.09968907737925, + 115.61910204028526, + 17.72940182851811, + 132.70526306719955, + 109.59720796281422, + 91.72372839039907, + 7.019766780765117, + 46.72983464027721, + 144.5506747767143, + 194.29835960559998, + 24.20145027418151, + 18.412610253666468, + 91.71737310163896, + 174.43358154492344, + 144.58546967375455, + 91.69093234394104, + 115.1578105564071, + 200.9085682043567, + 90.02731716641517, + 85.47908432152295, + 68.26207162076811, + 188.57469839136652, + 89.42274853999352, + 133.17531231363958, + 92.63116087564205, + 166.99749374183898, + 13.817053627020467, + 170.92968182294908, + 177.3927667503844, + 116.04535074168388, + 57.863454384468206, + 77.27120202406758, + 46.775879923566634, + 71.65251627042781, + 147.4681020400378, + 160.74757779277508, + 17.215113062056115, + 54.23821496718765, + 6.465457923918857, + 36.99054639799152, + 79.0162428773704, + 73.37607484582051, + 146.67204836904054, + 172.77537282209585, + 112.92275085996178, + 91.51336524260816, + 5.696092531143637, + 188.62996968830228, + 50.472111340594495, + 144.77645825708674, + 109.72731583701373, + 194.14623237537117, + 56.2981229611202, + 158.33288386724516, + 80.45719838009443, + 91.29609962124431, + 57.82685813338884, + 68.03593882487249, + 165.79360213442646, + 135.62687843211344, + 74.57998762085629, + 18.6270457750357, + 126.18645868319267, + 97.84557200717607, + 192.61758708774198, + 149.5384685437957, + 170.15315998887712, + 73.55702302592114, + 193.749339727555, + 161.1757764040323, + 111.36435702199564, + 28.21862121373395, + 76.84477017678385, + 146.8625539490731, + 40.78547734449145, + 110.64668515156377, + 86.33929955251598, + 15.137020393084562, + 33.92792526197745, + 132.44046409213905, + 8.570794461515472, + 31.881153625461586, + 44.61956912366978, + 137.16170700258706, + 196.88831602587467, + 122.29436344871225, + 190.00993904275998, + 104.90125222716011, + 87.57193588049307, + 29.17589108981544, + 201.8509374860833, + 77.8475098843848, + 69.48045171678537, + 107.43044898328002, + 96.60532705916512, + 160.5483980319197, + 198.53887123835437, + 34.91096257414143, + 192.5284644795022, + 138.42593503630997, + 25.989082177044285, + 165.92345925543728, + 85.72070848743249, + 26.764343575876463, + 161.63413103975242, + 45.47326895880879, + 141.68447342617327, + 98.85739307929452, + 72.51327209697205, + 156.5027787049715, + 32.56682708032227, + 34.765433839416325, + 91.41281192565535, + 149.70540813627466, + 155.78244051591943, + 49.588638109694465, + 86.03184734568202, + 18.823983955051993, + 205.0527131743833, + 24.406411172398997, + 39.369033734728106, + 95.6231737679542, + 179.99833110823897, + 30.094742622290095, + 125.78836721002986, + 31.871130420093436, + 52.82841438308416, + 135.0219821408639, + 98.1674318069979, + 78.31665722658438, + 172.20469029935145, + 165.66621923497868, + 133.58578998294158, + 109.82307474474794, + 94.21461938729276, + 137.511539968447, + 107.4713825217725, + 108.24449108936699, + 159.4762750499796, + 118.31525421965046, + 44.18150665295977, + 20.41537871781442, + 14.153099753886277, + 92.41150947134611, + 54.1078363458563, + 14.212990376011607, + 25.69238921817338, + 12.316163099866474, + 168.13439703811653, + 198.33629231502258, + 135.2743092736956, + 64.99932786634082, + 108.72182579403187, + 19.03725201486642, + 122.47628234376583, + 15.276358103762558, + 113.30707874449082, + 156.5797253009712, + 22.37979990346292, + 153.34143959186252, + 75.73168925881289, + 155.54082583104437, + 11.658052066130269, + 203.27562585404405, + 89.01272313257434, + 133.85441239158217, + 94.52282286211559, + 136.727237684053, + 108.59887963652386, + 173.21169180514073, + 149.31361765061493, + 145.56762038164558, + 102.89429674974019, + 158.54208933978114, + 52.99728865763281, + 43.88302094258375, + 198.01204601291042, + 28.26344963692799, + 151.49483732891258, + 134.6042439826298, + 64.95776940247413, + 194.7945041692049, + 92.48112497194072, + 198.82536653312314, + 97.52282685728156, + 189.3555410415478, + 128.82325538023366, + 74.21776411880153, + 140.1959437253357, + 138.04541696487485, + 163.86000109586283, + 19.698018834073878, + 149.019207639675, + 169.29775731490744, + 180.03179284222213, + 145.0844547850367, + 183.75372032980303, + 81.44432121600687, + 82.87609442463041, + 166.62712890928884, + 123.68175976973555, + 202.44779432741925, + 16.169069006617903, + 117.57462190028733, + 168.18808945265528, + 22.599176615008435, + 136.51871456323616, + 165.30003637046352, + 164.3291105573251, + 9.923748292476027, + 160.49331620608368, + 54.7030753407081, + 134.6175984196451, + 43.88972517303236, + 108.85922650548527, + 137.41274062877514, + 170.26513855872517, + 22.09196161995484, + 18.46682053566365, + 199.9491675329131, + 55.810026342587584, + 174.72305826477444, + 110.8115864553158, + 194.91699300592643, + 89.52979790458568, + 7.913852090750665, + 36.554120659363335, + 58.11106553006362, + 88.8546921444418, + 163.73723488263363, + 79.23768808934973, + 39.11719286514996, + 147.28859612081612, + 73.43858444587681, + 65.35812349175654, + 189.5735649954888, + 49.260805480634225, + 50.335937719900386, + 154.09449202441346, + 191.65278696380162, + 61.999393923433374, + 89.47973290343846, + 141.9758762894673, + 199.00405613544453, + 162.22048082873008, + 49.14271696310156, + 58.80902567588555, + 99.25293080668813, + 59.50106775676016, + 89.94836404148789, + 114.14896807389712, + 45.32073048500441, + 161.65004786763197, + 97.5213257134099, + 107.13176547402529, + 18.89991678398961, + 47.82155259921636, + 88.51925808819512, + 49.13679083010829, + 34.60455301485193, + 151.61746361497273, + 73.01198353551368, + 65.58659699927628, + 89.0709276395463, + 202.83858186744425, + 38.30960182219609, + 180.08667691435906, + 137.29375623706505, + 35.39529780633415, + 51.503034704804634, + 22.355781538599825, + 172.3550303405916, + 137.2114009180271, + 204.2847704773882, + 156.16740627638404, + 104.26613975002444, + 135.002556048244, + 200.21357286054757, + 56.44869110060214, + 127.73853655855913, + 141.848783283728, + 63.03581366073113, + 96.73732438779619, + 146.11473169783113, + 83.23818188369805, + 200.89259532144843, + 167.63041306891463, + 105.79514744198825, + 197.48278652972814, + 68.54902859441363, + 111.61623069191585, + 85.00755617925772, + 89.60460278917624, + 80.88305658568738, + 28.490526369365075, + 123.65231054708907, + 92.2023544721201, + 59.01481901864617, + 11.449678489879279, + 76.59847937053732, + 36.78143079161095, + 174.78536200382757, + 202.54020758663358, + 138.42724868971717, + 112.04718266730823, + 74.11518318599245, + 137.04725830961132, + 183.58610017713602, + 102.86183947655114, + 20.81288167978837, + 197.8262912991672, + 26.0799526257931, + 136.75976422852915, + 143.1260573542438, + 161.65394326671583, + 138.1947559435387, + 177.4248866885733, + 182.7560651288945, + 32.633281552718174, + 181.58916166137828, + 138.5636778085312, + 54.78966905439315, + 68.63218246176163, + 29.86039337992135, + 139.59674737357903, + 40.69091730704453, + 43.81960508956257, + 87.49066597881439, + 128.98549477116947, + 127.57900400807398, + 96.57476331063857, + 15.51782360589746, + 51.103662333587785, + 152.16744708464643, + 138.24433241536622, + 136.4643890938556, + 11.833883341497069, + 174.7368270866675, + 27.935942550551633, + 179.16152373791823, + 106.11932375458288, + 146.03730859945455, + 10.785832518862513, + 89.19248275915398, + 173.091541041757, + 84.72483418641275, + 126.82013525182903, + 44.216291967770076, + 14.953410282592769, + 178.0653503952353, + 123.28194803057276, + 42.915740080283676, + 106.52942136184883, + 68.13546496892069, + 95.69349353366192, + 61.2532904088919, + 126.5148208636642, + 29.337311121251748, + 165.09265733382347, + 122.76192390424126, + 109.73798879573435, + 90.66013534747336, + 136.12650470758118, + 131.5823590315561, + 38.41708804296776, + 201.79143630555058, + 149.70981248097038, + 133.4631868890966, + 47.43830339576892, + 120.8842304162404, + 89.8482779151341, + 147.29972210272365, + 82.66808912833947, + 198.9254954252369, + 20.883314480625696, + 17.029393582003696, + 132.0757624284879, + 86.52251259756765, + 8.222202606313276, + 80.2708209872389, + 78.18220417911533, + 189.28134984585202, + 170.1125824310833, + 123.66953930217164, + 89.68845846545564, + 143.7592101801866, + 154.92950759675216, + 139.56248279906174, + 43.99215625935872, + 186.75821872163598, + 43.29601901149529, + 172.88355102732345, + 110.3080625637672, + 79.69068111124861, + 140.78304572999937, + 182.17121397495268, + 173.85212819040987, + 69.19433252789293, + 102.72428750969272, + 53.448126658409784, + 119.61797791370854, + 111.6736404989087, + 47.020118676212846, + 28.372178468278975, + 114.96749709592376, + 57.74038803089159, + 184.08674119879396, + 202.66494257148145, + 202.24498037153808, + 128.2279098944373, + 41.12331914864686, + 11.648882029741157, + 147.27398568478046, + 101.85066381773645, + 124.32383701238476, + 113.67177797505168, + 21.023107081293873, + 87.04542304996434, + 61.144591322223036, + 36.925458811393796, + 160.82853769646115, + 131.9415808700954, + 107.32461881849919, + 59.273880728143126, + 28.74112990598407, + 181.5177146964899, + 61.670780899218556, + 154.53278970128332, + 64.97466556279034, + 143.65074655613054, + 176.00778180696113, + 72.05922435387295, + 142.10200378920234, + 165.6065266135321, + 128.0221949763792, + 155.38796022727766, + 193.32642840215266, + 123.69879002886398, + 71.62833808629094, + 148.7835833115724, + 109.88304345256526, + 117.12339549588117, + 26.417802343033046, + 42.5106053661006, + 160.26702558680373, + 54.7178536241683, + 123.08695267300844, + 182.10052521283842, + 107.76750351983114, + 183.40614670907874, + 130.33472255085113, + 118.84749654541648, + 163.67347923721198, + 182.29225914117183, + 93.53819806505085, + 179.3604113710233, + 186.94518491462762, + 12.622378884495891, + 144.42527926080535, + 182.28295288656452, + 203.82371149479718, + 85.82973035081213, + 118.50615790344445, + 44.70325006526129, + 21.85418343144728, + 149.51244948561856, + 21.344662675109042, + 103.04394728641948, + 9.377247049451459, + 92.08996378816998, + 17.836611093119352, + 94.16622230148492, + 177.11984072771443, + 41.85067582305745, + 42.53794402490931, + 150.73531328114726, + 169.02294801301767, + 99.9174251482558, + 143.55520070486796, + 111.83672231877138, + 159.37419290078296, + 18.56153993161017, + 162.76585169396384, + 185.01170305168893, + 193.19073601746766, + 112.36793411950752, + 195.70291213889377, + 119.205177857419, + 111.65172744712692, + 169.64649649213467, + 101.8994456298153, + 157.4765526009511, + 38.712746905049656, + 66.93519024979923, + 134.49680939188775, + 90.65690987203665, + 41.90206921425825, + 185.23559017754016, + 107.8298850291704, + 166.21865811128202, + 197.35766257033427, + 135.3993969811804, + 49.62754870426507, + 9.76018630088345, + 148.9251214393074, + 179.36588436679713, + 136.8397379427442, + 164.3914561196748, + 48.984870786436, + 32.300667618637654, + 57.462004232482904, + 50.99813818953834, + 39.8064048238041, + 171.56502105890215, + 101.4729859440037, + 124.96173390162232, + 63.06188638870118, + 123.3991160176786, + 22.649642401866785, + 152.5606003399518, + 87.60033981546526, + 170.05419297922293, + 86.29924614650557, + 56.681400430081375, + 34.49672863882411, + 98.64014675842019, + 50.70928795421429, + 195.20346819130262, + 159.31126743074682, + 132.7070738500729, + 108.40194091672554, + 85.44693047958505, + 26.816511840724306, + 124.38088189991527, + 182.50812451212224, + 47.15482684385222, + 124.17352622377182 + ], + "z": [ + 88.70098561597615, + 173.07801840100296, + 297.8191233365788, + 222.14755342557916, + 254.99898960904451, + 67.93263871386529, + 58.198826589016406, + 279.40879756268544, + 263.29766416783, + 274.5572417400419, + 259.0694849095392, + 85.32354025179576, + 11.240995934819816, + 85.29262260326561, + 156.13156441753623, + 165.5858189499875, + 221.70056569711264, + 22.83801431480936, + 226.55195653862248, + 82.44705597176699, + 295.7902369435253, + 94.14541458959951, + 223.64706545720202, + 293.1402162481627, + 268.0558117370121, + 146.72711171849596, + 38.98458226386576, + 137.9113377617589, + 8.107175648186816, + 90.95723704717174, + 117.82230000993181, + 110.57724471503795, + 271.50451978757746, + 84.20330668931173, + 263.21772410860507, + 273.87420309383026, + 240.8713215586312, + 229.63714681513918, + 50.211383442711195, + 160.12957870008373, + 29.616402265857264, + 194.45451260575012, + 67.03024864338187, + 54.28068510518285, + 119.69922456426549, + 291.82919532528723, + 132.88907662303885, + 275.9912510059446, + 299.5207813060453, + 164.2252607981102, + 274.4719202119824, + 230.31870093931772, + 185.6376507790244, + 19.81952462993436, + 231.36009978761714, + 252.17584047906402, + 17.03693279543554, + 16.259365255687285, + 300.20586208398913, + 263.6380071793142, + 169.08943267150423, + 265.0047222735621, + 90.00354641360748, + 138.01427178029058, + 130.0457703656612, + 259.77095651880427, + 195.8463117518237, + 28.89379949211815, + 46.47256057099497, + 177.80807792431145, + 192.50555643021505, + 210.15308424028413, + 139.48527970910683, + 60.05680870120429, + 151.8199584738517, + 251.2815706040019, + 48.55224662562214, + 287.2748697352893, + 22.78845336129403, + 51.566454058408645, + 207.70199386885466, + 70.26162717455408, + 186.58491821485302, + 46.75580040885159, + 250.63557510864786, + 112.820556226031, + 178.44025800191972, + 303.86899526848214, + 215.94914433882073, + 191.64472738430865, + 174.839544880868, + 215.49165489591243, + 296.7257305809129, + 71.93816595697233, + 134.3822837155305, + 70.55282770472326, + 291.1113153008399, + 17.991997963490835, + 116.64525530648088, + 117.55390360264506, + 240.92497981767045, + 6.435722236866062, + 279.45753458410877, + 138.74725111542608, + 264.8629973867376, + 294.06726953334623, + 204.0355460143471, + 157.3644505106519, + 168.6401112570331, + 21.62933630286256, + 256.18475706501306, + 76.78162836746964, + 200.2871201620387, + 80.20066329745019, + 146.97237965669402, + 234.68494431418685, + 273.2637613225389, + 70.02658812662679, + 299.2233621295876, + 96.30105056911877, + 51.32451681292308, + 72.90204049014913, + 113.94507272839108, + 75.73513168622522, + 52.756650986624486, + 117.08526771309208, + 22.2550870373621, + 223.9867300579928, + 10.097641767313267, + 209.2070235086345, + 166.30122126139315, + 160.01832660833162, + 107.07286117485741, + 237.47502328147908, + 163.00255403164164, + 262.20852223042124, + 90.91776942369634, + 301.2300759578358, + 288.6813311570848, + 102.14091355513186, + 200.0372963591528, + 208.89008924736706, + 108.0405431134468, + 262.86340871228686, + 176.1897676678604, + 281.3545240291362, + 300.27435225529285, + 94.47989691693569, + 78.46373157390114, + 98.98827257116383, + 265.76839333709216, + 259.52075111056587, + 82.98210239368362, + 93.2434179469039, + 123.53711808931591, + 110.31057159423521, + 301.81369418296714, + 173.21277928411723, + 38.71773119258589, + 203.28297983223558, + 90.10405305319512, + 137.39455895753406, + 140.06421006773294, + 93.66840895892976, + 269.6686127833603, + 185.5080387468846, + 174.36058261808964, + 14.577232620437659, + 138.6879840808855, + 165.81054911073142, + 249.9614632131314, + 153.04970579328466, + 144.91491047103258, + 112.02087778563039, + 272.98559232214313, + 129.03792427026062, + 196.13394352204762, + 137.249628030984, + 145.84538455466196, + 268.5197569161778, + 290.7652336534453, + 20.236808099493434, + 267.9157820636596, + 256.505164125237, + 106.0290065998593, + 256.789443324863, + 252.4380500786418, + 162.36891259931357, + 74.31332043391394, + 223.68624609205466, + 52.44455223509692, + 21.94626156733554, + 76.65184341067298, + 125.71870723030409, + 59.73100648026444, + 89.90521168036555, + 178.77999720968594, + 223.85268364918895, + 263.9818463910974, + 231.27889371661865, + 176.21870134515726, + 196.43480979683804, + 133.24644002835723, + 257.23761331338414, + 192.86067227444852, + 268.2624275623642, + 191.61484802102723, + 251.13853726145823, + 273.4392623561683, + 30.83965246112516, + 271.4415964893757, + 303.9640616714994, + 49.278704767469684, + 86.42833320947683, + 41.04811600906764, + 275.45528870624213, + 111.96454777689678, + 246.8350724320764, + 247.39839838546231, + 201.57244433471004, + 256.7345316549227, + 34.2450080308573, + 72.1312478121883, + 221.79536790200652, + 169.57276074766713, + 163.05874874732916, + 128.3490290668082, + 197.02043047736623, + 114.43490767180573, + 92.59538093389675, + 19.98980904511573, + 107.41370411477153, + 103.09672697131582, + 196.6555796227364, + 248.16955189694454, + 233.76197340998505, + 302.0224322272997, + 76.66492100754793, + 14.978835510024762, + 192.9301163701331, + 266.50272177268806, + 169.61101778828862, + 128.50674777267895, + 168.05174915273935, + 172.93324718265615, + 159.65022388802936, + 228.8886822863445, + 289.4696237378587, + 269.7847955113772, + 17.527646425201564, + 11.676071319579222, + 213.00111112234714, + 264.7182174442854, + 10.084624870652238, + 54.41639709540325, + 158.41616519056691, + 110.76845760541656, + 115.17515326627347, + 301.0884201512832, + 160.08706247955354, + 262.58042134845203, + 268.2387692450428, + 281.90326092663787, + 123.33894023547435, + 80.87674955899692, + 61.29999815613356, + 266.4888497661451, + 191.73324990656943, + 98.48319642925395, + 185.7922265703402, + 84.75230552904641, + 214.1853490365526, + 277.566094582282, + 266.2002848490414, + 216.91741916235824, + 8.961204506931377, + 168.7850666639356, + 66.20209667621927, + 55.95973946329119, + 168.60590384840236, + 130.21658237674902, + 269.38349347069067, + 13.835878499983929, + 43.946642674291645, + 122.79235663397503, + 131.43381587162887, + 170.1224838984568, + 127.33218204810143, + 243.65006618677478, + 167.61102814196917, + 46.79989984586434, + 289.3251212304232, + 164.81559891804918, + 192.14235956846576, + 274.9773687450887, + 90.38573474053325, + 168.37225023713387, + 124.49753163279708, + 207.74225575865466, + 54.275312296874255, + 29.128645453243607, + 284.16486029166947, + 27.826424107500614, + 57.774328692616834, + 19.647701188249396, + 23.79841055866656, + 94.29789916113056, + 105.52805679633292, + 232.12117464714981, + 164.64063388208504, + 101.98572174264808, + 292.98412483184075, + 118.60725336287408, + 115.56725440465243, + 208.81903001472716, + 117.31531658015749, + 127.09370126289492, + 25.574088780157442, + 237.5839393617249, + 298.98681306278127, + 115.95389280440567, + 264.8873714288192, + 64.27552030541122, + 170.94803828739666, + 96.89598509589561, + 266.5477975746911, + 142.94450400554317, + 241.85379438486498, + 230.38962467509998, + 229.99910436625677, + 217.1090987824822, + 77.33597317323407, + 103.18697310755634, + 103.43141169957705, + 96.99615607979838, + 178.28850949611623, + 263.7880522850348, + 138.49655938455604, + 111.02865894610997, + 132.88813341022205, + 294.36600566700986, + 243.76847493284697, + 10.272029151682013, + 241.6016450475499, + 255.1474072703804, + 20.117217133656695, + 122.7973265226677, + 218.66370649819518, + 183.31547060373944, + 289.87524579565184, + 79.90681712661062, + 19.274728564433715, + 25.68401450957685, + 286.7342620514214, + 217.235077256765, + 217.2950296936762, + 192.2268269641406, + 245.25691504622193, + 229.50024489718876, + 98.61019611057604, + 262.5270245172838, + 279.88253540504354, + 198.37006062044858, + 256.75906415736176, + 288.20382170327366, + 73.84916519829561, + 13.160887796955908, + 158.93925119596076, + 198.81016263956883, + 61.89840984246246, + 139.62865465237192, + 106.77239331663463, + 220.62035624356184, + 28.50573607562425, + 227.47710611854203, + 185.42298966205254, + 170.1122068004196, + 33.655144311731476, + 24.269276821000396, + 277.2912773731557, + 142.2960673438038, + 44.4957906251646, + 168.89770504522548, + 16.798259707002444, + 36.32305361247128, + 159.7282626658004, + 303.22069417797945, + 229.5214479169446, + 247.64197850668967, + 270.3996652376304, + 113.01369611608617, + 114.93038982962715, + 114.70808690120327, + 214.86268868214168, + 128.14722732958958, + 251.0705234029701, + 239.01753324354542, + 32.27919599876195, + 101.48570549497015, + 122.93056737489513, + 16.172538886899755, + 236.96746257204762, + 56.81285481101925, + 253.2478031192967, + 37.7989511470517, + 257.10562855281665, + 271.98330295103574, + 205.7368561626538, + 235.9227630270099, + 62.157783071925685, + 35.02041599189468, + 11.891688955785424, + 262.92517703976404, + 257.3201939722585, + 262.79453460241103, + 245.54897991501605, + 172.14373660940984, + 162.01062511121884, + 48.7903812650933, + 45.821878035871315, + 219.6973170020503, + 16.972960926821184, + 159.81929193858605, + 10.150539547455505, + 41.19797937497211, + 298.47970683438507, + 298.72018815306075, + 280.70858107523713, + 161.66429829647257, + 67.12841070567953, + 215.2152543559422, + 63.490475605306905, + 267.18175512524004, + 9.040432351901886, + 139.29917957907995, + 256.53455774843195, + 37.27800544870693, + 203.95114064682397, + 61.7341968222357, + 136.5962325130188, + 44.496256385758564, + 31.76848064987698, + 58.563482710073934, + 25.88484395640324, + 244.6785617549903, + 258.9541182736929, + 20.613356223704177, + 250.33049503799472, + 111.07906112064178, + 128.16798998840434, + 18.131434636664988, + 24.801977381787665, + 45.82299032045726, + 291.4591547886724, + 276.25678642759596, + 157.68007052712355, + 100.94594515124747, + 136.8572739929757, + 216.48969873970913, + 113.1553518000391, + 149.51616825395746, + 17.388939956130447, + 73.77235545633906, + 224.3107696510454, + 171.85795404277508, + 24.753264480359935, + 196.99181013388804, + 163.9252553592962, + 135.67166293751023, + 9.323080388139598, + 68.38976924633474, + 215.26065947352834, + 289.790397100583, + 35.87998162980803, + 26.090955334891785, + 136.55181592007605, + 260.7421604740481, + 214.99422554347163, + 135.50012984347825, + 170.88877111268846, + 299.9384198272788, + 134.63758096173632, + 126.20586235391315, + 100.65206275542609, + 282.0822476596967, + 131.86870508022503, + 197.39861881465623, + 136.72431430921148, + 249.16403706632354, + 19.50195749796727, + 255.087749682091, + 264.23163521307515, + 172.39407477514956, + 84.58451751323007, + 114.50102750738421, + 67.57269234451594, + 105.73945554610935, + 219.7480712214698, + 239.97463771429318, + 24.23336819922349, + 79.55053929267062, + 8.155362454484287, + 53.55754295157831, + 116.79647446040015, + 108.70581316117082, + 217.8198237336043, + 258.30362298912, + 168.46801194089713, + 135.68012368622377, + 6.286440703485725, + 281.18362364283814, + 74.22398303628948, + 216.06318263853302, + 162.4279386919617, + 289.5628145929914, + 83.42402887674368, + 235.35165144693644, + 119.51074927961416, + 135.45329666014123, + 85.28693232861683, + 101.49388362650936, + 247.1100894485046, + 202.7453937071216, + 109.99608616709686, + 26.568595683690166, + 187.98730099269397, + 145.74091151972678, + 287.70701901051416, + 221.53158256694945, + 253.44262053297507, + 107.45744032760875, + 288.969702971161, + 240.00006929904214, + 165.95621822588524, + 40.52516859544828, + 114.5049727942108, + 218.11984464810675, + 60.67354451018825, + 164.53771016562868, + 127.30755674701506, + 20.04807892456054, + 48.66689051958516, + 196.03857092774462, + 11.04002960036685, + 46.39161690208205, + 65.91714004943336, + 204.80373680471146, + 293.0094182343186, + 182.33400640411352, + 283.65281615209943, + 156.18693423283895, + 130.38579056226058, + 42.10128350581256, + 302.2205969949617, + 115.0040002589961, + 103.19480263964265, + 159.8454229424968, + 142.54785892014226, + 239.09016154967674, + 296.34497312863215, + 50.839874430913945, + 287.03943716707005, + 205.82014493066694, + 36.56880810809509, + 247.16474576197464, + 127.2756455991092, + 38.20983393295209, + 241.20250957888607, + 66.71455432134748, + 210.55325293082143, + 146.90081344225047, + 108.06413945390348, + 234.38169293836847, + 45.92254936922533, + 51.01337033117033, + 135.11431530769798, + 222.7118828083499, + 233.03670062515806, + 72.63840026953736, + 127.48833526589087, + 26.967158256376635, + 305.3784248795153, + 34.88311764078933, + 57.49195626063627, + 141.54608131963775, + 268.14060765151385, + 43.71532025414238, + 186.38757878693642, + 46.26446294283743, + 77.5462263578759, + 201.65765488717756, + 144.87954392972205, + 116.39651006161672, + 257.0737785001788, + 247.0578079247032, + 198.99144778436082, + 162.892511371324, + 140.281350487721, + 204.46607187635757, + 160.3474620893642, + 161.31195305348268, + 237.80505393414072, + 174.6433505401671, + 64.90288896926317, + 30.295630960215966, + 19.219585418319575, + 137.34638977600991, + 79.53984385940461, + 18.860891421332983, + 36.93928441798196, + 17.328955543600483, + 250.32441250608537, + 296.28020867487515, + 201.99256318672482, + 95.59998230163492, + 161.76468855591293, + 27.872384229251193, + 181.08551499168263, + 21.30263307308308, + 168.74318938697314, + 233.24709898466057, + 32.37243487718495, + 228.12107667940396, + 112.26671831703817, + 232.03714291554624, + 16.431891225048915, + 303.9231041967311, + 133.40109160343474, + 199.5640055506112, + 139.75551192748358, + 203.6366796647276, + 159.98361018854806, + 258.25728486669414, + 223.37081359369634, + 216.08156143715894, + 152.83484967726488, + 236.40029325725754, + 77.21035453971749, + 65.74831542685862, + 295.5781149380819, + 40.68888623295608, + 226.12863003376341, + 199.89958478354964, + 96.4905048060828, + 290.79424181795736, + 137.51474194796216, + 296.68255481582804, + 145.0415574804941, + 283.24718310014816, + 192.4479037065273, + 110.38739117902507, + 208.39428012841793, + 206.27784404617267, + 245.37213416625124, + 28.830467711835713, + 222.0674856688626, + 252.0578466632854, + 268.99019311522045, + 215.9360945429932, + 275.12927869911107, + 120.69154054294425, + 122.07539949159516, + 248.83679445978885, + 184.8627427842512, + 301.77999230231524, + 22.239859869959467, + 175.03270034486903, + 250.93976203006588, + 32.52479825683087, + 203.05376737157076, + 245.9930734753294, + 246.03382672371305, + 13.62244178434476, + 238.3879080823473, + 80.58553506348589, + 200.9187634122444, + 65.05206303539659, + 161.9107125773835, + 205.22147840428357, + 254.01841454872164, + 32.43630483600844, + 25.541838649768565, + 297.91545044982814, + 81.86270432485416, + 260.8361850637945, + 164.69904117025152, + 290.1919857785929, + 132.7325098322661, + 10.97689917526681, + 53.745452622992445, + 85.40882103882402, + 131.9738680519556, + 245.4443667273653, + 117.14314347415656, + 57.955766546714905, + 219.21289416435604, + 108.5512088602009, + 95.69648265466958, + 282.8514148073985, + 72.08024715728185, + 74.00462828744884, + 229.76731862155273, + 286.74371405318624, + 91.60500070211103, + 131.60255609383077, + 211.03543227443336, + 297.0437654353343, + 241.79667714171575, + 72.26345689594514, + 87.55536939636788, + 147.82248046629314, + 88.04665743037634, + 133.45999696277374, + 170.70317963684016, + 66.16327305054509, + 241.16858033086987, + 143.68969687127276, + 159.35904125268988, + 26.676732278888895, + 69.6121468433072, + 131.18021316514637, + 71.81563168314548, + 50.72227671628624, + 226.19175216981677, + 109.26943211816402, + 96.39371903944604, + 132.18303022578743, + 302.39101732173276, + 56.39772962985898, + 268.23972284020704, + 204.71914582624976, + 52.02847154180114, + 76.15064849162943, + 33.29778180723014, + 257.2959412731015, + 202.50031950864678, + 305.836619491589, + 232.4089465117841, + 155.1270643210367, + 201.61043743893808, + 298.31734022030815, + 83.02011097784536, + 190.43756924596985, + 211.64383955443085, + 92.98595986959396, + 143.61877419798213, + 218.08661008517998, + 124.11849317497241, + 298.81159792213913, + 250.23325547901163, + 157.38261376083173, + 295.0016737323907, + 100.83998428508383, + 166.18486024674115, + 126.49726691233262, + 132.74421717576195, + 120.63004784836534, + 42.542821019088656, + 184.4493340968124, + 137.1670966862372, + 87.36263526203717, + 15.80413494094103, + 112.94966792377933, + 52.979764576271855, + 260.63898692969434, + 302.5770412350472, + 205.97084308775467, + 166.48831248420822, + 109.65502385598909, + 203.36017561996508, + 273.374670254691, + 152.07919030517857, + 29.08421125273733, + 295.72053961865043, + 37.57171378481531, + 203.31964910087615, + 212.78195556999577, + 240.80254654393804, + 205.36420193903035, + 264.5698187281075, + 272.9491356818103, + 48.017475865349056, + 271.61543573665307, + 206.67039254475563, + 81.37920679219627, + 101.3861860954682, + 43.2102324080804, + 207.86880571969078, + 59.15875804856769, + 63.97068772572863, + 130.2825195790841, + 192.3136062891048, + 189.37558963305352, + 143.35737222553766, + 21.773696113586166, + 74.5774076622563, + 226.30919846154245, + 206.3334440105205, + 203.54510959877263, + 16.954878087934805, + 260.9085075370571, + 40.8974169784357, + 267.2069449104355, + 157.41515944470345, + 218.13849117746545, + 14.682338955286916, + 133.102223470186, + 258.69958333381953, + 126.71904369818326, + 189.41179055803255, + 64.14262006193972, + 20.704775874323705, + 265.5340425974217, + 183.09990256820555, + 62.0357649267291, + 157.7727358466954, + 100.06525892956029, + 141.7468035175213, + 89.52844775339311, + 188.32161825763004, + 42.39996957677127, + 245.9182843053516, + 182.51765968344253, + 162.72982056727153, + 133.77910164855905, + 202.63233597315528, + 195.55819627583728, + 56.284739862985965, + 301.55503835190416, + 223.4146681116232, + 199.07657797986323, + 68.65892812132732, + 179.51305729442413, + 132.39999634389014, + 220.87992537949845, + 121.0118500438495, + 296.3554601002703, + 29.808233689288315, + 24.427781029213527, + 197.09819536430047, + 128.44785639705913, + 10.401620341899633, + 119.06308193519594, + 115.78084965143911, + 282.60051077276165, + 254.49590262086477, + 184.42078930400587, + 131.97731440856936, + 213.69703897423378, + 231.27681148881817, + 207.83884009799186, + 64.00136748369366, + 278.61170333910815, + 63.735969688436256, + 257.8276512582376, + 164.15526962196807, + 118.00390696611593, + 208.95668812409633, + 271.61684454628687, + 259.5108428928883, + 100.49274681336594, + 151.91350855649432, + 78.69289487875898, + 177.83651944850038, + 166.68563974644695, + 69.1924688328554, + 41.2420013145432, + 170.84073767504643, + 86.06259999368388, + 274.41748806461663, + 303.3365858644193, + 302.2030996493132, + 189.87664740203545, + 60.83479931754564, + 16.601120466503538, + 219.40397489283228, + 151.31871706634627, + 185.62307160591112, + 168.22864434910943, + 29.34894279137345, + 129.05064646717355, + 90.43468810847264, + 54.49749865277966, + 239.66074886653487, + 196.33975597808794, + 159.71784045936099, + 88.05029730374322, + 42.144596645505885, + 270.54671940045205, + 91.16517115073994, + 230.00305626204218, + 96.65689448263129, + 213.54430470005966, + 262.7082794430432, + 107.16417644192833, + 211.8513664437088, + 245.97434882242908, + 190.8717268010994, + 231.68255768197682, + 289.36023746688005, + 184.2576309783463, + 105.46524155457354, + 221.46891839991306, + 163.39782311011004, + 173.77123314550118, + 37.19565220693295, + 61.741620863875674, + 240.09697176152952, + 80.95842379262879, + 182.65952062114403, + 271.1593409551697, + 160.71516284427202, + 274.2228087693474, + 193.40129464048297, + 177.12290653181253, + 244.83100831641661, + 272.5355702853715, + 137.7821732477548, + 267.6811296072192, + 277.7154154007217, + 17.1656809768837, + 214.93254449203, + 272.9120794892487, + 304.1863294969608, + 127.16999401051812, + 176.5947378382005, + 64.79056613299916, + 31.57779716964462, + 223.49563939754648, + 30.458280709530833, + 153.85106597914657, + 12.781241173051507, + 136.54192992811957, + 25.132188117448532, + 139.2474308698272, + 265.7276654736213, + 61.728059327561056, + 62.24951229802459, + 224.3549064201723, + 252.23410499883772, + 147.6184074127848, + 214.72004737206169, + 166.60908860436535, + 237.73309752114326, + 25.615165403917285, + 242.34099340520268, + 275.7855166087333, + 288.684036387456, + 165.5097664184906, + 293.1307154444089, + 176.7723205750363, + 165.18318875472312, + 253.37442862735742, + 151.49414324409483, + 234.1244271645183, + 56.591171116637376, + 98.6612157596242, + 200.26617477118253, + 134.6662981836826, + 61.22270134782246, + 276.6249613867073, + 159.69071077080227, + 247.989718302548, + 294.1336434473311, + 202.11447366496853, + 72.94859583326354, + 14.138395414318216, + 222.35178878293326, + 267.36739728733124, + 203.86939130823987, + 246.36054562485282, + 71.80133350657, + 47.503838833084835, + 85.6607542026723, + 75.36866946819204, + 58.87975749401984, + 255.50582882729833, + 151.0751013290926, + 186.2272127996072, + 92.34486411277771, + 183.75997266077314, + 30.85564404627766, + 227.15741072987248, + 130.06225749178864, + 253.95863372110747, + 128.04022265168058, + 82.567942985022, + 50.195815280782, + 147.3120841092655, + 74.32617375861878, + 290.86673670136753, + 237.13685773002277, + 198.23823006087778, + 161.5732900844414, + 127.27296446810897, + 39.31268625171347, + 185.49625501212736, + 272.2115150598935, + 69.06533494848614, + 183.879799826079 + ] + } + ], + "layout": { + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "#2a3f5f" + }, + "error_y": { + "color": "#2a3f5f" + }, + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "baxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "fillpattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "#EBF0F8" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "#C8D4E3" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowcolor": "#2a3f5f", + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "colorscale": { + "diverging": [ + [ + 0, + "#8e0152" + ], + [ + 0.1, + "#c51b7d" + ], + [ + 0.2, + "#de77ae" + ], + [ + 0.3, + "#f1b6da" + ], + [ + 0.4, + "#fde0ef" + ], + [ + 0.5, + "#f7f7f7" + ], + [ + 0.6, + "#e6f5d0" + ], + [ + 0.7, + "#b8e186" + ], + [ + 0.8, + "#7fbc41" + ], + [ + 0.9, + "#4d9221" + ], + [ + 1, + "#276419" + ] + ], + "sequential": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "sequentialminus": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ] + }, + "colorway": [ + "#636efa", + "#EF553B", + "#00cc96", + "#ab63fa", + "#FFA15A", + "#19d3f3", + "#FF6692", + "#B6E880", + "#FF97FF", + "#FECB52" + ], + "font": { + "color": "#2a3f5f" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "#E5ECF6", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "mapbox": { + "style": "light" + }, + "paper_bgcolor": "white", + "plot_bgcolor": "#E5ECF6", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "line": { + "color": "#2a3f5f" + } + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "title": { + "x": 0.05 + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + } + } + }, + "title": { + "text": "Dataset" + } + } + }, + "text/html": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "fig = go.Figure(data=[go.Scatter3d(x=dataset[:, 0], y=dataset[:, 1], z=dataset[:, 2],\n", + " mode='markers')])\n", + "fig.update_layout(\n", + " title=f\"Dataset\",\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "id": "b1eacbb4", + "metadata": {}, + "outputs": [], + "source": [ + "def gen_n_points(dataset, n_points, eps_range=0.01):\n", + " n, m = dataset.shape\n", + " \n", + " sample = []\n", + "# random_point = dataset[np.random.randint(n)]\n", + " random_point = np.array([0, 0, 0])\n", + " \n", + " for i in range(n_points):\n", + " eps = np.random.uniform(-1*eps_range, eps_range, m)\n", + " nearby_point = random_point + eps\n", + " \n", + " sample.append(nearby_point)\n", + " \n", + " \n", + " return np.array(sample)" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "id": "7b049ca0", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "2" + ] + }, + "execution_count": 25, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "sample = gen_n_points(dataset, 5)\n", + "compute_AS(sample, kde_pdf)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "0d54eccb", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "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.11.5" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/rdas/AS.py b/rdas/AS.py index e69de29..24c8f63 100644 --- a/rdas/AS.py +++ b/rdas/AS.py @@ -0,0 +1,26 @@ +from typing import Callable +import numpy as np + +def check_input(X): + # X : ndarray of input samples + + assert len(X.shape) == 2 and type(X) == np.ndarray, 'X should be a 2d numpy array' + N, d = X.shape + return X, N, d + +def get_n(S): + ediff = np.fabs(np.diff(S.reshape((S.size,)))) + n = np.argmax(ediff)+1 + + return n + +def compute_AS(X: np.ndarray, kde_pdf) -> np.ndarray: + # X : ndarray - input samples + # f_deriv : Callable - function derivative + + X, N, d = check_input(X) + + G = 1/np.sqrt(N) * np.column_stack([kde_pdf.grad(x) for x in X]) + U, S, Vh = np.linalg.svd(G) + + return get_n(S) \ No newline at end of file diff --git a/rdas/Manifold.ipynb b/rdas/Manifold.ipynb new file mode 100644 index 0000000..af4c712 --- /dev/null +++ b/rdas/Manifold.ipynb @@ -0,0 +1,10227 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "955e580d", + "metadata": {}, + "outputs": [], + "source": [ + "import plotly.express as px\n", + "import plotly.graph_objects as go\n", + "\n", + "import numpy as np\n", + "\n", + "from sklearn.datasets import make_s_curve, make_circles" + ] + }, + { + "cell_type": "markdown", + "id": "c72b7800", + "metadata": {}, + "source": [ + "# S-curve" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "444771b7", + "metadata": { + "scrolled": false + }, + "outputs": [ + { + "data": { + "text/html": [ + " \n", + " " + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plot.ly" + }, + "data": [ + { + "mode": "markers", + "type": "scatter3d", + "x": [ + -0.993531977792775, + -0.8708172857058722, + 0.8456794744325812, + 0.7300857314725252, + 0.2867643694023354, + 0.14779639067033762, + 0.7347371871309678, + -0.2389615646381622, + 0.7176809240320599, + 1.003525670661184, + 1.0970996767231285, + -1.042124533581882, + 0.10473209368590371, + -0.3760041046679454, + -0.06017212183994654, + 0.03258230451794586, + -0.9871871481416816, + 0.1558389835024952, + -0.6872717073907637, + -1.003874681165038, + 0.8617896133890696, + 0.28742262238863836, + -0.897925012467289, + -0.8692220380336348, + -0.4010024789314612, + 0.5838026869859363, + -0.33255716929818896, + 0.4057712767629692, + 0.827531609154129, + 0.8199772169992974, + 0.7416445834883275, + 0.011899573845048333, + 0.7955237444798057, + -0.8147888945897016, + -0.9006743019862895, + 0.22557577494244163, + -1.0482698671154722, + 0.453907322822113, + 0.9416748821957329, + -0.4489728778886363, + 0.42972952971762957, + -0.17001477631065212, + 0.965254483218935, + -0.6179620891182471, + -0.8515188548132283, + 1.0146097703432206, + -0.9734867294122725, + 0.07371397538219861, + 0.46192991154559787, + -0.11449918785776182, + -0.8508890137291109, + 0.6268109996774355, + -0.97955508772068, + -0.641444583489676, + 0.8487292437561094, + -0.6895676884808556, + 0.7234069826170265, + 0.11247660179167307, + 0.9676087127973305, + -0.8836002042034473, + -0.7716206423604515, + -0.769020917740917, + 0.01177415509438013, + -0.8998413455782874, + -0.9577982258394111, + 0.36794691978631316, + 0.19170724930388733, + 0.29744694444714675, + 0.9946154615022639, + -1.1790992736948447, + 0.6130868232796416, + -0.4587542407136729, + 0.951452792249678, + 0.2765384444055075, + 0.9355414337959683, + 0.7245293496626104, + 0.48061054076210125, + 0.8341824329329197, + -1.045114534591625, + 0.4823214051215363, + -0.27235247868940865, + 0.8524627613718416, + -0.7853421999313158, + 0.8892785877072682, + -1.1804087732983766, + -0.9784059734212799, + 0.7629825004412638, + 1.0478454557510355, + -0.5655093864067966, + -0.2703591184208844, + 0.479735084800109, + 0.9917575812623348, + 0.5116759963237818, + 0.5125010381601381, + 0.5070263822691963, + -0.12377473120471365, + 0.38916188670247676, + -0.590554779119505, + 0.8453517906029955, + 0.6178313521994017 + ], + "y": [ + 0.27507399107473185, + 1.3760673485826755, + 0.47677496555725196, + 0.9687179750427803, + 1.9418240627708483, + 0.4278175117358718, + 0.8651477888858823, + 1.588565682429031, + 0.36490328382543663, + 0.14800728405140598, + 0.2553761718206288, + 0.22000381037457983, + 1.8341384895458301, + 1.491462440932349, + 1.4300486434140105, + 1.5999070425793722, + 1.5633397051285305, + 0.3862141755006808, + 1.9292453258865672, + 0.9350982687133575, + 1.731196685543621, + 1.7932059059489451, + 0.5378560848389327, + 0.2663141964816806, + 0.4757762946412304, + 0.7941938895366332, + 1.643009740343988, + 1.6829298068265108, + 0.025255995587506214, + 1.087707672607236, + 0.9934236879120932, + 0.3204340710587756, + 0.4530340721329923, + 0.48002156285500575, + 1.87064089832148, + 0.7052375846899681, + 1.0656804302602354, + 1.3437679658082964, + 0.7064469797228604, + 1.894264071976038, + 1.8659581141898014, + 0.5885248013528308, + 1.0301985603812756, + 0.5324656601074739, + 0.6596409762982602, + 0.10450384679672653, + 1.3004148798436896, + 1.0683209306500843, + 0.020058001407771475, + 0.5012748244535259, + 1.8912611324456337, + 0.5401608078772914, + 0.28769958478603136, + 0.9906382588860042, + 2.099067397800044, + 0.42495340413941785, + 1.398980832928761, + 1.5030199654140457, + 0.4535069676620773, + 1.5663103824224383, + 0.8181079003373094, + 1.3459626247872227, + 1.3976073022372224, + 1.0736497523127928, + 0.248774837238313, + 1.6395783155191304, + 0.6739767651923159, + 0.36002271536294, + 0.09124987960879966, + 1.241301588920175, + 1.2733066553612176, + 0.24241438542425833, + 0.9235843784485918, + 0.3315726891171027, + 1.4061566681689066, + 0.42789912740627645, + 1.4442874579101475, + 0.8363052435275028, + 1.8722353001887775, + 0.18531645114340334, + 0.6897131579198896, + 0.15923087132996697, + 1.9468992098989006, + 1.7399729686117482, + 0.43333353575106004, + 1.2878295079030588, + 1.6757375458299941, + 1.0540291679185272, + 0.9770791171553699, + 0.5080733029500946, + 0.2107021927226707, + 1.7437371983695404, + 1.7537322837648286, + 1.2894079082822996, + 0.5332511479476689, + 0.5576727717876663, + 1.380066935615235, + 1.7728758047339694, + 1.805263605090035, + 1.707286713410203 + ], + "z": [ + 0.7070904624536677, + -1.463975694465423, + -1.5794277126816711, + -0.5022861399740245, + 1.993117319777704, + 1.9660799686203558, + 1.5527622301154136, + -2.035198043473573, + -0.36881414283475844, + -1.2271378955269698, + 1.1819135834562606, + -1.2396357209797269, + -1.9309503665545344, + 1.868654915418347, + 2.0122215868924695, + 1.9888424186284797, + 1.2805224438912968, + -0.10439772850414279, + 0.20119396680196666, + 1.4362896973583799, + -0.3609523187720281, + 2.0633129148838325, + 1.5938358491907865, + 0.6169818040496277, + 0.1717253388337786, + -1.8804217337639795, + 2.1709823953225915, + -0.08981531241924381, + -0.4399001843854352, + 1.363994974823974, + -0.6835693002956097, + 1.9467637030341802, + 1.4994897451833886, + -1.4482846500127706, + -1.2841004929649205, + -1.7848935029471462, + 1.3624248016228917, + 1.7382370629715276, + -1.2546452208547965, + 0.20409476314428715, + 1.7808154661447808, + 0.1841788477256159, + 1.4364037415704307, + -1.8012489612104252, + 1.4749278755439266, + -0.8255628108552806, + 1.1909234404027926, + 0.10594855282357783, + -0.254790802077451, + 1.9254067363153229, + -1.2822239377807945, + -1.8485955164661372, + -1.58481457687916, + -1.7744146223261439, + -0.5030807063892139, + -1.6858022453946369, + 1.7526694316903948, + 2.0135156290649467, + 1.4846272610074736, + 0.962890814471172, + 0.34831666928506333, + 1.6792901412761716, + -1.9658306671987327, + 0.7062110963055215, + 1.6291321743898286, + -0.06830923053224243, + 2.088642348743181, + -1.9504988630156816, + 1.8522966434343857, + -0.9477392553460453, + -1.8636827002889291, + 2.051884318343129, + 1.116558830713009, + -1.8489845482880065, + -1.4662871955194854, + -1.4857145621134946, + -1.7279083615936497, + 1.4667012129590042, + 0.6470156481506943, + 1.6836453943138436, + -1.9878366396824685, + -0.5307933822800206, + 1.1731859317316367, + 1.5712456091601836, + 1.3719603786844796, + 0.9387263903948432, + -1.7293478971987275, + -0.7346356782800612, + -1.8354091255872622, + 0.030822500992724655, + 1.6964479898701281, + -1.4339360443459963, + -1.9056553014924258, + -0.0952157430275647, + -1.7955099637258098, + -0.09227879552120408, + -0.07425095919706856, + 0.11833888859788348, + 1.2310166556227498, + 1.9459708695556424 + ] + } + ], + "layout": { + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "#2a3f5f" + }, + "error_y": { + "color": "#2a3f5f" + }, + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "baxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "fillpattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "#EBF0F8" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "#C8D4E3" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowcolor": "#2a3f5f", + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "colorscale": { + "diverging": [ + [ + 0, + "#8e0152" + ], + [ + 0.1, + "#c51b7d" + ], + [ + 0.2, + "#de77ae" + ], + [ + 0.3, + "#f1b6da" + ], + [ + 0.4, + "#fde0ef" + ], + [ + 0.5, + "#f7f7f7" + ], + [ + 0.6, + "#e6f5d0" + ], + [ + 0.7, + "#b8e186" + ], + [ + 0.8, + "#7fbc41" + ], + [ + 0.9, + "#4d9221" + ], + [ + 1, + "#276419" + ] + ], + "sequential": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "sequentialminus": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ] + }, + "colorway": [ + "#636efa", + "#EF553B", + "#00cc96", + "#ab63fa", + "#FFA15A", + "#19d3f3", + "#FF6692", + "#B6E880", + "#FF97FF", + "#FECB52" + ], + "font": { + "color": "#2a3f5f" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "#E5ECF6", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "mapbox": { + "style": "light" + }, + "paper_bgcolor": "white", + "plot_bgcolor": "#E5ECF6", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "line": { + "color": "#2a3f5f" + } + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "title": { + "x": 0.05 + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + } + } + }, + "title": { + "text": "S-curve. N_samples: 100; Noise: 0.1" + } + } + }, + "text/html": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "n_samples = 100\n", + "noise_mc = 0.1\n", + "\n", + "X, t = make_s_curve(n_samples=n_samples, noise=noise_mc, random_state=42)\n", + "\n", + "fig = go.Figure(data=[go.Scatter3d(x=X[:, 0], y=X[:, 1], z=X[:, 2],\n", + " mode='markers')])\n", + "\n", + "fig.update_layout(\n", + " title=f\"S-curve. N_samples: {n_samples}; Noise: {noise_mc}\",\n", + ")" + ] + }, + { + "cell_type": "markdown", + "id": "32e983a7", + "metadata": {}, + "source": [ + "# Circles" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "49b18125", + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plot.ly" + }, + "data": [ + { + "mode": "markers", + "type": "scatter3d", + "x": [ + -0.36503092514868, + 0.7914254474532982, + -0.6260548942673563, + 0.7193834760620176, + 0.8758627559646511, + 0.2823818541364431, + -0.8839879781882499, + -0.6145290731029565, + 0.3557964697012626, + 0.9220298119340121, + -0.652477375574668, + -0.7939680865638878, + -0.5115137068416924, + -0.6140315776089803, + 0.33448410529900957, + 1.038598729978001, + -0.7643858364870251, + -0.8358987306376383, + -0.08545190515657802, + -0.6327044984214414, + 0.5698093024253077, + 0.12264074077603868, + -0.9071225809082429, + 0.44879629952288935, + -0.7141699706583768, + -0.4186435739030831, + 0.24241093235190436, + 0.7311776241300543, + 0.35950546022725133, + -0.8284228903561718, + 0.29605401688965194, + 0.8855998835656502, + -0.1235119882063119, + -0.8959742200007371, + 0.7064426681914984, + 0.7327542979534323, + -0.47281112831540206, + -0.2609426958678851, + -0.3135572599036312, + -0.37453691832791236, + 0.994924647649298, + -0.3468120110900049, + 0.5277487598909707, + 0.7359647569415853, + -1.0406129604145125, + -0.7433148503844806, + -0.4582808320231382, + -0.8830792353047378, + 0.07079742902411772, + -0.1655616059381623, + -1.163167659166981, + 1.0298250466644618, + -0.5959665195361695, + 0.1444057918174508, + 0.5072778648803635, + -0.6584214100611109, + 0.7856580345001203, + -0.16420414513933254, + -0.17231541023739655, + 0.016897645117101623, + 0.7174917231668072, + 0.6977022978401917, + 0.7644693736615199, + 0.5055669736728787, + 0.8315890907152316, + -0.3376102141337307, + 0.6826690590454035, + -0.37349584706691996, + 0.11259313270354335, + 1.022214993359585, + -0.7022036760132901, + 0.4864768625219351, + 0.4892743722931058, + 1.0022230375072565, + 0.7531208312125026, + 0.4490018542105104, + -1.031806824818783, + -0.5277910107945807, + 0.6466861570273275, + 0.21005367784794907, + -0.15278240259546633, + -0.29564602940318435, + -0.12948485702496448, + -0.8106269469274655, + 0.873788139169036, + 0.7583355674475486, + -0.8694715549334807, + 1.1575379267412893, + -1.0599244148608726, + -0.09150857694246123, + 0.14146965459891672, + -0.847820305215579, + -0.15466942278428414, + -0.5490793730071348, + -0.6426400154301222, + 0.23649414798384535, + -0.5417471646091444, + -0.2606505347161093, + 0.4150896977513743, + 0.7568467621429127 + ], + "y": [ + -0.7661344072596052, + 0.42486576898760076, + 0.5299326664518862, + -0.5989840343431667, + -0.796936939382692, + -0.8096356038711522, + 0.1996958148480896, + -0.47834009724984744, + 1.0246687513620794, + -0.08438963603439258, + 0.6739574755862918, + -0.5991273774271128, + 0.09644282085079739, + -0.8019336185229219, + -0.5321226147403938, + 0.5641269817992295, + -0.010603548480348807, + -0.23056849941286128, + 0.97514197680437, + -0.7055163496123885, + 0.4342503873047798, + -0.8239978464385116, + -0.2564656561394152, + -0.8949922474651674, + 0.8420040263910793, + 1.0425449484877547, + -1.0024352654459783, + -0.531254631380048, + 0.8901797717918579, + 0.21225070526973597, + 1.082785938798952, + -0.3765410612027956, + -0.9034931015086781, + -0.17066743298932968, + -0.8104017160809556, + 0.6046511910118025, + 0.6570369720595745, + 0.9009773695054852, + -0.9293628436789193, + 0.9591759215902631, + -0.24504193989813408, + -0.8616781061397156, + 0.702283086383762, + -0.4096798887492106, + -0.2756832640724241, + 0.7462474835002015, + -0.5410727689318285, + 0.08733169690894234, + 0.6540730475729934, + 1.0721507919327933, + 0.1372310827539026, + 0.3833666389106039, + 0.7596664898155353, + -0.9508559992755736, + 0.95085717238661, + -0.1156402564151964, + 0.6680970625124982, + 0.592372781032846, + -0.9838587447139334, + -0.7883585631400637, + 0.4741829197481984, + 0.010226234993571892, + 0.6915124607191983, + -0.6984745185719694, + 0.005928128405319588, + 0.672489804632873, + -0.5664894269129797, + 0.7336134846010716, + 0.8361895069974328, + -0.2976183219644267, + -0.36634306876992, + -0.9397171707432947, + 0.4810393810266521, + -0.24362690607333787, + -0.24647764457193116, + 0.5350584845246291, + -0.0268018351842875, + -0.8040543451828733, + -0.6556577717469991, + 0.6487854576660483, + 0.680117421609112, + -0.5459692075842197, + -1.167208554053302, + -0.6253437560391186, + 0.17483279898347376, + 0.1302343921986328, + 0.44081279104455945, + 0.1811094137427151, + 0.2031865697660982, + -0.7388570175621851, + -0.6812590552894154, + 0.1779488872940036, + -0.733960354811173, + -0.5726083344784639, + 0.5138616091469626, + 0.7122234844608104, + 0.342008779380367, + 0.9244595593322749, + -0.7548128421688731, + 0.11598677236115121 + ], + "z": [ + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 1, + 1, + 0, + 0, + 1, + 1, + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 1, + 0, + 1, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 1, + 0, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 1, + 0, + 1, + 1 + ] + } + ], + "layout": { + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "#2a3f5f" + }, + "error_y": { + "color": "#2a3f5f" + }, + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "baxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "fillpattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "#EBF0F8" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "#C8D4E3" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowcolor": "#2a3f5f", + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "colorscale": { + "diverging": [ + [ + 0, + "#8e0152" + ], + [ + 0.1, + "#c51b7d" + ], + [ + 0.2, + "#de77ae" + ], + [ + 0.3, + "#f1b6da" + ], + [ + 0.4, + "#fde0ef" + ], + [ + 0.5, + "#f7f7f7" + ], + [ + 0.6, + "#e6f5d0" + ], + [ + 0.7, + "#b8e186" + ], + [ + 0.8, + "#7fbc41" + ], + [ + 0.9, + "#4d9221" + ], + [ + 1, + "#276419" + ] + ], + "sequential": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "sequentialminus": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ] + }, + "colorway": [ + "#636efa", + "#EF553B", + "#00cc96", + "#ab63fa", + "#FFA15A", + "#19d3f3", + "#FF6692", + "#B6E880", + "#FF97FF", + "#FECB52" + ], + "font": { + "color": "#2a3f5f" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "#E5ECF6", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "mapbox": { + "style": "light" + }, + "paper_bgcolor": "white", + "plot_bgcolor": "#E5ECF6", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "line": { + "color": "#2a3f5f" + } + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "title": { + "x": 0.05 + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + } + } + }, + "title": { + "text": "Circles. N_samples: 100; Noise: 0.1" + } + } + }, + "text/html": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "n_samples = 100\n", + "\n", + "X, y = make_circles(n_samples=n_samples, noise=0.1, random_state=42)\n", + "X = np.hstack([X, y.reshape(-1, 1)])\n", + "\n", + "fig = go.Figure(data=[go.Scatter3d(x=X[:, 0], y=X[:, 1], z=X[:, 2],\n", + " mode='markers')])\n", + "\n", + "fig.update_layout(\n", + " title=f\"Circles. N_samples: {n_samples}; Noise: {noise_mc}\",\n", + ")" + ] + }, + { + "cell_type": "markdown", + "id": "cd328619", + "metadata": {}, + "source": [ + "# Dataset Generator" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "d6b5cb0f", + "metadata": {}, + "outputs": [], + "source": [ + "import numpy as np\n", + "import random\n", + "\n", + "class DatasetGenerator:\n", + " def __init__(self, dim_of_space, dim_of_manifold):\n", + " self.dim_of_space = dim_of_space\n", + " self.dim_of_manifold = dim_of_manifold\n", + "\n", + " def generate_dataset_in_subspace(self, n_samples, seed_value=42):\n", + " \"\"\"\n", + " Generate a dataset that lies along a low-dimensional subspace within a high-dimensional space.\n", + "\n", + " Parameters:\n", + " - num_samples: Number of data points to generate.\n", + " - dim_of_space: Dimension of the high-dimensional space (L).\n", + " - dim_of_subspace: Dimension of the low-dimensional subspace (l).\n", + "\n", + " Returns:\n", + " - dataset: NumPy array with shape (num_samples, dim_of_space)\n", + " \"\"\"\n", + " np.random.seed(seed_value)\n", + " # Generate a random orthonormal basis for the subspace\n", + " basis = np.linalg.qr(np.random.randn(self.dim_of_space, self.dim_of_manifold))[0]\n", + " # Generate random coefficients for the linear combination\n", + " coefficients = np.random.randn(n_samples, self.dim_of_manifold)\n", + " # Compute the dataset by projecting random points onto the subspace\n", + " dataset = np.dot(coefficients, basis.T)\n", + "\n", + " return dataset\n", + "\n", + " def generate_lines_planes(self, n_samples, scale, noise, line_params):\n", + " \"\"\"\n", + " Generate a dataset of straight lines in either a 2D plane or 3D space.\n", + "\n", + " Parameters:\n", + " - n_samples: Number of samples in the dataset.\n", + " - plane: If True, generate lines in a 2D plane. If False, generate lines in 3D space.\n", + "\n", + " Returns:\n", + " - dataset: NumPy array with shape (n_samples, dim_of_space)\n", + " \"\"\"\n", + " if self.dim_of_space not in [2, 3]:\n", + " raise ValueError(\"dim_of_space must be either 2 or 3.\")\n", + " dataset = np.zeros((n_samples, self.dim_of_space))\n", + " if self.dim_of_space == 2:\n", + " k, b = line_params\n", + " else:\n", + " if self.dim_of_manifold == 2: # plane in 3D space\n", + " a, b, c = line_params\n", + " if self.dim_of_manifold == 1:\n", + " p_0, p_1, p_2, x_0, y_0, z_0 = line_params\n", + "\n", + " for i in range(n_samples):\n", + " eps = noise * np.random.normal()\n", + " # Generate random parameters for the line\n", + " if self.dim_of_space == 2:\n", + " x = scale * np.random.rand()\n", + " y = k * x + b + eps\n", + " dataset[i] = [x, y]\n", + " else:\n", + " if self.dim_of_manifold == 2:\n", + " x = scale * np.random.rand(self.dim_of_space - 1)\n", + " y = a * x[0] + b * x[1] + c + eps\n", + " dataset[i] = [x[0], x[1], y]\n", + " if self.dim_of_manifold == 1:\n", + " t = scale * np.random.rand()\n", + " x = x_0 + p_0 * t + noise * np.random.normal()\n", + " y = y_0 + p_1 * t + noise * np.random.normal()\n", + " z = z_0 + p_2 * t + noise * np.random.normal()\n", + " dataset[i] = [x, y, z]\n", + " return dataset\n" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "17a6f358", + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plot.ly" + }, + "data": [ + { + "mode": "markers", + "type": "scatter3d", + "x": [ + 64.51872177439087, + 35.54999427802527, + 70.90558283169798, + 61.98125090517891, + 51.07117438720352, + 4.332334102713964, + 24.05440804348633, + 54.949571281831986, + 52.59944417181819, + 34.682930564162376, + 80.37918527137936, + 32.18323942072941, + 35.93089566184959, + 95.7003532759321, + 71.88027301685123, + 74.2964213229198, + 4.893889763473203, + 6.370611298897966, + 77.39301412094882, + 48.67763244744441, + 92.61772636362254, + 84.16056107836715, + 23.443235952265297, + 66.50237526341803, + 84.03200186260825, + 87.63462360246362, + 12.722288890184108, + 46.911863087501736, + 17.86680677812398, + 87.80870395720814, + 30.87204474139771, + 7.322286085822793, + 61.245977902744656, + 6.2950758594997325, + 15.297536272375156, + 65.69513166348302, + 93.87542124609547, + 93.67520942510848, + 3.188962694277808, + 88.64325791698575, + 69.60611412237601, + 84.9636323464556, + 30.27383103050577, + 29.2219911824947, + 18.36517699471001, + 42.76259376001648, + 2.3607558321277144, + 64.51910816390794, + 36.86836577776217, + 38.669151403276416, + 3.8241451478089217, + 87.8742977859988, + 90.29325097603181, + 21.104108384452868, + 73.39594999830108, + 54.835809168215555, + 20.013277303714528, + 1.7194577435885483, + 38.82087123190505, + 46.65742172375251, + 18.3768659165082, + 21.784574405480207, + 30.085907130591917, + 79.73576266123628, + 27.815604694393247, + 80.04827048094285, + 67.10012054622861, + 86.08200347183593, + 45.10556245447498, + 85.77363055473049, + 85.68886873061909, + 48.383580518121605, + 23.544677510795264, + 50.996736855133676, + 11.610640231922497, + 45.01008954257949, + 24.07644449852754, + 44.72464036826125, + 50.25978038307498, + 90.69986269736778, + 69.28615679320082, + 98.00725512358595, + 6.5160926641046775, + 74.09060315750135, + 3.2339521551908113, + 65.23963557854975, + 54.54991787338545, + 53.468086176181195, + 82.4991761623566, + 92.40880474449696, + 32.50169960486864, + 77.01233125730629, + 58.75824193463941, + 10.175789188493646, + 33.65005129137286, + 42.37062307950477, + 40.90364085152728, + 85.24580646716785, + 61.28022032130129, + 43.6755065509339 + ], + "y": [ + 0.6057549237461823, + 54.78441538430775, + 45.25046850194683, + 94.49411481466063, + 57.36479619830877, + 84.85490383991142, + 80.30097230858273, + 55.55626230701517, + 5.632189989605452, + 37.918137572371776, + 78.17908610550182, + 72.6115794038052, + 86.42602222158348, + 93.19628052099141, + 92.0068223681603, + 44.66245647182888, + 24.882946857432863, + 18.557776980399908, + 72.29678922053768, + 97.8485669570795, + 47.426968267823135, + 76.1975793024291, + 72.35007118995776, + 69.71826019210518, + 82.89582523771209, + 74.3581842154248, + 70.9373769405891, + 94.0690682470665, + 84.29814080212739, + 3.5841348870907286, + 68.94673009653937, + 79.60878736635358, + 60.046739537724726, + 20.14948223925638, + 92.6376160912086, + 11.60055993467789, + 99.43517470636777, + 27.281429988254903, + 83.45280232754936, + 15.388091453051732, + 27.711727637500772, + 29.043761174263693, + 93.27718229631799, + 76.87649916727236, + 15.175966447310262, + 50.02101788972975, + 17.50102300055395, + 61.37403501228358, + 15.390964684920094, + 9.92545649031581, + 78.33027275110031, + 79.51683329721837, + 85.66324087582504, + 17.22560935298033, + 86.6042667027032, + 97.86797109960538, + 95.39487394616364, + 46.83245905076936, + 65.03826926891377, + 37.163789601155905, + 10.297228960250104, + 14.127176708808896, + 76.80744552094193, + 21.477284051925572, + 95.73953391440699, + 44.43057396692429, + 58.01748290431698, + 23.887385697161356, + 78.01173227979838, + 42.821233496689196, + 74.65835960065317, + 51.03579532434643, + 32.38056291577834, + 42.923737890951685, + 63.98557763384336, + 66.7232334820947, + 54.78914513085279, + 28.98230356874133, + 78.21875201945363, + 94.79214504767357, + 97.96905155793945, + 30.537483345520954, + 8.900282113087442, + 62.25360307754721, + 66.43555382052521, + 73.33609512130006, + 78.05477007907838, + 80.15266001894375, + 79.73788713360447, + 60.27853016055581, + 76.62087544913157, + 0.6978922236846596, + 80.30862409851096, + 27.79310936619973, + 17.195238618073784, + 68.9877359872806, + 4.152037186459523, + 32.56778363974775, + 39.83101652286214, + 83.9133665693168 + ], + "z": [ + 672.2707754151933, + 762.1551001222148, + 995.2950412300285, + 1353.377736398114, + 1020.1894002453573, + 621.1153801220529, + 892.1437265204642, + 991.8837085910445, + 381.25420462692193, + 634.4558964259837, + 1461.7075249532518, + 717.4995259980102, + 997.4518075379875, + 1789.479462615825, + 1206.1535355757876, + 1073.237388003897, + 265.45538249064924, + 398.1491787949393, + 1431.8970253654704, + 1366.3788203476192, + 1399.7628301873704, + 1217.838380619558, + 797.8013189036761, + 1053.8325614546768, + 1353.121994182314, + 1368.2739027748023, + 831.8024710281152, + 1267.746886373057, + 703.4482800220394, + 1233.5717439383625, + 840.3625175337717, + 648.0425694889158, + 1027.7141954302188, + 25.120150511487054, + 903.3475649611547, + 887.7483465626947, + 1618.4603563920364, + 1213.611806448803, + 594.8375609990121, + 1015.4268275705748, + 944.0056857829634, + 1038.108842861024, + 1045.9045558860737, + 919.9209345752479, + 138.64647314229077, + 620.4015402141649, + 203.34447844186974, + 1130.1760126066386, + 500.09546774706416, + 468.6896897528001, + 655.8639691712249, + 1462.883543831269, + 1645.2721789259085, + 323.7695461183153, + 1584.3285969874344, + 1180.0299256096146, + 954.8729434224831, + 465.27366846833235, + 864.9324356255398, + 920.2914049329743, + 279.1317062712806, + 504.7836581432802, + 954.8357833096036, + 890.5876386265754, + 902.151384927917, + 1110.919148521646, + 1138.8656764216396, + 1090.069314038184, + 823.5627699153092, + 1209.8059163946073, + 1430.2725601832035, + 921.4395900811562, + 518.6656404407252, + 954.2609981619712, + 554.937014224033, + 879.7300240334764, + 662.3835836123984, + 696.6743473084065, + 991.1362312349868, + 1575.5268106837252, + 1445.611398619726, + 1337.2851143330815, + 297.58561210915707, + 1147.8991989943477, + 445.2580106950745, + 1366.2644808179484, + 1223.5341777696926, + 925.7837706314565, + 1407.730190756129, + 1496.741111510581, + 937.9420242440762, + 926.7454260137365, + 925.1635816208155, + 352.53120828075254, + 514.7160782499645, + 779.5149440701869, + 506.6354159311418, + 1131.1326176098828, + 896.8308026079725, + 1019.7823995326971 + ] + } + ], + "layout": { + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "#2a3f5f" + }, + "error_y": { + "color": "#2a3f5f" + }, + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "baxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "fillpattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "#EBF0F8" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "#C8D4E3" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowcolor": "#2a3f5f", + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "colorscale": { + "diverging": [ + [ + 0, + "#8e0152" + ], + [ + 0.1, + "#c51b7d" + ], + [ + 0.2, + "#de77ae" + ], + [ + 0.3, + "#f1b6da" + ], + [ + 0.4, + "#fde0ef" + ], + [ + 0.5, + "#f7f7f7" + ], + [ + 0.6, + "#e6f5d0" + ], + [ + 0.7, + "#b8e186" + ], + [ + 0.8, + "#7fbc41" + ], + [ + 0.9, + "#4d9221" + ], + [ + 1, + "#276419" + ] + ], + "sequential": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "sequentialminus": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ] + }, + "colorway": [ + "#636efa", + "#EF553B", + "#00cc96", + "#ab63fa", + "#FFA15A", + "#19d3f3", + "#FF6692", + "#B6E880", + "#FF97FF", + "#FECB52" + ], + "font": { + "color": "#2a3f5f" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "#E5ECF6", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "mapbox": { + "style": "light" + }, + "paper_bgcolor": "white", + "plot_bgcolor": "#E5ECF6", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "line": { + "color": "#2a3f5f" + } + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "title": { + "x": 0.05 + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + } + } + }, + "title": { + "text": "Plane. N_samples: 100; Noise: 0.1" + } + } + }, + "text/html": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# Example usage:\n", + "dim_of_space = 3\n", + "dim_of_manifold = 2\n", + "n_samples = 100\n", + "\n", + "plane_generator = DatasetGenerator(dim_of_space, dim_of_manifold)\n", + "X = plane_generator.generate_lines_planes(n_samples, scale=100, noise=100, line_params = [10,7,30])\n", + "\n", + "\n", + "fig = go.Figure(data=[go.Scatter3d(x=X[:, 0], y=X[:, 1], z=X[:, 2],\n", + " mode='markers')])\n", + "\n", + "fig.update_layout(\n", + " title=f\"Plane. N_samples: {n_samples}; Noise: {noise_mc}\",\n", + ")" + ] + }, + { + "cell_type": "markdown", + "id": "94f16647", + "metadata": {}, + "source": [ + "# PDF" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "a5180917", + "metadata": {}, + "outputs": [], + "source": [ + "import numpy as np\n", + "from sklearn.neighbors import KernelDensity\n", + "from scipy.optimize import approx_fprime\n", + "\n", + "class KDEProbabilityDensityFunction:\n", + " def __init__(self, data, kernel='gaussian'):\n", + " self.data = data\n", + " self.kernel = kernel\n", + " self.kde_model = self._fit_kde()\n", + "\n", + " def _fit_kde(self):\n", + " kde_model = KernelDensity(kernel=self.kernel)\n", + " kde_model.fit(self.data)\n", + " return kde_model\n", + "\n", + " def value(self, x):\n", + " # Reshape x to match the input dimensions\n", + " x = np.array(x).reshape(1, -1)\n", + " return np.exp(self.kde_model.score_samples(x))\n", + "\n", + " def grad(self, x, epsilon=1e-5):\n", + " x = np.array(x)\n", + "\n", + " def func(x):\n", + " return np.log(self.value(x))\n", + "\n", + " # Use numerical approximation for gradient\n", + " gradient = approx_fprime(x, func, epsilon)\n", + " return gradient" + ] + }, + { + "cell_type": "markdown", + "id": "93c0ca50", + "metadata": {}, + "source": [ + "# Active subspace" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "1f325271", + "metadata": {}, + "outputs": [], + "source": [ + "dataset = plane_generator.generate_lines_planes(1000, scale=100, noise=10, line_params = [10,7,30])\n", + "\n", + "X, y = make_circles(n_samples=n_samples, noise=0.1, random_state=42)\n", + "dataset = np.hstack([X, y.reshape(-1, 1)])\n", + "\n", + "dataset, t = make_s_curve(n_samples=100, noise=0.2, random_state=42)\n", + "\n", + "kde_pdf = KDEProbabilityDensityFunction(dataset, kernel='gaussian')\n", + "\n", + "point = np.ones(dataset.shape[1])\n", + "pdf_value = kde_pdf.value(point)\n", + "pdf_gradient = kde_pdf.grad(point)" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "b00eaf20", + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plot.ly" + }, + "data": [ + { + "mode": "markers", + "type": "scatter3d", + "x": [ + -1.061534449950624, + -0.8475919159897719, + 0.8749867217624493, + 0.6586505896698884, + 0.47334182051681106, + 0.19517968276151637, + 0.615606837410703, + -0.17330620377477923, + 0.6202127570093278, + 1.082234131035429, + 1.212959234623869, + -1.1241927654170532, + 0.20106970661033588, + -0.33472601197429563, + 0.022033894159502465, + 0.22226160278334062, + -1.0117259597419688, + 0.08046536706674623, + -0.7762231503533161, + -1.0854557096615818, + 0.8540794424476592, + 0.3215378198703028, + -0.8702559325342871, + -0.7865037131300325, + -0.39970228974367045, + 0.729156094701668, + -0.3590228526219846, + 0.6777881934219311, + 0.8900983439306296, + 0.7342614613576691, + 0.6345553336822163, + 0.06014681536936686, + 0.7731774659472206, + -0.7433888451804924, + -0.853350539528935, + 0.21829288367675437, + -1.1329492389223126, + 0.3024226003535265, + 0.8970233869890307, + -0.3633329984562891, + 0.45113890413065, + -0.29458865418185093, + 0.9825725758040532, + -0.5794303511453635, + -0.9399045984333416, + 1.0299822809377734, + -0.9676658575676725, + -0.04058305440086371, + 0.4977086475804262, + -0.05842073522093838, + -0.7425838894115832, + 0.7321912048809257, + -1.117322024516389, + -0.7352270874811883, + 0.9002327704769754, + -0.6381890933896347, + 0.7749117512476313, + 0.49774975085714523, + 1.0246977638666472, + -0.7700436401853874, + -0.6762204660111312, + -0.7038817926103372, + -0.019752769369654435, + -0.8239444235289607, + -1.0350807472931685, + 0.3442650591123123, + 0.14317089452097698, + 0.305634358385779, + 1.2260813181696149, + -1.3658257929540194, + 0.681712842317093, + -0.620025827832638, + 0.9042596056707347, + 0.38543350410224414, + 0.9419694357055146, + 0.6167548718696798, + 0.4090801698361044, + 0.9021422078263873, + -1.1181511977633387, + 0.5039672640797338, + -0.26779529469902724, + 0.78730272661126, + -0.5709477909987832, + 0.9526704899390693, + -1.3829230319641375, + -0.9597605419443371, + 0.696803853964425, + 1.133088789230658, + -0.6447614602500666, + -0.2818327625675743, + 0.5302338126981547, + 1.078333100679347, + 0.39164635561820416, + 0.4790509145760433, + 0.45953185115310063, + -0.18910765446208483, + 0.5657073107305864, + -0.5500566080234095, + 0.719263395169491, + 0.7096175469048793 + ], + "y": [ + 0.4872896107759952, + 1.47931387463779, + 0.32483796896185063, + 0.9202945677561553, + 2.0685151776895108, + 0.3570505651739937, + 0.9095297317005051, + 1.6660290877719648, + 0.27221023666762834, + 0.14205474844522598, + -0.06875056218627851, + 0.11756504624115086, + 1.8088816744065142, + 1.366684122735864, + 1.593289773807174, + 1.4568929047833088, + 1.5193352564588323, + 0.39928823322928997, + 2.073372654793179, + 0.7915120535954135, + 1.847513060759117, + 1.7942292120509038, + 0.43970521973413756, + 0.31252454390800766, + 0.49568226419857736, + 0.7341722018207537, + 1.64998994884299, + 1.6443984471403348, + 0.03660773011263102, + 1.1539207400593408, + 1.1520253695266285, + 0.19665252117609067, + 0.666337409598619, + 0.2848127829027555, + 1.8554623888179216, + 0.7640693053384258, + 1.0937796170337388, + 1.2814980138262368, + 0.6856347546871329, + 1.8449639785101548, + 1.8070216384953801, + 0.6734850110549333, + 1.0659001089777804, + 0.46317470058140847, + 0.7496009638415854, + 0.13523379888438747, + 1.3817010917275856, + 1.1312838148424453, + -0.06284149968443575, + 0.44525672043382897, + 1.9659904929579597, + 0.6011978344206378, + 0.28560942538961653, + 1.0023709972168824, + 2.2268338873788864, + 0.36579626525583486, + 1.4536905710457646, + 1.4828007001706562, + 0.4317388473393553, + 1.6761880676211571, + 0.9006495352361125, + 1.4273135883872867, + 1.5281551829526552, + 1.0757501364760689, + 0.3169701343678094, + 1.6085516398597848, + 0.7063934004411601, + 0.34700840992617155, + 0.10094947610807148, + 1.3008172914638663, + 1.1914845870378703, + 0.45165311299280436, + 0.8229826402986216, + 0.21015382783832948, + 1.5219677555189133, + 0.50706539680257, + 1.506699439615363, + 0.8991397944539308, + 1.8710106229040862, + 0.09559101399482017, + 0.6972936137392622, + 0.09151470017875579, + 2.0444111832406757, + 1.7252672304615344, + 0.35078381607180886, + 1.2556909237377594, + 1.7170306912575566, + 0.9976567126381297, + 0.8948570775987267, + 0.5324420240992859, + 0.23519884983354297, + 1.6930428808324276, + 1.7066284532029963, + 1.3126129020180632, + 0.38844271379793655, + 0.4169263943500107, + 1.3082225134899916, + 1.7515310895627847, + 1.8363543616498355, + 1.8548223351051583 + ], + "z": [ + 0.7928564247738696, + -1.4799695474617656, + -1.58132933347194, + -0.6025390764378054, + 1.991266006178465, + 1.937214104728342, + 1.5850340861492227, + -2.1179211378288056, + -0.3168794914106412, + -1.073864004226712, + 1.1710375686105747, + -1.1994645487698326, + -1.861935967383423, + 1.8285328682297635, + 2.034630835073511, + 1.9901016587066591, + 1.2902900537461799, + -0.18169870688968945, + 0.20364498422786095, + 1.4860895264829248, + -0.21583795799252392, + 2.1592399974923535, + 1.8091540949419422, + 0.5402470477608228, + 0.2589574025058464, + -1.8620875331901443, + 2.3899626886443586, + -0.17064514095475897, + -0.5238723686035128, + 1.3040557102795716, + -0.8959588727265904, + 1.894188200866104, + 1.4235764790280188, + -1.43324527136515, + -1.2499248953872046, + -1.5972764190255577, + 1.4574671854414967, + 1.6805466974052874, + -1.3444866879896322, + 0.2532866802949377, + 1.6487921454427166, + 0.3673247243110513, + 1.5543477536425594, + -1.8481665264208957, + 1.303614422634839, + -0.6901755734387394, + 1.1794694558775307, + 0.22973018402092402, + -0.4142335679568877, + 1.8654692340199455, + -1.2816995678089762, + -1.8438974570896631, + -1.6298211240270843, + -1.7121296290913939, + -0.6098427493274734, + -1.7000401938967662, + 1.7646989948615845, + 2.0649595124708213, + 1.5557887488163626, + 0.8504266052873851, + 0.19490525221150107, + 1.8070578234660226, + -1.9325992660007734, + 0.6313624426498662, + 1.784247371942081, + -0.056741767102956565, + 2.2065720671495637, + -1.9437470148746707, + 2.0583714359225844, + -0.7722051711017248, + -1.8885791151368365, + 2.1490414134385643, + 1.1810964256715237, + -1.7121213925347716, + -1.5627795415774959, + -1.4171094161136508, + -1.622065912908691, + 1.2908272643166927, + 0.5286897968841168, + 1.4797221765378337, + -2.0147773231269244, + -0.45903915670042433, + 1.3234216369412395, + 1.5786550872021612, + 1.5348219332416089, + 0.800716244573354, + -1.899686141134243, + -0.740190448169723, + -1.7970025806933316, + 0.027553026183315343, + 1.4897037798661403, + -1.4428480482972752, + -2.036102251542911, + -0.02824848814456085, + -1.7588501391161249, + -0.1862667741539396, + -0.12563765093073792, + 0.012417536408988322, + 1.2247487458954327, + 2.0414851016057662 + ] + } + ], + "layout": { + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "#2a3f5f" + }, + "error_y": { + "color": "#2a3f5f" + }, + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "baxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "fillpattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "#EBF0F8" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "#C8D4E3" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowcolor": "#2a3f5f", + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "colorscale": { + "diverging": [ + [ + 0, + "#8e0152" + ], + [ + 0.1, + "#c51b7d" + ], + [ + 0.2, + "#de77ae" + ], + [ + 0.3, + "#f1b6da" + ], + [ + 0.4, + "#fde0ef" + ], + [ + 0.5, + "#f7f7f7" + ], + [ + 0.6, + "#e6f5d0" + ], + [ + 0.7, + "#b8e186" + ], + [ + 0.8, + "#7fbc41" + ], + [ + 0.9, + "#4d9221" + ], + [ + 1, + "#276419" + ] + ], + "sequential": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "sequentialminus": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ] + }, + "colorway": [ + "#636efa", + "#EF553B", + "#00cc96", + "#ab63fa", + "#FFA15A", + "#19d3f3", + "#FF6692", + "#B6E880", + "#FF97FF", + "#FECB52" + ], + "font": { + "color": "#2a3f5f" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "#E5ECF6", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "mapbox": { + "style": "light" + }, + "paper_bgcolor": "white", + "plot_bgcolor": "#E5ECF6", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "line": { + "color": "#2a3f5f" + } + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "title": { + "x": 0.05 + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + } + } + }, + "title": { + "text": "Dataset" + } + } + }, + "text/html": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "fig = go.Figure(data=[go.Scatter3d(x=dataset[:, 0], y=dataset[:, 1], z=dataset[:, 2],\n", + " mode='markers')])\n", + "fig.update_layout(\n", + " title=f\"Dataset\",\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "4e388e6d", + "metadata": {}, + "outputs": [], + "source": [ + "from typing import Callable\n", + "import numpy as np\n", + "\n", + "def check_input(X):\n", + " # X : ndarray of input samples\n", + "\n", + " assert len(X.shape) == 2 and type(X) == np.ndarray, 'X should be a 2d numpy array'\n", + " N, d = X.shape\n", + " return X, N, d\n", + "\n", + "def get_n(S, eps=1e-8):\n", + " ediff = np.fabs(np.diff(S.reshape((S.size,))))\n", + " n = np.argmax(ediff)+1\n", + "\n", + " return n\n", + "\n", + "def compute_AS(X: np.ndarray, kde_pdf) -> np.ndarray:\n", + " # X : ndarray - input samples\n", + " # f_deriv : Callable - function derivative\n", + "\n", + " X, N, d = check_input(X)\n", + "\n", + " G = 1/np.sqrt(N) * np.column_stack([kde_pdf.grad(x) for x in X])\n", + " U, S, Vh = np.linalg.svd(G)\n", + " \n", + " # print(S)\n", + " \n", + " return U, S, get_n(S)" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "466eb6a4", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2\n" + ] + } + ], + "source": [ + "U, S, n = compute_AS(dataset, kde_pdf)\n", + "print(n)" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "80404984", + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plot.ly" + }, + "data": [ + { + "hovertemplate": "x=%{x}
y=%{y}", + "legendgroup": "", + "marker": { + "color": "#636efa", + "symbol": "circle" + }, + "mode": "markers", + "name": "", + "orientation": "v", + "showlegend": false, + "type": "scatter", + "x": [ + 0.6500366140453336, + 1.8327578503228605, + 0.2773498162906553, + 0.7770301926045837, + 1.5860389648392552, + 0.03634636011732543, + 0.4947915778732158, + 1.9105316345345509, + 0.13235337727489263, + -0.019020563291676153, + -0.5466330470038216, + 0.5727797368718262, + 1.9119621263577191, + 1.1571396171438528, + 1.2496943065103383, + 1.0710425249200914, + 1.5562647435012673, + 0.38251600426102506, + 2.1616239192823725, + 0.8567728749782332, + 1.55812006515368, + 1.3438783120192916, + 0.4209591949984172, + 0.44147159529486757, + 0.5476346278819559, + 0.7437126473209857, + 1.3611204196650406, + 1.4064015181197767, + -0.13874991025934436, + 0.7320921438234297, + 1.042615381242907, + -0.0743933280520294, + 0.24103016862353932, + 0.6592371594026657, + 2.163219400777696, + 0.8765467027557529, + 1.1616433741610206, + 0.9221524458341295, + 0.5847449490573357, + 1.825289964809716, + 1.3870899424383283, + 0.6746210327080836, + 0.5482968087979112, + 0.8386382142563844, + 0.8009582200482166, + -0.06109497931120576, + 1.427415853756138, + 1.0601165388024527, + -0.14130714404777994, + 0.19860263777730788, + 2.2426843039845648, + 0.6137143851218081, + 0.7869793870324261, + 1.377509288954676, + 1.958435440859003, + 0.7425110238814105, + 0.9472151088377588, + 1.0112707221769583, + -0.06811455151279952, + 1.6972911871918328, + 1.0172044844434422, + 1.3179421645570415, + 1.7133355642866486, + 1.1676968911227943, + 0.35187484524963714, + 1.447970472312142, + 0.34869932279678423, + 0.5000208781833281, + -0.5034116740276615, + 1.7114139958095684, + 1.1961573251895294, + 0.320364093044611, + 0.38628376186261576, + 0.31781129868992886, + 1.3984502482532595, + 0.4999331886741645, + 1.5362136256697747, + 0.4452600662721313, + 2.019292856563998, + -0.23749386126266933, + 0.9989339087088855, + -0.06689175175382679, + 1.9330901181976927, + 1.1820903500905362, + 0.5108761931716985, + 1.354207687713618, + 1.6947076141238422, + 0.7398859244179281, + 1.2614257051425826, + 0.5807051256073099, + -0.11277535114158019, + 1.5090392255337493, + 1.7853017780652194, + 1.125459491365464, + 0.4737903027752212, + 0.4730972581235535, + 1.1103802391046094, + 1.8180976244266749, + 1.397273951318366, + 1.3116012125781034 + ], + "xaxis": "x", + "y": [ + -0.8061650699630208, + -0.5191364867437732, + 0.7894715367381973, + 0.8373492165201767, + 1.212822819941436, + 0.4569979822012522, + 0.9844094603780905, + 0.1219606792291185, + 0.6417778446020436, + 0.9798885578000984, + 1.2411540055461985, + -1.145026118123924, + 0.5423619063087126, + 0.2278664419581811, + 0.6508422795251015, + 0.7994635885748295, + -0.4223701674572477, + 0.17421865306221004, + -0.1353072073379487, + -0.682116420521244, + 1.3207872642649292, + 1.0047390273619359, + -0.5481692891544068, + -0.6151839013962044, + -0.21844785414624007, + 0.7417835285496875, + 0.33410218998646474, + 1.0987758529618514, + 0.814575973097651, + 1.1424800161728619, + 0.8544245424607099, + 0.27879125200789284, + 1.0517817193398313, + -0.7543775115359048, + -0.39782890257308245, + 0.2855715531681779, + -0.644230236711386, + 0.7992009622698912, + 0.933561297201791, + 0.19852390272539736, + 1.0875093403492002, + -0.05816340718287332, + 1.3765107219439923, + -0.58348268543902, + -0.5709637196269727, + 0.961595270881627, + -0.4290239663789893, + 0.3022267701419477, + 0.4212440995210775, + 0.2335759379337694, + -0.2634792650148235, + 0.7085523591781163, + -1.1284154033079972, + -0.567418563537782, + 1.4380184167479235, + -0.6542678389525491, + 1.3065962394645214, + 1.076428609702073, + 1.2369772308562659, + -0.18553581451397, + -0.37322993667243337, + -0.10933146417854347, + 0.24568370508738085, + -0.4264762299806096, + -0.7425580351775178, + 0.7800718128234322, + 0.5299724868346062, + 0.2203879984739525, + 1.3793844484875406, + -1.0027809678028, + 0.8238839850291951, + -0.27611740664911216, + 1.2001949226452868, + 0.2780172386280118, + 1.1946347747233774, + 0.6089227469486291, + 0.676248134468211, + 1.2293673551592423, + -0.490815020057348, + 0.6377139456469192, + -0.23404562687435296, + 0.7376551196556286, + 0.15038237990074804, + 1.5371170298134167, + -1.086934895869182, + -0.490326112478001, + 0.986400404161205, + 1.300318059118558, + -0.5189461972548133, + -0.11569038083345558, + 0.7032703861796639, + 1.3838633723376694, + 0.680120596875148, + 0.8273278741202905, + 0.3952649894444146, + -0.07860148408518045, + 0.9003206464934487, + -0.027342320965424338, + 1.3148046855086475, + 1.3822238133297384 + ], + "yaxis": "y" + } + ], + "layout": { + "legend": { + "tracegroupgap": 0 + }, + "margin": { + "t": 60 + }, + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "#2a3f5f" + }, + "error_y": { + "color": "#2a3f5f" + }, + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "baxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "fillpattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "#EBF0F8" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "#C8D4E3" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowcolor": "#2a3f5f", + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "colorscale": { + "diverging": [ + [ + 0, + "#8e0152" + ], + [ + 0.1, + "#c51b7d" + ], + [ + 0.2, + "#de77ae" + ], + [ + 0.3, + "#f1b6da" + ], + [ + 0.4, + "#fde0ef" + ], + [ + 0.5, + "#f7f7f7" + ], + [ + 0.6, + "#e6f5d0" + ], + [ + 0.7, + "#b8e186" + ], + [ + 0.8, + "#7fbc41" + ], + [ + 0.9, + "#4d9221" + ], + [ + 1, + "#276419" + ] + ], + "sequential": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "sequentialminus": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ] + }, + "colorway": [ + "#636efa", + "#EF553B", + "#00cc96", + "#ab63fa", + "#FFA15A", + "#19d3f3", + "#FF6692", + "#B6E880", + "#FF97FF", + "#FECB52" + ], + "font": { + "color": "#2a3f5f" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "#E5ECF6", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "mapbox": { + "style": "light" + }, + "paper_bgcolor": "white", + "plot_bgcolor": "#E5ECF6", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "line": { + "color": "#2a3f5f" + } + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "title": { + "x": 0.05 + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + } + } + }, + "xaxis": { + "anchor": "y", + "domain": [ + 0, + 1 + ], + "title": { + "text": "x" + } + }, + "yaxis": { + "anchor": "x", + "domain": [ + 0, + 1 + ], + "title": { + "text": "y" + } + } + } + }, + "text/html": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "new = np.array([U[:, :n].T @ x for x in dataset])\n", + "\n", + "px.scatter(x=new[:, 0], y=new[:, 1])" + ] + }, + { + "cell_type": "markdown", + "id": "22eac299", + "metadata": {}, + "source": [ + "# Sub-sample" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "e8551cd7", + "metadata": {}, + "outputs": [], + "source": [ + "n_samples = 1000\n", + "dim_of_space = 50\n", + "dim_of_manifold = 15\n", + "\n", + "# plane_generator = DatasetGenerator(dim_of_space, dim_of_manifold)\n", + "# dataset = plane_generator.generate_dataset_in_subspace(n_samples, seed_value=71)\n", + "\n", + "plane_generator = DatasetGenerator(3, 1)\n", + "dataset = plane_generator.generate_lines_planes(n_samples, scale = 100, noise=0.3, line_params = [1,2,3,4,5,6])\n", + "\n", + "fig = go.Figure(data=[go.Scatter3d(x=dataset[:, 0], y=dataset[:, 1], z=dataset[:, 2],\n", + " mode='markers')])\n", + "fig.update_layout(\n", + " title=f\"Dataset\",\n", + ")\n", + "\n", + "kde_pdf = KDEProbabilityDensityFunction(dataset, kernel='gaussian')\n", + "\n", + "point = np.ones(dataset.shape[1])\n", + "pdf_value = kde_pdf.value(point)\n", + "pdf_gradient = kde_pdf.grad(point)" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "id": "a339bcbc", + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plot.ly" + }, + "data": [ + { + "mode": "markers", + "type": "scatter3d", + "x": [ + 45.70822158478591, + 50.24366674845075, + 60.267589045950814, + 37.31206505337656, + 55.12516753206201, + 44.17720075423791, + 75.39022426189997, + 31.75999091992763, + 13.32442934675342, + 75.19990861216702, + 20.692843787934297, + 60.72056902348221, + 76.56473274596381, + 49.10299996317468, + 26.65821453811928, + 68.68860218897592, + 30.52227762921767, + 33.13494173604379, + 37.12966936986121, + 92.18796304348785, + 39.0607600502626, + 80.46202298447182, + 41.33373524749205, + 92.39378288973688, + 42.384751344319106, + 16.052910310417865, + 76.3094499119814, + 60.194645499222055, + 16.11924041881006, + 99.98804160218972, + 88.4004422790409, + 41.6054885597578, + 17.68083600440778, + 72.34472726448678, + 95.79272632623567, + 28.466196901644533, + 80.46432630769758, + 4.687626841504299, + 103.44385746675538, + 72.11387428270677, + 42.621114102004874, + 22.262318926542523, + 99.81178752583826, + 34.77135160010561, + 42.06688776509025, + 13.25412972166485, + 39.73761931636268, + 24.232546502363586, + 68.12032077707917, + 51.27321879656404, + 16.022433742973735, + 51.29612366078074, + 69.816518920186, + 56.33632493091348, + 66.31760202950356, + 15.853165897845429, + 36.30948791877773, + 56.18452377695501, + 67.60596515235338, + 42.08743365886156, + 32.7727214531582, + 12.15969899746679, + 27.630565192750286, + 80.54126021605333, + 96.12548602797028, + 102.09764690815196, + 14.567292709988811, + 4.410114931469557, + 48.21276944901149, + 42.4200559148382, + 42.86419279619356, + 28.900102303351012, + 79.13228968113506, + 66.02459718788047, + 81.64165242272435, + 88.60255949801055, + 26.96762766017953, + 25.012905505879633, + 72.08515272484779, + 49.68006610788412, + 80.99669142164979, + 5.1926392111289426, + 12.53538407913997, + 91.03160617521488, + 90.68313319859664, + 99.2628558547451, + 70.9268551993167, + 71.9124148069424, + 37.54728660553442, + 76.29655428596305, + 88.13391035021647, + 72.717658809745, + 76.38708156209148, + 60.79621087981801, + 90.67942694118072, + 31.32824066348852, + 48.33695830220751, + 46.08017134567509, + 24.56399987458712, + 18.66610164794127, + 74.4363743011847, + 30.456388356719994, + 45.52158944735693, + 92.47841211986344, + 59.954215901032406, + 80.63133685281707, + 54.29910183183091, + 46.36189768514005, + 63.998037554598085, + 12.105827773931814, + 4.236489134729236, + 76.42931248207593, + 86.26222788598945, + 96.33609536437544, + 56.53145218998921, + 9.307822856923064, + 6.601127737823326, + 80.10452898030728, + 22.08784560957, + 92.44126207255934, + 101.23292604117718, + 84.72210853697348, + 65.54179849861507, + 45.87731119762605, + 20.598143011544504, + 63.10796392293226, + 5.007903372593925, + 96.36464648393978, + 91.69699437361032, + 35.7011966164314, + 44.96974563077514, + 62.54076878144264, + 82.34929853593404, + 84.72999912018872, + 35.38427757829324, + 47.43598339200144, + 83.65410779526337, + 74.47533180248392, + 11.818357535080013, + 16.956935162656983, + 18.113784828093717, + 62.49277754953583, + 74.82687613411422, + 31.674928914020413, + 4.864885201601977, + 68.64721729091595, + 28.43508579930318, + 13.694651606053988, + 14.564145334345517, + 52.221369511288145, + 39.22154570250766, + 22.53167281404434, + 21.14801736914489, + 86.5270222871436, + 72.46066784997005, + 78.69036998753867, + 46.00636272398163, + 11.00843315912243, + 63.8496685118094, + 73.49501084158786, + 18.704365580755567, + 67.63641981420538, + 48.77962297012705, + 42.10741175511406, + 88.38182516738433, + 51.549261843443155, + 39.9565875047002, + 82.93773606184651, + 8.030375912429914, + 50.80644788244102, + 18.964946899687185, + 67.5285978239817, + 71.31793192571726, + 77.41155712336622, + 70.08563872616536, + 100.68893443479577, + 38.00200833007055, + 92.8903204695846, + 41.14618177237337, + 95.41244785298058, + 26.82036546848937, + 81.22822457816106, + 39.44319406015223, + 96.98124305079794, + 78.31266532158067, + 34.771823708945846, + 33.64414232262384, + 91.80712479792405, + 103.4267883893281, + 11.925056476828734, + 81.29933731518571, + 98.35544524422065, + 82.56800366643665, + 8.814147295937001, + 78.13429505254348, + 53.576627378906906, + 65.30074920316572, + 102.58451945589132, + 41.655405386955884, + 72.97676913719391, + 81.12812101151599, + 64.83609149087573, + 45.03275781440881, + 101.33325627230995, + 84.98888928320955, + 64.03713936694152, + 56.72866228000093, + 17.552844903979377, + 49.29337561612901, + 95.28020555858669, + 41.18533441321275, + 29.177834080465853, + 9.220771669287865, + 19.538724197451504, + 91.47138781622883, + 91.22389443121392, + 66.13777035239801, + 81.67192484443149, + 63.0812363416677, + 4.039743548794687, + 82.58742938978988, + 5.623400359579555, + 37.31914371767908, + 33.14473434234046, + 98.27468263678027, + 62.682150148894756, + 43.07206581585463, + 69.87895791198294, + 99.61139580183338, + 85.10056555683988, + 8.642582842631688, + 25.067431378941567, + 74.93938350792818, + 30.785554600935356, + 50.357788605892026, + 74.91359050622074, + 20.155720168683175, + 70.82021434129248, + 29.396565383085086, + 50.81860334758179, + 15.087355923554368, + 34.13123724458305, + 69.85279569484054, + 18.639346027953582, + 81.62461713604303, + 59.6182960683076, + 101.60501422965012, + 93.32782805880119, + 20.68450715556241, + 27.83027762547488, + 96.45915845746826, + 58.19340483435294, + 103.49930808974516, + 97.1623165170901, + 91.16741670289937, + 43.81222677111329, + 53.30929221918296, + 70.49383694403215, + 27.219262764222677, + 97.37123957492425, + 92.88211141422269, + 102.66847344555833, + 47.37249841955447, + 82.44372194255973, + 11.948884743914215, + 26.220139145805433, + 32.57594629884547, + 57.65680607958823, + 61.17293955398736, + 7.477395875575838, + 82.4886689667806, + 93.18904636250062, + 9.259427777871156, + 81.46113975221832, + 100.58352193179216, + 18.511193389404802, + 102.45151373399239, + 102.75039378713252, + 100.4758105286142, + 16.865007709278835, + 17.360748717107104, + 100.3451003141259, + 37.809857992957106, + 91.43772006435113, + 50.593059965675, + 6.825399377461062, + 44.080279024730174, + 74.99329561878679, + 96.30275345373843, + 6.961900034480907, + 37.2067852789836, + 98.4646721705629, + 58.183873868129474, + 73.97694384123945, + 77.16838319962659, + 48.97620804276712, + 21.575307808690244, + 98.25648984040782, + 97.78308152917357, + 101.19851522074953, + 92.56951739424996, + 83.25860721541675, + 90.75686908779585, + 99.32929039535912, + 9.933216120539509, + 7.0377893124283215, + 87.08743965052362, + 89.8577930146967, + 8.528976240700892, + 60.2204940477773, + 16.354805893689466, + 51.52892308377109, + 86.96000796790655, + 33.29386821399061, + 96.70613692038006, + 60.82559373221291, + 67.80030348531436, + 95.4926903348587, + 38.10606442348518, + 50.93821451015431, + 9.79017233476575, + 70.50545964566959, + 81.21092452092104, + 71.04097675522453, + 69.76664776706954, + 82.12879467814182, + 98.22606357222774, + 89.16361938488232, + 50.91343465057569, + 92.13470350459312, + 63.05008130487862, + 77.44848670912097, + 67.1513793384065, + 23.224118981402068, + 53.549021167772274, + 8.210992455492145, + 43.207634853758584, + 96.3125784143927, + 51.013745359112924, + 100.05862077527519, + 19.06217702558982, + 57.13833040693149, + 68.95355743700343, + 51.90683274360503, + 22.6273703993385, + 29.31686240967731, + 23.277409060792717, + 29.82459784529959, + 34.09254898253524, + 7.149655054348133, + 62.00985764543364, + 87.13036640009338, + 71.7711595602668, + 10.601896466849308, + 102.21817593723807, + 24.458634898424908, + 39.02194715435373, + 49.15424417568746, + 56.89762053364891, + 69.0923377263299, + 93.21873537415495, + 61.81635177730136, + 61.94647251087667, + 29.050084492295035, + 30.064406295443437, + 58.32848735649662, + 16.400043526384007, + 45.381407098202544, + 38.51264532700162, + 6.584241439450251, + 33.87160770552509, + 99.73748845698812, + 80.79583604876244, + 89.93554730949101, + 23.66825161926709, + 40.71821490218154, + 83.69035123664584, + 89.7114798619305, + 30.073099970660817, + 96.49930077006157, + 5.070074334151259, + 87.01854761529677, + 64.45265385799024, + 62.5609131961408, + 76.97293042893288, + 102.17530292505262, + 75.67205125519278, + 74.27407494727107, + 7.416243978406189, + 34.99484776346837, + 78.86363842261045, + 5.124682874550354, + 88.77252384984263, + 20.055849235438465, + 58.040036947259146, + 30.530838585515383, + 75.1605267220028, + 82.65766782868054, + 73.85117000939778, + 21.409750722462054, + 68.00834379318353, + 99.770561170982, + 73.3535637232095, + 75.1703785720507, + 41.57352689757534, + 72.99953093731523, + 37.11513849115264, + 84.1155521759426, + 100.85919863204148, + 70.60539081281549, + 47.46983918627775, + 70.68846759636226, + 85.64364787807149, + 26.049322550134146, + 99.53260515542628, + 55.962522273917195, + 17.041525650537125, + 57.5967671403631, + 37.31747471447589, + 64.08002782043062, + 33.79019937581346, + 64.81253517902022, + 35.31237097464002, + 34.80304106203059, + 27.351631245151545, + 98.11786018318632, + 63.00119399705639, + 88.05997958970815, + 85.65564827080027, + 76.9098174850077, + 101.6329780000211, + 28.75811675747876, + 73.54689315159551, + 14.984443281001132, + 67.53550933552819, + 14.793938259504287, + 16.800371881310433, + 33.544184770725494, + 61.192002562325726, + 46.84283198397815, + 20.652318368007055, + 52.66083624491553, + 27.296156884698224, + 69.7154709010546, + 90.51014893944726, + 69.52033444395364, + 70.56764364227423, + 28.384609948574486, + 86.23799529815322, + 98.57759483840755, + 31.725611014436794, + 6.323247141751476, + 85.00300276053389, + 43.799785322013605, + 39.17234551667973, + 95.53400954761469, + 33.34001776185621, + 58.22900131969218, + 26.342021943788996, + 56.00435664145961, + 94.40839808642825, + 57.9416607636527, + 72.98937256274564, + 53.80161311324054, + 23.52290998506142, + 10.475723504411997, + 54.00987726504946, + 29.612189063732178, + 13.235841967693098, + 18.770146019051392, + 47.78825603194173, + 15.344758620148768, + 69.82591339311313, + 87.35067847270652, + 54.3053292619308, + 83.440806695204, + 94.49850816558967, + 63.097794548139646, + 96.8854118285538, + 7.832859766309758, + 71.28106551237293, + 65.8866483094914, + 99.74598086766935, + 48.739373185697424, + 11.539646076404605, + 73.96499147834916, + 34.52913411841848, + 5.790893577476812, + 74.95726630482993, + 52.512062060683455, + 53.694200554135946, + 41.22148389459653, + 18.45300838103999, + 23.216775487832322, + 70.17527159276263, + 94.86484969414064, + 24.517207942258686, + 29.916361081805935, + 52.72428023945548, + 36.434016185204776, + 60.58520314002176, + 44.18468904050905, + 44.89324221054297, + 85.0508991941702, + 12.178979124127617, + 62.3061299758285, + 63.20700080038899, + 21.4462749676061, + 14.447105112658019, + 15.418786504830539, + 33.07177233893861, + 68.29629483310676, + 99.44875712193132, + 41.744800550597205, + 37.59162867617483, + 25.967552778406368, + 56.44582571199944, + 20.760848953021945, + 42.838119462043075, + 55.65264135284053, + 100.91409827865536, + 28.742337365070558, + 43.12859041768037, + 18.017482393621044, + 37.54571098068888, + 62.671391799137105, + 78.2440039869506, + 63.425470011110924, + 81.0776971952729, + 47.59893054182719, + 72.72855451585372, + 25.303332389018852, + 49.14054831820979, + 15.55778986586359, + 57.35592875956475, + 74.57177007037434, + 86.16954260053613, + 50.20985438122223, + 94.70037492240142, + 87.23518621698149, + 92.16127595698863, + 6.785916164491974, + 24.364823435722773, + 61.44701369517316, + 69.74086393472366, + 10.645337930644972, + 33.11835848069306, + 101.53557690777942, + 42.97618985201594, + 55.35154232254066, + 38.4065199308832, + 79.27468959889946, + 19.106944140132978, + 23.745927219272463, + 47.8020116417051, + 97.21135697352663, + 22.08303798425805, + 23.06809241771881, + 92.29371232610518, + 67.24139859803084, + 58.51218021279393, + 71.07109344424661, + 98.38160685315356, + 65.9402001944183, + 45.584801587691295, + 45.29025881053401, + 19.15459415047469, + 4.4524367260705695, + 15.84539783743002, + 57.7696825586006, + 55.71640371503208, + 19.380381293234596, + 16.419214097107364, + 35.84137784537944, + 61.38261221387045, + 81.72313095269634, + 77.83587655093191, + 16.112370083897233, + 6.993415796657188, + 6.465266864623837, + 15.305881438991172, + 64.28032857836435, + 11.902114849457092, + 55.407052132722654, + 33.7397901125786, + 69.40927578147138, + 97.70338617703467, + 9.104031864556354, + 12.055622530234047, + 73.37868921126041, + 62.05177841697998, + 97.17277771879054, + 5.052467871653151, + 96.76381035342328, + 94.07236239909018, + 93.30281487894375, + 96.52855463456575, + 33.723090300346676, + 21.325379939407615, + 97.15761439263969, + 7.344270325944065, + 32.97953949858872, + 101.54679022229179, + 88.82884287953048, + 99.90542972507352, + 8.876115864295281, + 36.3481916066177, + 103.34684851091731, + 32.34173173261294, + 88.86865943369854, + 101.15550648547544, + 57.48815044478204, + 48.17152860471039, + 20.79467168012966, + 85.9459367352386, + 50.07095105471642, + 93.6103540396992, + 26.887210106675763, + 52.63088586369339, + 97.78677907124028, + 13.983858724189433, + 93.81754129188812, + 101.98986042431996, + 27.03503205758594, + 26.63683142499396, + 66.01713743813438, + 23.101692426019728, + 63.83217012037443, + 20.76233185864466, + 75.59941177548664, + 65.8064986906907, + 17.38868069170444, + 48.21628001204643, + 8.428080291594314, + 18.254948196089252, + 98.64095156806268, + 11.437698531376194, + 67.26411889356429, + 14.962757266170465, + 64.05294853843263, + 71.61407394736534, + 92.241403977833, + 28.2359434907311, + 41.22884094638469, + 54.51339191772517, + 27.83291020450944, + 29.822794658347814, + 27.020983516626046, + 19.462277491004937, + 49.49479013859434, + 43.84876888534301, + 89.91442935345466, + 63.69039682151241, + 73.27594505343068, + 34.448331706241916, + 92.24360110231333, + 67.49874006700323, + 8.599390863231125, + 43.66710806341725, + 89.3809817674215, + 95.8721644381617, + 9.62648098390641, + 35.59819947532864, + 21.513490843280398, + 64.94656667860582, + 90.84183225280701, + 14.32171338599759, + 48.762359310774485, + 91.19191651187712, + 10.638306471727645, + 102.97193688854357, + 79.29960120878297, + 75.0485447391772, + 86.17680416560593, + 102.45317213223858, + 59.90829454979608, + 17.708675469470805, + 41.998541082926295, + 68.38035911582689, + 53.80041869238161, + 85.21078044461439, + 21.95156222280456, + 62.64377078073472, + 61.30999858096814, + 41.35449574630823, + 23.926517041028063, + 58.52105992711101, + 22.012054382256288, + 61.85893152848723, + 13.951747814619907, + 7.988580042826445, + 59.16729060916891, + 61.746189739787155, + 92.27938215592187, + 20.84671425279896, + 33.53051378248749, + 78.86925289315526, + 97.40862353212263, + 47.20946290856135, + 23.720286818510022, + 58.61990157874122, + 82.61465874609424, + 27.84720059876836, + 9.674314003643106, + 80.56982343562964, + 51.89799809342803, + 98.7465548418311, + 49.98314304548259, + 58.686215012425116, + 6.6638359554581905, + 4.94785943284277, + 40.38948283397161, + 63.59216664418657, + 19.10845813282216, + 85.33909325446294, + 82.69979962642688, + 84.52223246883358, + 49.06946946218979, + 88.60680073817863, + 101.27869908944373, + 35.02770019277229, + 38.048371760896, + 13.251088678137464, + 89.89281000723398, + 99.85315698320193, + 31.7360628602913, + 86.74741498032775, + 50.975460257663876, + 29.63366012384782, + 36.6906571215533, + 81.7316343536342, + 80.04082016232576, + 80.91599409579655, + 102.06037612904673, + 85.78381373716195, + 43.70592285874206, + 8.92870450938017, + 72.95760882996551, + 5.570354053521301, + 65.67750764580677, + 101.21556360503658, + 94.41277477636406, + 39.037945678984144, + 43.19313810685236, + 101.06965454619164, + 71.8974630347708, + 6.050711514422357, + 97.87706274988716, + 59.579252226123835, + 25.121371103554022, + 21.5319385100147, + 77.72986128442223, + 25.951680480877567, + 42.20511914864401, + 84.10369979371535, + 83.97598413552117, + 93.32992992584661, + 81.6461647511353, + 94.72410084163117, + 89.10278707761475, + 85.29405534621765, + 19.428716424257676, + 15.208892140598246, + 12.743019832076296, + 92.72463032335007, + 34.177714471900536, + 74.18791365730323, + 41.33384322637943, + 28.492062157464638, + 103.1409810230832, + 33.74611734513568, + 60.24027342598927, + 36.69314814701891, + 86.90252220425359, + 23.163371912832236, + 71.7850716634456, + 75.14876538577556, + 61.76139121649504, + 31.13326453254455, + 34.563663848085746, + 73.36992428282748, + 97.6174169039491, + 13.254986178719228, + 81.81346304051883, + 57.300683591365626, + 25.252245037583283, + 48.74694924636911, + 40.45147557717602, + 75.77389439057914, + 73.64902191537776, + 87.78032698950257, + 60.52736459146145, + 81.95499254871753, + 22.427075085844795, + 31.81459024646798, + 73.33380409120926, + 13.38536843826911, + 73.83330165279642, + 6.839166222565476, + 77.41734354390756, + 42.06263989728063, + 54.163846474578335, + 15.22187766746639, + 91.81185812642163, + 44.27882775228483, + 63.89478274065887, + 64.40738243498808, + 97.68279837412783, + 92.48606168482698, + 90.35606564446489, + 75.11285499583002, + 103.77649419910009, + 67.5588225406807, + 36.51458874378584, + 5.7894659783060245, + 19.667781396438148, + 93.04015299731476, + 4.175023468199882, + 18.70487704095115, + 70.107007062962, + 45.52546162163886, + 76.12399004233876, + 29.2888704649556, + 65.16092177157604, + 26.44582306520078, + 101.90501306494649, + 97.01316754229074, + 67.51480165781022, + 31.069716752561884, + 30.684325973572896, + 102.54714279892806, + 44.53295711658545, + 69.98240746019084, + 48.24432463944099, + 23.82425444939355, + 21.586343073267997, + 19.858842978665965, + 60.41375350129644, + 99.06950228122997, + 32.883290029319205, + 95.53331719666257, + 63.68970545777113, + 18.628558110345715, + 49.24681930884685, + 16.408191326661758, + 42.15384486452135, + 72.44271676390464, + 43.575082860626196, + 67.22234461144987, + 92.19228000982942, + 12.740438332608445, + 25.812520255748588, + 39.95978124914461, + 50.9439416924693, + 75.37992754987059, + 29.393084955577503, + 83.02071438647008, + 92.15053942945683, + 50.739167575448775, + 14.002139772605783, + 18.909266106461622, + 9.94417575907625, + 38.13608663112389, + 80.81948789853048, + 11.710368527384103, + 16.154768359767175, + 50.48745717677119, + 84.06013879857943, + 87.92365397096974, + 92.17466220141549, + 38.962938247984006, + 97.83620705329244, + 76.00401148135573, + 23.925219119713425, + 34.60382847514447, + 62.77575427939001, + 62.80996793320865, + 62.05062502727924, + 57.308953887746156, + 16.878697781576275, + 4.542892726887075, + 15.021664264079142, + 8.820765526100047, + 92.43446218766161, + 69.74490924170883, + 41.91724216685916, + 83.24584476593802, + 71.27599124136623, + 53.668054104329585, + 19.44280180859474, + 90.85192385718851, + 72.28515140074241, + 32.48096424299086, + 26.214195675997843, + 84.67939700079138, + 90.51922025678255, + 33.285094280741745, + 59.07889384560414, + 17.94064954010505, + 53.51103006538707, + 20.64649988343742, + 87.87240843657457, + 26.501978348119483, + 51.99534683906653, + 6.092366132693068, + 86.28454311073754, + 81.43936232265973, + 90.74651162691059, + 79.82248802343928, + 68.4916202567697, + 27.80660647404458, + 12.523947014285389, + 68.15141369895102, + 79.9205585415215, + 82.98969513614057, + 99.03329400086588, + 28.673205698938013, + 54.91237156280332, + 65.86503653844048, + 5.086131964126257, + 11.547429466162136, + 17.682644392641844, + 11.124461605990657, + 31.221021216603095, + 88.73113535128017, + 41.48099584787616, + 69.60494349245764, + 55.4983707110355, + 18.44239047755642, + 73.0360524285085, + 40.94277752081078, + 79.53353195792779, + 86.80707869606734, + 33.6212394601233, + 80.07168051326965, + 77.37713444271046, + 52.041502134882464, + 85.35449350889537, + 93.62866629415687, + 56.087522837014504, + 44.847361344490636, + 34.12362989270013, + 101.967755117336, + 74.89693510397987, + 69.22200318148151, + 53.733764369525524, + 19.664165813911104, + 48.90302869187933, + 40.78729276819489, + 42.87747220910854, + 60.14269756179734, + 23.234378689937923, + 78.74498032110134, + 35.81863711006997, + 16.565592833008903, + 75.15889445814027, + 30.18344892383843, + 74.7499938444122, + 33.76879392002478, + 94.90533092066164, + 24.842388518833708, + 49.817498781539584, + 9.374295326060404, + 56.52272061341948, + 50.0257631079092, + 43.17120136905631, + 56.264681934819365, + 85.26549682313893, + 75.2745936979989, + 76.32416301668057, + 88.9152091728363, + 78.38211140558855, + 50.19902673516884, + 99.09384860134884, + 71.54764762814126, + 59.9391346442194, + 49.646889027274014, + 96.30720834728032, + 84.15062586165489, + 33.94557885725427, + 47.262303591749024, + 44.26948565995427, + 93.5582586684877, + 78.33112562278146, + 11.234645785196198, + 76.5657166001075, + 85.03605519732628, + 63.46767909024393, + 34.31024125613658, + 4.424897327044786, + 33.94315862681769, + 61.28828324845071, + 68.96011466532144, + 12.173830879613044, + 71.40237461476342, + 50.047990860613574, + 10.29291511074204, + 36.40974170459866, + 75.9092906639786, + 29.887756495757746 + ], + "y": [ + 88.46894911541769, + 96.44651148220181, + 117.14222150381835, + 71.1548906340571, + 107.44979517513202, + 85.81393499582606, + 147.63384014472427, + 59.47684209212897, + 23.750332516919098, + 147.29495273354485, + 38.264180697104884, + 118.88734090234749, + 150.57482258698462, + 95.08760851266038, + 49.107788008080455, + 134.14671302076442, + 58.12740747304685, + 64.09610964870315, + 70.76899644936732, + 180.66122781011438, + 74.91992291581002, + 159.19120010142748, + 80.20682848490159, + 181.77954322684897, + 82.44844229051112, + 30.44791589061773, + 148.53603664565784, + 116.52552358006417, + 28.702731484678857, + 196.7711267698163, + 173.49485245997542, + 79.13648322597666, + 32.05524911192305, + 142.7355508925296, + 188.46940677150488, + 53.22852064618503, + 158.61986751652196, + 4.988555927218719, + 204.07632281027074, + 141.64557173974316, + 82.63103554517666, + 42.125555195339274, + 195.75765452464938, + 65.89673872190892, + 80.03630420757167, + 22.403828772101697, + 77.33072611759316, + 44.41457694684598, + 132.79618279020352, + 99.67716740456471, + 29.59860396503991, + 99.06606200480557, + 136.6802113001687, + 109.9688127882601, + 129.73521415240856, + 27.927774206612256, + 68.9004865894492, + 109.89945797709093, + 132.48482141948068, + 82.17012210800868, + 63.12560024374809, + 22.21328507308455, + 52.66039862839307, + 158.12272276070073, + 188.53485564735155, + 201.16390944289117, + 25.965975591721577, + 6.11352449814094, + 94.03209508257092, + 83.54895276202589, + 82.14894529312275, + 54.81087748871179, + 155.18379940794213, + 129.42568782693377, + 159.4326885387872, + 173.43189321529084, + 49.528778844776305, + 48.00995898258658, + 140.86245992609673, + 95.16996668218589, + 157.98028296311074, + 6.860708619398166, + 22.85014221873094, + 178.89227657020203, + 179.09823032580599, + 195.73482409374714, + 139.13352931977843, + 141.4541202091397, + 72.15883765546093, + 149.04115969825708, + 173.24321685225055, + 142.33865535856756, + 150.6277702054868, + 118.98012491747916, + 178.20618854579348, + 59.59730479152741, + 93.9370047969811, + 89.92953932297573, + 46.46030656410465, + 33.554247670755565, + 146.44188349991097, + 56.83742638860161, + 87.45776106602337, + 182.52095665382396, + 116.5389309401153, + 157.3329148683657, + 106.46795799604088, + 89.18796748595801, + 124.83344298452157, + 21.828042576811757, + 6.2607268431293654, + 150.47724179510678, + 168.7846306283951, + 189.54199250995072, + 110.2350413626093, + 15.360633074281635, + 10.697141471413099, + 157.4229262091029, + 42.166510426966326, + 182.59829350525146, + 199.513005335985, + 166.63250271456013, + 129.23424194017272, + 90.01447852451012, + 37.50193000198369, + 124.47988747682459, + 7.439922794412346, + 189.458533234784, + 180.86006644490612, + 67.21768911069287, + 88.08775320915365, + 121.06939540046147, + 161.0482498026076, + 166.6975281734581, + 67.23517994429552, + 91.8452088150678, + 164.06271887848524, + 146.3854588364643, + 21.177644875445377, + 29.797485997427962, + 32.89261029075932, + 122.24198243864751, + 146.0914189040958, + 61.48931279544413, + 7.264095582891068, + 134.6999950659846, + 54.19771888473012, + 24.221212398837235, + 26.845232406555994, + 100.93451211217335, + 75.44186212575234, + 41.98395528632257, + 38.72910808673792, + 170.40898971021664, + 142.6300148075692, + 154.73907508937367, + 89.82768140845344, + 18.9515330914188, + 124.2861549814667, + 145.31792080440593, + 33.67024514352772, + 132.39155129134298, + 94.4208444511987, + 81.53693679446282, + 172.9531009982249, + 101.6880798967762, + 77.09923324681999, + 163.98992269181167, + 13.180666001450703, + 99.1250820493257, + 35.601744208731816, + 131.74018288057536, + 139.2139769640179, + 151.79339528006324, + 137.2860024350346, + 197.65447378590113, + 72.86526367466945, + 182.80777507092003, + 80.05485526563238, + 186.27759211082437, + 49.33952214697043, + 159.3987745257009, + 76.44631852607564, + 190.22743247742937, + 151.99221632302465, + 66.77644719440319, + 64.76489751668112, + 180.02261680105386, + 204.5633933988505, + 21.21964011912924, + 160.41752710863233, + 194.1553073705098, + 161.05682766147467, + 14.14762840930282, + 151.1441415482356, + 104.67516931937294, + 126.90619748100019, + 202.01802322543045, + 80.14952086135972, + 142.71163578363223, + 158.1105118386651, + 126.64732504208095, + 86.87665063693251, + 199.31101751848632, + 167.418736503572, + 125.33456005259428, + 110.07911930092794, + 32.157436240572245, + 94.79715503342341, + 188.07223792624208, + 78.08522425938864, + 56.89908870101821, + 16.025246584090993, + 35.233254344859176, + 179.6573466758423, + 180.7058607822553, + 128.8628437494237, + 160.71860175189994, + 123.18893829757178, + 6.350058264369384, + 162.0233695989204, + 9.581794041964628, + 71.55034282741505, + 64.15442412840024, + 194.17571984320463, + 121.54221992205184, + 83.29635508587951, + 136.47541104464784, + 196.7949814021919, + 168.104996147673, + 14.123358674838203, + 48.04624790183941, + 147.2630977403433, + 58.23692084973422, + 95.88270150902028, + 147.57330623854352, + 37.04778273159354, + 138.58859577243143, + 55.32688392732835, + 98.45460116566356, + 26.42456660352267, + 64.52275237908657, + 136.87214479968296, + 33.41903128230457, + 160.94797736483042, + 116.6495650411822, + 201.07443906550847, + 184.06124690673667, + 38.00687011597857, + 51.492302803002865, + 190.4438568013449, + 113.66133423020113, + 203.72993889639173, + 190.5789066901361, + 179.57367752564386, + 83.53599889127622, + 103.8532821490408, + 138.00849840393823, + 50.72315924505792, + 192.9820706982847, + 183.25637218251381, + 202.44056921090427, + 91.6344698053484, + 161.6569022820923, + 20.996860475894685, + 48.81374574396736, + 60.88622535116835, + 114.30088672623529, + 118.39257079488952, + 11.317739756115948, + 161.49565855308913, + 181.94191616651776, + 17.140346846981902, + 159.68002238760846, + 198.2319845562629, + 33.615231062732136, + 200.05574553234538, + 202.0885611422108, + 196.80573798850773, + 30.389441805222916, + 32.09875537604175, + 197.5415881027773, + 72.20167670673492, + 178.95514292842293, + 97.542937204704, + 10.413664018909902, + 85.44199649513304, + 147.14101620320528, + 189.69242244326963, + 10.654449984878061, + 71.86153996278499, + 193.25714598404844, + 112.91646915316129, + 145.16048755683312, + 152.32304230447707, + 94.4559672988475, + 41.19429012726127, + 191.79856575303478, + 193.05791132966598, + 200.0068036348135, + 182.14245662593603, + 163.5696218800136, + 178.78925704376414, + 195.1108014516176, + 16.92385357030961, + 11.163916484789123, + 171.35950224310065, + 175.22361802717472, + 13.354225504875714, + 117.86620092358446, + 29.491678664426026, + 99.87274568403429, + 170.70010490214986, + 63.60864473760236, + 191.01529730434007, + 118.51805481837013, + 132.91467623179008, + 187.11956394262828, + 74.26994333685046, + 97.77066578169493, + 17.785643259539928, + 137.93506756989478, + 159.41655918889086, + 138.76017525238527, + 135.71948260764876, + 162.41353997920996, + 194.20641821782607, + 174.7878255771381, + 99.00685669040865, + 180.7234758216833, + 123.76112077150516, + 151.5253728516342, + 130.83582729361746, + 43.252028201503904, + 103.8445043228867, + 13.52597360818972, + 81.95299114736214, + 189.08530762180283, + 99.14663410594727, + 196.41498003733696, + 34.56670715264578, + 109.79353309876188, + 135.12704235531197, + 100.72338735471973, + 41.90228289868295, + 55.049982592341344, + 43.22818683891781, + 56.594400030793, + 64.87977435588905, + 9.97488547259246, + 120.91164131941855, + 171.8200235365123, + 140.68525984127393, + 18.226219145605523, + 201.12344157196978, + 46.1741669160287, + 74.64810102057211, + 93.92566049231452, + 109.7011428751375, + 135.38356091982314, + 182.8263481986003, + 119.89639913644774, + 120.40900091184476, + 55.40658301243736, + 56.88366232272793, + 112.46124184626959, + 30.210660928106545, + 87.96639320686901, + 75.20701677663001, + 10.103515952850268, + 65.3644668414297, + 195.8444275861216, + 158.8259205360962, + 177.68624595507495, + 44.88161414310129, + 78.77493611503468, + 164.14857489678568, + 176.73886661825856, + 57.46911104798292, + 190.48411980477368, + 7.497055112286142, + 170.51517621978914, + 126.48120052744648, + 122.94805875407589, + 151.15721270323044, + 202.2575578300949, + 149.37859090852587, + 145.7852353601556, + 11.411334731092431, + 67.23258806353542, + 154.72852381216813, + 7.081997615389224, + 174.1548201910101, + 37.314551147415855, + 112.85160334258237, + 58.49648598532227, + 147.86209523569838, + 162.69705542693833, + 144.9666039970832, + 39.62845118991681, + 133.73180547543797, + 196.57789312016257, + 144.08038002022806, + 147.38791750334437, + 80.24615078407483, + 143.57500685909008, + 70.42348263549373, + 165.64239490722076, + 198.58436389140743, + 137.430296982684, + 91.37268772747812, + 138.00659215400955, + 169.25377548359077, + 49.58291788675809, + 196.72828927249873, + 108.56673315430344, + 30.342632835507477, + 110.68650247998242, + 72.11759150124698, + 125.09795293246535, + 64.8885198681572, + 126.29462322817997, + 66.35757745062355, + 65.50937482883515, + 52.8488772777564, + 193.56918203192296, + 122.55870524412147, + 173.40443159508297, + 168.95567750377384, + 151.61036261580153, + 200.30452805043979, + 54.59647731833335, + 144.1761444726528, + 26.891627817096012, + 132.38537358347153, + 26.56064338368555, + 31.306293922847235, + 64.04004520778109, + 120.1487268166754, + 89.98258506368545, + 37.485022614782004, + 101.73513756396078, + 52.19636097017664, + 136.30573058993193, + 178.45070165217763, + 137.2710451758432, + 138.38373348280302, + 52.4570850263935, + 169.58474173899393, + 193.0617695138383, + 61.22258945473021, + 9.502901021065263, + 167.17307758301376, + 84.95550322782772, + 75.06916130448282, + 188.12508741897506, + 62.7678199956219, + 113.15119520688057, + 50.417567634488115, + 109.0355526646401, + 185.32059365197145, + 113.11520732888178, + 143.48800779438855, + 103.08325224993, + 43.497872927906954, + 16.83988878102746, + 104.9680301219831, + 56.64001970280201, + 23.845178905928837, + 36.09099019921889, + 92.90456780364096, + 26.793294700749726, + 135.64675217593964, + 172.43803747663046, + 106.28317041757973, + 164.15320746194067, + 186.39386204628022, + 123.19169400369529, + 190.16635603444368, + 12.211959586641758, + 139.37131627170345, + 127.94207485693508, + 197.68140632134285, + 95.38905948370709, + 20.43356710592625, + 144.52615371898165, + 67.06540018296843, + 8.713176794566765, + 146.4955753156927, + 101.8469053930888, + 104.96770957418809, + 80.45679932675097, + 34.340434184692484, + 42.9951215239948, + 136.99950897966724, + 187.18407834881342, + 45.41010348386664, + 56.33285889555621, + 101.8077611511564, + 68.9626660956943, + 118.31075156752257, + 86.05840059133658, + 87.084666446214, + 167.0195099665222, + 19.756127838351777, + 121.84982002520931, + 124.02380806460141, + 39.114500282637515, + 25.188299940447312, + 26.573460225599003, + 63.05027136303424, + 133.4039415461551, + 196.20713220994486, + 78.90474574702387, + 73.10072674496128, + 48.77852337086473, + 109.84339323532596, + 37.894506631609055, + 81.91046527437638, + 108.92072242138823, + 198.07871382754612, + 54.70997746548279, + 82.95583757277763, + 33.50476814370275, + 72.51740165196327, + 122.62912806786214, + 153.40545446045115, + 123.34180121576864, + 159.22977286633633, + 93.19715649507727, + 142.96845798559085, + 47.00039725465422, + 95.28055571821255, + 28.10643519045875, + 111.37454935421809, + 144.29072401760746, + 168.9344400803802, + 97.31496821533375, + 185.04307843257413, + 171.78698284209435, + 181.44134997378794, + 12.108320952369759, + 45.33624326808283, + 119.4677346946896, + 137.01910808757526, + 18.756304033945668, + 62.51049400858741, + 199.82318701286775, + 82.42778029795902, + 107.61786114618454, + 73.7574158418347, + 155.13639477306674, + 34.64423959899964, + 45.0756210936725, + 92.32243782047176, + 192.722607496969, + 41.748051272341165, + 43.35835839445537, + 180.06278353828708, + 131.52169286491312, + 112.79810990018285, + 139.5147621642731, + 193.43569883549205, + 128.84272663964634, + 86.6655220319941, + 88.32782339078602, + 36.20539919181435, + 7.0685001895558575, + 27.758373601839338, + 112.6644198122796, + 109.3228486137743, + 34.89580220851807, + 30.24753920164214, + 70.10351358672692, + 119.45970294645457, + 158.80581760546016, + 152.02122122558274, + 30.400356499205962, + 10.880029052735356, + 8.890699388297842, + 27.79353532923355, + 125.95140036740291, + 20.749866984586955, + 108.42764512360536, + 63.413258840261236, + 135.74496001305684, + 191.11251940190087, + 15.751127116660408, + 22.063120762327433, + 144.81383787214753, + 121.93807588767204, + 190.96399462895755, + 6.553839732587522, + 189.4862883080067, + 185.0268796846585, + 182.56438567015024, + 190.3976018512396, + 64.22323644302935, + 40.34721061473025, + 191.6772009250938, + 11.542537079380711, + 62.559104600234264, + 200.02479671332506, + 174.57024213487665, + 195.60511090777734, + 14.992110967845056, + 69.44301709402566, + 203.52401609548374, + 62.19504810056937, + 175.31696958298548, + 199.01863218099268, + 112.0392544879408, + 92.62349337855575, + 38.11570979651268, + 168.61080184663652, + 97.55775626567932, + 184.2837329701125, + 50.66721986920541, + 101.89371996578264, + 192.28960461373336, + 24.75208970873787, + 185.28874060668787, + 202.02375733752547, + 51.6822664502868, + 50.846239098444435, + 129.6171956738393, + 43.985669942456674, + 124.12100056544088, + 38.18696931828428, + 147.67226564268148, + 128.51335134163435, + 32.13624191615786, + 93.23759172619192, + 13.102311809775886, + 34.152246113216535, + 194.26394752674207, + 20.000314912204068, + 132.45076513547016, + 27.30296022948537, + 124.69924905097393, + 141.265262560446, + 181.7768132714223, + 53.58291146859846, + 79.34139924409723, + 107.92676995901228, + 52.60354422312459, + 56.25314396957275, + 51.35153383516449, + 35.83554352903184, + 96.84635333357737, + 85.32214202126757, + 177.5047558320106, + 124.16632396703312, + 143.28842788996664, + 65.54178276997469, + 180.3491968995231, + 133.3374722473423, + 12.735193937624468, + 84.38734193295404, + 176.14958994347964, + 188.86806400231322, + 16.680524474465585, + 67.84885869589398, + 40.53261705135005, + 127.35511096063608, + 178.978899386823, + 25.720913537214866, + 95.20688384054932, + 179.3626231804456, + 18.35709717554878, + 202.93496656876198, + 154.50408243736953, + 147.34153025459835, + 169.85635413889804, + 202.64586865124295, + 116.8110930264825, + 32.59256112644937, + 79.4253556128263, + 133.90692314595128, + 104.40453550872932, + 167.78677834377729, + 39.52878383547012, + 122.2034719124072, + 119.33888172932365, + 80.32070463416953, + 45.070658156319105, + 114.62038414951164, + 39.561898854582516, + 120.8249969183764, + 24.736745892406834, + 13.317996058148543, + 115.83008552362683, + 120.03464228425818, + 181.76465886693214, + 38.96047738827549, + 64.46702600132653, + 155.42159837093538, + 192.70093181742638, + 91.6225637034162, + 44.9383287535775, + 114.86626901549599, + 162.30624779648545, + 52.412091099388626, + 17.23559386652805, + 158.2988672717551, + 99.75911668885959, + 195.7623827420715, + 97.49539179492024, + 113.89820991197458, + 9.433857678725266, + 6.977689137503331, + 78.13274119283909, + 123.5212327865539, + 34.77698450848482, + 168.17349182160797, + 163.61672696616043, + 165.4896227242109, + 94.89228902167983, + 172.55523116184617, + 198.92486440167664, + 65.8858763297862, + 72.97296975396176, + 22.601908432673525, + 176.36705334831794, + 196.2712639866981, + 60.290917253301274, + 170.22692472426422, + 99.43099070012278, + 55.78579813628856, + 70.5004516326443, + 159.488357358844, + 157.43125700695632, + 159.4125113603799, + 201.10439820396928, + 167.564413564251, + 83.57041559772807, + 15.222836158288628, + 143.12103936919817, + 8.187158687017776, + 128.72896856475325, + 200.31431090993803, + 184.91825302484892, + 75.53771983354376, + 83.25084671392277, + 199.21302491533058, + 141.2313232592694, + 7.946002300956246, + 192.3513849366167, + 117.16931059989868, + 48.17429758967476, + 40.765295732227166, + 152.93388902193715, + 49.43037302386907, + 80.67403954625647, + 165.4199107239756, + 164.391070080192, + 183.6569526562999, + 159.28823428918338, + 186.95524982487152, + 174.5217167545316, + 167.63672759452035, + 36.844991943014584, + 27.053856220624105, + 21.95151128601434, + 182.56269322646992, + 65.9716586306502, + 145.33922427155144, + 78.8411468170783, + 53.36836181181669, + 204.02352266868823, + 65.14675263684559, + 117.0142427117095, + 69.69064012234273, + 170.23725089231314, + 42.454245913716136, + 139.86479808618088, + 148.01672870028005, + 119.8022635666262, + 58.32633700846463, + 66.802400802657, + 144.5300628780259, + 192.42323856832977, + 22.76526871257943, + 159.66099126570387, + 111.26193802530331, + 47.40856561084614, + 94.5005154331935, + 77.2853391919858, + 148.03590734233143, + 143.9370441091577, + 172.7298261770244, + 117.99560493037009, + 161.42850987332298, + 40.563955470739074, + 59.23379458117295, + 143.7191549253196, + 24.371133401924745, + 143.9922268022715, + 9.594484057382854, + 151.98077416365737, + 82.24436050174364, + 105.59335273247173, + 28.524429330998117, + 180.8534633369662, + 85.2014734670299, + 123.51295293972619, + 127.04841611695443, + 191.14540021134763, + 181.93002166366432, + 176.86543576906485, + 146.92711982593178, + 203.82790166877936, + 132.43112913097346, + 69.63771877533956, + 8.798307572850614, + 36.939003195505634, + 183.66221087779445, + 6.015781394490779, + 34.829272086041605, + 137.60507360317985, + 88.56455570418379, + 149.20825303833573, + 55.44438528576136, + 126.77250693572347, + 50.477681276985145, + 201.50886235235092, + 191.50010934356038, + 131.80744924794212, + 59.90507533179393, + 59.54226893345858, + 203.44368854435652, + 87.15981761940593, + 136.8440542881409, + 93.84325762261231, + 43.37772204742816, + 39.143808346487965, + 38.397012621399156, + 117.24180321904934, + 195.5655893449659, + 63.33381992709592, + 189.30336659564605, + 124.75586040497515, + 34.79328005985421, + 95.55860328011195, + 28.641928185133573, + 80.81204294207758, + 141.73492248286928, + 84.47699988907478, + 131.13116543500925, + 181.37564771575526, + 22.701366188139914, + 48.44815396078333, + 77.43306135967545, + 99.74629907988502, + 147.29546182551184, + 55.874403233288305, + 163.25903470046183, + 181.57368952013692, + 98.31539341471913, + 24.28153089205735, + 36.30029068649861, + 16.474081310042703, + 72.68545740530935, + 158.96028104388972, + 20.95267167723048, + 30.523075404658407, + 99.21843678299335, + 165.52895126432884, + 171.81563697590838, + 180.86462717795195, + 74.58462996473487, + 191.6073077618856, + 150.32979033979328, + 44.572002479081455, + 66.34305059396767, + 122.00030600149789, + 121.9243866204974, + 121.78515376834397, + 112.73395245447027, + 29.27507181746526, + 5.829734238143217, + 26.26802942397366, + 15.030368226369486, + 180.68133212301137, + 135.36793674265004, + 81.43848174796173, + 162.12064501526416, + 139.99428657891622, + 104.26901635040456, + 35.76499406138977, + 178.6000226763871, + 142.87559043786928, + 62.178864380881386, + 49.300364199232526, + 166.0086929577067, + 177.53315305373368, + 63.55196799494915, + 115.20453817939648, + 34.29958607526549, + 103.92390220015643, + 37.27683366641688, + 172.26718147880146, + 50.78077931016442, + 101.02834961010319, + 8.780593574135558, + 169.48707664854078, + 160.07139957353735, + 178.15599345139935, + 156.61737343952296, + 134.92879862466862, + 53.62450947829732, + 23.313097744696123, + 133.47777671471366, + 157.579118260468, + 163.2936363418612, + 193.9587617706984, + 54.89002663916563, + 106.31950124762459, + 127.44996521768257, + 6.265582645643496, + 20.73612379512303, + 31.219352554445937, + 19.065803977908924, + 58.947332145463875, + 175.4355149751563, + 80.21840458537392, + 136.27205258817625, + 108.44369918473497, + 34.09956742237591, + 143.44162702888468, + 78.62283308832468, + 156.27149847764863, + 171.84028516989477, + 64.72110960953438, + 156.13383307747648, + 151.17051519324812, + 100.36480711676553, + 168.27489095479442, + 184.50338757402923, + 108.58050012523601, + 87.06835599846997, + 65.38208517434755, + 201.0701308394474, + 146.6100511197918, + 133.92078313521597, + 104.8642656081794, + 36.0892085615596, + 94.74788160532876, + 78.37415059706382, + 82.2892305590141, + 116.31732739558473, + 43.30915109999883, + 154.32100280770194, + 67.88427644440654, + 29.51726870275957, + 146.99255500451494, + 57.53891417225012, + 146.7493887643406, + 63.98845962566495, + 185.95398930990356, + 47.11289255739297, + 95.58593097462447, + 16.12026021994516, + 109.17812960891203, + 97.08416786069235, + 83.0908226334731, + 108.75014623283593, + 167.24276914283624, + 148.14863479116488, + 149.60429490820198, + 175.68734671393557, + 153.7316629287881, + 97.34494116520794, + 194.96739676682944, + 139.55097152668878, + 116.18124828395888, + 95.71120058198872, + 189.92698502435104, + 166.31739656167932, + 65.20217994967412, + 90.70893013737778, + 84.5154262996075, + 184.52520536541417, + 153.49082235244526, + 20.280923614285197, + 149.14720720690102, + 167.85680798730434, + 123.88959117603733, + 65.80658154149425, + 5.234799395636581, + 64.22534603101401, + 118.62865402658011, + 134.96975630381374, + 21.025586519519816, + 140.3769125131287, + 95.5140696758334, + 16.813638100178412, + 69.88512080595585, + 146.98435296518562, + 55.87795576367837 + ], + "z": [ + 130.41071809860082, + 144.35452154292238, + 174.84213174464995, + 105.64756969939648, + 160.48273979163676, + 127.55300592106323, + 220.28566075684034, + 87.56490533071538, + 34.215443887413635, + 219.52261761794745, + 55.926842920448514, + 177.29188027326364, + 224.3855287297116, + 141.43258628974394, + 72.48543057724123, + 199.5107709558438, + 84.73684872998584, + 94.59856006069283, + 104.66329050062545, + 269.2314815324489, + 111.07663655526794, + 237.56296456082327, + 118.51162220999073, + 271.33577505259933, + 121.72154200284115, + 44.41706340810147, + 221.95448139164148, + 172.8323857816035, + 41.809422698207804, + 293.93035521586285, + 259.391822124587, + 117.89016856386225, + 46.71023154270029, + 212.2338683465113, + 281.98373349012246, + 77.90735399417227, + 236.05962839193177, + 6.719693273417745, + 305.43700287432205, + 211.25086741269942, + 122.11198004468818, + 61.47965041798851, + 293.5361738452151, + 97.24761459831996, + 118.7826403915574, + 32.186326170983335, + 114.48148344094014, + 64.77158558835137, + 198.42351118862183, + 148.3431312393051, + 42.47742227927967, + 147.22247299669937, + 203.61359034638392, + 161.86265528641778, + 193.10361859766095, + 41.268497955657935, + 101.47046642577658, + 163.88111687709596, + 197.7734761535454, + 121.43098527668818, + 91.79243780797694, + 31.465936677176824, + 77.70845566317591, + 235.77733071201834, + 282.0070873159318, + 300.09025683867367, + 37.592231536629356, + 7.842597492647652, + 139.61292159616949, + 123.351207216445, + 122.1664947383542, + 80.75237518624647, + 231.31428661818376, + 192.32977100485448, + 238.19238159688578, + 258.47141304014343, + 74.2036886351408, + 70.64287818937125, + 209.41748711531514, + 141.2094521736411, + 235.59353667378292, + 9.650215374974362, + 31.414989445170242, + 267.45734013274785, + 267.28043173426806, + 292.36578297356965, + 206.91705374263105, + 210.33096049844067, + 106.07847973410054, + 221.81828325856304, + 258.8276232952742, + 212.4185056405189, + 223.2080264550931, + 176.76903811524656, + 265.9611365960771, + 87.85703571193196, + 138.6425094131563, + 133.47301847512753, + 68.49026804567775, + 48.84137006950491, + 218.3913800566551, + 84.39354946242013, + 129.79657792851032, + 272.28888738682014, + 173.83439108633954, + 235.44472475486901, + 158.61888313272226, + 132.388745941821, + 186.53777212404358, + 31.792528240368995, + 7.960621646543791, + 224.8694273071321, + 252.5543865781474, + 282.6277132220164, + 163.8887591982947, + 21.303630144891223, + 14.877520926450199, + 234.62190949411504, + 61.359739294556974, + 271.76107093819496, + 297.7138097938, + 248.2263927853249, + 191.75487516679195, + 133.49192876252627, + 55.20922016992928, + 184.46541018406225, + 9.50700955043004, + 282.9343575564374, + 269.8895487952433, + 100.19845616061446, + 129.6201444731274, + 181.07976520671028, + 240.45693550969747, + 249.1707636173757, + 99.21143503045616, + 135.66589555939905, + 244.68119614715727, + 217.43049584287309, + 30.10424451076969, + 43.62331320276321, + 47.355962359499976, + 182.1532869601016, + 218.33581662748486, + 90.46174523725719, + 9.225147484892814, + 200.02325483779813, + 79.51024155802544, + 34.986726516947556, + 37.7782804254253, + 150.35684565311183, + 111.39051273629667, + 61.47770431466791, + 56.707563386227996, + 253.97642711099203, + 212.4339906859925, + 230.11615961965225, + 132.95880028009591, + 26.17776245694882, + 185.39807746330882, + 217.03484705689172, + 50.14021142471198, + 197.5850852137751, + 140.68477865185258, + 120.80099265645788, + 257.86523150998937, + 150.24942046462004, + 114.61163055942731, + 244.16048755248462, + 17.890742661304945, + 146.6354033184909, + 51.63862538041609, + 196.59606262224983, + 207.96128753929827, + 225.81587840729065, + 205.187286190835, + 295.23110498960904, + 108.46140958426808, + 273.3284969353573, + 119.60827111250202, + 278.14682556173784, + 73.22977236583243, + 237.7942411726101, + 112.89170322027404, + 284.4602184248025, + 227.30692985978158, + 98.3665909040431, + 95.32636225813394, + 268.538431231363, + 305.37781962875437, + 30.082120457659922, + 238.9517611232251, + 288.9697919829226, + 240.18902778168288, + 20.08178368894901, + 225.42030882822345, + 155.61532536926967, + 188.3348388672063, + 301.7525665400205, + 117.8163147103674, + 211.88354413922315, + 236.14919903029565, + 187.986091522068, + 129.32772531629175, + 296.4256038717777, + 249.9546774954587, + 186.878787317169, + 163.82394006824705, + 46.87346165063927, + 141.21716314562897, + 281.19433629271515, + 115.38693317195376, + 83.2639119944492, + 22.565245899307428, + 52.13315346420835, + 268.4844007968662, + 269.169493362787, + 192.76644114902692, + 238.59626502061516, + 184.01967094639696, + 7.596805516658346, + 241.98379917403585, + 12.336302366361291, + 105.47693293120774, + 94.69790069356573, + 289.5429187667268, + 181.0463305784224, + 123.47073260662006, + 202.99596349454808, + 293.24570531349207, + 251.3828257995107, + 19.351967758217, + 70.15010843488247, + 219.87217808792525, + 86.97649794855971, + 142.78514114964733, + 219.49254685278638, + 54.119442982896516, + 206.37308937075593, + 82.5562575489674, + 145.9420104928788, + 39.456409551532275, + 95.50652092051608, + 204.3592504325445, + 48.57499347644178, + 239.6331180443527, + 173.24739624676087, + 299.84547207474895, + 274.80892965624435, + 56.01704945409382, + 75.88482944582064, + 284.70983480159185, + 168.47894278217933, + 304.2496045521435, + 285.34834312154914, + 267.78247268593947, + 124.17019204303756, + 154.3763449144234, + 205.77717716023014, + 74.79178910592283, + 287.17020347365974, + 272.8076831992372, + 301.86393028726746, + 135.96649270135777, + 240.75056228846796, + 30.030187720104486, + 71.64214756884141, + 90.1569962301842, + 168.9363302762424, + 176.57272731185247, + 15.393357739817407, + 241.41198949828853, + 272.1012881603665, + 24.301823679705777, + 238.11199143121735, + 296.09989632409565, + 48.48071312293425, + 298.361004413588, + 301.6539491877115, + 293.58035024023667, + 44.33551366805087, + 46.1717023693491, + 295.11596753142084, + 106.60300066907396, + 266.48425084843086, + 145.34417076418097, + 13.853199020339803, + 126.83574182470602, + 219.66881924848926, + 283.5087192529849, + 13.188784173294444, + 107.13838318784917, + 288.3467016594043, + 168.06014122528063, + 215.97341222996434, + 226.31741129316433, + 140.52510921875626, + 60.61801982047319, + 287.26684617939725, + 287.2665412758509, + 298.0522070260458, + 271.8316455339976, + 242.84382971181967, + 267.202525126924, + 290.65555397695067, + 24.02066344458795, + 14.353239903937116, + 255.98441262172614, + 262.10933541488083, + 19.856449716441396, + 174.74618877266875, + 42.52715956893514, + 148.47429645997929, + 254.7176787311968, + 94.63913618640912, + 285.50134941400876, + 176.07409422261284, + 198.24466213760198, + 278.63848245966426, + 109.4562270926142, + 145.9876992725506, + 25.475458098691416, + 205.37708659994783, + 237.3244442797053, + 207.6913458892043, + 201.73251527659636, + 241.8027010710414, + 290.40578654624164, + 261.8993678079832, + 146.28545667366637, + 270.6113125006232, + 183.36567062470067, + 226.00457867800603, + 194.90957122151485, + 62.80378571443818, + 153.8347608218173, + 18.77298620323261, + 121.84512661386339, + 282.72187899441855, + 146.83222581095802, + 292.91206468663876, + 50.48955052569847, + 162.88873117596643, + 201.16696192276575, + 149.4238414737215, + 61.26992063903808, + 80.92121329494802, + 63.2722082711138, + 83.95250134393238, + 95.49155208600334, + 14.878738865655093, + 179.7454867293189, + 256.1820884033814, + 210.00271841387965, + 26.19549064489942, + 300.6189788441335, + 67.38273470048868, + 110.4100831089233, + 138.8949345042744, + 163.65253276835125, + 200.97474739111618, + 272.4394331249368, + 177.6790871298941, + 178.865520404908, + 81.69366663440883, + 83.81683202812036, + 167.75392567133622, + 43.68840111892396, + 130.25993969924525, + 111.28646535491171, + 13.27988168799907, + 95.67938340717647, + 292.3168606376916, + 236.73164761442703, + 264.9190498783095, + 65.76281413771233, + 117.03622621112515, + 244.49533812248933, + 262.84131538694436, + 84.54992036344623, + 283.7967808256301, + 9.95033063059975, + 254.41266629632173, + 188.068494291836, + 183.15823051581006, + 224.98801458005718, + 302.3059139753993, + 221.98289812547614, + 216.9225184161072, + 16.262917358343667, + 99.433243294675, + 230.60393316797033, + 9.487750929661575, + 260.11064156257345, + 54.657595068254764, + 168.59542711737504, + 85.55321447386146, + 220.34850680182788, + 242.7666587448963, + 215.58640806567553, + 58.668906306830614, + 199.55615841426396, + 293.2069398210682, + 215.26494615704985, + 218.8976351981955, + 119.3895378113342, + 214.53069440069106, + 104.30188243689287, + 246.162418762874, + 295.29735061497195, + 206.3304249332088, + 135.61682352780406, + 205.7833652399448, + 252.29845241389592, + 72.3487292913571, + 293.1341530345691, + 161.56815378452603, + 44.30279949178407, + 164.5200259151864, + 106.61019331662447, + 186.55313287038382, + 96.87954305140572, + 187.8810157824881, + 98.74598318519787, + 97.90999345433569, + 77.72700795336488, + 289.6118605400229, + 183.40144458728693, + 257.7447549802441, + 252.4639981098977, + 225.79872396058505, + 299.3345293897331, + 80.44116028424469, + 214.88880169963574, + 37.78952855645777, + 196.66160947544972, + 37.72545736565214, + 45.558449915022656, + 94.76359413229247, + 178.84120349754122, + 133.70309514649847, + 54.60548468134339, + 151.53360921343054, + 77.07409145054095, + 202.6186547845465, + 266.0708447328512, + 204.04536497219607, + 206.77459810845878, + 77.99403278490638, + 252.96140858784995, + 287.93239207001466, + 89.41845443626572, + 12.444100277319352, + 250.0997115090548, + 125.90553054002545, + 111.00405345843659, + 280.8754190899924, + 93.60570959588843, + 168.59355938551022, + 73.56426683302617, + 163.36569043533547, + 277.34776009432824, + 168.13293867208205, + 213.59060437880493, + 153.3869921464231, + 64.04544808609745, + 24.40036643330566, + 155.93979295863787, + 83.21640628583185, + 34.04283201874587, + 51.72590656357552, + 137.56564898083914, + 38.30702972114378, + 202.63777079414436, + 257.0877864435587, + 157.26999970678395, + 244.93417812883663, + 277.6151567908434, + 183.20843938523416, + 283.5177527417012, + 16.715777407986717, + 208.70738520449908, + 191.19911173290046, + 294.7161824906215, + 141.52698920967973, + 29.83589634920878, + 214.94291205425742, + 99.17659087432101, + 11.915896412210529, + 217.8108523174367, + 151.67872352441364, + 155.8739029068006, + 119.38760046967707, + 49.67469861393026, + 62.739697335519885, + 203.41107908691825, + 279.99434813640113, + 66.81926473566173, + 83.41937728000563, + 151.76512578828687, + 102.68307876009432, + 176.45810576337553, + 127.59854798876307, + 129.16970581252218, + 249.0530312008428, + 28.146853643662357, + 180.63310515023286, + 183.59814302492154, + 57.342155268377425, + 37.447045924872064, + 39.049096037281544, + 93.07552209258579, + 199.45440809604946, + 293.4818575192224, + 116.77274825898009, + 107.64751829970788, + 71.93419932724309, + 163.82172394105322, + 55.50224780966781, + 121.37746613624388, + 161.3523747734905, + 296.0253497989902, + 80.26636137273509, + 122.16637180580122, + 49.00013568379005, + 107.13893294107324, + 182.94134073109225, + 228.83207335330664, + 183.92867876965232, + 236.73131704022043, + 137.8254886553939, + 212.93372955965697, + 68.56597853028087, + 141.50880300953764, + 40.606635380276266, + 166.8297364680899, + 214.62223023601018, + 251.71503319186036, + 144.55164678426326, + 276.42298986416205, + 256.487478993449, + 270.8418211774732, + 16.335563727896716, + 65.985079642445, + 177.64396108427638, + 204.22571347869126, + 27.518751702163705, + 92.99019963045585, + 299.3916875583573, + 122.21169335238902, + 159.82465148736867, + 109.32647875525343, + 231.2725970657639, + 49.91267212374381, + 65.98246990868464, + 136.78132967946502, + 287.31133586815304, + 60.94418220269539, + 63.92376296219552, + 269.30101258560353, + 195.90494131307514, + 166.960050909458, + 207.17856050332512, + 288.833700257931, + 191.51960881964743, + 128.94024269692224, + 130.73896828645908, + 51.66072936894317, + 8.472318205257674, + 40.472509458956125, + 167.74796902813563, + 161.97177078766097, + 51.36941222370627, + 42.899893963521095, + 103.66635429565612, + 177.37114218028913, + 236.8357609822766, + 226.44665926494815, + 43.699231798561335, + 15.300035755331125, + 12.878612129115545, + 40.346406262097766, + 187.41146494308543, + 29.747478749203434, + 161.0600723566913, + 94.27683564381547, + 203.36122563371484, + 284.5524519172864, + 22.244316253635933, + 30.824084907801648, + 216.1974738389154, + 180.8997444817453, + 285.007880053684, + 8.887455570442665, + 282.6288738427181, + 275.7392063347399, + 272.64413632677594, + 284.3029769969209, + 95.02160044165682, + 59.24405376294258, + 286.30417837896874, + 15.613989965872626, + 92.24445275599462, + 298.50234607350217, + 261.36183368057436, + 292.02580157090574, + 22.067491040874913, + 102.73274522488465, + 303.00302889604643, + 91.58996027474147, + 260.87434680672084, + 296.68547380438673, + 166.56374852586913, + 137.34657229113898, + 55.86295924414752, + 251.25138732902516, + 144.59121773646206, + 275.10044037294875, + 73.43129871401646, + 152.80822298369597, + 287.0629488963738, + 35.96062542646638, + 275.48362898792607, + 301.66553750319827, + 76.53252441244486, + 73.56673661007844, + 192.77540369475668, + 64.15796856287315, + 185.75285131587987, + 55.95567438580995, + 220.0733635554546, + 191.78678593931073, + 47.17386780072905, + 138.32670668127508, + 18.465613111244814, + 49.304549899476044, + 289.5578430670728, + 29.387363819864383, + 196.60475089590722, + 39.11642481872851, + 185.47880151346828, + 210.18893944582393, + 271.72318422129433, + 78.28783534960753, + 117.48083869457413, + 159.7618521458904, + 77.68201763058792, + 82.34793918354049, + 75.78039161997269, + 52.074179642921685, + 142.4663914366794, + 126.30505704067907, + 264.71695772016307, + 184.83728337361524, + 213.00942808882365, + 96.47334441968412, + 268.2228166951513, + 198.86107240726827, + 18.307149287486382, + 124.94659238042213, + 262.6059962636636, + 281.32441093180523, + 23.854222905507157, + 101.13852646275406, + 59.11186649154023, + 190.41005225658213, + 267.9477747381443, + 37.30807499925292, + 140.67414985882692, + 267.5416636460729, + 25.57903646990983, + 303.3405539048796, + 231.11956027377838, + 219.00333430940697, + 253.46771658104373, + 302.20833256154856, + 173.40683082610116, + 47.31421215578273, + 118.16455577056722, + 199.20509023443654, + 155.76313593112792, + 249.5925283826546, + 58.01025509640099, + 181.86255903980643, + 177.31434827850399, + 118.01168674375715, + 66.2435026350445, + 170.43157632465451, + 58.27859467869181, + 180.21887444078624, + 35.46567714008411, + 18.979739626854766, + 172.01424158453176, + 179.9230605318179, + 271.656857009223, + 57.311307008728996, + 95.40976586324851, + 231.09650087326602, + 287.8719779308202, + 135.45961194807856, + 66.23079546000855, + 170.12727158217461, + 241.00558112287104, + 76.46409111821282, + 24.125981695055504, + 236.10475456900843, + 148.27146549405848, + 291.6673619006895, + 144.2241134144548, + 169.51885477895343, + 12.812652585235819, + 8.863583609190751, + 115.096055125141, + 184.72195604798736, + 50.758862481891086, + 250.30154459306377, + 244.39436603649744, + 246.72938456806747, + 141.0395766402385, + 258.5450694198483, + 296.7859653428012, + 96.93919825829339, + 107.20332655318124, + 33.37839388237401, + 264.06962095921693, + 294.11568816090363, + 88.58285031472066, + 254.07313487977814, + 147.82393249683923, + 82.92289859465778, + 104.57630480821311, + 237.87196773964243, + 233.6101977653921, + 237.1900072649021, + 300.82868934905696, + 249.80667210045775, + 124.31465994838254, + 21.430481745864384, + 212.55945671338668, + 11.594522326261918, + 192.70931233298245, + 299.0733346473538, + 275.9717923967331, + 112.22248073046622, + 124.05282490221, + 297.7131400144968, + 210.23564170480134, + 10.430038005287138, + 286.93165133577514, + 174.3912420100649, + 70.47051366841605, + 60.89363256491517, + 227.80558488594335, + 72.40356812013434, + 120.33163516000013, + 246.22806609224776, + 245.68782889959013, + 273.3268205489109, + 237.47176511474365, + 279.0621549443585, + 261.3318331106271, + 249.23958893362726, + 53.80716816460752, + 39.71468996456287, + 32.736630931152675, + 272.2100449594226, + 98.35123379232465, + 216.44099544266237, + 116.72955385325105, + 78.95058003456768, + 305.40054724544575, + 95.30639156623205, + 173.81133084249151, + 103.38481374755226, + 255.0788292741961, + 62.80026972997567, + 210.1993155053624, + 219.8482857786501, + 178.63906821336087, + 86.84286091058425, + 98.87950379466236, + 216.13110805197715, + 287.76874863980146, + 32.72325413241342, + 238.3169482796676, + 166.9634965685907, + 69.7663724416351, + 139.32745601883215, + 114.00211217901571, + 220.73514685022693, + 213.9382109778211, + 257.9170928617791, + 174.93435798455522, + 240.5194746152694, + 60.009759176099045, + 88.20183213644826, + 213.87522473857013, + 35.33385970161777, + 215.56729750231173, + 13.276612614307297, + 226.90799450101247, + 121.12990515555671, + 155.53554779500277, + 40.84485190855888, + 270.702385958878, + 126.18688735603233, + 185.05734910352317, + 188.46700721596514, + 285.39930372826365, + 271.2105265053527, + 263.6130234246311, + 217.99770023137296, + 303.9545425475569, + 197.70963084381268, + 103.9055703567566, + 12.084809593385163, + 53.74394562831907, + 274.1631222281905, + 7.735052059594281, + 50.869741602847014, + 204.55713017588164, + 131.945481732427, + 222.44401947164664, + 83.19682382723728, + 188.68430796940868, + 73.46760764513476, + 300.0839661242491, + 286.03781154753074, + 196.58641377953447, + 88.08437437763538, + 87.34609670188064, + 303.57248470117844, + 128.4718523891098, + 202.92682720589528, + 139.32530523037323, + 64.52404171486965, + 57.61709245795429, + 56.319541645365256, + 174.22899861933058, + 291.50617139560137, + 94.0976100669194, + 281.7310988299121, + 185.87907511948274, + 49.715244196036096, + 141.89896607769086, + 41.1142480712749, + 120.0190149946127, + 211.46584711383755, + 125.36391398268141, + 195.61017486565152, + 270.60403641566506, + 32.4302498653968, + 71.56751355756447, + 114.33856812783442, + 148.2533208816699, + 219.88409489013793, + 82.76847459441598, + 243.612772229114, + 271.22060419001247, + 146.26254576562843, + 34.91888055091578, + 52.7357948239182, + 23.525902822572206, + 108.31183679522067, + 235.49441827460848, + 29.386884518522837, + 44.54844747736508, + 147.25653764278294, + 247.09965952188833, + 256.82192065624037, + 269.93489451545184, + 110.6227394513644, + 286.6349567764057, + 223.94002427779984, + 65.10290577705237, + 97.89011171467597, + 181.3733820181822, + 182.29101076430396, + 180.80902185818834, + 166.936853979985, + 42.874026490594254, + 7.378416198319284, + 38.46796911556942, + 21.053975980270494, + 270.3176430052919, + 202.36767978187774, + 120.19922818663072, + 242.89987920267262, + 208.40539062288153, + 155.4069370178078, + 52.62564058893817, + 265.8434041259366, + 212.32113507133374, + 91.31403895218185, + 71.68999354594165, + 247.306445240549, + 264.8719743647264, + 94.69611076097038, + 171.50494806112226, + 50.428953440362, + 154.7268034577517, + 54.83606121502953, + 257.1707968561483, + 74.3068195335955, + 150.63603258289584, + 12.586108000530134, + 252.29322077637696, + 238.52235989489608, + 265.6553964985189, + 233.21786709761525, + 200.44760986863693, + 78.85821622859326, + 32.343126285184056, + 198.62814953966858, + 234.91424766773736, + 242.83809434680975, + 289.51668348235415, + 80.89816896825559, + 158.3983925231228, + 190.430048282431, + 7.558489656016344, + 29.58273631007476, + 44.58182161212542, + 27.023349423649, + 86.61550930751044, + 262.3926433703076, + 118.80222251566641, + 202.9947108115988, + 160.50723904741167, + 50.42230990294548, + 213.62932615832915, + 116.23359448653419, + 233.28803142665805, + 255.9910281832562, + 94.72810111807144, + 233.06115074359215, + 224.8910615958082, + 149.6694445025993, + 250.69202772451567, + 275.4780652358841, + 163.01231827896683, + 129.14315045596038, + 96.51061699443765, + 299.7487192798251, + 218.22247562866184, + 199.44843318010837, + 155.30448609197805, + 52.73001560752705, + 141.67820482716613, + 116.69111198041401, + 121.39968258194878, + 172.09608341368494, + 63.30602866697352, + 230.03310528050125, + 100.74020022970556, + 43.4377848912998, + 219.4147199029981, + 85.69171335747554, + 218.98177388619797, + 94.53713617970101, + 276.55113995476285, + 69.41738464271519, + 142.616495792453, + 22.028200076129504, + 163.29238808881894, + 143.85174758152618, + 123.94180928285695, + 162.30926623670857, + 249.44275938044282, + 220.83938394055863, + 222.686553303064, + 260.4785473556961, + 228.60437097311066, + 144.73204910643489, + 291.13734308166335, + 207.5613229795154, + 173.4272994020303, + 143.21822133591306, + 283.38835382558966, + 247.65525691317862, + 96.15933664711217, + 134.67158253700975, + 125.77304001695379, + 274.3160758357922, + 229.46701951707718, + 29.592218967514196, + 222.0044316712584, + 250.18751950511768, + 184.69758923736836, + 97.15527524639874, + 6.540468465656202, + 95.20796813530653, + 176.16056939907534, + 200.28228672374775, + 30.072386447071352, + 208.82015977201925, + 142.6847278648149, + 23.750127346168128, + 103.60714962811826, + 219.36886794865546, + 83.20714442685271 + ] + } + ], + "layout": { + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "#2a3f5f" + }, + "error_y": { + "color": "#2a3f5f" + }, + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "baxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "fillpattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "#EBF0F8" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "#C8D4E3" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowcolor": "#2a3f5f", + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "colorscale": { + "diverging": [ + [ + 0, + "#8e0152" + ], + [ + 0.1, + "#c51b7d" + ], + [ + 0.2, + "#de77ae" + ], + [ + 0.3, + "#f1b6da" + ], + [ + 0.4, + "#fde0ef" + ], + [ + 0.5, + "#f7f7f7" + ], + [ + 0.6, + "#e6f5d0" + ], + [ + 0.7, + "#b8e186" + ], + [ + 0.8, + "#7fbc41" + ], + [ + 0.9, + "#4d9221" + ], + [ + 1, + "#276419" + ] + ], + "sequential": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "sequentialminus": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ] + }, + "colorway": [ + "#636efa", + "#EF553B", + "#00cc96", + "#ab63fa", + "#FFA15A", + "#19d3f3", + "#FF6692", + "#B6E880", + "#FF97FF", + "#FECB52" + ], + "font": { + "color": "#2a3f5f" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "#E5ECF6", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "mapbox": { + "style": "light" + }, + "paper_bgcolor": "white", + "plot_bgcolor": "#E5ECF6", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "line": { + "color": "#2a3f5f" + } + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "title": { + "x": 0.05 + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + } + } + }, + "title": { + "text": "Dataset" + } + } + }, + "text/html": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "fig = go.Figure(data=[go.Scatter3d(x=dataset[:, 0], y=dataset[:, 1], z=dataset[:, 2],\n", + " mode='markers')])\n", + "fig.update_layout(\n", + " title=f\"Dataset\",\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "04e047ae", + "metadata": {}, + "outputs": [], + "source": [ + "def gen_n_points(dataset, n_points, eps_range=0.01):\n", + " n, m = dataset.shape\n", + " \n", + " sample = []\n", + "# random_point = dataset[np.random.randint(n)]\n", + " random_point = np.array([0, 0, 0])\n", + " \n", + " for i in range(n_points):\n", + " eps = np.random.uniform(-1*eps_range, eps_range, m)\n", + " nearby_point = random_point + eps\n", + " \n", + " sample.append(nearby_point)\n", + " \n", + " \n", + " return np.array(sample)" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "5c035c27", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(array([[-0.47250682, 0.50933554, -0.71924586],\n", + " [-0.54447989, -0.81042833, -0.21621186],\n", + " [-0.69302161, 0.28945333, 0.66025588]]),\n", + " array([9.50200032e+00, 5.20163849e-03, 2.42486200e-03]),\n", + " 1)" + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "sample = gen_n_points(dataset, 5)\n", + "compute_AS(sample, kde_pdf)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "c50d3aea", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "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.11.5" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +}