{ "cells": [ { "cell_type": "markdown", "source": [ "# Basic usage example #\n", "This notebook demonstrates how to use the library to perform regression without delving into technical details. The interested reader is referred to the [Robust Local Polynomial Regression with Similarity Kernels draft paper](https://github.com/yaniv-shulman/rsklpr/tree/main/paper/rsklpr.pdf). It is assumed that the library is installed in the environment that you are using. You can install the library from [PyPI](https://pypi.org/project/rsklpr/) using pip: ```pip install rsklpr```\n", "\n", "**Note**, the plots are interactive, it is possible to pan, zoom, rotate as well as toggle viewing of elements by clicking / double-clicking the legend items. \n", "\n", "To begin lets define a function that generates some data to perform regression on." ], "metadata": { "collapsed": false }, "id": "165adbae35cd0ed2" }, { "cell_type": "code", "execution_count": 1, "outputs": [], "source": [ "from typing import Tuple\n", "\n", "import numpy as np\n", "\n", "\n", "def benchmark_curve_1(noise_ratio: float, hetero: bool, num_points: int) -> Tuple[np.ndarray, np.ndarray, np.ndarray]:\n", " \"\"\"\n", " Generates a dataset of points sampled from smooth curve with added noise. In the case of heteroscedastic noise the\n", " noise scale is sampled from a uniform distribution up to noise_ratio of the response range.\n", "\n", " Args:\n", " noise_ratio: The ratio of noise of the response range used to generate noise.\n", " hetero: True to generate heteroscedastic noise, False for homoscedastic noise.\n", " num_points: The number of points sampled from the curve.\n", "\n", " Returns:\n", " The predictor, response and ground truth.\n", " \"\"\"\n", " generator: np.random.Generator = np.random.default_rng(seed=14)\n", " x_: np.ndarray = np.linspace(start=0.0, stop=1.0, num=num_points)\n", " x_ += generator.normal(scale=1 / np.sqrt(num_points), size=x_.shape[0])\n", " x_ = np.sort(x_)\n", "\n", " y_true_: np.ndarray = np.sqrt(np.abs(x_**3 - 4 * x_**4 / 3)) + (\n", " 0.31 * x_ * np.sin(x_ * 3 * np.pi) ** 2 / np.max(x_)\n", " )\n", "\n", " scale: np.ndarray\n", "\n", " if hetero:\n", " scale = generator.uniform(low=0.001, high=noise_ratio * (y_true_.max() - y_true_.min()), size=x_.shape[0])\n", " else:\n", " scale = np.full(shape=x_.shape[0], fill_value=noise_ratio * (y_true_.max() - y_true_.min()))\n", "\n", " y_: np.ndarray = y_true_ + generator.normal(scale=scale)\n", "\n", " return (\n", " x_,\n", " y_,\n", " y_true_,\n", " )" ], "metadata": { "collapsed": false, "ExecuteTime": { "end_time": "2024-03-23T15:13:53.718985Z", "start_time": "2024-03-23T15:13:53.568208Z" } }, "id": "c23ce514f76767a1" }, { "cell_type": "markdown", "source": [ "Next, define a function to plot our data and regression results." ], "metadata": { "collapsed": false }, "id": "eec286e69027c48e" }, { "cell_type": "code", "execution_count": 2, "outputs": [], "source": [ "import pandas as pd\n", "from typing import Optional\n", "import plotly\n", "import plotly.graph_objects as go\n", "\n", "\n", "def plot_results_1d(\n", " x_: Optional[np.ndarray],\n", " y_: Optional[np.ndarray],\n", " y_true_: Optional[np.ndarray] = None,\n", " estimates_: Optional[pd.DataFrame] = None,\n", " title: str = \"\",\n", " estimates_mode: str = \"lines+markers\",\n", ") -> None:\n", " \"\"\"\n", " Plots a scatter plot of all columns in the provided dataframe where each column is treated as a separate variable.\n", " It is assumed estimates_.index is the same as x_ as both are used for x coordinates in the plot.\n", "\n", " Args:\n", " x_: The predictors X for all observations with shape [N,K] where N is the number of observations and K is the\n", " dimension of X.\n", " y_: The corresponding response for all observations.\n", " y_true_: The ground truth response at the locations x.\n", " estimates_: The estimates y_hat given x. it is assumed each column in the dataframe is the results of a\n", " different estimator.\n", " title: The plot title.\n", " estimates_mode: The style mode for estimates data.\n", " \"\"\"\n", " fig = go.Figure()\n", " if x_ is not None and y_ is not None:\n", " fig.add_trace(go.Scatter(x=x_, y=y_, mode=\"markers\", name=\"data\"))\n", "\n", " if y_true_ is not None:\n", " fig.add_trace(\n", " go.Scatter(x=x_ if x_ is not None else estimates_.index, y=y_true_, mode=\"markers\", name=\"y_true\")\n", " )\n", "\n", " if estimates_ is not None:\n", " for c in estimates_.columns:\n", " fig.add_trace(go.Scatter(x=estimates_.index, y=estimates_[c], mode=estimates_mode, name=c))\n", "\n", " fig.update_layout(\n", " go.Layout(\n", " title=title,\n", " autosize=True,\n", " height=500,\n", " )\n", " )\n", "\n", " plotly.offline.iplot(fig)" ], "metadata": { "collapsed": false, "ExecuteTime": { "end_time": "2024-03-23T15:13:53.852433Z", "start_time": "2024-03-23T15:13:53.721491Z" } }, "id": "5f700b91e93981d2" }, { "cell_type": "markdown", "source": [ "We can now use the function to generate some data as well as the ground truth and plot it." ], "metadata": { "collapsed": false }, "id": "f1e0d62ded816bef" }, { "cell_type": "code", "execution_count": 3, "outputs": [], "source": [ "x: np.ndarray\n", "y: np.ndarray\n", "y_true: np.ndarray\n", "\n", "x, y, y_true = benchmark_curve_1(noise_ratio=0.15, hetero=True, num_points=100)" ], "metadata": { "collapsed": false, "ExecuteTime": { "end_time": "2024-03-23T15:13:53.857333Z", "start_time": "2024-03-23T15:13:53.853667Z" } }, "id": "ee4eeaea95e7b19c" }, { "cell_type": "code", "execution_count": 4, "outputs": [ { "data": { "text/html": " \n " }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.plotly.v1+json": { "data": [ { "mode": "markers", "name": "data", "x": [ -0.2621940268810562, -0.13714701309275049, -0.08784640673486305, -0.030850187819932928, 0.0026945061031015682, 0.00508082404577135, 0.023420285885473083, 0.0639133229529901, 0.06955197700381686, 0.10676759267748642, 0.11042820716088642, 0.12189147347515301, 0.12723831565926966, 0.1299889001989774, 0.15856742743090813, 0.16294460288605572, 0.17526568776616297, 0.18313190217442732, 0.19818237049366424, 0.2051698200776125, 0.2234140392549424, 0.22557661575196092, 0.23325382540157508, 0.24272632878986972, 0.2677355789124005, 0.26961608102827483, 0.2723327771560209, 0.2838849238217034, 0.3110066434093784, 0.3204850492503619, 0.3242489208553885, 0.3261202340267171, 0.3419538108173584, 0.36077653751263666, 0.3662387707270556, 0.37142952223799286, 0.3739342735453117, 0.3816105667328741, 0.3878935537487197, 0.4003004221025975, 0.40527121312475006, 0.4233257386571563, 0.454808529100877, 0.45904654530523314, 0.4767598929607979, 0.4818862497761771, 0.4835122127396662, 0.48840380476445205, 0.49346997881851956, 0.5055829134345279, 0.5096475587184862, 0.5355460346714367, 0.5506679981386633, 0.5537155683748481, 0.5558811278910932, 0.5611597024600908, 0.6017430838823248, 0.6086036965610636, 0.6124341648911753, 0.6179953298555498, 0.6214719714446114, 0.6229490226067329, 0.6230747364674994, 0.6262140841270676, 0.6382898144495655, 0.6404266769431961, 0.6408098433696546, 0.6442433059997603, 0.6649202653253814, 0.6671150158690536, 0.6700960311873938, 0.6934092794646858, 0.715545927551773, 0.7157866279988553, 0.7194650879706673, 0.7204069994801902, 0.7341419845009008, 0.7355758878330942, 0.7372147956104544, 0.7408130382142839, 0.782769896876621, 0.7899755293337545, 0.7998856223207204, 0.8136859987131889, 0.8392010754973859, 0.85350517453068, 0.8543533066150426, 0.8686804832330532, 0.8711885240578958, 0.887132895264158, 0.8897792464320593, 0.9067714007439831, 0.9232108585117856, 0.9397683767912604, 0.9653060322867386, 0.9711215074309083, 0.9781271369870336, 1.0015277239896265, 1.0249338830634431, 1.0952567809664036 ], "y": [ 0.1191803185843851, 0.049811093885267915, 0.06154022649514988, 0.0013762966927779747, 0.33011327978584265, 0.0028016920574798175, -0.018016182333556743, -0.13475603292238464, 0.016424942045166105, 0.06316524913103082, 0.02166744082832109, 0.09766151574695812, 0.09090549793114422, 0.06689146678957547, 0.16179459444413052, 0.12443357341669295, 0.1631650247912569, 0.038855113399051414, 0.12841036368335207, 0.183214077336861, 0.39570107775443547, 0.1073633367019008, 0.11826487922134708, 0.17029988799114418, 0.15250691605270672, 0.1178555476891144, 0.1994147735064709, 0.13600793661464475, 0.18074037888883446, 0.02869848500206705, 0.12300210634145065, 0.14017714839182097, 0.14079634648627437, 0.25920963900419897, 0.19998893320546, 0.17214220553933704, 0.379565738443743, 0.20399736643110541, 0.3060974115360755, 0.28054457327836957, 0.20658826381454637, 0.24848552557269682, 0.29923855871226346, 0.2803165922239966, 0.3049611492304679, 0.37833477545305483, 0.34762176545168, 0.21952270244910357, 0.5372041316713028, 0.2968889992752433, 0.4042488451359492, 0.4364238516121898, 0.3705794138731636, 0.280307274231896, 0.3292219792574228, 0.3083241905997943, 0.28663423553925, 0.2723642427956192, 0.30852468552248574, 0.31176076624427695, 0.23856588303835238, 0.2660273570908446, 0.3370976037894936, 0.11549407224434381, 0.2428781567635641, 0.09011049604729682, 0.31525652377686375, 0.21342624029812785, 0.16797962931678445, 0.05561311952347106, 0.17480132891284392, 0.18533435819326427, 0.11241160294394752, 0.13096888739516416, 0.16147029490348405, 0.16854889154648367, 0.15338038067836843, 0.17324006390595226, 0.33435695116865805, 0.2361276238047269, 0.28604075920515304, 0.5441203927673431, 0.5629092927848828, 0.41881491683734573, 0.5460187582043701, 0.496449631739897, 0.5186881585119715, 0.48477066112949485, 0.6269316354967817, 0.5542870819313165, 0.564156339858511, 0.5550855630673031, 0.5067325733222442, 0.5374322541879143, 0.556272268791394, 0.620920077923215, 0.4579706192934344, 0.6083521898108901, 0.7578020505384726, 0.7858166096159729 ], "type": "scatter" }, { "mode": "markers", "name": "y_true", "x": [ -0.2621940268810562, -0.13714701309275049, -0.08784640673486305, -0.030850187819932928, 0.0026945061031015682, 0.00508082404577135, 0.023420285885473083, 0.0639133229529901, 0.06955197700381686, 0.10676759267748642, 0.11042820716088642, 0.12189147347515301, 0.12723831565926966, 0.1299889001989774, 0.15856742743090813, 0.16294460288605572, 0.17526568776616297, 0.18313190217442732, 0.19818237049366424, 0.2051698200776125, 0.2234140392549424, 0.22557661575196092, 0.23325382540157508, 0.24272632878986972, 0.2677355789124005, 0.26961608102827483, 0.2723327771560209, 0.2838849238217034, 0.3110066434093784, 0.3204850492503619, 0.3242489208553885, 0.3261202340267171, 0.3419538108173584, 0.36077653751263666, 0.3662387707270556, 0.37142952223799286, 0.3739342735453117, 0.3816105667328741, 0.3878935537487197, 0.4003004221025975, 0.40527121312475006, 0.4233257386571563, 0.454808529100877, 0.45904654530523314, 0.4767598929607979, 0.4818862497761771, 0.4835122127396662, 0.48840380476445205, 0.49346997881851956, 0.5055829134345279, 0.5096475587184862, 0.5355460346714367, 0.5506679981386633, 0.5537155683748481, 0.5558811278910932, 0.5611597024600908, 0.6017430838823248, 0.6086036965610636, 0.6124341648911753, 0.6179953298555498, 0.6214719714446114, 0.6229490226067329, 0.6230747364674994, 0.6262140841270676, 0.6382898144495655, 0.6404266769431961, 0.6408098433696546, 0.6442433059997603, 0.6649202653253814, 0.6671150158690536, 0.6700960311873938, 0.6934092794646858, 0.715545927551773, 0.7157866279988553, 0.7194650879706673, 0.7204069994801902, 0.7341419845009008, 0.7355758878330942, 0.7372147956104544, 0.7408130382142839, 0.782769896876621, 0.7899755293337545, 0.7998856223207204, 0.8136859987131889, 0.8392010754973859, 0.85350517453068, 0.8543533066150426, 0.8686804832330532, 0.8711885240578958, 0.887132895264158, 0.8897792464320593, 0.9067714007439831, 0.9232108585117856, 0.9397683767912604, 0.9653060322867386, 0.9711215074309083, 0.9781271369870336, 1.0015277239896265, 1.0249338830634431, 1.0952567809664036 ], "y": [ 0.12731633461957972, 0.01934914913687403, 0.014031043165993995, 0.004811305448886617, 0.00014010838617521914, 0.0003642268487549952, 0.0038455225428482725, 0.021261612046873164, 0.024786217800552228, 0.05387724353192527, 0.05715380220194499, 0.06765690752626724, 0.07262281843313775, 0.07517946916146598, 0.1006913079752271, 0.10425563972617358, 0.11351338477929776, 0.11872800628546665, 0.1269653627567095, 0.1299619674077417, 0.13529204628172442, 0.1356947308575982, 0.13676610639503237, 0.13739343584875824, 0.13654656053562622, 0.13640923527251594, 0.1362092347029089, 0.1354662091052353, 0.13653496774795112, 0.1386235014806803, 0.13978326566872012, 0.14043537559103514, 0.1481317622983789, 0.1627886159655451, 0.1681970232999818, 0.1738066943470976, 0.17667313417060482, 0.18607649887824884, 0.19442369801931544, 0.2123899500858094, 0.22004358060334084, 0.24918578549271558, 0.2991806609134927, 0.3052301202270735, 0.32726740754475736, 0.332463028485542, 0.33398445864882254, 0.3381753994992158, 0.34187810913161754, 0.34792559492018255, 0.3490280796288381, 0.34476598660429303, 0.33360402400924616, 0.3306581419427155, 0.32843427982249335, 0.32258336453097347, 0.263732587910332, 0.25279006163216955, 0.2467418646957159, 0.2381135132305177, 0.23284547762697, 0.23064304617608333, 0.2304566590082362, 0.22586012993529403, 0.20942491097673627, 0.2067582262199809, 0.20628860404375, 0.20220067718166967, 0.18266612305959162, 0.181140872469366, 0.17924179015573047, 0.17081438909057495, 0.16975671423396294, 0.16974812143126178, 0.16953249225876094, 0.16944444487106564, 0.1647665626564842, 0.16363190141243594, 0.16207428748120772, 0.15734461213254008, 0.3196978901291103, 0.35039084664540354, 0.38913681984745374, 0.43638078467475583, 0.5019273423481623, 0.5258753717872753, 0.5270113655110031, 0.5416468609082469, 0.5433672244778102, 0.5491753805481521, 0.5493806754702031, 0.5468974903174653, 0.5408694839285411, 0.5351552484130071, 0.5363392015202572, 0.5394948973879891, 0.5451194788480829, 0.5804980008807575, 0.6439697617245795, 0.9672480931765578 ], "type": "scatter" } ], "layout": { "autosize": true, "height": 500, "template": { "data": { "barpolar": [ { "marker": { "line": { "color": "rgb(17,17,17)", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "bar": [ { "error_x": { "color": "#f2f5fa" }, "error_y": { "color": "#f2f5fa" }, "marker": { "line": { "color": "rgb(17,17,17)", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#A2B1C6", "gridcolor": "#506784", "linecolor": "#506784", "minorgridcolor": "#506784", "startlinecolor": "#A2B1C6" }, "baxis": { "endlinecolor": "#A2B1C6", "gridcolor": "#506784", "linecolor": "#506784", "minorgridcolor": "#506784", "startlinecolor": "#A2B1C6" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "contour" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "heatmapgl" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "heatmap" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "histogram2dcontour" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "histogram2d" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "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": { "line": { "color": "#283442" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatter": [ { "marker": { "line": { "color": "#283442" } }, "type": "scatter" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#506784" }, "line": { "color": "rgb(17,17,17)" } }, "header": { "fill": { "color": "#2a3f5f" }, "line": { "color": "rgb(17,17,17)" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#f2f5fa", "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.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.0, "#f0f921" ] ], "sequentialminus": [ [ 0.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.0, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#f2f5fa" }, "geo": { "bgcolor": "rgb(17,17,17)", "lakecolor": "rgb(17,17,17)", "landcolor": "rgb(17,17,17)", "showlakes": true, "showland": true, "subunitcolor": "#506784" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "dark" }, "paper_bgcolor": "rgb(17,17,17)", "plot_bgcolor": "rgb(17,17,17)", "polar": { "angularaxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" }, "bgcolor": "rgb(17,17,17)", "radialaxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3" }, "yaxis": { "backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3" }, "zaxis": { "backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3" } }, "shapedefaults": { "line": { "color": "#f2f5fa" } }, "sliderdefaults": { "bgcolor": "#C8D4E3", "bordercolor": "rgb(17,17,17)", "borderwidth": 1, "tickwidth": 0 }, "ternary": { "aaxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" }, "baxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" }, "bgcolor": "rgb(17,17,17)", "caxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" } }, "title": { "x": 0.05 }, "updatemenudefaults": { "bgcolor": "#506784", "borderwidth": 0 }, "xaxis": { "automargin": true, "gridcolor": "#283442", "linecolor": "#506784", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#283442", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "#283442", "linecolor": "#506784", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#283442", "zerolinewidth": 2 } } }, "title": { "text": "Generated noisy data and ground truth" } }, "config": { "showLink": false, "linkText": "Export to plot.ly", "plotlyServerURL": "https://plot.ly" } }, "text/html": "
" }, "metadata": {}, "output_type": "display_data" } ], "source": [ "plot_results_1d(x_=x, y_=y, y_true_=y_true, title=\"Generated noisy data and ground truth\")" ], "metadata": { "collapsed": false, "ExecuteTime": { "end_time": "2024-03-23T15:13:54.153999Z", "start_time": "2024-03-23T15:13:53.858427Z" } }, "id": "fc461aed32a8612d" }, { "cell_type": "markdown", "source": [ "To perform regression we need to instantiate a Rsklpr object, fit the data and predict the outputs. The main parameter that requires attention and has the largest impact is the size_neighborhood. Having a larger neighborhood thus including more datapoints results in a smoother estimate with lower variance but increases the bias. Let's regress the data with a few neighborhood sizes to see the impact." ], "metadata": { "collapsed": false }, "id": "4aa77d4228643ac4" }, { "cell_type": "code", "execution_count": 5, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "data": [ { "mode": "markers", "name": "data", "x": [ -0.2621940268810562, -0.13714701309275049, -0.08784640673486305, -0.030850187819932928, 0.0026945061031015682, 0.00508082404577135, 0.023420285885473083, 0.0639133229529901, 0.06955197700381686, 0.10676759267748642, 0.11042820716088642, 0.12189147347515301, 0.12723831565926966, 0.1299889001989774, 0.15856742743090813, 0.16294460288605572, 0.17526568776616297, 0.18313190217442732, 0.19818237049366424, 0.2051698200776125, 0.2234140392549424, 0.22557661575196092, 0.23325382540157508, 0.24272632878986972, 0.2677355789124005, 0.26961608102827483, 0.2723327771560209, 0.2838849238217034, 0.3110066434093784, 0.3204850492503619, 0.3242489208553885, 0.3261202340267171, 0.3419538108173584, 0.36077653751263666, 0.3662387707270556, 0.37142952223799286, 0.3739342735453117, 0.3816105667328741, 0.3878935537487197, 0.4003004221025975, 0.40527121312475006, 0.4233257386571563, 0.454808529100877, 0.45904654530523314, 0.4767598929607979, 0.4818862497761771, 0.4835122127396662, 0.48840380476445205, 0.49346997881851956, 0.5055829134345279, 0.5096475587184862, 0.5355460346714367, 0.5506679981386633, 0.5537155683748481, 0.5558811278910932, 0.5611597024600908, 0.6017430838823248, 0.6086036965610636, 0.6124341648911753, 0.6179953298555498, 0.6214719714446114, 0.6229490226067329, 0.6230747364674994, 0.6262140841270676, 0.6382898144495655, 0.6404266769431961, 0.6408098433696546, 0.6442433059997603, 0.6649202653253814, 0.6671150158690536, 0.6700960311873938, 0.6934092794646858, 0.715545927551773, 0.7157866279988553, 0.7194650879706673, 0.7204069994801902, 0.7341419845009008, 0.7355758878330942, 0.7372147956104544, 0.7408130382142839, 0.782769896876621, 0.7899755293337545, 0.7998856223207204, 0.8136859987131889, 0.8392010754973859, 0.85350517453068, 0.8543533066150426, 0.8686804832330532, 0.8711885240578958, 0.887132895264158, 0.8897792464320593, 0.9067714007439831, 0.9232108585117856, 0.9397683767912604, 0.9653060322867386, 0.9711215074309083, 0.9781271369870336, 1.0015277239896265, 1.0249338830634431, 1.0952567809664036 ], "y": [ 0.1191803185843851, 0.049811093885267915, 0.06154022649514988, 0.0013762966927779747, 0.33011327978584265, 0.0028016920574798175, -0.018016182333556743, -0.13475603292238464, 0.016424942045166105, 0.06316524913103082, 0.02166744082832109, 0.09766151574695812, 0.09090549793114422, 0.06689146678957547, 0.16179459444413052, 0.12443357341669295, 0.1631650247912569, 0.038855113399051414, 0.12841036368335207, 0.183214077336861, 0.39570107775443547, 0.1073633367019008, 0.11826487922134708, 0.17029988799114418, 0.15250691605270672, 0.1178555476891144, 0.1994147735064709, 0.13600793661464475, 0.18074037888883446, 0.02869848500206705, 0.12300210634145065, 0.14017714839182097, 0.14079634648627437, 0.25920963900419897, 0.19998893320546, 0.17214220553933704, 0.379565738443743, 0.20399736643110541, 0.3060974115360755, 0.28054457327836957, 0.20658826381454637, 0.24848552557269682, 0.29923855871226346, 0.2803165922239966, 0.3049611492304679, 0.37833477545305483, 0.34762176545168, 0.21952270244910357, 0.5372041316713028, 0.2968889992752433, 0.4042488451359492, 0.4364238516121898, 0.3705794138731636, 0.280307274231896, 0.3292219792574228, 0.3083241905997943, 0.28663423553925, 0.2723642427956192, 0.30852468552248574, 0.31176076624427695, 0.23856588303835238, 0.2660273570908446, 0.3370976037894936, 0.11549407224434381, 0.2428781567635641, 0.09011049604729682, 0.31525652377686375, 0.21342624029812785, 0.16797962931678445, 0.05561311952347106, 0.17480132891284392, 0.18533435819326427, 0.11241160294394752, 0.13096888739516416, 0.16147029490348405, 0.16854889154648367, 0.15338038067836843, 0.17324006390595226, 0.33435695116865805, 0.2361276238047269, 0.28604075920515304, 0.5441203927673431, 0.5629092927848828, 0.41881491683734573, 0.5460187582043701, 0.496449631739897, 0.5186881585119715, 0.48477066112949485, 0.6269316354967817, 0.5542870819313165, 0.564156339858511, 0.5550855630673031, 0.5067325733222442, 0.5374322541879143, 0.556272268791394, 0.620920077923215, 0.4579706192934344, 0.6083521898108901, 0.7578020505384726, 0.7858166096159729 ], "type": "scatter" }, { "mode": "markers", "name": "y_true", "x": [ -0.2621940268810562, -0.13714701309275049, -0.08784640673486305, -0.030850187819932928, 0.0026945061031015682, 0.00508082404577135, 0.023420285885473083, 0.0639133229529901, 0.06955197700381686, 0.10676759267748642, 0.11042820716088642, 0.12189147347515301, 0.12723831565926966, 0.1299889001989774, 0.15856742743090813, 0.16294460288605572, 0.17526568776616297, 0.18313190217442732, 0.19818237049366424, 0.2051698200776125, 0.2234140392549424, 0.22557661575196092, 0.23325382540157508, 0.24272632878986972, 0.2677355789124005, 0.26961608102827483, 0.2723327771560209, 0.2838849238217034, 0.3110066434093784, 0.3204850492503619, 0.3242489208553885, 0.3261202340267171, 0.3419538108173584, 0.36077653751263666, 0.3662387707270556, 0.37142952223799286, 0.3739342735453117, 0.3816105667328741, 0.3878935537487197, 0.4003004221025975, 0.40527121312475006, 0.4233257386571563, 0.454808529100877, 0.45904654530523314, 0.4767598929607979, 0.4818862497761771, 0.4835122127396662, 0.48840380476445205, 0.49346997881851956, 0.5055829134345279, 0.5096475587184862, 0.5355460346714367, 0.5506679981386633, 0.5537155683748481, 0.5558811278910932, 0.5611597024600908, 0.6017430838823248, 0.6086036965610636, 0.6124341648911753, 0.6179953298555498, 0.6214719714446114, 0.6229490226067329, 0.6230747364674994, 0.6262140841270676, 0.6382898144495655, 0.6404266769431961, 0.6408098433696546, 0.6442433059997603, 0.6649202653253814, 0.6671150158690536, 0.6700960311873938, 0.6934092794646858, 0.715545927551773, 0.7157866279988553, 0.7194650879706673, 0.7204069994801902, 0.7341419845009008, 0.7355758878330942, 0.7372147956104544, 0.7408130382142839, 0.782769896876621, 0.7899755293337545, 0.7998856223207204, 0.8136859987131889, 0.8392010754973859, 0.85350517453068, 0.8543533066150426, 0.8686804832330532, 0.8711885240578958, 0.887132895264158, 0.8897792464320593, 0.9067714007439831, 0.9232108585117856, 0.9397683767912604, 0.9653060322867386, 0.9711215074309083, 0.9781271369870336, 1.0015277239896265, 1.0249338830634431, 1.0952567809664036 ], "y": [ 0.12731633461957972, 0.01934914913687403, 0.014031043165993995, 0.004811305448886617, 0.00014010838617521914, 0.0003642268487549952, 0.0038455225428482725, 0.021261612046873164, 0.024786217800552228, 0.05387724353192527, 0.05715380220194499, 0.06765690752626724, 0.07262281843313775, 0.07517946916146598, 0.1006913079752271, 0.10425563972617358, 0.11351338477929776, 0.11872800628546665, 0.1269653627567095, 0.1299619674077417, 0.13529204628172442, 0.1356947308575982, 0.13676610639503237, 0.13739343584875824, 0.13654656053562622, 0.13640923527251594, 0.1362092347029089, 0.1354662091052353, 0.13653496774795112, 0.1386235014806803, 0.13978326566872012, 0.14043537559103514, 0.1481317622983789, 0.1627886159655451, 0.1681970232999818, 0.1738066943470976, 0.17667313417060482, 0.18607649887824884, 0.19442369801931544, 0.2123899500858094, 0.22004358060334084, 0.24918578549271558, 0.2991806609134927, 0.3052301202270735, 0.32726740754475736, 0.332463028485542, 0.33398445864882254, 0.3381753994992158, 0.34187810913161754, 0.34792559492018255, 0.3490280796288381, 0.34476598660429303, 0.33360402400924616, 0.3306581419427155, 0.32843427982249335, 0.32258336453097347, 0.263732587910332, 0.25279006163216955, 0.2467418646957159, 0.2381135132305177, 0.23284547762697, 0.23064304617608333, 0.2304566590082362, 0.22586012993529403, 0.20942491097673627, 0.2067582262199809, 0.20628860404375, 0.20220067718166967, 0.18266612305959162, 0.181140872469366, 0.17924179015573047, 0.17081438909057495, 0.16975671423396294, 0.16974812143126178, 0.16953249225876094, 0.16944444487106564, 0.1647665626564842, 0.16363190141243594, 0.16207428748120772, 0.15734461213254008, 0.3196978901291103, 0.35039084664540354, 0.38913681984745374, 0.43638078467475583, 0.5019273423481623, 0.5258753717872753, 0.5270113655110031, 0.5416468609082469, 0.5433672244778102, 0.5491753805481521, 0.5493806754702031, 0.5468974903174653, 0.5408694839285411, 0.5351552484130071, 0.5363392015202572, 0.5394948973879891, 0.5451194788480829, 0.5804980008807575, 0.6439697617245795, 0.9672480931765578 ], "type": "scatter" }, { "mode": "lines+markers", "name": "y_hat", "x": [ -0.2621940268810562, -0.13714701309275049, -0.08784640673486305, -0.030850187819932928, 0.0026945061031015682, 0.00508082404577135, 0.023420285885473083, 0.0639133229529901, 0.06955197700381686, 0.10676759267748642, 0.11042820716088642, 0.12189147347515301, 0.12723831565926966, 0.1299889001989774, 0.15856742743090813, 0.16294460288605572, 0.17526568776616297, 0.18313190217442732, 0.19818237049366424, 0.2051698200776125, 0.2234140392549424, 0.22557661575196092, 0.23325382540157508, 0.24272632878986972, 0.2677355789124005, 0.26961608102827483, 0.2723327771560209, 0.2838849238217034, 0.3110066434093784, 0.3204850492503619, 0.3242489208553885, 0.3261202340267171, 0.3419538108173584, 0.36077653751263666, 0.3662387707270556, 0.37142952223799286, 0.3739342735453117, 0.3816105667328741, 0.3878935537487197, 0.4003004221025975, 0.40527121312475006, 0.4233257386571563, 0.454808529100877, 0.45904654530523314, 0.4767598929607979, 0.4818862497761771, 0.4835122127396662, 0.48840380476445205, 0.49346997881851956, 0.5055829134345279, 0.5096475587184862, 0.5355460346714367, 0.5506679981386633, 0.5537155683748481, 0.5558811278910932, 0.5611597024600908, 0.6017430838823248, 0.6086036965610636, 0.6124341648911753, 0.6179953298555498, 0.6214719714446114, 0.6229490226067329, 0.6230747364674994, 0.6262140841270676, 0.6382898144495655, 0.6404266769431961, 0.6408098433696546, 0.6442433059997603, 0.6649202653253814, 0.6671150158690536, 0.6700960311873938, 0.6934092794646858, 0.715545927551773, 0.7157866279988553, 0.7194650879706673, 0.7204069994801902, 0.7341419845009008, 0.7355758878330942, 0.7372147956104544, 0.7408130382142839, 0.782769896876621, 0.7899755293337545, 0.7998856223207204, 0.8136859987131889, 0.8392010754973859, 0.85350517453068, 0.8543533066150426, 0.8686804832330532, 0.8711885240578958, 0.887132895264158, 0.8897792464320593, 0.9067714007439831, 0.9232108585117856, 0.9397683767912604, 0.9653060322867386, 0.9711215074309083, 0.9781271369870336, 1.0015277239896265, 1.0249338830634431, 1.0952567809664036 ], "y": [ 0.08693539645809142, 0.04546083474735763, 0.051734134163797206, 0.029686350695720228, 0.04930646437933209, 0.04828666071404922, 0.03499905341419785, 0.016320346216321044, 0.02235349117244791, 0.0636640870174437, 0.06625371912593196, 0.07448747161114738, 0.07417099980787355, 0.07658571171677815, 0.11058316956608578, 0.11262540072751354, 0.11667775370870292, 0.11764577283056722, 0.12809267693452808, 0.13665526210507528, 0.14524738641639448, 0.14519003728544239, 0.14556749355782497, 0.14658818385905886, 0.14949370309477264, 0.14966961633344655, 0.15001627888245947, 0.151774619287669, 0.15406417273958764, 0.15443169514488947, 0.15617925139904087, 0.15694492116404066, 0.17711441866019392, 0.21041675747674124, 0.21669990087682067, 0.2205292303676713, 0.22331745943415846, 0.23182235180694033, 0.23793471326018092, 0.243805239406361, 0.24533005906509445, 0.2529112464869246, 0.28974164075482517, 0.29285725820526926, 0.3078840387802713, 0.3117115423206991, 0.3130412118003126, 0.3158347233704571, 0.31877167640021997, 0.3244465587610434, 0.32615554461370044, 0.33691505529901716, 0.31514339740082126, 0.31283890889281374, 0.3115947893027224, 0.309711808280591, 0.2838310566437499, 0.27790040974901165, 0.2759061830100619, 0.2735831160025162, 0.26767590445427886, 0.26496095788799706, 0.2647244806726557, 0.2616728568423359, 0.24027996207157587, 0.2370011236228821, 0.23645037853387887, 0.23118028893678802, 0.177050276338028, 0.17355783509471562, 0.170996557673337, 0.17380031164521206, 0.16274602159602364, 0.16284563004567743, 0.16498313630743147, 0.16565815320355437, 0.18361560425743467, 0.18566113451929417, 0.1880268698853405, 0.19430777062267396, 0.39149725038067396, 0.4130198233586873, 0.4402571298575709, 0.46670777640683164, 0.5141042632242712, 0.5217996044687789, 0.5222702031165765, 0.5307600669911673, 0.5324346389210848, 0.5413380170214068, 0.5424660649189854, 0.5467875255576469, 0.5491871263897351, 0.5565480962156582, 0.575592446436855, 0.5797835088643328, 0.5850039987841167, 0.6220268164712706, 0.6847268121681428, 0.7859265256611011 ], "type": "scatter" } ], "layout": { "autosize": true, "height": 500, "template": { "data": { "barpolar": [ { "marker": { "line": { "color": "rgb(17,17,17)", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "bar": [ { "error_x": { "color": "#f2f5fa" }, "error_y": { "color": "#f2f5fa" }, "marker": { "line": { "color": "rgb(17,17,17)", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#A2B1C6", "gridcolor": "#506784", "linecolor": "#506784", "minorgridcolor": "#506784", "startlinecolor": "#A2B1C6" }, "baxis": { "endlinecolor": "#A2B1C6", "gridcolor": "#506784", "linecolor": "#506784", "minorgridcolor": "#506784", "startlinecolor": "#A2B1C6" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "contour" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "heatmapgl" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "heatmap" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "histogram2dcontour" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "histogram2d" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "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": { "line": { "color": "#283442" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatter": [ { "marker": { "line": { "color": "#283442" } }, "type": "scatter" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#506784" }, "line": { "color": "rgb(17,17,17)" } }, "header": { "fill": { "color": "#2a3f5f" }, "line": { "color": "rgb(17,17,17)" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#f2f5fa", "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.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.0, "#f0f921" ] ], "sequentialminus": [ [ 0.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.0, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#f2f5fa" }, "geo": { "bgcolor": "rgb(17,17,17)", "lakecolor": "rgb(17,17,17)", "landcolor": "rgb(17,17,17)", "showlakes": true, "showland": true, "subunitcolor": "#506784" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "dark" }, "paper_bgcolor": "rgb(17,17,17)", "plot_bgcolor": "rgb(17,17,17)", "polar": { "angularaxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" }, "bgcolor": "rgb(17,17,17)", "radialaxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3" }, "yaxis": { "backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3" }, "zaxis": { "backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3" } }, "shapedefaults": { "line": { "color": "#f2f5fa" } }, "sliderdefaults": { "bgcolor": "#C8D4E3", "bordercolor": "rgb(17,17,17)", "borderwidth": 1, "tickwidth": 0 }, "ternary": { "aaxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" }, "baxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" }, "bgcolor": "rgb(17,17,17)", "caxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" } }, "title": { "x": 0.05 }, "updatemenudefaults": { "bgcolor": "#506784", "borderwidth": 0 }, "xaxis": { "automargin": true, "gridcolor": "#283442", "linecolor": "#506784", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#283442", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "#283442", "linecolor": "#506784", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#283442", "zerolinewidth": 2 } } }, "title": { "text": "Regression with size_neighborhood=30" } }, "config": { "showLink": false, "linkText": "Export to plot.ly", "plotlyServerURL": "https://plot.ly" } }, "text/html": "
" }, "metadata": {}, "output_type": "display_data" } ], "source": [ "from rsklpr.rsklpr import Rsklpr\n", "\n", "rsklpr: Rsklpr = Rsklpr(size_neighborhood=30)\n", "y_hat: np.ndarray = rsklpr(x=x, y=y)\n", "plot_results_1d(\n", " x_=x,\n", " y_=y,\n", " y_true_=y_true,\n", " estimates_=pd.DataFrame(data=y_hat, columns=[\"y_hat\"], index=x),\n", " title=\"Regression with size_neighborhood=30\",\n", ")" ], "metadata": { "collapsed": false, "ExecuteTime": { "end_time": "2024-03-23T15:13:54.742551Z", "start_time": "2024-03-23T15:13:54.156508Z" } }, "id": "b170de3a00f5ae5c" }, { "cell_type": "markdown", "source": [ "Note that calling the model directly as ```python rsklpr(x=x, y=y) ``` is a shortform for calling fit and predict on all locations given in the dataset. We can also make the curve smoother by increasing the number of datapoints in the neighborhood. " ], "metadata": { "collapsed": false }, "id": "9b6c300b7b1797a0" }, { "cell_type": "code", "execution_count": 6, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "data": [ { "mode": "markers", "name": "data", "x": [ -0.2621940268810562, -0.13714701309275049, -0.08784640673486305, -0.030850187819932928, 0.0026945061031015682, 0.00508082404577135, 0.023420285885473083, 0.0639133229529901, 0.06955197700381686, 0.10676759267748642, 0.11042820716088642, 0.12189147347515301, 0.12723831565926966, 0.1299889001989774, 0.15856742743090813, 0.16294460288605572, 0.17526568776616297, 0.18313190217442732, 0.19818237049366424, 0.2051698200776125, 0.2234140392549424, 0.22557661575196092, 0.23325382540157508, 0.24272632878986972, 0.2677355789124005, 0.26961608102827483, 0.2723327771560209, 0.2838849238217034, 0.3110066434093784, 0.3204850492503619, 0.3242489208553885, 0.3261202340267171, 0.3419538108173584, 0.36077653751263666, 0.3662387707270556, 0.37142952223799286, 0.3739342735453117, 0.3816105667328741, 0.3878935537487197, 0.4003004221025975, 0.40527121312475006, 0.4233257386571563, 0.454808529100877, 0.45904654530523314, 0.4767598929607979, 0.4818862497761771, 0.4835122127396662, 0.48840380476445205, 0.49346997881851956, 0.5055829134345279, 0.5096475587184862, 0.5355460346714367, 0.5506679981386633, 0.5537155683748481, 0.5558811278910932, 0.5611597024600908, 0.6017430838823248, 0.6086036965610636, 0.6124341648911753, 0.6179953298555498, 0.6214719714446114, 0.6229490226067329, 0.6230747364674994, 0.6262140841270676, 0.6382898144495655, 0.6404266769431961, 0.6408098433696546, 0.6442433059997603, 0.6649202653253814, 0.6671150158690536, 0.6700960311873938, 0.6934092794646858, 0.715545927551773, 0.7157866279988553, 0.7194650879706673, 0.7204069994801902, 0.7341419845009008, 0.7355758878330942, 0.7372147956104544, 0.7408130382142839, 0.782769896876621, 0.7899755293337545, 0.7998856223207204, 0.8136859987131889, 0.8392010754973859, 0.85350517453068, 0.8543533066150426, 0.8686804832330532, 0.8711885240578958, 0.887132895264158, 0.8897792464320593, 0.9067714007439831, 0.9232108585117856, 0.9397683767912604, 0.9653060322867386, 0.9711215074309083, 0.9781271369870336, 1.0015277239896265, 1.0249338830634431, 1.0952567809664036 ], "y": [ 0.1191803185843851, 0.049811093885267915, 0.06154022649514988, 0.0013762966927779747, 0.33011327978584265, 0.0028016920574798175, -0.018016182333556743, -0.13475603292238464, 0.016424942045166105, 0.06316524913103082, 0.02166744082832109, 0.09766151574695812, 0.09090549793114422, 0.06689146678957547, 0.16179459444413052, 0.12443357341669295, 0.1631650247912569, 0.038855113399051414, 0.12841036368335207, 0.183214077336861, 0.39570107775443547, 0.1073633367019008, 0.11826487922134708, 0.17029988799114418, 0.15250691605270672, 0.1178555476891144, 0.1994147735064709, 0.13600793661464475, 0.18074037888883446, 0.02869848500206705, 0.12300210634145065, 0.14017714839182097, 0.14079634648627437, 0.25920963900419897, 0.19998893320546, 0.17214220553933704, 0.379565738443743, 0.20399736643110541, 0.3060974115360755, 0.28054457327836957, 0.20658826381454637, 0.24848552557269682, 0.29923855871226346, 0.2803165922239966, 0.3049611492304679, 0.37833477545305483, 0.34762176545168, 0.21952270244910357, 0.5372041316713028, 0.2968889992752433, 0.4042488451359492, 0.4364238516121898, 0.3705794138731636, 0.280307274231896, 0.3292219792574228, 0.3083241905997943, 0.28663423553925, 0.2723642427956192, 0.30852468552248574, 0.31176076624427695, 0.23856588303835238, 0.2660273570908446, 0.3370976037894936, 0.11549407224434381, 0.2428781567635641, 0.09011049604729682, 0.31525652377686375, 0.21342624029812785, 0.16797962931678445, 0.05561311952347106, 0.17480132891284392, 0.18533435819326427, 0.11241160294394752, 0.13096888739516416, 0.16147029490348405, 0.16854889154648367, 0.15338038067836843, 0.17324006390595226, 0.33435695116865805, 0.2361276238047269, 0.28604075920515304, 0.5441203927673431, 0.5629092927848828, 0.41881491683734573, 0.5460187582043701, 0.496449631739897, 0.5186881585119715, 0.48477066112949485, 0.6269316354967817, 0.5542870819313165, 0.564156339858511, 0.5550855630673031, 0.5067325733222442, 0.5374322541879143, 0.556272268791394, 0.620920077923215, 0.4579706192934344, 0.6083521898108901, 0.7578020505384726, 0.7858166096159729 ], "type": "scatter" }, { "mode": "markers", "name": "y_true", "x": [ -0.2621940268810562, -0.13714701309275049, -0.08784640673486305, -0.030850187819932928, 0.0026945061031015682, 0.00508082404577135, 0.023420285885473083, 0.0639133229529901, 0.06955197700381686, 0.10676759267748642, 0.11042820716088642, 0.12189147347515301, 0.12723831565926966, 0.1299889001989774, 0.15856742743090813, 0.16294460288605572, 0.17526568776616297, 0.18313190217442732, 0.19818237049366424, 0.2051698200776125, 0.2234140392549424, 0.22557661575196092, 0.23325382540157508, 0.24272632878986972, 0.2677355789124005, 0.26961608102827483, 0.2723327771560209, 0.2838849238217034, 0.3110066434093784, 0.3204850492503619, 0.3242489208553885, 0.3261202340267171, 0.3419538108173584, 0.36077653751263666, 0.3662387707270556, 0.37142952223799286, 0.3739342735453117, 0.3816105667328741, 0.3878935537487197, 0.4003004221025975, 0.40527121312475006, 0.4233257386571563, 0.454808529100877, 0.45904654530523314, 0.4767598929607979, 0.4818862497761771, 0.4835122127396662, 0.48840380476445205, 0.49346997881851956, 0.5055829134345279, 0.5096475587184862, 0.5355460346714367, 0.5506679981386633, 0.5537155683748481, 0.5558811278910932, 0.5611597024600908, 0.6017430838823248, 0.6086036965610636, 0.6124341648911753, 0.6179953298555498, 0.6214719714446114, 0.6229490226067329, 0.6230747364674994, 0.6262140841270676, 0.6382898144495655, 0.6404266769431961, 0.6408098433696546, 0.6442433059997603, 0.6649202653253814, 0.6671150158690536, 0.6700960311873938, 0.6934092794646858, 0.715545927551773, 0.7157866279988553, 0.7194650879706673, 0.7204069994801902, 0.7341419845009008, 0.7355758878330942, 0.7372147956104544, 0.7408130382142839, 0.782769896876621, 0.7899755293337545, 0.7998856223207204, 0.8136859987131889, 0.8392010754973859, 0.85350517453068, 0.8543533066150426, 0.8686804832330532, 0.8711885240578958, 0.887132895264158, 0.8897792464320593, 0.9067714007439831, 0.9232108585117856, 0.9397683767912604, 0.9653060322867386, 0.9711215074309083, 0.9781271369870336, 1.0015277239896265, 1.0249338830634431, 1.0952567809664036 ], "y": [ 0.12731633461957972, 0.01934914913687403, 0.014031043165993995, 0.004811305448886617, 0.00014010838617521914, 0.0003642268487549952, 0.0038455225428482725, 0.021261612046873164, 0.024786217800552228, 0.05387724353192527, 0.05715380220194499, 0.06765690752626724, 0.07262281843313775, 0.07517946916146598, 0.1006913079752271, 0.10425563972617358, 0.11351338477929776, 0.11872800628546665, 0.1269653627567095, 0.1299619674077417, 0.13529204628172442, 0.1356947308575982, 0.13676610639503237, 0.13739343584875824, 0.13654656053562622, 0.13640923527251594, 0.1362092347029089, 0.1354662091052353, 0.13653496774795112, 0.1386235014806803, 0.13978326566872012, 0.14043537559103514, 0.1481317622983789, 0.1627886159655451, 0.1681970232999818, 0.1738066943470976, 0.17667313417060482, 0.18607649887824884, 0.19442369801931544, 0.2123899500858094, 0.22004358060334084, 0.24918578549271558, 0.2991806609134927, 0.3052301202270735, 0.32726740754475736, 0.332463028485542, 0.33398445864882254, 0.3381753994992158, 0.34187810913161754, 0.34792559492018255, 0.3490280796288381, 0.34476598660429303, 0.33360402400924616, 0.3306581419427155, 0.32843427982249335, 0.32258336453097347, 0.263732587910332, 0.25279006163216955, 0.2467418646957159, 0.2381135132305177, 0.23284547762697, 0.23064304617608333, 0.2304566590082362, 0.22586012993529403, 0.20942491097673627, 0.2067582262199809, 0.20628860404375, 0.20220067718166967, 0.18266612305959162, 0.181140872469366, 0.17924179015573047, 0.17081438909057495, 0.16975671423396294, 0.16974812143126178, 0.16953249225876094, 0.16944444487106564, 0.1647665626564842, 0.16363190141243594, 0.16207428748120772, 0.15734461213254008, 0.3196978901291103, 0.35039084664540354, 0.38913681984745374, 0.43638078467475583, 0.5019273423481623, 0.5258753717872753, 0.5270113655110031, 0.5416468609082469, 0.5433672244778102, 0.5491753805481521, 0.5493806754702031, 0.5468974903174653, 0.5408694839285411, 0.5351552484130071, 0.5363392015202572, 0.5394948973879891, 0.5451194788480829, 0.5804980008807575, 0.6439697617245795, 0.9672480931765578 ], "type": "scatter" }, { "mode": "lines+markers", "name": "y_hat", "x": [ -0.2621940268810562, -0.13714701309275049, -0.08784640673486305, -0.030850187819932928, 0.0026945061031015682, 0.00508082404577135, 0.023420285885473083, 0.0639133229529901, 0.06955197700381686, 0.10676759267748642, 0.11042820716088642, 0.12189147347515301, 0.12723831565926966, 0.1299889001989774, 0.15856742743090813, 0.16294460288605572, 0.17526568776616297, 0.18313190217442732, 0.19818237049366424, 0.2051698200776125, 0.2234140392549424, 0.22557661575196092, 0.23325382540157508, 0.24272632878986972, 0.2677355789124005, 0.26961608102827483, 0.2723327771560209, 0.2838849238217034, 0.3110066434093784, 0.3204850492503619, 0.3242489208553885, 0.3261202340267171, 0.3419538108173584, 0.36077653751263666, 0.3662387707270556, 0.37142952223799286, 0.3739342735453117, 0.3816105667328741, 0.3878935537487197, 0.4003004221025975, 0.40527121312475006, 0.4233257386571563, 0.454808529100877, 0.45904654530523314, 0.4767598929607979, 0.4818862497761771, 0.4835122127396662, 0.48840380476445205, 0.49346997881851956, 0.5055829134345279, 0.5096475587184862, 0.5355460346714367, 0.5506679981386633, 0.5537155683748481, 0.5558811278910932, 0.5611597024600908, 0.6017430838823248, 0.6086036965610636, 0.6124341648911753, 0.6179953298555498, 0.6214719714446114, 0.6229490226067329, 0.6230747364674994, 0.6262140841270676, 0.6382898144495655, 0.6404266769431961, 0.6408098433696546, 0.6442433059997603, 0.6649202653253814, 0.6671150158690536, 0.6700960311873938, 0.6934092794646858, 0.715545927551773, 0.7157866279988553, 0.7194650879706673, 0.7204069994801902, 0.7341419845009008, 0.7355758878330942, 0.7372147956104544, 0.7408130382142839, 0.782769896876621, 0.7899755293337545, 0.7998856223207204, 0.8136859987131889, 0.8392010754973859, 0.85350517453068, 0.8543533066150426, 0.8686804832330532, 0.8711885240578958, 0.887132895264158, 0.8897792464320593, 0.9067714007439831, 0.9232108585117856, 0.9397683767912604, 0.9653060322867386, 0.9711215074309083, 0.9781271369870336, 1.0015277239896265, 1.0249338830634431, 1.0952567809664036 ], "y": [ 0.05286574886449825, 0.03774968288814314, 0.04238464184937267, 0.02092231068434167, 0.035938865391689445, 0.03643376693591122, 0.037569854570635206, 0.04617062292093819, 0.050611080201546345, 0.07845126146268068, 0.080677134457203, 0.08765688456287285, 0.09092624932913107, 0.09262683862219909, 0.11043789597719056, 0.11290358798991032, 0.11943082882118083, 0.1177443022168739, 0.12632034913133322, 0.1303860729744925, 0.1397967324089766, 0.1407091309324106, 0.1436635198398315, 0.14672612818553066, 0.15202256844283935, 0.152476919764446, 0.15315135179173944, 0.1558356491600239, 0.15951626433563132, 0.16476636917580204, 0.16297593599133703, 0.16454334029002327, 0.18170398500547102, 0.20351660802585164, 0.2092880571676718, 0.21331918693766158, 0.21563676637258153, 0.221886331202993, 0.22639203043124623, 0.23279585047933066, 0.23523261107040044, 0.2463585363833271, 0.2836350108736575, 0.2867524433643722, 0.29658617534281284, 0.29832103507081487, 0.2987715127285796, 0.30003655204515556, 0.3015604008979372, 0.3042057227381897, 0.3063594965457026, 0.31477647838915734, 0.3098870096956018, 0.3087481214017048, 0.3078287254804799, 0.30530898556784414, 0.27286801567506425, 0.26769059568117015, 0.26507655172066824, 0.2611837087782803, 0.258372352236219, 0.25712683733075836, 0.2570186661921152, 0.2541539429585812, 0.24153607456903414, 0.2389388822753061, 0.2384701776820904, 0.23407987582816395, 0.20525410619095963, 0.20271856012816558, 0.19876296815038752, 0.18021728534765674, 0.18107377790522838, 0.18113896667081347, 0.18243318561492092, 0.18284347138264626, 0.19445226748952554, 0.19665177625154773, 0.19953875543964694, 0.20735719152870608, 0.4184599267427588, 0.4401694064298063, 0.461554453840053, 0.4832523252214382, 0.5139023471917291, 0.5246536513781948, 0.5251861478143854, 0.5332125274402175, 0.5345038132384838, 0.5413064982467473, 0.5421845925214258, 0.5458825255106424, 0.5481376832262462, 0.5531362876996722, 0.5668647658512888, 0.5706142463493855, 0.5755787561708563, 0.6034478027332154, 0.6549178427677866, 0.7902412075014406 ], "type": "scatter" } ], "layout": { "autosize": true, "height": 500, "template": { "data": { "barpolar": [ { "marker": { "line": { "color": "rgb(17,17,17)", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "bar": [ { "error_x": { "color": "#f2f5fa" }, "error_y": { "color": "#f2f5fa" }, "marker": { "line": { "color": "rgb(17,17,17)", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#A2B1C6", "gridcolor": "#506784", "linecolor": "#506784", "minorgridcolor": "#506784", "startlinecolor": "#A2B1C6" }, "baxis": { "endlinecolor": "#A2B1C6", "gridcolor": "#506784", "linecolor": "#506784", "minorgridcolor": "#506784", "startlinecolor": "#A2B1C6" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "contour" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "heatmapgl" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "heatmap" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "histogram2dcontour" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "histogram2d" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "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": { "line": { "color": "#283442" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatter": [ { "marker": { "line": { "color": "#283442" } }, "type": "scatter" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#506784" }, "line": { "color": "rgb(17,17,17)" } }, "header": { "fill": { "color": "#2a3f5f" }, "line": { "color": "rgb(17,17,17)" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#f2f5fa", "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.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.0, "#f0f921" ] ], "sequentialminus": [ [ 0.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.0, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#f2f5fa" }, "geo": { "bgcolor": "rgb(17,17,17)", "lakecolor": "rgb(17,17,17)", "landcolor": "rgb(17,17,17)", "showlakes": true, "showland": true, "subunitcolor": "#506784" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "dark" }, "paper_bgcolor": "rgb(17,17,17)", "plot_bgcolor": "rgb(17,17,17)", "polar": { "angularaxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" }, "bgcolor": "rgb(17,17,17)", "radialaxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3" }, "yaxis": { "backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3" }, "zaxis": { "backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3" } }, "shapedefaults": { "line": { "color": "#f2f5fa" } }, "sliderdefaults": { "bgcolor": "#C8D4E3", "bordercolor": "rgb(17,17,17)", "borderwidth": 1, "tickwidth": 0 }, "ternary": { "aaxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" }, "baxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" }, "bgcolor": "rgb(17,17,17)", "caxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" } }, "title": { "x": 0.05 }, "updatemenudefaults": { "bgcolor": "#506784", "borderwidth": 0 }, "xaxis": { "automargin": true, "gridcolor": "#283442", "linecolor": "#506784", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#283442", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "#283442", "linecolor": "#506784", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#283442", "zerolinewidth": 2 } } }, "title": { "text": "Regression with size_neighborhood=60" } }, "config": { "showLink": false, "linkText": "Export to plot.ly", "plotlyServerURL": "https://plot.ly" } }, "text/html": "
" }, "metadata": {}, "output_type": "display_data" } ], "source": [ "rsklpr = Rsklpr(size_neighborhood=60)\n", "y_hat = rsklpr(x=x, y=y)\n", "plot_results_1d(\n", " x_=x,\n", " y_=y,\n", " y_true_=y_true,\n", " estimates_=pd.DataFrame(data=y_hat, columns=[\"y_hat\"], index=x),\n", " title=\"Regression with size_neighborhood=60\",\n", ")" ], "metadata": { "collapsed": false, "ExecuteTime": { "end_time": "2024-03-23T15:13:54.839636Z", "start_time": "2024-03-23T15:13:54.744270Z" } }, "id": "119f22f68c8526ce" }, { "cell_type": "code", "execution_count": 7, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "data": [ { "mode": "markers", "name": "data", "x": [ -0.2621940268810562, -0.13714701309275049, -0.08784640673486305, -0.030850187819932928, 0.0026945061031015682, 0.00508082404577135, 0.023420285885473083, 0.0639133229529901, 0.06955197700381686, 0.10676759267748642, 0.11042820716088642, 0.12189147347515301, 0.12723831565926966, 0.1299889001989774, 0.15856742743090813, 0.16294460288605572, 0.17526568776616297, 0.18313190217442732, 0.19818237049366424, 0.2051698200776125, 0.2234140392549424, 0.22557661575196092, 0.23325382540157508, 0.24272632878986972, 0.2677355789124005, 0.26961608102827483, 0.2723327771560209, 0.2838849238217034, 0.3110066434093784, 0.3204850492503619, 0.3242489208553885, 0.3261202340267171, 0.3419538108173584, 0.36077653751263666, 0.3662387707270556, 0.37142952223799286, 0.3739342735453117, 0.3816105667328741, 0.3878935537487197, 0.4003004221025975, 0.40527121312475006, 0.4233257386571563, 0.454808529100877, 0.45904654530523314, 0.4767598929607979, 0.4818862497761771, 0.4835122127396662, 0.48840380476445205, 0.49346997881851956, 0.5055829134345279, 0.5096475587184862, 0.5355460346714367, 0.5506679981386633, 0.5537155683748481, 0.5558811278910932, 0.5611597024600908, 0.6017430838823248, 0.6086036965610636, 0.6124341648911753, 0.6179953298555498, 0.6214719714446114, 0.6229490226067329, 0.6230747364674994, 0.6262140841270676, 0.6382898144495655, 0.6404266769431961, 0.6408098433696546, 0.6442433059997603, 0.6649202653253814, 0.6671150158690536, 0.6700960311873938, 0.6934092794646858, 0.715545927551773, 0.7157866279988553, 0.7194650879706673, 0.7204069994801902, 0.7341419845009008, 0.7355758878330942, 0.7372147956104544, 0.7408130382142839, 0.782769896876621, 0.7899755293337545, 0.7998856223207204, 0.8136859987131889, 0.8392010754973859, 0.85350517453068, 0.8543533066150426, 0.8686804832330532, 0.8711885240578958, 0.887132895264158, 0.8897792464320593, 0.9067714007439831, 0.9232108585117856, 0.9397683767912604, 0.9653060322867386, 0.9711215074309083, 0.9781271369870336, 1.0015277239896265, 1.0249338830634431, 1.0952567809664036 ], "y": [ 0.1191803185843851, 0.049811093885267915, 0.06154022649514988, 0.0013762966927779747, 0.33011327978584265, 0.0028016920574798175, -0.018016182333556743, -0.13475603292238464, 0.016424942045166105, 0.06316524913103082, 0.02166744082832109, 0.09766151574695812, 0.09090549793114422, 0.06689146678957547, 0.16179459444413052, 0.12443357341669295, 0.1631650247912569, 0.038855113399051414, 0.12841036368335207, 0.183214077336861, 0.39570107775443547, 0.1073633367019008, 0.11826487922134708, 0.17029988799114418, 0.15250691605270672, 0.1178555476891144, 0.1994147735064709, 0.13600793661464475, 0.18074037888883446, 0.02869848500206705, 0.12300210634145065, 0.14017714839182097, 0.14079634648627437, 0.25920963900419897, 0.19998893320546, 0.17214220553933704, 0.379565738443743, 0.20399736643110541, 0.3060974115360755, 0.28054457327836957, 0.20658826381454637, 0.24848552557269682, 0.29923855871226346, 0.2803165922239966, 0.3049611492304679, 0.37833477545305483, 0.34762176545168, 0.21952270244910357, 0.5372041316713028, 0.2968889992752433, 0.4042488451359492, 0.4364238516121898, 0.3705794138731636, 0.280307274231896, 0.3292219792574228, 0.3083241905997943, 0.28663423553925, 0.2723642427956192, 0.30852468552248574, 0.31176076624427695, 0.23856588303835238, 0.2660273570908446, 0.3370976037894936, 0.11549407224434381, 0.2428781567635641, 0.09011049604729682, 0.31525652377686375, 0.21342624029812785, 0.16797962931678445, 0.05561311952347106, 0.17480132891284392, 0.18533435819326427, 0.11241160294394752, 0.13096888739516416, 0.16147029490348405, 0.16854889154648367, 0.15338038067836843, 0.17324006390595226, 0.33435695116865805, 0.2361276238047269, 0.28604075920515304, 0.5441203927673431, 0.5629092927848828, 0.41881491683734573, 0.5460187582043701, 0.496449631739897, 0.5186881585119715, 0.48477066112949485, 0.6269316354967817, 0.5542870819313165, 0.564156339858511, 0.5550855630673031, 0.5067325733222442, 0.5374322541879143, 0.556272268791394, 0.620920077923215, 0.4579706192934344, 0.6083521898108901, 0.7578020505384726, 0.7858166096159729 ], "type": "scatter" }, { "mode": "markers", "name": "y_true", "x": [ -0.2621940268810562, -0.13714701309275049, -0.08784640673486305, -0.030850187819932928, 0.0026945061031015682, 0.00508082404577135, 0.023420285885473083, 0.0639133229529901, 0.06955197700381686, 0.10676759267748642, 0.11042820716088642, 0.12189147347515301, 0.12723831565926966, 0.1299889001989774, 0.15856742743090813, 0.16294460288605572, 0.17526568776616297, 0.18313190217442732, 0.19818237049366424, 0.2051698200776125, 0.2234140392549424, 0.22557661575196092, 0.23325382540157508, 0.24272632878986972, 0.2677355789124005, 0.26961608102827483, 0.2723327771560209, 0.2838849238217034, 0.3110066434093784, 0.3204850492503619, 0.3242489208553885, 0.3261202340267171, 0.3419538108173584, 0.36077653751263666, 0.3662387707270556, 0.37142952223799286, 0.3739342735453117, 0.3816105667328741, 0.3878935537487197, 0.4003004221025975, 0.40527121312475006, 0.4233257386571563, 0.454808529100877, 0.45904654530523314, 0.4767598929607979, 0.4818862497761771, 0.4835122127396662, 0.48840380476445205, 0.49346997881851956, 0.5055829134345279, 0.5096475587184862, 0.5355460346714367, 0.5506679981386633, 0.5537155683748481, 0.5558811278910932, 0.5611597024600908, 0.6017430838823248, 0.6086036965610636, 0.6124341648911753, 0.6179953298555498, 0.6214719714446114, 0.6229490226067329, 0.6230747364674994, 0.6262140841270676, 0.6382898144495655, 0.6404266769431961, 0.6408098433696546, 0.6442433059997603, 0.6649202653253814, 0.6671150158690536, 0.6700960311873938, 0.6934092794646858, 0.715545927551773, 0.7157866279988553, 0.7194650879706673, 0.7204069994801902, 0.7341419845009008, 0.7355758878330942, 0.7372147956104544, 0.7408130382142839, 0.782769896876621, 0.7899755293337545, 0.7998856223207204, 0.8136859987131889, 0.8392010754973859, 0.85350517453068, 0.8543533066150426, 0.8686804832330532, 0.8711885240578958, 0.887132895264158, 0.8897792464320593, 0.9067714007439831, 0.9232108585117856, 0.9397683767912604, 0.9653060322867386, 0.9711215074309083, 0.9781271369870336, 1.0015277239896265, 1.0249338830634431, 1.0952567809664036 ], "y": [ 0.12731633461957972, 0.01934914913687403, 0.014031043165993995, 0.004811305448886617, 0.00014010838617521914, 0.0003642268487549952, 0.0038455225428482725, 0.021261612046873164, 0.024786217800552228, 0.05387724353192527, 0.05715380220194499, 0.06765690752626724, 0.07262281843313775, 0.07517946916146598, 0.1006913079752271, 0.10425563972617358, 0.11351338477929776, 0.11872800628546665, 0.1269653627567095, 0.1299619674077417, 0.13529204628172442, 0.1356947308575982, 0.13676610639503237, 0.13739343584875824, 0.13654656053562622, 0.13640923527251594, 0.1362092347029089, 0.1354662091052353, 0.13653496774795112, 0.1386235014806803, 0.13978326566872012, 0.14043537559103514, 0.1481317622983789, 0.1627886159655451, 0.1681970232999818, 0.1738066943470976, 0.17667313417060482, 0.18607649887824884, 0.19442369801931544, 0.2123899500858094, 0.22004358060334084, 0.24918578549271558, 0.2991806609134927, 0.3052301202270735, 0.32726740754475736, 0.332463028485542, 0.33398445864882254, 0.3381753994992158, 0.34187810913161754, 0.34792559492018255, 0.3490280796288381, 0.34476598660429303, 0.33360402400924616, 0.3306581419427155, 0.32843427982249335, 0.32258336453097347, 0.263732587910332, 0.25279006163216955, 0.2467418646957159, 0.2381135132305177, 0.23284547762697, 0.23064304617608333, 0.2304566590082362, 0.22586012993529403, 0.20942491097673627, 0.2067582262199809, 0.20628860404375, 0.20220067718166967, 0.18266612305959162, 0.181140872469366, 0.17924179015573047, 0.17081438909057495, 0.16975671423396294, 0.16974812143126178, 0.16953249225876094, 0.16944444487106564, 0.1647665626564842, 0.16363190141243594, 0.16207428748120772, 0.15734461213254008, 0.3196978901291103, 0.35039084664540354, 0.38913681984745374, 0.43638078467475583, 0.5019273423481623, 0.5258753717872753, 0.5270113655110031, 0.5416468609082469, 0.5433672244778102, 0.5491753805481521, 0.5493806754702031, 0.5468974903174653, 0.5408694839285411, 0.5351552484130071, 0.5363392015202572, 0.5394948973879891, 0.5451194788480829, 0.5804980008807575, 0.6439697617245795, 0.9672480931765578 ], "type": "scatter" }, { "mode": "lines+markers", "name": "y_hat", "x": [ -0.2621940268810562, -0.13714701309275049, -0.08784640673486305, -0.030850187819932928, 0.0026945061031015682, 0.00508082404577135, 0.023420285885473083, 0.0639133229529901, 0.06955197700381686, 0.10676759267748642, 0.11042820716088642, 0.12189147347515301, 0.12723831565926966, 0.1299889001989774, 0.15856742743090813, 0.16294460288605572, 0.17526568776616297, 0.18313190217442732, 0.19818237049366424, 0.2051698200776125, 0.2234140392549424, 0.22557661575196092, 0.23325382540157508, 0.24272632878986972, 0.2677355789124005, 0.26961608102827483, 0.2723327771560209, 0.2838849238217034, 0.3110066434093784, 0.3204850492503619, 0.3242489208553885, 0.3261202340267171, 0.3419538108173584, 0.36077653751263666, 0.3662387707270556, 0.37142952223799286, 0.3739342735453117, 0.3816105667328741, 0.3878935537487197, 0.4003004221025975, 0.40527121312475006, 0.4233257386571563, 0.454808529100877, 0.45904654530523314, 0.4767598929607979, 0.4818862497761771, 0.4835122127396662, 0.48840380476445205, 0.49346997881851956, 0.5055829134345279, 0.5096475587184862, 0.5355460346714367, 0.5506679981386633, 0.5537155683748481, 0.5558811278910932, 0.5611597024600908, 0.6017430838823248, 0.6086036965610636, 0.6124341648911753, 0.6179953298555498, 0.6214719714446114, 0.6229490226067329, 0.6230747364674994, 0.6262140841270676, 0.6382898144495655, 0.6404266769431961, 0.6408098433696546, 0.6442433059997603, 0.6649202653253814, 0.6671150158690536, 0.6700960311873938, 0.6934092794646858, 0.715545927551773, 0.7157866279988553, 0.7194650879706673, 0.7204069994801902, 0.7341419845009008, 0.7355758878330942, 0.7372147956104544, 0.7408130382142839, 0.782769896876621, 0.7899755293337545, 0.7998856223207204, 0.8136859987131889, 0.8392010754973859, 0.85350517453068, 0.8543533066150426, 0.8686804832330532, 0.8711885240578958, 0.887132895264158, 0.8897792464320593, 0.9067714007439831, 0.9232108585117856, 0.9397683767912604, 0.9653060322867386, 0.9711215074309083, 0.9781271369870336, 1.0015277239896265, 1.0249338830634431, 1.0952567809664036 ], "y": [ 0.06787252233434314, 0.047695862438766445, 0.048760319473612854, 0.04126779838611466, 0.04813440533737548, 0.04851958926650199, 0.05118614819744778, 0.0633491737932311, 0.0661696075593523, 0.08570322219737753, 0.08755366687852134, 0.09335386684166297, 0.09604263125420086, 0.09742661715593806, 0.11179271745573466, 0.11391636515277201, 0.11970717916019982, 0.12321131423024945, 0.1295298032493129, 0.13221434352311134, 0.13817275691733613, 0.13876258024989696, 0.14067156485492419, 0.1426103402020963, 0.14589389929587346, 0.14608936865278316, 0.14638148582330943, 0.14779765751532142, 0.15541516891786267, 0.1603155138229507, 0.16261756342460332, 0.16383349284657506, 0.17555590031716967, 0.19109215238013788, 0.19554637728499707, 0.199695435647054, 0.20166937351240694, 0.2075439835090508, 0.21222028423149564, 0.22123690699415213, 0.2248717559937352, 0.23897140690815943, 0.2657538313641318, 0.26907304499323964, 0.2814627523531423, 0.28462729437535444, 0.28558630891105463, 0.28835147986801424, 0.2910792748806701, 0.29680697906090536, 0.2984325139357594, 0.30256060931201256, 0.29815551028502296, 0.29665149403368035, 0.29548370257349293, 0.29232592454641376, 0.2661473358626857, 0.26263098737564866, 0.26076379017670936, 0.2581094241137178, 0.2564573987044124, 0.25575738537256526, 0.25569763884756447, 0.25418344285975103, 0.24815763698936763, 0.2470246291878314, 0.2468211826027867, 0.2449458071288157, 0.23244846616123233, 0.23108661780898831, 0.22929099743390224, 0.2198203628926474, 0.2259524421943491, 0.22612809637281833, 0.22916471759204393, 0.23004675494209817, 0.24794513644459049, 0.2504043581651005, 0.2533731551153639, 0.26043290554803644, 0.38812965861479587, 0.41133978998798204, 0.4394693873998863, 0.47044711810970485, 0.5077978469096744, 0.5208825209147679, 0.5215302662195767, 0.5307440145813951, 0.5320798420159841, 0.5390077671694005, 0.5399577512232311, 0.5451840317518408, 0.5496758172493175, 0.5549116774655795, 0.5663186888088688, 0.5696600944572439, 0.5740691191347055, 0.5933196671703038, 0.6220622887876321, 0.7752058942891908 ], "type": "scatter" } ], "layout": { "autosize": true, "height": 500, "template": { "data": { "barpolar": [ { "marker": { "line": { "color": "rgb(17,17,17)", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "bar": [ { "error_x": { "color": "#f2f5fa" }, "error_y": { "color": "#f2f5fa" }, "marker": { "line": { "color": "rgb(17,17,17)", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#A2B1C6", "gridcolor": "#506784", "linecolor": "#506784", "minorgridcolor": "#506784", "startlinecolor": "#A2B1C6" }, "baxis": { "endlinecolor": "#A2B1C6", "gridcolor": "#506784", "linecolor": "#506784", "minorgridcolor": "#506784", "startlinecolor": "#A2B1C6" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "contour" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "heatmapgl" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "heatmap" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "histogram2dcontour" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "histogram2d" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "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": { "line": { "color": "#283442" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatter": [ { "marker": { "line": { "color": "#283442" } }, "type": "scatter" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#506784" }, "line": { "color": "rgb(17,17,17)" } }, "header": { "fill": { "color": "#2a3f5f" }, "line": { "color": "rgb(17,17,17)" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#f2f5fa", "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.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.0, "#f0f921" ] ], "sequentialminus": [ [ 0.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.0, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#f2f5fa" }, "geo": { "bgcolor": "rgb(17,17,17)", "lakecolor": "rgb(17,17,17)", "landcolor": "rgb(17,17,17)", "showlakes": true, "showland": true, "subunitcolor": "#506784" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "dark" }, "paper_bgcolor": "rgb(17,17,17)", "plot_bgcolor": "rgb(17,17,17)", "polar": { "angularaxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" }, "bgcolor": "rgb(17,17,17)", "radialaxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3" }, "yaxis": { "backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3" }, "zaxis": { "backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3" } }, "shapedefaults": { "line": { "color": "#f2f5fa" } }, "sliderdefaults": { "bgcolor": "#C8D4E3", "bordercolor": "rgb(17,17,17)", "borderwidth": 1, "tickwidth": 0 }, "ternary": { "aaxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" }, "baxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" }, "bgcolor": "rgb(17,17,17)", "caxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" } }, "title": { "x": 0.05 }, "updatemenudefaults": { "bgcolor": "#506784", "borderwidth": 0 }, "xaxis": { "automargin": true, "gridcolor": "#283442", "linecolor": "#506784", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#283442", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "#283442", "linecolor": "#506784", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#283442", "zerolinewidth": 2 } } }, "title": { "text": "Regression with size_neighborhood=100" } }, "config": { "showLink": false, "linkText": "Export to plot.ly", "plotlyServerURL": "https://plot.ly" } }, "text/html": "
" }, "metadata": {}, "output_type": "display_data" } ], "source": [ "rsklpr = Rsklpr(size_neighborhood=100)\n", "y_hat = rsklpr(x=x, y=y)\n", "plot_results_1d(\n", " x_=x,\n", " y_=y,\n", " y_true_=y_true,\n", " estimates_=pd.DataFrame(data=y_hat, columns=[\"y_hat\"], index=x),\n", " title=\"Regression with size_neighborhood=100\",\n", ")" ], "metadata": { "collapsed": false, "ExecuteTime": { "end_time": "2024-03-23T15:13:54.940125Z", "start_time": "2024-03-23T15:13:54.842198Z" } }, "id": "b80070becd456e20" }, { "cell_type": "markdown", "source": [ "## Metrics ##\n", "There are also metrics provided to help with evaluating the quality of fit such as the residuals and local R-Squared statistics. There are additional metrics available which are described in more detail in the documentation. " ], "metadata": { "collapsed": false }, "id": "2e6f4a25882df34" }, { "cell_type": "code", "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "data": [ { "mode": "markers", "name": "data", "x": [ -0.2621940268810562, -0.13714701309275049, -0.08784640673486305, -0.030850187819932928, 0.0026945061031015682, 0.00508082404577135, 0.023420285885473083, 0.0639133229529901, 0.06955197700381686, 0.10676759267748642, 0.11042820716088642, 0.12189147347515301, 0.12723831565926966, 0.1299889001989774, 0.15856742743090813, 0.16294460288605572, 0.17526568776616297, 0.18313190217442732, 0.19818237049366424, 0.2051698200776125, 0.2234140392549424, 0.22557661575196092, 0.23325382540157508, 0.24272632878986972, 0.2677355789124005, 0.26961608102827483, 0.2723327771560209, 0.2838849238217034, 0.3110066434093784, 0.3204850492503619, 0.3242489208553885, 0.3261202340267171, 0.3419538108173584, 0.36077653751263666, 0.3662387707270556, 0.37142952223799286, 0.3739342735453117, 0.3816105667328741, 0.3878935537487197, 0.4003004221025975, 0.40527121312475006, 0.4233257386571563, 0.454808529100877, 0.45904654530523314, 0.4767598929607979, 0.4818862497761771, 0.4835122127396662, 0.48840380476445205, 0.49346997881851956, 0.5055829134345279, 0.5096475587184862, 0.5355460346714367, 0.5506679981386633, 0.5537155683748481, 0.5558811278910932, 0.5611597024600908, 0.6017430838823248, 0.6086036965610636, 0.6124341648911753, 0.6179953298555498, 0.6214719714446114, 0.6229490226067329, 0.6230747364674994, 0.6262140841270676, 0.6382898144495655, 0.6404266769431961, 0.6408098433696546, 0.6442433059997603, 0.6649202653253814, 0.6671150158690536, 0.6700960311873938, 0.6934092794646858, 0.715545927551773, 0.7157866279988553, 0.7194650879706673, 0.7204069994801902, 0.7341419845009008, 0.7355758878330942, 0.7372147956104544, 0.7408130382142839, 0.782769896876621, 0.7899755293337545, 0.7998856223207204, 0.8136859987131889, 0.8392010754973859, 0.85350517453068, 0.8543533066150426, 0.8686804832330532, 0.8711885240578958, 0.887132895264158, 0.8897792464320593, 0.9067714007439831, 0.9232108585117856, 0.9397683767912604, 0.9653060322867386, 0.9711215074309083, 0.9781271369870336, 1.0015277239896265, 1.0249338830634431, 1.0952567809664036 ], "y": [ 0.1191803185843851, 0.049811093885267915, 0.06154022649514988, 0.0013762966927779747, 0.33011327978584265, 0.0028016920574798175, -0.018016182333556743, -0.13475603292238464, 0.016424942045166105, 0.06316524913103082, 0.02166744082832109, 0.09766151574695812, 0.09090549793114422, 0.06689146678957547, 0.16179459444413052, 0.12443357341669295, 0.1631650247912569, 0.038855113399051414, 0.12841036368335207, 0.183214077336861, 0.39570107775443547, 0.1073633367019008, 0.11826487922134708, 0.17029988799114418, 0.15250691605270672, 0.1178555476891144, 0.1994147735064709, 0.13600793661464475, 0.18074037888883446, 0.02869848500206705, 0.12300210634145065, 0.14017714839182097, 0.14079634648627437, 0.25920963900419897, 0.19998893320546, 0.17214220553933704, 0.379565738443743, 0.20399736643110541, 0.3060974115360755, 0.28054457327836957, 0.20658826381454637, 0.24848552557269682, 0.29923855871226346, 0.2803165922239966, 0.3049611492304679, 0.37833477545305483, 0.34762176545168, 0.21952270244910357, 0.5372041316713028, 0.2968889992752433, 0.4042488451359492, 0.4364238516121898, 0.3705794138731636, 0.280307274231896, 0.3292219792574228, 0.3083241905997943, 0.28663423553925, 0.2723642427956192, 0.30852468552248574, 0.31176076624427695, 0.23856588303835238, 0.2660273570908446, 0.3370976037894936, 0.11549407224434381, 0.2428781567635641, 0.09011049604729682, 0.31525652377686375, 0.21342624029812785, 0.16797962931678445, 0.05561311952347106, 0.17480132891284392, 0.18533435819326427, 0.11241160294394752, 0.13096888739516416, 0.16147029490348405, 0.16854889154648367, 0.15338038067836843, 0.17324006390595226, 0.33435695116865805, 0.2361276238047269, 0.28604075920515304, 0.5441203927673431, 0.5629092927848828, 0.41881491683734573, 0.5460187582043701, 0.496449631739897, 0.5186881585119715, 0.48477066112949485, 0.6269316354967817, 0.5542870819313165, 0.564156339858511, 0.5550855630673031, 0.5067325733222442, 0.5374322541879143, 0.556272268791394, 0.620920077923215, 0.4579706192934344, 0.6083521898108901, 0.7578020505384726, 0.7858166096159729 ], "type": "scatter" }, { "mode": "markers", "name": "y_hat", "x": [ -0.2621940268810562, -0.13714701309275049, -0.08784640673486305, -0.030850187819932928, 0.0026945061031015682, 0.00508082404577135, 0.023420285885473083, 0.0639133229529901, 0.06955197700381686, 0.10676759267748642, 0.11042820716088642, 0.12189147347515301, 0.12723831565926966, 0.1299889001989774, 0.15856742743090813, 0.16294460288605572, 0.17526568776616297, 0.18313190217442732, 0.19818237049366424, 0.2051698200776125, 0.2234140392549424, 0.22557661575196092, 0.23325382540157508, 0.24272632878986972, 0.2677355789124005, 0.26961608102827483, 0.2723327771560209, 0.2838849238217034, 0.3110066434093784, 0.3204850492503619, 0.3242489208553885, 0.3261202340267171, 0.3419538108173584, 0.36077653751263666, 0.3662387707270556, 0.37142952223799286, 0.3739342735453117, 0.3816105667328741, 0.3878935537487197, 0.4003004221025975, 0.40527121312475006, 0.4233257386571563, 0.454808529100877, 0.45904654530523314, 0.4767598929607979, 0.4818862497761771, 0.4835122127396662, 0.48840380476445205, 0.49346997881851956, 0.5055829134345279, 0.5096475587184862, 0.5355460346714367, 0.5506679981386633, 0.5537155683748481, 0.5558811278910932, 0.5611597024600908, 0.6017430838823248, 0.6086036965610636, 0.6124341648911753, 0.6179953298555498, 0.6214719714446114, 0.6229490226067329, 0.6230747364674994, 0.6262140841270676, 0.6382898144495655, 0.6404266769431961, 0.6408098433696546, 0.6442433059997603, 0.6649202653253814, 0.6671150158690536, 0.6700960311873938, 0.6934092794646858, 0.715545927551773, 0.7157866279988553, 0.7194650879706673, 0.7204069994801902, 0.7341419845009008, 0.7355758878330942, 0.7372147956104544, 0.7408130382142839, 0.782769896876621, 0.7899755293337545, 0.7998856223207204, 0.8136859987131889, 0.8392010754973859, 0.85350517453068, 0.8543533066150426, 0.8686804832330532, 0.8711885240578958, 0.887132895264158, 0.8897792464320593, 0.9067714007439831, 0.9232108585117856, 0.9397683767912604, 0.9653060322867386, 0.9711215074309083, 0.9781271369870336, 1.0015277239896265, 1.0249338830634431, 1.0952567809664036 ], "y": [ 0.09135400547551437, 0.04422993937142681, 0.05102530926733128, 0.028641119965564572, 0.046392151997483595, 0.04560456290973861, 0.03383535868268836, 0.01568286208603442, 0.021933268449113055, 0.06715930957134757, 0.06962592453215045, 0.07491659600638631, 0.07900177958373568, 0.08124979624860468, 0.1087017543480473, 0.11126205980620626, 0.11495885287459556, 0.11803902510400256, 0.12761335257432324, 0.1325266253279865, 0.14276277607319904, 0.14306801680155415, 0.14408532919548858, 0.14570383267996942, 0.15004496246695487, 0.15029656909171896, 0.1507192734528665, 0.1521958246055886, 0.15674528433195203, 0.1586699177686947, 0.15992086577720827, 0.16090518523835828, 0.18206413948390898, 0.21361728608735103, 0.22016208720849992, 0.22608286514800946, 0.22864760386756458, 0.23300249773237763, 0.23817425585128146, 0.2427057787112905, 0.24474903851933108, 0.250869243495662, 0.29009057296170504, 0.29299757398395726, 0.3051949769675246, 0.3087899468588677, 0.31066354118137984, 0.3130856506915436, 0.314869237439778, 0.3204785192059533, 0.3228447411209905, 0.32673914219521644, 0.31262809367340383, 0.3111082969340659, 0.31014515983081964, 0.30813264827859704, 0.2845783286506485, 0.2793288044447038, 0.2770348545951371, 0.2703889415830891, 0.26546442423432365, 0.26328119293392493, 0.26309197866495304, 0.258063691644252, 0.24151431034144094, 0.23806400367615183, 0.23746088486592834, 0.23392096092424405, 0.1856840426492283, 0.18192416066834677, 0.1783732452288143, 0.17279451094068893, 0.16624055603454813, 0.16632070587228337, 0.16799590827123637, 0.1685113913149056, 0.1921836175632012, 0.19399848784683993, 0.19617394629940293, 0.20073497553488837, 0.40516113897018263, 0.4250353255289453, 0.4416075058525506, 0.4637164833602415, 0.50852375935127, 0.5199009014655996, 0.5204442547560209, 0.5288419285075108, 0.5306145754466257, 0.5401284979623758, 0.5413940660575381, 0.546861494737608, 0.550615213489344, 0.5586836923271102, 0.5782205943216849, 0.5828328117730394, 0.5886184153085319, 0.6239338400912243, 0.6815559098601325, 0.7850575525751163 ], "type": "scatter" }, { "mode": "markers", "name": "residuals", "x": [ -0.2621940268810562, -0.13714701309275049, -0.08784640673486305, -0.030850187819932928, 0.0026945061031015682, 0.00508082404577135, 0.023420285885473083, 0.0639133229529901, 0.06955197700381686, 0.10676759267748642, 0.11042820716088642, 0.12189147347515301, 0.12723831565926966, 0.1299889001989774, 0.15856742743090813, 0.16294460288605572, 0.17526568776616297, 0.18313190217442732, 0.19818237049366424, 0.2051698200776125, 0.2234140392549424, 0.22557661575196092, 0.23325382540157508, 0.24272632878986972, 0.2677355789124005, 0.26961608102827483, 0.2723327771560209, 0.2838849238217034, 0.3110066434093784, 0.3204850492503619, 0.3242489208553885, 0.3261202340267171, 0.3419538108173584, 0.36077653751263666, 0.3662387707270556, 0.37142952223799286, 0.3739342735453117, 0.3816105667328741, 0.3878935537487197, 0.4003004221025975, 0.40527121312475006, 0.4233257386571563, 0.454808529100877, 0.45904654530523314, 0.4767598929607979, 0.4818862497761771, 0.4835122127396662, 0.48840380476445205, 0.49346997881851956, 0.5055829134345279, 0.5096475587184862, 0.5355460346714367, 0.5506679981386633, 0.5537155683748481, 0.5558811278910932, 0.5611597024600908, 0.6017430838823248, 0.6086036965610636, 0.6124341648911753, 0.6179953298555498, 0.6214719714446114, 0.6229490226067329, 0.6230747364674994, 0.6262140841270676, 0.6382898144495655, 0.6404266769431961, 0.6408098433696546, 0.6442433059997603, 0.6649202653253814, 0.6671150158690536, 0.6700960311873938, 0.6934092794646858, 0.715545927551773, 0.7157866279988553, 0.7194650879706673, 0.7204069994801902, 0.7341419845009008, 0.7355758878330942, 0.7372147956104544, 0.7408130382142839, 0.782769896876621, 0.7899755293337545, 0.7998856223207204, 0.8136859987131889, 0.8392010754973859, 0.85350517453068, 0.8543533066150426, 0.8686804832330532, 0.8711885240578958, 0.887132895264158, 0.8897792464320593, 0.9067714007439831, 0.9232108585117856, 0.9397683767912604, 0.9653060322867386, 0.9711215074309083, 0.9781271369870336, 1.0015277239896265, 1.0249338830634431, 1.0952567809664036 ], "y": [ -0.027826313108870737, -0.0055811545138411064, -0.010514917227818603, 0.0272648232727866, -0.28372112778835906, 0.0428028708522588, 0.051851541016245103, 0.15043889500841906, 0.00550832640394695, 0.003994060440316749, 0.047958483703829366, -0.022744919740571815, -0.01190371834740854, 0.014358329459029207, -0.05309284009608323, -0.013171513610486685, -0.04820617191666135, 0.07918391170495115, -0.0007970111090288279, -0.05068745200887448, -0.25293830168123643, 0.035704680099653344, 0.0258204499741415, -0.024596055311174758, -0.0024619535857518526, 0.03244102140260456, -0.0486955000536044, 0.01618788799094384, -0.023995094556882424, 0.12997143276662765, 0.03691875943575762, 0.020728036846537318, 0.04126779299763461, -0.045592352916847934, 0.020173154003039928, 0.05394065960867242, -0.1509181345761784, 0.02900513130127222, -0.06792315568479404, -0.03783879456707906, 0.03816077470478471, 0.002383717922965156, -0.009147985750558418, 0.012680981759960686, 0.00023382773705671323, -0.06954482859418715, -0.036958224270300155, 0.09356294824244002, -0.22233489423152475, 0.023589519930710012, -0.08140410401495873, -0.10968470941697334, -0.05795132019975979, 0.03080102270216989, -0.019076819426603164, -0.00019154232119727999, -0.0020559068886014664, 0.0069645616490846, -0.03148983092734864, -0.04137182466118783, 0.026898541195971265, -0.0027461641569196393, -0.07400562512454056, 0.1425696193999082, -0.0013638464221231716, 0.147953507628855, -0.07779563891093541, 0.02049472062611621, 0.017704413332443852, 0.1263110411448757, 0.0035719163159703693, -0.012539847252575342, 0.05382895309060061, 0.03535181847711921, 0.006525613367752314, -3.750023157805815e-05, 0.03880323688483278, 0.02075842394088767, -0.1381830048692551, -0.03539264826983854, 0.1191203797650296, -0.11908506723839785, -0.12130178693233218, 0.044901566522895786, -0.03749499885310004, 0.02345126972570266, 0.0017560962440493766, 0.04407126737801592, -0.09631706005015594, -0.014158583968940652, -0.022762273800972843, -0.008224068329695022, 0.04388264016709975, 0.021251438139195944, 0.021948325530290913, -0.03808726615017566, 0.13064779601509746, 0.015581650280334203, -0.07624614067834012, -0.0007590570408565478 ], "type": "scatter" } ], "layout": { "autosize": true, "height": 500, "template": { "data": { "barpolar": [ { "marker": { "line": { "color": "rgb(17,17,17)", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "bar": [ { "error_x": { "color": "#f2f5fa" }, "error_y": { "color": "#f2f5fa" }, "marker": { "line": { "color": "rgb(17,17,17)", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#A2B1C6", "gridcolor": "#506784", "linecolor": "#506784", "minorgridcolor": "#506784", "startlinecolor": "#A2B1C6" }, "baxis": { "endlinecolor": "#A2B1C6", "gridcolor": "#506784", "linecolor": "#506784", "minorgridcolor": "#506784", "startlinecolor": "#A2B1C6" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "contour" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "heatmapgl" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "heatmap" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "histogram2dcontour" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "histogram2d" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "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": { "line": { "color": "#283442" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatter": [ { "marker": { "line": { "color": "#283442" } }, "type": "scatter" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#506784" }, "line": { "color": "rgb(17,17,17)" } }, "header": { "fill": { "color": "#2a3f5f" }, "line": { "color": "rgb(17,17,17)" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#f2f5fa", "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.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.0, "#f0f921" ] ], "sequentialminus": [ [ 0.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.0, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#f2f5fa" }, "geo": { "bgcolor": "rgb(17,17,17)", "lakecolor": "rgb(17,17,17)", "landcolor": "rgb(17,17,17)", "showlakes": true, "showland": true, "subunitcolor": "#506784" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "dark" }, "paper_bgcolor": "rgb(17,17,17)", "plot_bgcolor": "rgb(17,17,17)", "polar": { "angularaxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" }, "bgcolor": "rgb(17,17,17)", "radialaxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3" }, "yaxis": { "backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3" }, "zaxis": { "backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3" } }, "shapedefaults": { "line": { "color": "#f2f5fa" } }, "sliderdefaults": { "bgcolor": "#C8D4E3", "bordercolor": "rgb(17,17,17)", "borderwidth": 1, "tickwidth": 0 }, "ternary": { "aaxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" }, "baxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" }, "bgcolor": "rgb(17,17,17)", "caxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" } }, "title": { "x": 0.05 }, "updatemenudefaults": { "bgcolor": "#506784", "borderwidth": 0 }, "xaxis": { "automargin": true, "gridcolor": "#283442", "linecolor": "#506784", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#283442", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "#283442", "linecolor": "#506784", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#283442", "zerolinewidth": 2 } } }, "title": { "text": "Regression residuals with size_neighborhood=35" } }, "config": { "showLink": false, "linkText": "Export to plot.ly", "plotlyServerURL": "https://plot.ly" } }, "text/html": "
" }, "metadata": {}, "output_type": "display_data" } ], "source": [ "rsklpr = Rsklpr(size_neighborhood=35)\n", "y_hat = rsklpr(x=x, y=y, metrics=[\"residuals\", \"r_squared\"])\n", "\n", "plot_results_1d(\n", " x_=x,\n", " y_=y,\n", " estimates_=pd.DataFrame(\n", " data=np.concatenate([y_hat.reshape((-1, 1)), rsklpr.residuals.reshape((-1, 1))], axis=1),\n", " columns=[\"y_hat\", \"residuals\"],\n", " index=x,\n", " ),\n", " title=\"Regression residuals with size_neighborhood=35\",\n", " estimates_mode=\"markers\",\n", ")" ], "metadata": { "collapsed": false, "ExecuteTime": { "end_time": "2024-03-23T15:13:55.030463Z", "start_time": "2024-03-23T15:13:54.941517Z" } }, "id": "f3c661be27df8770", "execution_count": 8 }, { "cell_type": "code", "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "data": [ { "mode": "markers", "name": "data", "x": [ -0.2621940268810562, -0.13714701309275049, -0.08784640673486305, -0.030850187819932928, 0.0026945061031015682, 0.00508082404577135, 0.023420285885473083, 0.0639133229529901, 0.06955197700381686, 0.10676759267748642, 0.11042820716088642, 0.12189147347515301, 0.12723831565926966, 0.1299889001989774, 0.15856742743090813, 0.16294460288605572, 0.17526568776616297, 0.18313190217442732, 0.19818237049366424, 0.2051698200776125, 0.2234140392549424, 0.22557661575196092, 0.23325382540157508, 0.24272632878986972, 0.2677355789124005, 0.26961608102827483, 0.2723327771560209, 0.2838849238217034, 0.3110066434093784, 0.3204850492503619, 0.3242489208553885, 0.3261202340267171, 0.3419538108173584, 0.36077653751263666, 0.3662387707270556, 0.37142952223799286, 0.3739342735453117, 0.3816105667328741, 0.3878935537487197, 0.4003004221025975, 0.40527121312475006, 0.4233257386571563, 0.454808529100877, 0.45904654530523314, 0.4767598929607979, 0.4818862497761771, 0.4835122127396662, 0.48840380476445205, 0.49346997881851956, 0.5055829134345279, 0.5096475587184862, 0.5355460346714367, 0.5506679981386633, 0.5537155683748481, 0.5558811278910932, 0.5611597024600908, 0.6017430838823248, 0.6086036965610636, 0.6124341648911753, 0.6179953298555498, 0.6214719714446114, 0.6229490226067329, 0.6230747364674994, 0.6262140841270676, 0.6382898144495655, 0.6404266769431961, 0.6408098433696546, 0.6442433059997603, 0.6649202653253814, 0.6671150158690536, 0.6700960311873938, 0.6934092794646858, 0.715545927551773, 0.7157866279988553, 0.7194650879706673, 0.7204069994801902, 0.7341419845009008, 0.7355758878330942, 0.7372147956104544, 0.7408130382142839, 0.782769896876621, 0.7899755293337545, 0.7998856223207204, 0.8136859987131889, 0.8392010754973859, 0.85350517453068, 0.8543533066150426, 0.8686804832330532, 0.8711885240578958, 0.887132895264158, 0.8897792464320593, 0.9067714007439831, 0.9232108585117856, 0.9397683767912604, 0.9653060322867386, 0.9711215074309083, 0.9781271369870336, 1.0015277239896265, 1.0249338830634431, 1.0952567809664036 ], "y": [ 0.1191803185843851, 0.049811093885267915, 0.06154022649514988, 0.0013762966927779747, 0.33011327978584265, 0.0028016920574798175, -0.018016182333556743, -0.13475603292238464, 0.016424942045166105, 0.06316524913103082, 0.02166744082832109, 0.09766151574695812, 0.09090549793114422, 0.06689146678957547, 0.16179459444413052, 0.12443357341669295, 0.1631650247912569, 0.038855113399051414, 0.12841036368335207, 0.183214077336861, 0.39570107775443547, 0.1073633367019008, 0.11826487922134708, 0.17029988799114418, 0.15250691605270672, 0.1178555476891144, 0.1994147735064709, 0.13600793661464475, 0.18074037888883446, 0.02869848500206705, 0.12300210634145065, 0.14017714839182097, 0.14079634648627437, 0.25920963900419897, 0.19998893320546, 0.17214220553933704, 0.379565738443743, 0.20399736643110541, 0.3060974115360755, 0.28054457327836957, 0.20658826381454637, 0.24848552557269682, 0.29923855871226346, 0.2803165922239966, 0.3049611492304679, 0.37833477545305483, 0.34762176545168, 0.21952270244910357, 0.5372041316713028, 0.2968889992752433, 0.4042488451359492, 0.4364238516121898, 0.3705794138731636, 0.280307274231896, 0.3292219792574228, 0.3083241905997943, 0.28663423553925, 0.2723642427956192, 0.30852468552248574, 0.31176076624427695, 0.23856588303835238, 0.2660273570908446, 0.3370976037894936, 0.11549407224434381, 0.2428781567635641, 0.09011049604729682, 0.31525652377686375, 0.21342624029812785, 0.16797962931678445, 0.05561311952347106, 0.17480132891284392, 0.18533435819326427, 0.11241160294394752, 0.13096888739516416, 0.16147029490348405, 0.16854889154648367, 0.15338038067836843, 0.17324006390595226, 0.33435695116865805, 0.2361276238047269, 0.28604075920515304, 0.5441203927673431, 0.5629092927848828, 0.41881491683734573, 0.5460187582043701, 0.496449631739897, 0.5186881585119715, 0.48477066112949485, 0.6269316354967817, 0.5542870819313165, 0.564156339858511, 0.5550855630673031, 0.5067325733222442, 0.5374322541879143, 0.556272268791394, 0.620920077923215, 0.4579706192934344, 0.6083521898108901, 0.7578020505384726, 0.7858166096159729 ], "type": "scatter" }, { "mode": "markers", "name": "y_true", "x": [ -0.2621940268810562, -0.13714701309275049, -0.08784640673486305, -0.030850187819932928, 0.0026945061031015682, 0.00508082404577135, 0.023420285885473083, 0.0639133229529901, 0.06955197700381686, 0.10676759267748642, 0.11042820716088642, 0.12189147347515301, 0.12723831565926966, 0.1299889001989774, 0.15856742743090813, 0.16294460288605572, 0.17526568776616297, 0.18313190217442732, 0.19818237049366424, 0.2051698200776125, 0.2234140392549424, 0.22557661575196092, 0.23325382540157508, 0.24272632878986972, 0.2677355789124005, 0.26961608102827483, 0.2723327771560209, 0.2838849238217034, 0.3110066434093784, 0.3204850492503619, 0.3242489208553885, 0.3261202340267171, 0.3419538108173584, 0.36077653751263666, 0.3662387707270556, 0.37142952223799286, 0.3739342735453117, 0.3816105667328741, 0.3878935537487197, 0.4003004221025975, 0.40527121312475006, 0.4233257386571563, 0.454808529100877, 0.45904654530523314, 0.4767598929607979, 0.4818862497761771, 0.4835122127396662, 0.48840380476445205, 0.49346997881851956, 0.5055829134345279, 0.5096475587184862, 0.5355460346714367, 0.5506679981386633, 0.5537155683748481, 0.5558811278910932, 0.5611597024600908, 0.6017430838823248, 0.6086036965610636, 0.6124341648911753, 0.6179953298555498, 0.6214719714446114, 0.6229490226067329, 0.6230747364674994, 0.6262140841270676, 0.6382898144495655, 0.6404266769431961, 0.6408098433696546, 0.6442433059997603, 0.6649202653253814, 0.6671150158690536, 0.6700960311873938, 0.6934092794646858, 0.715545927551773, 0.7157866279988553, 0.7194650879706673, 0.7204069994801902, 0.7341419845009008, 0.7355758878330942, 0.7372147956104544, 0.7408130382142839, 0.782769896876621, 0.7899755293337545, 0.7998856223207204, 0.8136859987131889, 0.8392010754973859, 0.85350517453068, 0.8543533066150426, 0.8686804832330532, 0.8711885240578958, 0.887132895264158, 0.8897792464320593, 0.9067714007439831, 0.9232108585117856, 0.9397683767912604, 0.9653060322867386, 0.9711215074309083, 0.9781271369870336, 1.0015277239896265, 1.0249338830634431, 1.0952567809664036 ], "y": [ 0.12731633461957972, 0.01934914913687403, 0.014031043165993995, 0.004811305448886617, 0.00014010838617521914, 0.0003642268487549952, 0.0038455225428482725, 0.021261612046873164, 0.024786217800552228, 0.05387724353192527, 0.05715380220194499, 0.06765690752626724, 0.07262281843313775, 0.07517946916146598, 0.1006913079752271, 0.10425563972617358, 0.11351338477929776, 0.11872800628546665, 0.1269653627567095, 0.1299619674077417, 0.13529204628172442, 0.1356947308575982, 0.13676610639503237, 0.13739343584875824, 0.13654656053562622, 0.13640923527251594, 0.1362092347029089, 0.1354662091052353, 0.13653496774795112, 0.1386235014806803, 0.13978326566872012, 0.14043537559103514, 0.1481317622983789, 0.1627886159655451, 0.1681970232999818, 0.1738066943470976, 0.17667313417060482, 0.18607649887824884, 0.19442369801931544, 0.2123899500858094, 0.22004358060334084, 0.24918578549271558, 0.2991806609134927, 0.3052301202270735, 0.32726740754475736, 0.332463028485542, 0.33398445864882254, 0.3381753994992158, 0.34187810913161754, 0.34792559492018255, 0.3490280796288381, 0.34476598660429303, 0.33360402400924616, 0.3306581419427155, 0.32843427982249335, 0.32258336453097347, 0.263732587910332, 0.25279006163216955, 0.2467418646957159, 0.2381135132305177, 0.23284547762697, 0.23064304617608333, 0.2304566590082362, 0.22586012993529403, 0.20942491097673627, 0.2067582262199809, 0.20628860404375, 0.20220067718166967, 0.18266612305959162, 0.181140872469366, 0.17924179015573047, 0.17081438909057495, 0.16975671423396294, 0.16974812143126178, 0.16953249225876094, 0.16944444487106564, 0.1647665626564842, 0.16363190141243594, 0.16207428748120772, 0.15734461213254008, 0.3196978901291103, 0.35039084664540354, 0.38913681984745374, 0.43638078467475583, 0.5019273423481623, 0.5258753717872753, 0.5270113655110031, 0.5416468609082469, 0.5433672244778102, 0.5491753805481521, 0.5493806754702031, 0.5468974903174653, 0.5408694839285411, 0.5351552484130071, 0.5363392015202572, 0.5394948973879891, 0.5451194788480829, 0.5804980008807575, 0.6439697617245795, 0.9672480931765578 ], "type": "scatter" }, { "mode": "markers", "name": "y_hat", "x": [ -0.2621940268810562, -0.13714701309275049, -0.08784640673486305, -0.030850187819932928, 0.0026945061031015682, 0.00508082404577135, 0.023420285885473083, 0.0639133229529901, 0.06955197700381686, 0.10676759267748642, 0.11042820716088642, 0.12189147347515301, 0.12723831565926966, 0.1299889001989774, 0.15856742743090813, 0.16294460288605572, 0.17526568776616297, 0.18313190217442732, 0.19818237049366424, 0.2051698200776125, 0.2234140392549424, 0.22557661575196092, 0.23325382540157508, 0.24272632878986972, 0.2677355789124005, 0.26961608102827483, 0.2723327771560209, 0.2838849238217034, 0.3110066434093784, 0.3204850492503619, 0.3242489208553885, 0.3261202340267171, 0.3419538108173584, 0.36077653751263666, 0.3662387707270556, 0.37142952223799286, 0.3739342735453117, 0.3816105667328741, 0.3878935537487197, 0.4003004221025975, 0.40527121312475006, 0.4233257386571563, 0.454808529100877, 0.45904654530523314, 0.4767598929607979, 0.4818862497761771, 0.4835122127396662, 0.48840380476445205, 0.49346997881851956, 0.5055829134345279, 0.5096475587184862, 0.5355460346714367, 0.5506679981386633, 0.5537155683748481, 0.5558811278910932, 0.5611597024600908, 0.6017430838823248, 0.6086036965610636, 0.6124341648911753, 0.6179953298555498, 0.6214719714446114, 0.6229490226067329, 0.6230747364674994, 0.6262140841270676, 0.6382898144495655, 0.6404266769431961, 0.6408098433696546, 0.6442433059997603, 0.6649202653253814, 0.6671150158690536, 0.6700960311873938, 0.6934092794646858, 0.715545927551773, 0.7157866279988553, 0.7194650879706673, 0.7204069994801902, 0.7341419845009008, 0.7355758878330942, 0.7372147956104544, 0.7408130382142839, 0.782769896876621, 0.7899755293337545, 0.7998856223207204, 0.8136859987131889, 0.8392010754973859, 0.85350517453068, 0.8543533066150426, 0.8686804832330532, 0.8711885240578958, 0.887132895264158, 0.8897792464320593, 0.9067714007439831, 0.9232108585117856, 0.9397683767912604, 0.9653060322867386, 0.9711215074309083, 0.9781271369870336, 1.0015277239896265, 1.0249338830634431, 1.0952567809664036 ], "y": [ 0.09135400547551437, 0.04422993937142681, 0.05102530926733128, 0.028641119965564572, 0.046392151997483595, 0.04560456290973861, 0.03383535868268836, 0.01568286208603442, 0.021933268449113055, 0.06715930957134757, 0.06962592453215045, 0.07491659600638631, 0.07900177958373568, 0.08124979624860468, 0.1087017543480473, 0.11126205980620626, 0.11495885287459556, 0.11803902510400256, 0.12761335257432324, 0.1325266253279865, 0.14276277607319904, 0.14306801680155415, 0.14408532919548858, 0.14570383267996942, 0.15004496246695487, 0.15029656909171896, 0.1507192734528665, 0.1521958246055886, 0.15674528433195203, 0.1586699177686947, 0.15992086577720827, 0.16090518523835828, 0.18206413948390898, 0.21361728608735103, 0.22016208720849992, 0.22608286514800946, 0.22864760386756458, 0.23300249773237763, 0.23817425585128146, 0.2427057787112905, 0.24474903851933108, 0.250869243495662, 0.29009057296170504, 0.29299757398395726, 0.3051949769675246, 0.3087899468588677, 0.31066354118137984, 0.3130856506915436, 0.314869237439778, 0.3204785192059533, 0.3228447411209905, 0.32673914219521644, 0.31262809367340383, 0.3111082969340659, 0.31014515983081964, 0.30813264827859704, 0.2845783286506485, 0.2793288044447038, 0.2770348545951371, 0.2703889415830891, 0.26546442423432365, 0.26328119293392493, 0.26309197866495304, 0.258063691644252, 0.24151431034144094, 0.23806400367615183, 0.23746088486592834, 0.23392096092424405, 0.1856840426492283, 0.18192416066834677, 0.1783732452288143, 0.17279451094068893, 0.16624055603454813, 0.16632070587228337, 0.16799590827123637, 0.1685113913149056, 0.1921836175632012, 0.19399848784683993, 0.19617394629940293, 0.20073497553488837, 0.40516113897018263, 0.4250353255289453, 0.4416075058525506, 0.4637164833602415, 0.50852375935127, 0.5199009014655996, 0.5204442547560209, 0.5288419285075108, 0.5306145754466257, 0.5401284979623758, 0.5413940660575381, 0.546861494737608, 0.550615213489344, 0.5586836923271102, 0.5782205943216849, 0.5828328117730394, 0.5886184153085319, 0.6239338400912243, 0.6815559098601325, 0.7850575525751163 ], "type": "scatter" }, { "mode": "markers", "name": "r_squared", "x": [ -0.2621940268810562, -0.13714701309275049, -0.08784640673486305, -0.030850187819932928, 0.0026945061031015682, 0.00508082404577135, 0.023420285885473083, 0.0639133229529901, 0.06955197700381686, 0.10676759267748642, 0.11042820716088642, 0.12189147347515301, 0.12723831565926966, 0.1299889001989774, 0.15856742743090813, 0.16294460288605572, 0.17526568776616297, 0.18313190217442732, 0.19818237049366424, 0.2051698200776125, 0.2234140392549424, 0.22557661575196092, 0.23325382540157508, 0.24272632878986972, 0.2677355789124005, 0.26961608102827483, 0.2723327771560209, 0.2838849238217034, 0.3110066434093784, 0.3204850492503619, 0.3242489208553885, 0.3261202340267171, 0.3419538108173584, 0.36077653751263666, 0.3662387707270556, 0.37142952223799286, 0.3739342735453117, 0.3816105667328741, 0.3878935537487197, 0.4003004221025975, 0.40527121312475006, 0.4233257386571563, 0.454808529100877, 0.45904654530523314, 0.4767598929607979, 0.4818862497761771, 0.4835122127396662, 0.48840380476445205, 0.49346997881851956, 0.5055829134345279, 0.5096475587184862, 0.5355460346714367, 0.5506679981386633, 0.5537155683748481, 0.5558811278910932, 0.5611597024600908, 0.6017430838823248, 0.6086036965610636, 0.6124341648911753, 0.6179953298555498, 0.6214719714446114, 0.6229490226067329, 0.6230747364674994, 0.6262140841270676, 0.6382898144495655, 0.6404266769431961, 0.6408098433696546, 0.6442433059997603, 0.6649202653253814, 0.6671150158690536, 0.6700960311873938, 0.6934092794646858, 0.715545927551773, 0.7157866279988553, 0.7194650879706673, 0.7204069994801902, 0.7341419845009008, 0.7355758878330942, 0.7372147956104544, 0.7408130382142839, 0.782769896876621, 0.7899755293337545, 0.7998856223207204, 0.8136859987131889, 0.8392010754973859, 0.85350517453068, 0.8543533066150426, 0.8686804832330532, 0.8711885240578958, 0.887132895264158, 0.8897792464320593, 0.9067714007439831, 0.9232108585117856, 0.9397683767912604, 0.9653060322867386, 0.9711215074309083, 0.9781271369870336, 1.0015277239896265, 1.0249338830634431, 1.0952567809664036 ], "y": [ 0.1311969608126019, 0.047720923328644194, 0.08584436997319134, 0.011083933888339392, 0.005930275846856792, 0.006222586904901517, 0.008860336717309458, 0.05917393055696518, 0.08608547622689611, 0.3178216115637861, 0.3266823623428581, 0.36071180609335707, 0.36634376613154795, 0.36908833233841676, 0.32397730356631926, 0.31614581823753785, 0.3082461243434005, 0.2666614233404708, 0.19453841408437966, 0.17228727530601273, 0.11516958001938271, 0.11424256306176961, 0.11527248246911315, 0.12824315509835327, 0.19990607575923258, 0.20175536466912325, 0.203519686740131, 0.20050492808522669, 0.18731232478390947, 0.1703946245166209, 0.1773874290232832, 0.1838809593548354, 0.3595640796269447, 0.4221027721692845, 0.41328766156265306, 0.42232733544404055, 0.42041784565576124, 0.4197907042858473, 0.41575067100865437, 0.4936436449304409, 0.49172162845040235, 0.39230586538883816, 0.046970123273273656, 0.04089835300043421, 0.026909277882459448, 0.012714102043191011, 0.010213380917542092, 0.009268940890792221, 0.002102577803204664, 4.5174562979366506e-05, 9.987696309443628e-05, 0.009926284837893595, 0.008262515565639394, 0.012606503768601729, 0.012067835932718873, 0.03079378864626614, 0.17922377694744962, 0.2050862721692499, 0.23192566306541773, 0.25117011729701255, 0.26238832590089733, 0.26667879765924185, 0.26702832087123973, 0.27562767092381, 0.19702466674131802, 0.19824307619652182, 0.1985123680510078, 0.24499070986557048, 0.12908141129958117, 0.11174534516255741, 0.0949270002026551, 0.08612678018882158, 0.041090457970634264, 0.04137294574987849, 0.04583009171658181, 0.04704358307946144, 0.004897426746783062, 0.003879834879292221, 0.002787967845873429, 0.0011007558913413984, 0.6154877672794901, 0.6046917991336824, 0.568179749970515, 0.41715733843483527, 0.22461254657724516, 0.18937432988730196, 0.18862192730164273, 0.2158238910333925, 0.21419071374698062, 0.2024411502656731, 0.19989210027574378, 0.1885675186257436, 0.1887222632713954, 0.20644336803092123, 0.27341831170390984, 0.2874946487925444, 0.30235121503843987, 0.409113599815887, 0.5931055100692526, 0.7592720613219495 ], "type": "scatter" } ], "layout": { "autosize": true, "height": 500, "template": { "data": { "barpolar": [ { "marker": { "line": { "color": "rgb(17,17,17)", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "bar": [ { "error_x": { "color": "#f2f5fa" }, "error_y": { "color": "#f2f5fa" }, "marker": { "line": { "color": "rgb(17,17,17)", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#A2B1C6", "gridcolor": "#506784", "linecolor": "#506784", "minorgridcolor": "#506784", "startlinecolor": "#A2B1C6" }, "baxis": { "endlinecolor": "#A2B1C6", "gridcolor": "#506784", "linecolor": "#506784", "minorgridcolor": "#506784", "startlinecolor": "#A2B1C6" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "contour" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "heatmapgl" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "heatmap" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "histogram2dcontour" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "histogram2d" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "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": { "line": { "color": "#283442" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatter": [ { "marker": { "line": { "color": "#283442" } }, "type": "scatter" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#506784" }, "line": { "color": "rgb(17,17,17)" } }, "header": { "fill": { "color": "#2a3f5f" }, "line": { "color": "rgb(17,17,17)" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#f2f5fa", "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.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.0, "#f0f921" ] ], "sequentialminus": [ [ 0.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.0, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#f2f5fa" }, "geo": { "bgcolor": "rgb(17,17,17)", "lakecolor": "rgb(17,17,17)", "landcolor": "rgb(17,17,17)", "showlakes": true, "showland": true, "subunitcolor": "#506784" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "dark" }, "paper_bgcolor": "rgb(17,17,17)", "plot_bgcolor": "rgb(17,17,17)", "polar": { "angularaxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" }, "bgcolor": "rgb(17,17,17)", "radialaxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3" }, "yaxis": { "backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3" }, "zaxis": { "backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3" } }, "shapedefaults": { "line": { "color": "#f2f5fa" } }, "sliderdefaults": { "bgcolor": "#C8D4E3", "bordercolor": "rgb(17,17,17)", "borderwidth": 1, "tickwidth": 0 }, "ternary": { "aaxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" }, "baxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" }, "bgcolor": "rgb(17,17,17)", "caxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" } }, "title": { "x": 0.05 }, "updatemenudefaults": { "bgcolor": "#506784", "borderwidth": 0 }, "xaxis": { "automargin": true, "gridcolor": "#283442", "linecolor": "#506784", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#283442", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "#283442", "linecolor": "#506784", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#283442", "zerolinewidth": 2 } } }, "title": { "text": "Regression local r_squared with size_neighborhood=35" } }, "config": { "showLink": false, "linkText": "Export to plot.ly", "plotlyServerURL": "https://plot.ly" } }, "text/html": "
" }, "metadata": {}, "output_type": "display_data" } ], "source": [ "plot_results_1d(\n", " x_=x,\n", " y_=y,\n", " y_true_=y_true,\n", " estimates_=pd.DataFrame(\n", " data=np.concatenate([y_hat.reshape((-1, 1)), rsklpr.r_squared.reshape((-1, 1))], axis=1),\n", " columns=[\"y_hat\", \"r_squared\"],\n", " index=x,\n", " ),\n", " title=\"Regression local r_squared with size_neighborhood=35\",\n", " estimates_mode=\"markers\",\n", ")" ], "metadata": { "collapsed": false, "ExecuteTime": { "end_time": "2024-03-23T15:13:55.057022Z", "start_time": "2024-03-23T15:13:55.031647Z" } }, "id": "3302f934fe171dd7", "execution_count": 9 }, { "cell_type": "markdown", "source": [ "## Predicting in novel locations ##\n", "It is also possible to predict values in locations not present in the original dataset." ], "metadata": { "collapsed": false }, "id": "492d64f8ff01d4cd" }, { "cell_type": "code", "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "data": [ { "mode": "markers", "name": "data", "x": [ -0.2621940268810562, -0.13714701309275049, -0.08784640673486305, -0.030850187819932928, 0.0026945061031015682, 0.00508082404577135, 0.023420285885473083, 0.0639133229529901, 0.06955197700381686, 0.10676759267748642, 0.11042820716088642, 0.12189147347515301, 0.12723831565926966, 0.1299889001989774, 0.15856742743090813, 0.16294460288605572, 0.17526568776616297, 0.18313190217442732, 0.19818237049366424, 0.2051698200776125, 0.2234140392549424, 0.22557661575196092, 0.23325382540157508, 0.24272632878986972, 0.2677355789124005, 0.26961608102827483, 0.2723327771560209, 0.2838849238217034, 0.3110066434093784, 0.3204850492503619, 0.3242489208553885, 0.3261202340267171, 0.3419538108173584, 0.36077653751263666, 0.3662387707270556, 0.37142952223799286, 0.3739342735453117, 0.3816105667328741, 0.3878935537487197, 0.4003004221025975, 0.40527121312475006, 0.4233257386571563, 0.454808529100877, 0.45904654530523314, 0.4767598929607979, 0.4818862497761771, 0.4835122127396662, 0.48840380476445205, 0.49346997881851956, 0.5055829134345279, 0.5096475587184862, 0.5355460346714367, 0.5506679981386633, 0.5537155683748481, 0.5558811278910932, 0.5611597024600908, 0.6017430838823248, 0.6086036965610636, 0.6124341648911753, 0.6179953298555498, 0.6214719714446114, 0.6229490226067329, 0.6230747364674994, 0.6262140841270676, 0.6382898144495655, 0.6404266769431961, 0.6408098433696546, 0.6442433059997603, 0.6649202653253814, 0.6671150158690536, 0.6700960311873938, 0.6934092794646858, 0.715545927551773, 0.7157866279988553, 0.7194650879706673, 0.7204069994801902, 0.7341419845009008, 0.7355758878330942, 0.7372147956104544, 0.7408130382142839, 0.782769896876621, 0.7899755293337545, 0.7998856223207204, 0.8136859987131889, 0.8392010754973859, 0.85350517453068, 0.8543533066150426, 0.8686804832330532, 0.8711885240578958, 0.887132895264158, 0.8897792464320593, 0.9067714007439831, 0.9232108585117856, 0.9397683767912604, 0.9653060322867386, 0.9711215074309083, 0.9781271369870336, 1.0015277239896265, 1.0249338830634431, 1.0952567809664036 ], "y": [ 0.1191803185843851, 0.049811093885267915, 0.06154022649514988, 0.0013762966927779747, 0.33011327978584265, 0.0028016920574798175, -0.018016182333556743, -0.13475603292238464, 0.016424942045166105, 0.06316524913103082, 0.02166744082832109, 0.09766151574695812, 0.09090549793114422, 0.06689146678957547, 0.16179459444413052, 0.12443357341669295, 0.1631650247912569, 0.038855113399051414, 0.12841036368335207, 0.183214077336861, 0.39570107775443547, 0.1073633367019008, 0.11826487922134708, 0.17029988799114418, 0.15250691605270672, 0.1178555476891144, 0.1994147735064709, 0.13600793661464475, 0.18074037888883446, 0.02869848500206705, 0.12300210634145065, 0.14017714839182097, 0.14079634648627437, 0.25920963900419897, 0.19998893320546, 0.17214220553933704, 0.379565738443743, 0.20399736643110541, 0.3060974115360755, 0.28054457327836957, 0.20658826381454637, 0.24848552557269682, 0.29923855871226346, 0.2803165922239966, 0.3049611492304679, 0.37833477545305483, 0.34762176545168, 0.21952270244910357, 0.5372041316713028, 0.2968889992752433, 0.4042488451359492, 0.4364238516121898, 0.3705794138731636, 0.280307274231896, 0.3292219792574228, 0.3083241905997943, 0.28663423553925, 0.2723642427956192, 0.30852468552248574, 0.31176076624427695, 0.23856588303835238, 0.2660273570908446, 0.3370976037894936, 0.11549407224434381, 0.2428781567635641, 0.09011049604729682, 0.31525652377686375, 0.21342624029812785, 0.16797962931678445, 0.05561311952347106, 0.17480132891284392, 0.18533435819326427, 0.11241160294394752, 0.13096888739516416, 0.16147029490348405, 0.16854889154648367, 0.15338038067836843, 0.17324006390595226, 0.33435695116865805, 0.2361276238047269, 0.28604075920515304, 0.5441203927673431, 0.5629092927848828, 0.41881491683734573, 0.5460187582043701, 0.496449631739897, 0.5186881585119715, 0.48477066112949485, 0.6269316354967817, 0.5542870819313165, 0.564156339858511, 0.5550855630673031, 0.5067325733222442, 0.5374322541879143, 0.556272268791394, 0.620920077923215, 0.4579706192934344, 0.6083521898108901, 0.7578020505384726, 0.7858166096159729 ], "type": "scatter" }, { "mode": "markers", "name": "y_true", "x": [ -0.2621940268810562, -0.13714701309275049, -0.08784640673486305, -0.030850187819932928, 0.0026945061031015682, 0.00508082404577135, 0.023420285885473083, 0.0639133229529901, 0.06955197700381686, 0.10676759267748642, 0.11042820716088642, 0.12189147347515301, 0.12723831565926966, 0.1299889001989774, 0.15856742743090813, 0.16294460288605572, 0.17526568776616297, 0.18313190217442732, 0.19818237049366424, 0.2051698200776125, 0.2234140392549424, 0.22557661575196092, 0.23325382540157508, 0.24272632878986972, 0.2677355789124005, 0.26961608102827483, 0.2723327771560209, 0.2838849238217034, 0.3110066434093784, 0.3204850492503619, 0.3242489208553885, 0.3261202340267171, 0.3419538108173584, 0.36077653751263666, 0.3662387707270556, 0.37142952223799286, 0.3739342735453117, 0.3816105667328741, 0.3878935537487197, 0.4003004221025975, 0.40527121312475006, 0.4233257386571563, 0.454808529100877, 0.45904654530523314, 0.4767598929607979, 0.4818862497761771, 0.4835122127396662, 0.48840380476445205, 0.49346997881851956, 0.5055829134345279, 0.5096475587184862, 0.5355460346714367, 0.5506679981386633, 0.5537155683748481, 0.5558811278910932, 0.5611597024600908, 0.6017430838823248, 0.6086036965610636, 0.6124341648911753, 0.6179953298555498, 0.6214719714446114, 0.6229490226067329, 0.6230747364674994, 0.6262140841270676, 0.6382898144495655, 0.6404266769431961, 0.6408098433696546, 0.6442433059997603, 0.6649202653253814, 0.6671150158690536, 0.6700960311873938, 0.6934092794646858, 0.715545927551773, 0.7157866279988553, 0.7194650879706673, 0.7204069994801902, 0.7341419845009008, 0.7355758878330942, 0.7372147956104544, 0.7408130382142839, 0.782769896876621, 0.7899755293337545, 0.7998856223207204, 0.8136859987131889, 0.8392010754973859, 0.85350517453068, 0.8543533066150426, 0.8686804832330532, 0.8711885240578958, 0.887132895264158, 0.8897792464320593, 0.9067714007439831, 0.9232108585117856, 0.9397683767912604, 0.9653060322867386, 0.9711215074309083, 0.9781271369870336, 1.0015277239896265, 1.0249338830634431, 1.0952567809664036 ], "y": [ 0.12731633461957972, 0.01934914913687403, 0.014031043165993995, 0.004811305448886617, 0.00014010838617521914, 0.0003642268487549952, 0.0038455225428482725, 0.021261612046873164, 0.024786217800552228, 0.05387724353192527, 0.05715380220194499, 0.06765690752626724, 0.07262281843313775, 0.07517946916146598, 0.1006913079752271, 0.10425563972617358, 0.11351338477929776, 0.11872800628546665, 0.1269653627567095, 0.1299619674077417, 0.13529204628172442, 0.1356947308575982, 0.13676610639503237, 0.13739343584875824, 0.13654656053562622, 0.13640923527251594, 0.1362092347029089, 0.1354662091052353, 0.13653496774795112, 0.1386235014806803, 0.13978326566872012, 0.14043537559103514, 0.1481317622983789, 0.1627886159655451, 0.1681970232999818, 0.1738066943470976, 0.17667313417060482, 0.18607649887824884, 0.19442369801931544, 0.2123899500858094, 0.22004358060334084, 0.24918578549271558, 0.2991806609134927, 0.3052301202270735, 0.32726740754475736, 0.332463028485542, 0.33398445864882254, 0.3381753994992158, 0.34187810913161754, 0.34792559492018255, 0.3490280796288381, 0.34476598660429303, 0.33360402400924616, 0.3306581419427155, 0.32843427982249335, 0.32258336453097347, 0.263732587910332, 0.25279006163216955, 0.2467418646957159, 0.2381135132305177, 0.23284547762697, 0.23064304617608333, 0.2304566590082362, 0.22586012993529403, 0.20942491097673627, 0.2067582262199809, 0.20628860404375, 0.20220067718166967, 0.18266612305959162, 0.181140872469366, 0.17924179015573047, 0.17081438909057495, 0.16975671423396294, 0.16974812143126178, 0.16953249225876094, 0.16944444487106564, 0.1647665626564842, 0.16363190141243594, 0.16207428748120772, 0.15734461213254008, 0.3196978901291103, 0.35039084664540354, 0.38913681984745374, 0.43638078467475583, 0.5019273423481623, 0.5258753717872753, 0.5270113655110031, 0.5416468609082469, 0.5433672244778102, 0.5491753805481521, 0.5493806754702031, 0.5468974903174653, 0.5408694839285411, 0.5351552484130071, 0.5363392015202572, 0.5394948973879891, 0.5451194788480829, 0.5804980008807575, 0.6439697617245795, 0.9672480931765578 ], "type": "scatter" }, { "mode": "lines+markers", "name": "y_hat", "x": [ -0.2621940268810562, -0.23449094916988356, -0.20678787145871091, -0.17908479374753827, -0.15138171603636563, -0.12367863832519296, -0.09597556061402032, -0.06827248290284768, -0.04056940519167504, -0.012866327480502399, 0.01483675023067027, 0.04253982794184291, 0.07024290565301555, 0.0979459833641882, 0.12564906107536084, 0.15335213878653348, 0.18105521649770612, 0.20875829420887876, 0.2364613719200514, 0.2641644496312241, 0.29186752734239674, 0.3195706050535694, 0.347273682764742, 0.37497676047591466, 0.4026798381870873, 0.43038291589825994, 0.4580859936094326, 0.4857890713206052, 0.5134921490317779, 0.5411952267429505, 0.5688983044541231, 0.5966013821652958, 0.6243044598764684, 0.6520075375876411, 0.6797106152988137, 0.7074136930099864, 0.735116770721159, 0.7628198484323317, 0.7905229261435044, 0.818226003854677, 0.8459290815658497, 0.8736321592770223, 0.901335236988195, 0.9290383146993676, 0.9567413924105402, 0.9844444701217129, 1.0121475478328854, 1.0398506255440583, 1.0675537032552307, 1.0952567809664036 ], "y": [ 0.09135400547551437, 0.09186142246116034, 0.08211349630940942, 0.042796861734564234, 0.04355746063648956, 0.04554269198253175, 0.050652897156908315, 0.044496207504853294, 0.024932330660686806, 0.04211861367218278, 0.04053534396753669, 0.016493092177445153, 0.022824560529127357, 0.06023401623346466, 0.07774685575926966, 0.1039241101750691, 0.11737972269912698, 0.13632737409415452, 0.14458419202051992, 0.14951814204558916, 0.15468193165519484, 0.1585133941555914, 0.19220170873912953, 0.2296583637739059, 0.24372884593263944, 0.2583031875506283, 0.2923584818113017, 0.31180033708903165, 0.32583539697225694, 0.31993239926508854, 0.30449245129131886, 0.2835531579125373, 0.2611505122223358, 0.21794195545121992, 0.17628798910334711, 0.1641189242915552, 0.19341409659612777, 0.30421542890215353, 0.4263766789806342, 0.4730646012361336, 0.5147317459523973, 0.5321990733319709, 0.5455128713573144, 0.5528102073481376, 0.5716081324781321, 0.5954584533638703, 0.6496637806604809, 0.7111499762980186, 0.7560453168283513, 0.7850575525751163 ], "type": "scatter" } ], "layout": { "autosize": true, "height": 500, "template": { "data": { "barpolar": [ { "marker": { "line": { "color": "rgb(17,17,17)", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "bar": [ { "error_x": { "color": "#f2f5fa" }, "error_y": { "color": "#f2f5fa" }, "marker": { "line": { "color": "rgb(17,17,17)", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#A2B1C6", "gridcolor": "#506784", "linecolor": "#506784", "minorgridcolor": "#506784", "startlinecolor": "#A2B1C6" }, "baxis": { "endlinecolor": "#A2B1C6", "gridcolor": "#506784", "linecolor": "#506784", "minorgridcolor": "#506784", "startlinecolor": "#A2B1C6" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "contour" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "heatmapgl" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "heatmap" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "histogram2dcontour" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "histogram2d" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "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": { "line": { "color": "#283442" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatter": [ { "marker": { "line": { "color": "#283442" } }, "type": "scatter" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#506784" }, "line": { "color": "rgb(17,17,17)" } }, "header": { "fill": { "color": "#2a3f5f" }, "line": { "color": "rgb(17,17,17)" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#f2f5fa", "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.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.0, "#f0f921" ] ], "sequentialminus": [ [ 0.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.0, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#f2f5fa" }, "geo": { "bgcolor": "rgb(17,17,17)", "lakecolor": "rgb(17,17,17)", "landcolor": "rgb(17,17,17)", "showlakes": true, "showland": true, "subunitcolor": "#506784" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "dark" }, "paper_bgcolor": "rgb(17,17,17)", "plot_bgcolor": "rgb(17,17,17)", "polar": { "angularaxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" }, "bgcolor": "rgb(17,17,17)", "radialaxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3" }, "yaxis": { "backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3" }, "zaxis": { "backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3" } }, "shapedefaults": { "line": { "color": "#f2f5fa" } }, "sliderdefaults": { "bgcolor": "#C8D4E3", "bordercolor": "rgb(17,17,17)", "borderwidth": 1, "tickwidth": 0 }, "ternary": { "aaxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" }, "baxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" }, "bgcolor": "rgb(17,17,17)", "caxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" } }, "title": { "x": 0.05 }, "updatemenudefaults": { "bgcolor": "#506784", "borderwidth": 0 }, "xaxis": { "automargin": true, "gridcolor": "#283442", "linecolor": "#506784", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#283442", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "#283442", "linecolor": "#506784", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#283442", "zerolinewidth": 2 } } }, "title": { "text": "Regression in linearly spaced locations" } }, "config": { "showLink": false, "linkText": "Export to plot.ly", "plotlyServerURL": "https://plot.ly" } }, "text/html": "
" }, "metadata": {}, "output_type": "display_data" } ], "source": [ "rsklpr = Rsklpr(size_neighborhood=35)\n", "rsklpr.fit(x=x, y=y)\n", "x_linspace: np.ndarray = np.linspace(start=x.min(), stop=x.max())\n", "y_hat = rsklpr.predict(x=x_linspace)\n", "plot_results_1d(\n", " x_=x,\n", " y_=y,\n", " y_true_=y_true,\n", " estimates_=pd.DataFrame(data=y_hat, columns=[\"y_hat\"], index=x_linspace),\n", " title=\"Regression in linearly spaced locations\",\n", ")" ], "metadata": { "collapsed": false, "ExecuteTime": { "end_time": "2024-03-23T15:13:55.133722Z", "start_time": "2024-03-23T15:13:55.058482Z" } }, "id": "925f96669e46a5b5", "execution_count": 10 }, { "cell_type": "markdown", "source": [ "## Confidence intervals ##\n", "We can also use the library to calculate confidence intervals for the prediction. In this case we calculate the 95% confidence intervals at the linearly spaced locations." ], "metadata": { "collapsed": false }, "id": "acb77bad32d0c739" }, { "cell_type": "code", "execution_count": 11, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "data": [ { "mode": "markers", "name": "data", "x": [ -0.2621940268810562, -0.13714701309275049, -0.08784640673486305, -0.030850187819932928, 0.0026945061031015682, 0.00508082404577135, 0.023420285885473083, 0.0639133229529901, 0.06955197700381686, 0.10676759267748642, 0.11042820716088642, 0.12189147347515301, 0.12723831565926966, 0.1299889001989774, 0.15856742743090813, 0.16294460288605572, 0.17526568776616297, 0.18313190217442732, 0.19818237049366424, 0.2051698200776125, 0.2234140392549424, 0.22557661575196092, 0.23325382540157508, 0.24272632878986972, 0.2677355789124005, 0.26961608102827483, 0.2723327771560209, 0.2838849238217034, 0.3110066434093784, 0.3204850492503619, 0.3242489208553885, 0.3261202340267171, 0.3419538108173584, 0.36077653751263666, 0.3662387707270556, 0.37142952223799286, 0.3739342735453117, 0.3816105667328741, 0.3878935537487197, 0.4003004221025975, 0.40527121312475006, 0.4233257386571563, 0.454808529100877, 0.45904654530523314, 0.4767598929607979, 0.4818862497761771, 0.4835122127396662, 0.48840380476445205, 0.49346997881851956, 0.5055829134345279, 0.5096475587184862, 0.5355460346714367, 0.5506679981386633, 0.5537155683748481, 0.5558811278910932, 0.5611597024600908, 0.6017430838823248, 0.6086036965610636, 0.6124341648911753, 0.6179953298555498, 0.6214719714446114, 0.6229490226067329, 0.6230747364674994, 0.6262140841270676, 0.6382898144495655, 0.6404266769431961, 0.6408098433696546, 0.6442433059997603, 0.6649202653253814, 0.6671150158690536, 0.6700960311873938, 0.6934092794646858, 0.715545927551773, 0.7157866279988553, 0.7194650879706673, 0.7204069994801902, 0.7341419845009008, 0.7355758878330942, 0.7372147956104544, 0.7408130382142839, 0.782769896876621, 0.7899755293337545, 0.7998856223207204, 0.8136859987131889, 0.8392010754973859, 0.85350517453068, 0.8543533066150426, 0.8686804832330532, 0.8711885240578958, 0.887132895264158, 0.8897792464320593, 0.9067714007439831, 0.9232108585117856, 0.9397683767912604, 0.9653060322867386, 0.9711215074309083, 0.9781271369870336, 1.0015277239896265, 1.0249338830634431, 1.0952567809664036 ], "y": [ 0.1191803185843851, 0.049811093885267915, 0.06154022649514988, 0.0013762966927779747, 0.33011327978584265, 0.0028016920574798175, -0.018016182333556743, -0.13475603292238464, 0.016424942045166105, 0.06316524913103082, 0.02166744082832109, 0.09766151574695812, 0.09090549793114422, 0.06689146678957547, 0.16179459444413052, 0.12443357341669295, 0.1631650247912569, 0.038855113399051414, 0.12841036368335207, 0.183214077336861, 0.39570107775443547, 0.1073633367019008, 0.11826487922134708, 0.17029988799114418, 0.15250691605270672, 0.1178555476891144, 0.1994147735064709, 0.13600793661464475, 0.18074037888883446, 0.02869848500206705, 0.12300210634145065, 0.14017714839182097, 0.14079634648627437, 0.25920963900419897, 0.19998893320546, 0.17214220553933704, 0.379565738443743, 0.20399736643110541, 0.3060974115360755, 0.28054457327836957, 0.20658826381454637, 0.24848552557269682, 0.29923855871226346, 0.2803165922239966, 0.3049611492304679, 0.37833477545305483, 0.34762176545168, 0.21952270244910357, 0.5372041316713028, 0.2968889992752433, 0.4042488451359492, 0.4364238516121898, 0.3705794138731636, 0.280307274231896, 0.3292219792574228, 0.3083241905997943, 0.28663423553925, 0.2723642427956192, 0.30852468552248574, 0.31176076624427695, 0.23856588303835238, 0.2660273570908446, 0.3370976037894936, 0.11549407224434381, 0.2428781567635641, 0.09011049604729682, 0.31525652377686375, 0.21342624029812785, 0.16797962931678445, 0.05561311952347106, 0.17480132891284392, 0.18533435819326427, 0.11241160294394752, 0.13096888739516416, 0.16147029490348405, 0.16854889154648367, 0.15338038067836843, 0.17324006390595226, 0.33435695116865805, 0.2361276238047269, 0.28604075920515304, 0.5441203927673431, 0.5629092927848828, 0.41881491683734573, 0.5460187582043701, 0.496449631739897, 0.5186881585119715, 0.48477066112949485, 0.6269316354967817, 0.5542870819313165, 0.564156339858511, 0.5550855630673031, 0.5067325733222442, 0.5374322541879143, 0.556272268791394, 0.620920077923215, 0.4579706192934344, 0.6083521898108901, 0.7578020505384726, 0.7858166096159729 ], "type": "scatter" }, { "mode": "markers", "name": "y_true", "x": [ -0.2621940268810562, -0.13714701309275049, -0.08784640673486305, -0.030850187819932928, 0.0026945061031015682, 0.00508082404577135, 0.023420285885473083, 0.0639133229529901, 0.06955197700381686, 0.10676759267748642, 0.11042820716088642, 0.12189147347515301, 0.12723831565926966, 0.1299889001989774, 0.15856742743090813, 0.16294460288605572, 0.17526568776616297, 0.18313190217442732, 0.19818237049366424, 0.2051698200776125, 0.2234140392549424, 0.22557661575196092, 0.23325382540157508, 0.24272632878986972, 0.2677355789124005, 0.26961608102827483, 0.2723327771560209, 0.2838849238217034, 0.3110066434093784, 0.3204850492503619, 0.3242489208553885, 0.3261202340267171, 0.3419538108173584, 0.36077653751263666, 0.3662387707270556, 0.37142952223799286, 0.3739342735453117, 0.3816105667328741, 0.3878935537487197, 0.4003004221025975, 0.40527121312475006, 0.4233257386571563, 0.454808529100877, 0.45904654530523314, 0.4767598929607979, 0.4818862497761771, 0.4835122127396662, 0.48840380476445205, 0.49346997881851956, 0.5055829134345279, 0.5096475587184862, 0.5355460346714367, 0.5506679981386633, 0.5537155683748481, 0.5558811278910932, 0.5611597024600908, 0.6017430838823248, 0.6086036965610636, 0.6124341648911753, 0.6179953298555498, 0.6214719714446114, 0.6229490226067329, 0.6230747364674994, 0.6262140841270676, 0.6382898144495655, 0.6404266769431961, 0.6408098433696546, 0.6442433059997603, 0.6649202653253814, 0.6671150158690536, 0.6700960311873938, 0.6934092794646858, 0.715545927551773, 0.7157866279988553, 0.7194650879706673, 0.7204069994801902, 0.7341419845009008, 0.7355758878330942, 0.7372147956104544, 0.7408130382142839, 0.782769896876621, 0.7899755293337545, 0.7998856223207204, 0.8136859987131889, 0.8392010754973859, 0.85350517453068, 0.8543533066150426, 0.8686804832330532, 0.8711885240578958, 0.887132895264158, 0.8897792464320593, 0.9067714007439831, 0.9232108585117856, 0.9397683767912604, 0.9653060322867386, 0.9711215074309083, 0.9781271369870336, 1.0015277239896265, 1.0249338830634431, 1.0952567809664036 ], "y": [ 0.12731633461957972, 0.01934914913687403, 0.014031043165993995, 0.004811305448886617, 0.00014010838617521914, 0.0003642268487549952, 0.0038455225428482725, 0.021261612046873164, 0.024786217800552228, 0.05387724353192527, 0.05715380220194499, 0.06765690752626724, 0.07262281843313775, 0.07517946916146598, 0.1006913079752271, 0.10425563972617358, 0.11351338477929776, 0.11872800628546665, 0.1269653627567095, 0.1299619674077417, 0.13529204628172442, 0.1356947308575982, 0.13676610639503237, 0.13739343584875824, 0.13654656053562622, 0.13640923527251594, 0.1362092347029089, 0.1354662091052353, 0.13653496774795112, 0.1386235014806803, 0.13978326566872012, 0.14043537559103514, 0.1481317622983789, 0.1627886159655451, 0.1681970232999818, 0.1738066943470976, 0.17667313417060482, 0.18607649887824884, 0.19442369801931544, 0.2123899500858094, 0.22004358060334084, 0.24918578549271558, 0.2991806609134927, 0.3052301202270735, 0.32726740754475736, 0.332463028485542, 0.33398445864882254, 0.3381753994992158, 0.34187810913161754, 0.34792559492018255, 0.3490280796288381, 0.34476598660429303, 0.33360402400924616, 0.3306581419427155, 0.32843427982249335, 0.32258336453097347, 0.263732587910332, 0.25279006163216955, 0.2467418646957159, 0.2381135132305177, 0.23284547762697, 0.23064304617608333, 0.2304566590082362, 0.22586012993529403, 0.20942491097673627, 0.2067582262199809, 0.20628860404375, 0.20220067718166967, 0.18266612305959162, 0.181140872469366, 0.17924179015573047, 0.17081438909057495, 0.16975671423396294, 0.16974812143126178, 0.16953249225876094, 0.16944444487106564, 0.1647665626564842, 0.16363190141243594, 0.16207428748120772, 0.15734461213254008, 0.3196978901291103, 0.35039084664540354, 0.38913681984745374, 0.43638078467475583, 0.5019273423481623, 0.5258753717872753, 0.5270113655110031, 0.5416468609082469, 0.5433672244778102, 0.5491753805481521, 0.5493806754702031, 0.5468974903174653, 0.5408694839285411, 0.5351552484130071, 0.5363392015202572, 0.5394948973879891, 0.5451194788480829, 0.5804980008807575, 0.6439697617245795, 0.9672480931765578 ], "type": "scatter" }, { "mode": "lines+markers", "name": "y_hat", "x": [ -0.2621940268810562, -0.23449094916988356, -0.20678787145871091, -0.17908479374753827, -0.15138171603636563, -0.12367863832519296, -0.09597556061402032, -0.06827248290284768, -0.04056940519167504, -0.012866327480502399, 0.01483675023067027, 0.04253982794184291, 0.07024290565301555, 0.0979459833641882, 0.12564906107536084, 0.15335213878653348, 0.18105521649770612, 0.20875829420887876, 0.2364613719200514, 0.2641644496312241, 0.29186752734239674, 0.3195706050535694, 0.347273682764742, 0.37497676047591466, 0.4026798381870873, 0.43038291589825994, 0.4580859936094326, 0.4857890713206052, 0.5134921490317779, 0.5411952267429505, 0.5688983044541231, 0.5966013821652958, 0.6243044598764684, 0.6520075375876411, 0.6797106152988137, 0.7074136930099864, 0.735116770721159, 0.7628198484323317, 0.7905229261435044, 0.818226003854677, 0.8459290815658497, 0.8736321592770223, 0.901335236988195, 0.9290383146993676, 0.9567413924105402, 0.9844444701217129, 1.0121475478328854, 1.0398506255440583, 1.0675537032552307, 1.0952567809664036 ], "y": [ 0.09135400547551437, 0.09186142246116034, 0.08211349630940942, 0.042796861734564234, 0.04355746063648956, 0.04554269198253175, 0.050652897156908315, 0.044496207504853294, 0.024932330660686806, 0.04211861367218278, 0.04053534396753669, 0.016493092177445153, 0.022824560529127357, 0.06023401623346466, 0.07774685575926966, 0.1039241101750691, 0.11737972269912698, 0.13632737409415452, 0.14458419202051992, 0.14951814204558916, 0.15468193165519484, 0.1585133941555914, 0.19220170873912953, 0.2296583637739059, 0.24372884593263944, 0.2583031875506283, 0.2923584818113017, 0.31180033708903165, 0.32583539697225694, 0.31993239926508854, 0.30449245129131886, 0.2835531579125373, 0.2611505122223358, 0.21794195545121992, 0.17628798910334711, 0.1641189242915552, 0.19341409659612777, 0.30421542890215353, 0.4263766789806342, 0.4730646012361336, 0.5147317459523973, 0.5321990733319709, 0.5455128713573144, 0.5528102073481376, 0.5716081324781321, 0.5954584533638703, 0.6496637806604809, 0.7111499762980186, 0.7560453168283513, 0.7850575525751163 ], "type": "scatter" }, { "mode": "lines+markers", "name": "y_mean_hat", "x": [ -0.2621940268810562, -0.23449094916988356, -0.20678787145871091, -0.17908479374753827, -0.15138171603636563, -0.12367863832519296, -0.09597556061402032, -0.06827248290284768, -0.04056940519167504, -0.012866327480502399, 0.01483675023067027, 0.04253982794184291, 0.07024290565301555, 0.0979459833641882, 0.12564906107536084, 0.15335213878653348, 0.18105521649770612, 0.20875829420887876, 0.2364613719200514, 0.2641644496312241, 0.29186752734239674, 0.3195706050535694, 0.347273682764742, 0.37497676047591466, 0.4026798381870873, 0.43038291589825994, 0.4580859936094326, 0.4857890713206052, 0.5134921490317779, 0.5411952267429505, 0.5688983044541231, 0.5966013821652958, 0.6243044598764684, 0.6520075375876411, 0.6797106152988137, 0.7074136930099864, 0.735116770721159, 0.7628198484323317, 0.7905229261435044, 0.818226003854677, 0.8459290815658497, 0.8736321592770223, 0.901335236988195, 0.9290383146993676, 0.9567413924105402, 0.9844444701217129, 1.0121475478328854, 1.0398506255440583, 1.0675537032552307, 1.0952567809664036 ], "y": [ 0.06888154542093045, 0.07044418201057512, 0.06758835833571983, 0.05206904367734916, 0.04891955417251933, 0.05224006268224771, 0.054708779514550214, 0.05298512694554876, 0.07150888412554571, 0.09633288196506891, 0.08548548927772838, 0.014002238662603687, 0.007862362693071586, 0.05934626144156561, 0.07940171281468461, 0.10760478957982679, 0.11798607566394599, 0.1465478323495954, 0.15413189437981611, 0.14970975634145137, 0.15192643102946585, 0.150775069227836, 0.18931494542234645, 0.23264153626133413, 0.2485368953578277, 0.2631054262961805, 0.29476917497092847, 0.32168573560912334, 0.33627335204283043, 0.33487262509072324, 0.3067815209305624, 0.2833429939905248, 0.25878227075893895, 0.21768348021911998, 0.17176995733102898, 0.17102900638835522, 0.18982229127705488, 0.28016421765011, 0.4307974405491413, 0.4771360830004056, 0.5144697414757946, 0.5336037014403435, 0.5461228709503182, 0.5538189270331775, 0.5694384523288054, 0.5902385353787868, 0.6354474062014799, 0.6900150317772432, 0.734978818213191, 0.762046625345579 ], "type": "scatter" }, { "mode": "lines+markers", "name": "conf_0.025", "x": [ -0.2621940268810562, -0.23449094916988356, -0.20678787145871091, -0.17908479374753827, -0.15138171603636563, -0.12367863832519296, -0.09597556061402032, -0.06827248290284768, -0.04056940519167504, -0.012866327480502399, 0.01483675023067027, 0.04253982794184291, 0.07024290565301555, 0.0979459833641882, 0.12564906107536084, 0.15335213878653348, 0.18105521649770612, 0.20875829420887876, 0.2364613719200514, 0.2641644496312241, 0.29186752734239674, 0.3195706050535694, 0.347273682764742, 0.37497676047591466, 0.4026798381870873, 0.43038291589825994, 0.4580859936094326, 0.4857890713206052, 0.5134921490317779, 0.5411952267429505, 0.5688983044541231, 0.5966013821652958, 0.6243044598764684, 0.6520075375876411, 0.6797106152988137, 0.7074136930099864, 0.735116770721159, 0.7628198484323317, 0.7905229261435044, 0.818226003854677, 0.8459290815658497, 0.8736321592770223, 0.901335236988195, 0.9290383146993676, 0.9567413924105402, 0.9844444701217129, 1.0121475478328854, 1.0398506255440583, 1.0675537032552307, 1.0952567809664036 ], "y": [ -0.02800545609218, -0.020384113100168254, -0.01279105712488407, -0.005232625684592751, 0.002270621257696709, -0.02894816611044883, -0.02250320005393987, -0.018133900854522118, -0.010087963675030351, -0.0025090167703118783, -0.009215496086091624, -0.11154785190047914, -0.11277781391520508, 0.03343956891833627, 0.05593465969444401, 0.08226007596201382, 0.08415921809920793, 0.11572384024639515, 0.12736226703979928, 0.1309453016896525, 0.1273183659637032, 0.1017914432221379, 0.16256175375095053, 0.2076540864740702, 0.22835687842627803, 0.2398040064864084, 0.2667415836090136, 0.27739692446185027, 0.2964515470950381, 0.2980224283466031, 0.2846539632100057, 0.2608557218204857, 0.215387909337369, 0.1771467647269322, 0.13211753379788857, 0.15457167709771535, 0.14906821176533389, 0.1852558074348824, 0.3311169407514699, 0.42036057779502783, 0.47874985374999257, 0.5066658991569813, 0.5225374306598978, 0.5249219888892029, 0.5339782183650117, 0.537561561928869, 0.5476870061702462, 0.6018345740327882, 0.6112675672476644, 0.6183953066588072 ], "type": "scatter" }, { "mode": "lines+markers", "name": "conf_0.975", "x": [ -0.2621940268810562, -0.23449094916988356, -0.20678787145871091, -0.17908479374753827, -0.15138171603636563, -0.12367863832519296, -0.09597556061402032, -0.06827248290284768, -0.04056940519167504, -0.012866327480502399, 0.01483675023067027, 0.04253982794184291, 0.07024290565301555, 0.0979459833641882, 0.12564906107536084, 0.15335213878653348, 0.18105521649770612, 0.20875829420887876, 0.2364613719200514, 0.2641644496312241, 0.29186752734239674, 0.3195706050535694, 0.347273682764742, 0.37497676047591466, 0.4026798381870873, 0.43038291589825994, 0.4580859936094326, 0.4857890713206052, 0.5134921490317779, 0.5411952267429505, 0.5688983044541231, 0.5966013821652958, 0.6243044598764684, 0.6520075375876411, 0.6797106152988137, 0.7074136930099864, 0.735116770721159, 0.7628198484323317, 0.7905229261435044, 0.818226003854677, 0.8459290815658497, 0.8736321592770223, 0.901335236988195, 0.9290383146993676, 0.9567413924105402, 0.9844444701217129, 1.0121475478328854, 1.0398506255440583, 1.0675537032552307, 1.0952567809664036 ], "y": [ 0.11387034763694438, 0.11403073616718622, 0.11416670009483938, 0.11339669284892887, 0.11298651451334443, 0.24552534480913993, 0.25074140633482955, 0.2585585936189796, 0.3234414952749628, 0.3251875039717354, 0.3302620014330156, 0.19220365964228414, 0.07252309683448827, 0.08632246019340542, 0.0992144242277149, 0.1319548826914669, 0.14502859551253125, 0.20750895000650568, 0.22242351623768827, 0.17339509827510305, 0.1726411798284871, 0.17994444415732724, 0.21428126312695264, 0.2731313796428098, 0.27775680637024586, 0.2857756506628321, 0.31551056474087436, 0.3755976519600311, 0.4053927369967345, 0.38279080038401564, 0.32695358093635085, 0.3026887783480004, 0.2965257674626543, 0.26371994066513693, 0.20169539934526418, 0.20021261256366707, 0.2704102387487782, 0.37113480128402093, 0.5326904690273333, 0.5359325341186271, 0.5457556148006608, 0.5622306553979854, 0.5769319831338476, 0.5831978715450714, 0.6005045870058288, 0.6330649896085881, 0.7077008517731518, 0.7585565618234513, 0.7896260192946338, 0.8203319404588276 ], "type": "scatter" } ], "layout": { "autosize": true, "height": 500, "template": { "data": { "barpolar": [ { "marker": { "line": { "color": "rgb(17,17,17)", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "bar": [ { "error_x": { "color": "#f2f5fa" }, "error_y": { "color": "#f2f5fa" }, "marker": { "line": { "color": "rgb(17,17,17)", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#A2B1C6", "gridcolor": "#506784", "linecolor": "#506784", "minorgridcolor": "#506784", "startlinecolor": "#A2B1C6" }, "baxis": { "endlinecolor": "#A2B1C6", "gridcolor": "#506784", "linecolor": "#506784", "minorgridcolor": "#506784", "startlinecolor": "#A2B1C6" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "contour" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "heatmapgl" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "heatmap" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "histogram2dcontour" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "histogram2d" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "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": { "line": { "color": "#283442" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatter": [ { "marker": { "line": { "color": "#283442" } }, "type": "scatter" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#506784" }, "line": { "color": "rgb(17,17,17)" } }, "header": { "fill": { "color": "#2a3f5f" }, "line": { "color": "rgb(17,17,17)" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#f2f5fa", "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.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.0, "#f0f921" ] ], "sequentialminus": [ [ 0.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.0, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#f2f5fa" }, "geo": { "bgcolor": "rgb(17,17,17)", "lakecolor": "rgb(17,17,17)", "landcolor": "rgb(17,17,17)", "showlakes": true, "showland": true, "subunitcolor": "#506784" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "dark" }, "paper_bgcolor": "rgb(17,17,17)", "plot_bgcolor": "rgb(17,17,17)", "polar": { "angularaxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" }, "bgcolor": "rgb(17,17,17)", "radialaxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3" }, "yaxis": { "backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3" }, "zaxis": { "backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3" } }, "shapedefaults": { "line": { "color": "#f2f5fa" } }, "sliderdefaults": { "bgcolor": "#C8D4E3", "bordercolor": "rgb(17,17,17)", "borderwidth": 1, "tickwidth": 0 }, "ternary": { "aaxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" }, "baxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" }, "bgcolor": "rgb(17,17,17)", "caxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" } }, "title": { "x": 0.05 }, "updatemenudefaults": { "bgcolor": "#506784", "borderwidth": 0 }, "xaxis": { "automargin": true, "gridcolor": "#283442", "linecolor": "#506784", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#283442", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "#283442", "linecolor": "#506784", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#283442", "zerolinewidth": 2 } } }, "title": { "text": "Regression in linearly spaced locations with 95% confidence intervals" } }, "config": { "showLink": false, "linkText": "Export to plot.ly", "plotlyServerURL": "https://plot.ly" } }, "text/html": "
" }, "metadata": {}, "output_type": "display_data" } ], "source": [ "import numpy as np\n", "\n", "rsklpr = Rsklpr(size_neighborhood=35)\n", "rsklpr.fit(x=x, y=y)\n", "y_hat = rsklpr.predict(x=x_linspace)\n", "\n", "y_mean_hat: np.ndarray\n", "conf_low: np.ndarray\n", "conf_high: np.ndarray\n", "y_mean_hat, conf_low, conf_high, _ = rsklpr.predict_bootstrap(x=x_linspace)\n", "\n", "estimates: pd.DataFrame = pd.DataFrame(\n", " data=np.concatenate([y_hat.reshape((-1, 1)), y_mean_hat.reshape((-1, 1))], axis=1),\n", " columns=[\"y_hat\", \"y_mean_hat\"],\n", " index=x_linspace,\n", ")\n", "estimates[\"conf_0.025\"] = conf_low\n", "estimates[\"conf_0.975\"] = conf_high\n", "\n", "plot_results_1d(\n", " x_=x,\n", " y_=y,\n", " y_true_=y_true,\n", " estimates_=estimates,\n", " title=\"Regression in linearly spaced locations with 95% confidence intervals\",\n", ")" ], "metadata": { "collapsed": false, "ExecuteTime": { "end_time": "2024-03-23T15:13:56.634996Z", "start_time": "2024-03-23T15:13:55.135243Z" } }, "id": "6acfea390453908d" }, { "cell_type": "markdown", "source": [ "## Multivariate predictors ##\n", "Now let's regress a multivariate predictor. In this case to be able to visualize we regress a 2D predictor but it is possible to input data of any dimension. As before start by generating some data and a function to visualize the results." ], "metadata": { "collapsed": false }, "id": "81a708bf843e6daa" }, { "cell_type": "code", "execution_count": 12, "outputs": [], "source": [ "from typing import List\n", "\n", "\n", "def benchmark_plane_1(noise_ratio: float, hetero: bool, num_points: int) -> Tuple[np.ndarray, np.ndarray, np.ndarray]:\n", " \"\"\"\n", " Generates a dataset of points sampled from a smooth function with added noise. In the case of heteroscedastic noise\n", " the noise scale is sampled from a uniform distribution up to noise_ratio of the response range.\n", "\n", " Args:\n", " noise_ratio: The ratio of noise of the response range used to generate noise.\n", " hetero: True to generate heteroscedastic noise, False for homoscedastic noise.\n", " num_points: The number of points sampled from the function.\n", "\n", " Returns:\n", " The predictor, response and ground truth.\n", " \"\"\"\n", " generator: np.random.Generator = np.random.default_rng(seed=14)\n", "\n", " x_: np.ndarray = np.concatenate(\n", " [\n", " generator.uniform(low=0.0, high=0.7, size=(num_points, 1)),\n", " generator.uniform(low=-0.5, high=0.8, size=(num_points, 1)),\n", " ],\n", " axis=1,\n", " )\n", "\n", " y_true_: np.ndarray = np.power(x_[:, 0], 2) * np.cos(1.5 * np.pi * x_[:, 1]) + np.sin(np.square(x_.sum(axis=1)))\n", " scale: np.ndarray\n", "\n", " if hetero:\n", " scale = generator.uniform(\n", " low=0.001,\n", " high=noise_ratio * (y_true_.max() - y_true_.min()),\n", " size=num_points,\n", " )\n", " else:\n", " scale = np.full(shape=num_points, fill_value=noise_ratio * (y_true_.max() - y_true_.min()))\n", "\n", " y_: np.ndarray = y_true_ + generator.normal(scale=scale)\n", "\n", " return (\n", " x_,\n", " y_,\n", " y_true_,\n", " )\n", "\n", "\n", "def plot_results_2d(\n", " x_: np.ndarray,\n", " y_: np.ndarray,\n", " y_true_: Optional[np.ndarray],\n", " estimates_: Optional[pd.DataFrame] = None,\n", " title: str = \"\",\n", ") -> None:\n", " \"\"\"\n", " Plots a scatter plot of all columns in the provided dataframe where each column is treated as a separate variable.\n", " It is assumed all plots share the same x coordinates.\n", "\n", " Args:\n", " x_: The predictors X for all observations with shape [N,K] where N is the number of observations and K is the\n", " dimension of X.\n", " y_: The corresponding response for all observations.\n", " y_true_: The ground truth response at the locations x.\n", " estimates_: The estimates y_hat given x. it is assumed each column in the dataframe is the results of a\n", " different estimator.\n", " title: The plot title.\n", " \"\"\"\n", " fig = go.Figure()\n", "\n", " fig.add_trace(go.Scatter3d(x=x_[:, 0], y=x_[:, 1], z=y_, mode=\"markers\", name=\"data\"))\n", "\n", " if y_true_ is not None:\n", " fig.add_trace(go.Scatter3d(x=x_[:, 0], y=x_[:, 1], z=y_true_, mode=\"markers\", name=\"y_true\"))\n", "\n", " if estimates_ is not None:\n", " for c in estimates_.columns:\n", " fig.add_trace(go.Scatter3d(x=x_[:, 0], y=x_[:, 1], z=estimates_[c], mode=\"markers\", name=c))\n", "\n", " x_lines: List[Optional[float]] = []\n", " y_lines: List[Optional[float]] = []\n", " z_lines: List[Optional[float]] = []\n", " estimates_[\"y\"] = y_\n", "\n", " if y_true_ is not None:\n", " estimates_[\"y_true\"] = y_true_\n", "\n", " min_z: np.ndarray = estimates_.values.min(axis=1)\n", " max_z: np.ndarray = estimates_.values.max(axis=1)\n", " estimates_.drop(columns=[\"y\", \"y_true\"], inplace=True)\n", "\n", " for i in range(x_.shape[0]):\n", " x_lines.append(float(x_[i, 0]))\n", " y_lines.append(float(x_[i, 1]))\n", " z_lines.append(float(min_z[i]))\n", "\n", " x_lines.append(float(x_[i, 0]))\n", " y_lines.append(float(x_[i, 1]))\n", " z_lines.append(float(max_z[i]))\n", "\n", " x_lines.append(None)\n", " y_lines.append(None)\n", " z_lines.append(None)\n", "\n", " fig.add_trace(go.Scatter3d(x=x_lines, y=y_lines, z=z_lines, mode=\"lines\", name=\"lines\"))\n", "\n", " fig.update_traces(marker=dict(size=3))\n", " fig.update_layout(\n", " go.Layout(\n", " title=title,\n", " autosize=True,\n", " height=800,\n", " )\n", " )\n", "\n", " plotly.offline.iplot(fig)" ], "metadata": { "collapsed": false, "ExecuteTime": { "end_time": "2024-03-23T15:13:56.663478Z", "start_time": "2024-03-23T15:13:56.637252Z" } }, "id": "aa63350108b4ce26" }, { "cell_type": "raw", "source": [ "Lets generate and plot the data." ], "metadata": { "collapsed": false }, "id": "c8522fdec56607d" }, { "cell_type": "code", "execution_count": 13, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "data": [ { "marker": { "size": 3 }, "mode": "markers", "name": "data", "x": [ 0.581688323222378, 0.2526626667839796, 0.4919175139074384, 0.6020831506568161, 0.4489222365517152, 0.38385424616931973, 0.5336193957718353, 0.5014200678480283, 0.32701812773759636, 0.4007212567278529, 0.5224256520639181, 0.04449474339743783, 0.45281322989621176, 0.5152400000270209, 0.2791311915895589, 0.3550277712254864, 0.16010443943453678, 0.4551359265930321, 0.6798989849404713, 0.20909915930727688, 0.3239815524991035, 0.6241297300166675, 0.3859806141082527, 0.29502531807884086, 0.4678035220605126, 0.021574161982192905, 0.10765749252013904, 0.6099263690455247, 0.11076789086889365, 0.020626787174647842, 0.6484768761116372, 0.5269495399628076, 0.6842015099159706, 0.5318032663918825, 0.6459658631221312, 0.24108941128410605, 0.5282428348490007, 0.11508586669446493, 0.5767230781669882, 0.5126184197180482, 0.13393237760838486, 0.12877704362899467, 0.11809267127161466, 0.5732113677060404, 0.4650277588458246, 0.19657232108052777, 0.45809586862816337, 0.4802151337551695, 0.4822176949974435, 0.6971768110878656, 0.5914745871958926, 0.3009898252002854, 0.03294746293744977, 0.16001667613033596, 0.052364660393598966, 0.549115498483072, 0.555332394470296, 0.14998707349229795, 0.6639297738597724, 0.2261637823645921, 0.3261412474552212, 0.4066650125718359, 0.6985819104452934, 0.6278144137047045, 0.10102091604167335, 0.6254424150174316, 0.14223363887666493, 0.5620995501385927, 0.47003011273244244, 0.10611484426371016, 0.03749411142440205, 0.6506007087377399, 0.0034250834369676016, 0.10336103612564117, 0.6821433004885235, 0.4878861592495521, 0.39492360528805187, 0.31755766313043843, 0.40058007756304015, 0.3239276127524767, 0.046258805645901346, 0.16131919385589116, 0.21974813225764012, 0.3473362361003947, 0.2754461810503763, 0.5051549292806663, 0.5623073095596461, 0.5379378911285656, 0.32261606951798966, 0.2746958923653975, 0.016240185298756003, 0.2474366855879214, 0.5509401545987935, 0.2445960633111747, 0.20008877390298244, 0.11407699206124698, 0.4431961767874015, 0.35051790682132405, 0.03225273795843825, 0.16927416363879821, 0.053687927336659086, 0.10746109537624514, 0.1803175978833368, 0.05263677015607784, 0.6924118338988441, 0.4436272234631362, 0.08250058312457872, 0.36796412666162304, 0.2777595192480918, 0.1355907678760479, 0.2890771086971247, 0.3966572600829247, 0.06947334393236836, 0.6682939595467622, 0.3473720525410805, 0.05404030224997812, 0.4798578454528292, 0.6636101489907303, 0.011401001252968068, 0.4772536966515514, 0.5871053222267442, 0.3119119763251488, 0.053123689006751615, 0.5302392559921149, 0.23317305693417723, 0.21201538911692763, 0.5389572407534939, 0.0034126162750669374, 0.1725044499673648, 0.6347122278227233, 0.11121731488790966, 0.05074533766883168, 0.06533174017809458, 0.36372198486698826, 0.26187806033818706, 0.3591401458905362, 0.6404353666361431, 0.16874003866224463, 0.5380268463272463, 0.4065064028495482, 0.43864598685704403, 0.019389356665052815, 0.033383496627523074, 0.10610431364908003, 0.3093571543285732, 0.25604656199629755, 0.20907701920521476, 0.6059878129603569, 0.3967002350273306, 0.23585770555824037, 0.4260951759315009, 0.6090963103660714, 0.13580114870758725, 0.2798094680518256, 0.14836763574926448, 0.35854582481586955, 0.09208662170200667, 0.23800088309281178, 0.6969059599590102, 0.6436276754129453, 0.009210078478647153, 0.2434768225634164, 0.5691618458286487, 0.5866211742791386, 0.2199036376050671, 0.461215317281515, 0.534165618981301, 0.28249892209299543, 0.08015921904992866, 0.5497961339694498, 0.5143368812413286, 0.3932086043221785, 0.5460488257090141, 0.6930754768607994, 0.15452311469833746, 0.004469277669808924, 0.43735238785862335, 0.13302819920453263, 0.6072474643616517, 0.5321300019596166, 0.32960721994299436, 0.5492323995853949, 0.6613779782046582, 0.5064489834471043, 0.18822446924628294, 0.32146383952882446, 0.05674661263297647, 0.4399670432359381, 0.2310387290561353, 0.0967159803767839, 0.16466312958845727, 0.2197313540636621, 0.567390788330198, 0.013584205045139696, 0.116881429575923, 0.18517520427871234, 0.580644884358749, 0.07676248851327404, 0.6894454926147752, 0.5484221036294178 ], "y": [ 0.040666384737487404, 0.31132378947989325, 0.3850827622982058, 0.5209234813576031, -0.1825234489657423, 0.642641899697348, 0.4320573172208956, -0.37138541221986415, -0.48175045683065026, 0.33470035232856765, 0.5631711218799518, 0.36950552481740373, 0.5499934591395721, -0.4964074042400457, 0.7038690516936106, -0.021435865247612262, 0.03520398053378537, 0.5239325252128586, 0.23844328725937314, 0.07175978644779302, -0.3816316754045598, 0.6853865120128566, 0.26088256210974115, -0.4694616681675274, 0.18510010822762646, 0.37290241456297013, 0.10642400403814023, 0.28785245140097604, -0.260304259708665, 0.7982036239173402, 0.1360265361534404, -0.43655936296893955, -0.17318155727588286, 0.6025953951087075, 0.4592215833600526, 0.22554031678749487, -0.16928780193780735, 0.44755686030730846, 0.5654666447392276, -0.35282192867458084, -0.40663384194917007, 0.4851234047137485, 0.3316591262048789, 0.47619150112954356, -0.2586194275125996, 0.6720013228850252, 0.08472445187842848, 0.5033320323147559, -0.21230825968182576, -0.013685702951121648, -0.02530483573068648, 0.03606106112362828, 0.6300023716444434, 0.2274307017190591, 0.5378103229459257, 0.31605998591913154, 0.504488829253259, 0.13244985551336774, -0.46309681515202367, 0.17015288397295103, -0.3419469726415929, -0.47880554786471496, 0.6009350646433373, 0.22359972810768614, 0.22541193635751366, 0.2387655529288305, 0.08452963992830098, -0.1771004445387721, 0.10088228608318284, 0.16613899078415484, 0.421383675331537, 0.04131905006762637, -0.16791860338560466, 0.3265208725768586, 0.40661477191319395, -0.26245829455339253, 0.6892583752427393, 0.5218596020012973, -0.12853335619356088, 0.6216676465646569, 0.42931241596913783, -0.1818575510172346, -0.23109164117320524, 0.7696795400211351, 0.6238987561936971, -0.3983368597259991, -0.30071414530521134, 0.729783734043675, 0.36902823200344803, 0.2995690635945495, -0.4215452587569354, 0.4382943300282881, 0.1987955897134951, 0.38532013275698707, 0.4872390828610108, 0.34693923201848154, 0.3510288901554588, 0.7057371728356778, 0.4500692012232749, 0.08804290928805569, 0.6018576581427106, 0.4458929630485966, 0.2772253944234746, -0.03211636162611259, -0.027576803201994238, 0.7209288151252977, 0.36093673171726115, 0.33832762614802625, 0.12826978577327008, 0.44924472454417574, 0.7650388747564885, -0.26800909891097335, 0.1833626666303848, 0.3536757059014224, -0.19833339794231614, -0.04429612778624298, -0.2829647365291783, -0.35359150006395335, 0.1827304030063155, 0.016924411507184156, 0.5227628522994228, 0.378606001325828, 0.5312207621752614, 0.01639770747199909, 0.7964256811692325, 0.3143886117696909, -0.0742451884895729, 0.6452420872226408, 0.39381484935909217, 0.7174557840280407, -0.10638406766837194, 0.6934820851542423, 0.00981861693110797, -0.3862380311216124, -0.4675860443357518, 0.10728180124516074, 0.2922658875810856, -0.1661997429615914, -0.3266405028984589, -0.24981482245654468, -0.26008490109833804, -0.4356907690044717, -0.3074672214754355, -0.3280752875725478, 0.026889799576298667, 0.25268620026986355, 0.2961814253135999, -0.03957106820296635, -0.06576761756491939, -0.15901241286796486, 0.5842414273979841, 0.5723662315550802, 0.09402192568324652, 0.2415040169879502, -0.10369567596240153, 0.2862886535884315, 0.6664823110426779, 0.7078831143262521, 0.2809856954125839, -0.1153647626844333, 0.5166056045094947, -0.19596373168047232, -0.18178330950122834, -0.02157932869232554, 0.21076775347419618, 0.18198269324594918, 0.16957576077484826, 0.23980418600829623, -0.4805914263762741, 0.646823215015381, 0.758010617968798, -0.49546415819461603, -0.2252215845894217, 0.09739081189073895, 0.5756711266477585, -0.30311800041833614, 0.19201615743056244, 0.1276214088821207, 0.48820733210510237, 0.16625924147751492, -0.04352314214979358, -0.00227170688080075, 0.4604589552731707, 0.03670332685705313, 0.681551842592528, 0.32620469497102234, -0.1026350128987592, 0.13976697920336767, -0.3936063330168997, 0.5733022678687447, 0.5799149998253497, -0.08240158495691219, -0.08502038767020587, -0.03808029000543417, 0.057756851771847084, 0.4913945506424927, 0.2981005568384374, 0.6341037595687731, 0.1890641087657231, 0.5068279451720992 ], "z": [ 0.6935645739586053, 0.283162206150284, 0.6346338032501165, 0.7256605486298391, 0.1651193309346472, 0.7189334831893194, 0.6028849112874047, 0.006024520465025891, -0.10459565651781173, 0.5329937333366107, 0.6760475440326196, 0.08389372389767391, 0.6496940591170581, -0.4435308426812251, 1.0550955987848576, 0.2696369230420926, 0.11699561994736826, 0.7624670830100723, 1.1072243997143458, 0.19541889553729272, 0.10617857146454737, 0.9036616184637163, 0.39208085639611256, -0.018155143655484512, 0.4860672781664319, 0.15104355681131046, -0.1355736495630433, 0.7270130150423787, 0.14750817598778923, 0.5506708882316875, 0.961396145099069, -0.18922821074602492, 0.5691972225350067, 0.5082069513197689, 0.696050399070882, 0.02046196086066565, 0.3522416360478374, 0.0742714502740861, 0.6734373956778398, -0.034845274546419336, 0.031430672965573406, 0.4024908321494135, 0.15736686479004294, 0.632165385454945, 0.11197662686536944, 0.6690181691905683, 0.3874025868126615, 0.7758489449678193, 0.20272515867483343, 0.8716129855494666, 0.58248161652441, 0.189208307982293, 0.5210585220390657, 0.18760012407445176, 0.3451219940150463, 0.6326165329523041, 0.673528076663178, -0.27016092940480385, -0.17804138239644585, 0.29978945613128766, -0.008717055801530555, -0.06671140270368241, 0.3763758527934483, 0.9376204759917388, 0.10922970649532697, 0.847438316331619, 0.27172227162338375, 0.24329626089966186, 0.5418485223100864, 0.07915599812576542, 0.19235813555940137, 0.8750113168821768, 0.02458864221629116, 0.19526528216635503, 0.889969486358905, 0.10767743319176484, 0.8687564103070955, 0.6000839149148673, 0.22137864469200508, 0.7500624813752832, 0.21221707628955921, 0.28299720083284274, -0.06498486865656046, 0.7746045524578705, 0.8205197820677956, -0.09706569838428569, 0.11636543822117722, 0.5595983776124512, 0.40665424680012935, 0.3544344330682455, -0.1425532860858839, 0.42592696448408895, 0.6748205610227362, 0.5894351931795047, 0.5129715628288325, 0.2152327635118414, 0.660918470731104, 0.9689643343704814, 0.3746321063590913, -0.14532704767826887, 0.3787032887086399, 0.27568564250216954, 0.05518882810588677, -0.012924089610683549, 0.9299244373081138, 0.7479394132392635, 0.2778188444302556, 0.5483078893935941, 0.2372826262033902, 0.3646509214037616, 0.8241858827803639, 0.060301488447797376, 0.037004014823586756, 0.6803762077133739, 0.09976662252161735, 0.13910730093351065, 0.09113745567012417, 0.07205830740533738, -0.1398248453294032, 0.464263151227423, 0.6905983579326113, 0.42449766465320543, 0.33418305214250854, 0.5273255843446383, 0.6618452729160489, 0.2587428464342454, 0.7468090682146422, 0.3570579734697211, 0.0885441681822138, 0.5290899147853804, -0.024541164845097684, 0.7066377774838708, 0.1654940823355386, -0.172313535800673, -0.1609282396114645, 0.31010115392895726, 0.8402530154610266, -0.08217849802879522, 0.06742413504358545, 0.07297507856539304, 0.12954042463291612, 0.14629671660930774, 0.0761871065122222, 0.039484333376546644, 0.24408682728101175, 0.4390447158171714, 0.2736518731181485, 0.9093379215708027, 0.140442791331229, 0.008895590762464295, 0.5821081870828413, 0.6327688056700503, 0.06388585673312211, 0.5527786549427022, 0.03504834084769846, 0.5605666832009338, 0.4560026051952677, 0.7534541729547581, 0.8100582655020718, 0.6389786200143823, 0.39100778183628304, -0.059991357989156495, 0.47322359788003404, 0.6480939044130466, 0.2109755727070483, 0.4862885009225726, 0.6741933315586446, 0.2583738536837147, 0.02653271450281708, 0.6256332983414281, 0.7380308103610429, 0.04129295353676629, -0.028986220661658124, 1.0077553214135995, 0.5733995995735895, 0.2304262983135759, 0.5060260695780101, 0.07920000518378845, 0.7612904237716122, 0.6638506720410459, 0.13341362634729712, 0.5499463142247829, 0.6879315981230734, 0.7780454236429268, 0.4252830840153272, 0.2491928962002778, 0.12480220207232767, 0.5277665984320761, 0.06242239925126839, 0.38257496822735026, 0.520136684571722, 0.022174906582948906, 0.48726418304997154, -0.10351984061708337, 0.040466446956931294, 0.4146996897204944, 0.680004108930069, 0.6971227238774057, 1.0083236691632318, 0.6748132907859759 ], "type": "scatter3d" }, { "marker": { "size": 3 }, "mode": "markers", "name": "y_true", "x": [ 0.581688323222378, 0.2526626667839796, 0.4919175139074384, 0.6020831506568161, 0.4489222365517152, 0.38385424616931973, 0.5336193957718353, 0.5014200678480283, 0.32701812773759636, 0.4007212567278529, 0.5224256520639181, 0.04449474339743783, 0.45281322989621176, 0.5152400000270209, 0.2791311915895589, 0.3550277712254864, 0.16010443943453678, 0.4551359265930321, 0.6798989849404713, 0.20909915930727688, 0.3239815524991035, 0.6241297300166675, 0.3859806141082527, 0.29502531807884086, 0.4678035220605126, 0.021574161982192905, 0.10765749252013904, 0.6099263690455247, 0.11076789086889365, 0.020626787174647842, 0.6484768761116372, 0.5269495399628076, 0.6842015099159706, 0.5318032663918825, 0.6459658631221312, 0.24108941128410605, 0.5282428348490007, 0.11508586669446493, 0.5767230781669882, 0.5126184197180482, 0.13393237760838486, 0.12877704362899467, 0.11809267127161466, 0.5732113677060404, 0.4650277588458246, 0.19657232108052777, 0.45809586862816337, 0.4802151337551695, 0.4822176949974435, 0.6971768110878656, 0.5914745871958926, 0.3009898252002854, 0.03294746293744977, 0.16001667613033596, 0.052364660393598966, 0.549115498483072, 0.555332394470296, 0.14998707349229795, 0.6639297738597724, 0.2261637823645921, 0.3261412474552212, 0.4066650125718359, 0.6985819104452934, 0.6278144137047045, 0.10102091604167335, 0.6254424150174316, 0.14223363887666493, 0.5620995501385927, 0.47003011273244244, 0.10611484426371016, 0.03749411142440205, 0.6506007087377399, 0.0034250834369676016, 0.10336103612564117, 0.6821433004885235, 0.4878861592495521, 0.39492360528805187, 0.31755766313043843, 0.40058007756304015, 0.3239276127524767, 0.046258805645901346, 0.16131919385589116, 0.21974813225764012, 0.3473362361003947, 0.2754461810503763, 0.5051549292806663, 0.5623073095596461, 0.5379378911285656, 0.32261606951798966, 0.2746958923653975, 0.016240185298756003, 0.2474366855879214, 0.5509401545987935, 0.2445960633111747, 0.20008877390298244, 0.11407699206124698, 0.4431961767874015, 0.35051790682132405, 0.03225273795843825, 0.16927416363879821, 0.053687927336659086, 0.10746109537624514, 0.1803175978833368, 0.05263677015607784, 0.6924118338988441, 0.4436272234631362, 0.08250058312457872, 0.36796412666162304, 0.2777595192480918, 0.1355907678760479, 0.2890771086971247, 0.3966572600829247, 0.06947334393236836, 0.6682939595467622, 0.3473720525410805, 0.05404030224997812, 0.4798578454528292, 0.6636101489907303, 0.011401001252968068, 0.4772536966515514, 0.5871053222267442, 0.3119119763251488, 0.053123689006751615, 0.5302392559921149, 0.23317305693417723, 0.21201538911692763, 0.5389572407534939, 0.0034126162750669374, 0.1725044499673648, 0.6347122278227233, 0.11121731488790966, 0.05074533766883168, 0.06533174017809458, 0.36372198486698826, 0.26187806033818706, 0.3591401458905362, 0.6404353666361431, 0.16874003866224463, 0.5380268463272463, 0.4065064028495482, 0.43864598685704403, 0.019389356665052815, 0.033383496627523074, 0.10610431364908003, 0.3093571543285732, 0.25604656199629755, 0.20907701920521476, 0.6059878129603569, 0.3967002350273306, 0.23585770555824037, 0.4260951759315009, 0.6090963103660714, 0.13580114870758725, 0.2798094680518256, 0.14836763574926448, 0.35854582481586955, 0.09208662170200667, 0.23800088309281178, 0.6969059599590102, 0.6436276754129453, 0.009210078478647153, 0.2434768225634164, 0.5691618458286487, 0.5866211742791386, 0.2199036376050671, 0.461215317281515, 0.534165618981301, 0.28249892209299543, 0.08015921904992866, 0.5497961339694498, 0.5143368812413286, 0.3932086043221785, 0.5460488257090141, 0.6930754768607994, 0.15452311469833746, 0.004469277669808924, 0.43735238785862335, 0.13302819920453263, 0.6072474643616517, 0.5321300019596166, 0.32960721994299436, 0.5492323995853949, 0.6613779782046582, 0.5064489834471043, 0.18822446924628294, 0.32146383952882446, 0.05674661263297647, 0.4399670432359381, 0.2310387290561353, 0.0967159803767839, 0.16466312958845727, 0.2197313540636621, 0.567390788330198, 0.013584205045139696, 0.116881429575923, 0.18517520427871234, 0.580644884358749, 0.07676248851327404, 0.6894454926147752, 0.5484221036294178 ], "y": [ 0.040666384737487404, 0.31132378947989325, 0.3850827622982058, 0.5209234813576031, -0.1825234489657423, 0.642641899697348, 0.4320573172208956, -0.37138541221986415, -0.48175045683065026, 0.33470035232856765, 0.5631711218799518, 0.36950552481740373, 0.5499934591395721, -0.4964074042400457, 0.7038690516936106, -0.021435865247612262, 0.03520398053378537, 0.5239325252128586, 0.23844328725937314, 0.07175978644779302, -0.3816316754045598, 0.6853865120128566, 0.26088256210974115, -0.4694616681675274, 0.18510010822762646, 0.37290241456297013, 0.10642400403814023, 0.28785245140097604, -0.260304259708665, 0.7982036239173402, 0.1360265361534404, -0.43655936296893955, -0.17318155727588286, 0.6025953951087075, 0.4592215833600526, 0.22554031678749487, -0.16928780193780735, 0.44755686030730846, 0.5654666447392276, -0.35282192867458084, -0.40663384194917007, 0.4851234047137485, 0.3316591262048789, 0.47619150112954356, -0.2586194275125996, 0.6720013228850252, 0.08472445187842848, 0.5033320323147559, -0.21230825968182576, -0.013685702951121648, -0.02530483573068648, 0.03606106112362828, 0.6300023716444434, 0.2274307017190591, 0.5378103229459257, 0.31605998591913154, 0.504488829253259, 0.13244985551336774, -0.46309681515202367, 0.17015288397295103, -0.3419469726415929, -0.47880554786471496, 0.6009350646433373, 0.22359972810768614, 0.22541193635751366, 0.2387655529288305, 0.08452963992830098, -0.1771004445387721, 0.10088228608318284, 0.16613899078415484, 0.421383675331537, 0.04131905006762637, -0.16791860338560466, 0.3265208725768586, 0.40661477191319395, -0.26245829455339253, 0.6892583752427393, 0.5218596020012973, -0.12853335619356088, 0.6216676465646569, 0.42931241596913783, -0.1818575510172346, -0.23109164117320524, 0.7696795400211351, 0.6238987561936971, -0.3983368597259991, -0.30071414530521134, 0.729783734043675, 0.36902823200344803, 0.2995690635945495, -0.4215452587569354, 0.4382943300282881, 0.1987955897134951, 0.38532013275698707, 0.4872390828610108, 0.34693923201848154, 0.3510288901554588, 0.7057371728356778, 0.4500692012232749, 0.08804290928805569, 0.6018576581427106, 0.4458929630485966, 0.2772253944234746, -0.03211636162611259, -0.027576803201994238, 0.7209288151252977, 0.36093673171726115, 0.33832762614802625, 0.12826978577327008, 0.44924472454417574, 0.7650388747564885, -0.26800909891097335, 0.1833626666303848, 0.3536757059014224, -0.19833339794231614, -0.04429612778624298, -0.2829647365291783, -0.35359150006395335, 0.1827304030063155, 0.016924411507184156, 0.5227628522994228, 0.378606001325828, 0.5312207621752614, 0.01639770747199909, 0.7964256811692325, 0.3143886117696909, -0.0742451884895729, 0.6452420872226408, 0.39381484935909217, 0.7174557840280407, -0.10638406766837194, 0.6934820851542423, 0.00981861693110797, -0.3862380311216124, -0.4675860443357518, 0.10728180124516074, 0.2922658875810856, -0.1661997429615914, -0.3266405028984589, -0.24981482245654468, -0.26008490109833804, -0.4356907690044717, -0.3074672214754355, -0.3280752875725478, 0.026889799576298667, 0.25268620026986355, 0.2961814253135999, -0.03957106820296635, -0.06576761756491939, -0.15901241286796486, 0.5842414273979841, 0.5723662315550802, 0.09402192568324652, 0.2415040169879502, -0.10369567596240153, 0.2862886535884315, 0.6664823110426779, 0.7078831143262521, 0.2809856954125839, -0.1153647626844333, 0.5166056045094947, -0.19596373168047232, -0.18178330950122834, -0.02157932869232554, 0.21076775347419618, 0.18198269324594918, 0.16957576077484826, 0.23980418600829623, -0.4805914263762741, 0.646823215015381, 0.758010617968798, -0.49546415819461603, -0.2252215845894217, 0.09739081189073895, 0.5756711266477585, -0.30311800041833614, 0.19201615743056244, 0.1276214088821207, 0.48820733210510237, 0.16625924147751492, -0.04352314214979358, -0.00227170688080075, 0.4604589552731707, 0.03670332685705313, 0.681551842592528, 0.32620469497102234, -0.1026350128987592, 0.13976697920336767, -0.3936063330168997, 0.5733022678687447, 0.5799149998253497, -0.08240158495691219, -0.08502038767020587, -0.03808029000543417, 0.057756851771847084, 0.4913945506424927, 0.2981005568384374, 0.6341037595687731, 0.1890641087657231, 0.5068279451720992 ], "z": [ 0.7098805373687822, 0.3193534355880619, 0.6370824071800971, 0.6721223978961954, 0.2023766903118507, 0.7228546924858668, 0.6753850858916464, -0.027934626620696262, -0.044904232291340156, 0.5138261017805326, 0.682934178185924, 0.17022244219362836, 0.6696729670120336, -0.1841578200118187, 0.7460625188533245, 0.23645620600601763, 0.06341763849755692, 0.6563432706461924, 0.9467614945596715, 0.12004627844211863, -0.020360622992926212, 0.6016214445344273, 0.4562103136054212, -0.021660451606612438, 0.5542243678941902, 0.15489821862787562, 0.055977736093426086, 0.8006496734887739, 0.026498859581491944, 0.621018377637362, 0.914367737569223, -0.12163839564147672, 0.5788856105202967, 0.689938746650016, 0.7063189287561182, 0.24429821988748346, 0.3233517693084423, 0.3045159405695814, 0.6692791884465094, 0.001433121271324233, 0.06822393290680641, 0.3571393050996755, 0.20101013639582557, 0.6869099432683803, 0.11716601343334947, 0.6462378152106949, 0.48375587689558264, 0.6577896411224744, 0.19833152456533337, 0.9353975328309945, 0.662444686568125, 0.20264904630160224, 0.4244199101447017, 0.1618069037779376, 0.3390546206658212, 0.7050783176419974, 0.6788679013562114, 0.0979406823917694, -0.2127388338239628, 0.19199139505382123, -0.00406656236615021, -0.09949176740350758, 0.5282607417252944, 0.8579206579710354, 0.11132606126750556, 0.8479462749778761, 0.07004544509755646, 0.359846287132657, 0.5166302030282769, 0.08203634851627004, 0.2084494782779759, 0.8759554576137096, 0.027063062622314303, 0.18409133756917404, 0.7691330295844141, 0.1288268135255605, 0.7677818154875075, 0.5694843258793824, 0.20586033550860144, 0.6770985734335248, 0.22330957206673732, 0.017460193696084123, 0.022504815641624418, 0.841559776665243, 0.6491390188824329, -0.06554110044671217, 0.11678926521447035, 0.7226691813981146, 0.4429095320873451, 0.3357906479660801, 0.16342786979208668, 0.4240255452534081, 0.7127716683994553, 0.3719533758979961, 0.4284853072013777, 0.21010566344696915, 0.5734253066603651, 0.7774213648689614, 0.22999799517054084, 0.09238645714861819, 0.41388545926285214, 0.29559618232454965, 0.2163169011870559, 0.003160046272539226, 0.9031447688286535, 0.7866543998090145, 0.19448904761845542, 0.4752279856525701, 0.22759416736119042, 0.32585239272094835, 0.8214678219194486, 0.06422181951258617, 0.06701660095836565, 0.8218866220334488, 0.09390167447624799, 0.0029519101287375834, 0.09289997441706369, 0.05398704108945993, 0.037762779129516574, 0.46883885941833886, 0.6746630698726483, 0.43835303270789905, 0.3325951643834393, 0.5746997288776641, 0.8278734343939044, 0.27757618215426716, 0.48715950961635013, 0.4084362376847868, 0.3068806242845299, 0.5756377261162011, 0.010870578743563815, 0.5234318099522149, 0.009911214450080577, -0.03213423719040844, 0.001752768101689721, 0.3286843489180976, 0.8431663485972473, 0.02018429806006679, 0.05379755336750953, 0.0879204472055172, 0.09698288986939946, 0.17226622768995306, 0.07518675874546005, 0.04953010504436811, 0.20775583551310794, 0.28024938488476586, 0.2601362622688183, 0.6762074329254325, 0.259171082721795, 0.04663363960889896, 0.6844833438557854, 0.6497706005282096, 0.06945529948519016, 0.3012674807269205, 0.0214322595308497, 0.4321992879186274, 0.5357129873016123, 0.7244398891089793, 0.9356446520862683, 0.629986848476279, 0.2729085938232621, 0.03800781833563966, 0.3616787898984701, 0.6562223644069678, 0.21081923437551003, 0.5411803302174039, 0.6742293937360165, 0.30347566995470227, 0.15555018040223995, 0.6894139257185101, 0.7584342210469791, -0.09651025604026403, 0.24816859977201755, 1.015612182699686, 0.48656203522311203, 0.08907568796408541, 0.5039985989697615, 0.08247750019879155, 0.6861866102269174, 0.6692473363173823, 0.18811667687499428, 0.5963622966671256, 0.7049872519172009, 0.5434172921671676, 0.6510468550017584, 0.4107514020343803, 0.004956569554289469, 0.4828811132645452, 0.011466980821170038, 0.42553365772011625, 0.5015507322315487, 0.06354567351535947, 0.5270251465122282, 0.0007816256065248163, 0.04365218616961354, 0.4186841742955548, 0.7534284590663741, 0.47827369972462574, 0.9962443272718757, 0.6778667855968934 ], "type": "scatter3d" } ], "layout": { "autosize": true, "height": 800, "template": { "data": { "barpolar": [ { "marker": { "line": { "color": "rgb(17,17,17)", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "bar": [ { "error_x": { "color": "#f2f5fa" }, "error_y": { "color": "#f2f5fa" }, "marker": { "line": { "color": "rgb(17,17,17)", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#A2B1C6", "gridcolor": "#506784", "linecolor": "#506784", "minorgridcolor": "#506784", "startlinecolor": "#A2B1C6" }, "baxis": { "endlinecolor": "#A2B1C6", "gridcolor": "#506784", "linecolor": "#506784", "minorgridcolor": "#506784", "startlinecolor": "#A2B1C6" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "contour" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "heatmapgl" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "heatmap" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "histogram2dcontour" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "histogram2d" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "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": { "line": { "color": "#283442" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatter": [ { "marker": { "line": { "color": "#283442" } }, "type": "scatter" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#506784" }, "line": { "color": "rgb(17,17,17)" } }, "header": { "fill": { "color": "#2a3f5f" }, "line": { "color": "rgb(17,17,17)" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#f2f5fa", "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.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.0, "#f0f921" ] ], "sequentialminus": [ [ 0.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.0, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#f2f5fa" }, "geo": { "bgcolor": "rgb(17,17,17)", "lakecolor": "rgb(17,17,17)", "landcolor": "rgb(17,17,17)", "showlakes": true, "showland": true, "subunitcolor": "#506784" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "dark" }, "paper_bgcolor": "rgb(17,17,17)", "plot_bgcolor": "rgb(17,17,17)", "polar": { "angularaxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" }, "bgcolor": "rgb(17,17,17)", "radialaxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3" }, "yaxis": { "backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3" }, "zaxis": { "backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3" } }, "shapedefaults": { "line": { "color": "#f2f5fa" } }, "sliderdefaults": { "bgcolor": "#C8D4E3", "bordercolor": "rgb(17,17,17)", "borderwidth": 1, "tickwidth": 0 }, "ternary": { "aaxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" }, "baxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" }, "bgcolor": "rgb(17,17,17)", "caxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" } }, "title": { "x": 0.05 }, "updatemenudefaults": { "bgcolor": "#506784", "borderwidth": 0 }, "xaxis": { "automargin": true, "gridcolor": "#283442", "linecolor": "#506784", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#283442", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "#283442", "linecolor": "#506784", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#283442", "zerolinewidth": 2 } } }, "title": { "text": "Generated noisy data and ground truth" } }, "config": { "showLink": false, "linkText": "Export to plot.ly", "plotlyServerURL": "https://plot.ly" } }, "text/html": "
" }, "metadata": {}, "output_type": "display_data" } ], "source": [ "x, y, y_true = benchmark_plane_1(noise_ratio=0.15, hetero=True, num_points=200)\n", "plot_results_2d(x_=x, y_=y, y_true_=y_true, title=\"Generated noisy data and ground truth\")" ], "metadata": { "collapsed": false, "ExecuteTime": { "end_time": "2024-03-23T15:13:56.720941Z", "start_time": "2024-03-23T15:13:56.664974Z" } }, "id": "3459851d90c4892f" }, { "cell_type": "markdown", "source": [ "Next regress the plane at the locations in the dataset." ], "metadata": { "collapsed": false }, "id": "11911ef03c42e252" }, { "cell_type": "code", "execution_count": 14, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "data": [ { "marker": { "size": 3 }, "mode": "markers", "name": "data", "x": [ 0.581688323222378, 0.2526626667839796, 0.4919175139074384, 0.6020831506568161, 0.4489222365517152, 0.38385424616931973, 0.5336193957718353, 0.5014200678480283, 0.32701812773759636, 0.4007212567278529, 0.5224256520639181, 0.04449474339743783, 0.45281322989621176, 0.5152400000270209, 0.2791311915895589, 0.3550277712254864, 0.16010443943453678, 0.4551359265930321, 0.6798989849404713, 0.20909915930727688, 0.3239815524991035, 0.6241297300166675, 0.3859806141082527, 0.29502531807884086, 0.4678035220605126, 0.021574161982192905, 0.10765749252013904, 0.6099263690455247, 0.11076789086889365, 0.020626787174647842, 0.6484768761116372, 0.5269495399628076, 0.6842015099159706, 0.5318032663918825, 0.6459658631221312, 0.24108941128410605, 0.5282428348490007, 0.11508586669446493, 0.5767230781669882, 0.5126184197180482, 0.13393237760838486, 0.12877704362899467, 0.11809267127161466, 0.5732113677060404, 0.4650277588458246, 0.19657232108052777, 0.45809586862816337, 0.4802151337551695, 0.4822176949974435, 0.6971768110878656, 0.5914745871958926, 0.3009898252002854, 0.03294746293744977, 0.16001667613033596, 0.052364660393598966, 0.549115498483072, 0.555332394470296, 0.14998707349229795, 0.6639297738597724, 0.2261637823645921, 0.3261412474552212, 0.4066650125718359, 0.6985819104452934, 0.6278144137047045, 0.10102091604167335, 0.6254424150174316, 0.14223363887666493, 0.5620995501385927, 0.47003011273244244, 0.10611484426371016, 0.03749411142440205, 0.6506007087377399, 0.0034250834369676016, 0.10336103612564117, 0.6821433004885235, 0.4878861592495521, 0.39492360528805187, 0.31755766313043843, 0.40058007756304015, 0.3239276127524767, 0.046258805645901346, 0.16131919385589116, 0.21974813225764012, 0.3473362361003947, 0.2754461810503763, 0.5051549292806663, 0.5623073095596461, 0.5379378911285656, 0.32261606951798966, 0.2746958923653975, 0.016240185298756003, 0.2474366855879214, 0.5509401545987935, 0.2445960633111747, 0.20008877390298244, 0.11407699206124698, 0.4431961767874015, 0.35051790682132405, 0.03225273795843825, 0.16927416363879821, 0.053687927336659086, 0.10746109537624514, 0.1803175978833368, 0.05263677015607784, 0.6924118338988441, 0.4436272234631362, 0.08250058312457872, 0.36796412666162304, 0.2777595192480918, 0.1355907678760479, 0.2890771086971247, 0.3966572600829247, 0.06947334393236836, 0.6682939595467622, 0.3473720525410805, 0.05404030224997812, 0.4798578454528292, 0.6636101489907303, 0.011401001252968068, 0.4772536966515514, 0.5871053222267442, 0.3119119763251488, 0.053123689006751615, 0.5302392559921149, 0.23317305693417723, 0.21201538911692763, 0.5389572407534939, 0.0034126162750669374, 0.1725044499673648, 0.6347122278227233, 0.11121731488790966, 0.05074533766883168, 0.06533174017809458, 0.36372198486698826, 0.26187806033818706, 0.3591401458905362, 0.6404353666361431, 0.16874003866224463, 0.5380268463272463, 0.4065064028495482, 0.43864598685704403, 0.019389356665052815, 0.033383496627523074, 0.10610431364908003, 0.3093571543285732, 0.25604656199629755, 0.20907701920521476, 0.6059878129603569, 0.3967002350273306, 0.23585770555824037, 0.4260951759315009, 0.6090963103660714, 0.13580114870758725, 0.2798094680518256, 0.14836763574926448, 0.35854582481586955, 0.09208662170200667, 0.23800088309281178, 0.6969059599590102, 0.6436276754129453, 0.009210078478647153, 0.2434768225634164, 0.5691618458286487, 0.5866211742791386, 0.2199036376050671, 0.461215317281515, 0.534165618981301, 0.28249892209299543, 0.08015921904992866, 0.5497961339694498, 0.5143368812413286, 0.3932086043221785, 0.5460488257090141, 0.6930754768607994, 0.15452311469833746, 0.004469277669808924, 0.43735238785862335, 0.13302819920453263, 0.6072474643616517, 0.5321300019596166, 0.32960721994299436, 0.5492323995853949, 0.6613779782046582, 0.5064489834471043, 0.18822446924628294, 0.32146383952882446, 0.05674661263297647, 0.4399670432359381, 0.2310387290561353, 0.0967159803767839, 0.16466312958845727, 0.2197313540636621, 0.567390788330198, 0.013584205045139696, 0.116881429575923, 0.18517520427871234, 0.580644884358749, 0.07676248851327404, 0.6894454926147752, 0.5484221036294178 ], "y": [ 0.040666384737487404, 0.31132378947989325, 0.3850827622982058, 0.5209234813576031, -0.1825234489657423, 0.642641899697348, 0.4320573172208956, -0.37138541221986415, -0.48175045683065026, 0.33470035232856765, 0.5631711218799518, 0.36950552481740373, 0.5499934591395721, -0.4964074042400457, 0.7038690516936106, -0.021435865247612262, 0.03520398053378537, 0.5239325252128586, 0.23844328725937314, 0.07175978644779302, -0.3816316754045598, 0.6853865120128566, 0.26088256210974115, -0.4694616681675274, 0.18510010822762646, 0.37290241456297013, 0.10642400403814023, 0.28785245140097604, -0.260304259708665, 0.7982036239173402, 0.1360265361534404, -0.43655936296893955, -0.17318155727588286, 0.6025953951087075, 0.4592215833600526, 0.22554031678749487, -0.16928780193780735, 0.44755686030730846, 0.5654666447392276, -0.35282192867458084, -0.40663384194917007, 0.4851234047137485, 0.3316591262048789, 0.47619150112954356, -0.2586194275125996, 0.6720013228850252, 0.08472445187842848, 0.5033320323147559, -0.21230825968182576, -0.013685702951121648, -0.02530483573068648, 0.03606106112362828, 0.6300023716444434, 0.2274307017190591, 0.5378103229459257, 0.31605998591913154, 0.504488829253259, 0.13244985551336774, -0.46309681515202367, 0.17015288397295103, -0.3419469726415929, -0.47880554786471496, 0.6009350646433373, 0.22359972810768614, 0.22541193635751366, 0.2387655529288305, 0.08452963992830098, -0.1771004445387721, 0.10088228608318284, 0.16613899078415484, 0.421383675331537, 0.04131905006762637, -0.16791860338560466, 0.3265208725768586, 0.40661477191319395, -0.26245829455339253, 0.6892583752427393, 0.5218596020012973, -0.12853335619356088, 0.6216676465646569, 0.42931241596913783, -0.1818575510172346, -0.23109164117320524, 0.7696795400211351, 0.6238987561936971, -0.3983368597259991, -0.30071414530521134, 0.729783734043675, 0.36902823200344803, 0.2995690635945495, -0.4215452587569354, 0.4382943300282881, 0.1987955897134951, 0.38532013275698707, 0.4872390828610108, 0.34693923201848154, 0.3510288901554588, 0.7057371728356778, 0.4500692012232749, 0.08804290928805569, 0.6018576581427106, 0.4458929630485966, 0.2772253944234746, -0.03211636162611259, -0.027576803201994238, 0.7209288151252977, 0.36093673171726115, 0.33832762614802625, 0.12826978577327008, 0.44924472454417574, 0.7650388747564885, -0.26800909891097335, 0.1833626666303848, 0.3536757059014224, -0.19833339794231614, -0.04429612778624298, -0.2829647365291783, -0.35359150006395335, 0.1827304030063155, 0.016924411507184156, 0.5227628522994228, 0.378606001325828, 0.5312207621752614, 0.01639770747199909, 0.7964256811692325, 0.3143886117696909, -0.0742451884895729, 0.6452420872226408, 0.39381484935909217, 0.7174557840280407, -0.10638406766837194, 0.6934820851542423, 0.00981861693110797, -0.3862380311216124, -0.4675860443357518, 0.10728180124516074, 0.2922658875810856, -0.1661997429615914, -0.3266405028984589, -0.24981482245654468, -0.26008490109833804, -0.4356907690044717, -0.3074672214754355, -0.3280752875725478, 0.026889799576298667, 0.25268620026986355, 0.2961814253135999, -0.03957106820296635, -0.06576761756491939, -0.15901241286796486, 0.5842414273979841, 0.5723662315550802, 0.09402192568324652, 0.2415040169879502, -0.10369567596240153, 0.2862886535884315, 0.6664823110426779, 0.7078831143262521, 0.2809856954125839, -0.1153647626844333, 0.5166056045094947, -0.19596373168047232, -0.18178330950122834, -0.02157932869232554, 0.21076775347419618, 0.18198269324594918, 0.16957576077484826, 0.23980418600829623, -0.4805914263762741, 0.646823215015381, 0.758010617968798, -0.49546415819461603, -0.2252215845894217, 0.09739081189073895, 0.5756711266477585, -0.30311800041833614, 0.19201615743056244, 0.1276214088821207, 0.48820733210510237, 0.16625924147751492, -0.04352314214979358, -0.00227170688080075, 0.4604589552731707, 0.03670332685705313, 0.681551842592528, 0.32620469497102234, -0.1026350128987592, 0.13976697920336767, -0.3936063330168997, 0.5733022678687447, 0.5799149998253497, -0.08240158495691219, -0.08502038767020587, -0.03808029000543417, 0.057756851771847084, 0.4913945506424927, 0.2981005568384374, 0.6341037595687731, 0.1890641087657231, 0.5068279451720992 ], "z": [ 0.6935645739586053, 0.283162206150284, 0.6346338032501165, 0.7256605486298391, 0.1651193309346472, 0.7189334831893194, 0.6028849112874047, 0.006024520465025891, -0.10459565651781173, 0.5329937333366107, 0.6760475440326196, 0.08389372389767391, 0.6496940591170581, -0.4435308426812251, 1.0550955987848576, 0.2696369230420926, 0.11699561994736826, 0.7624670830100723, 1.1072243997143458, 0.19541889553729272, 0.10617857146454737, 0.9036616184637163, 0.39208085639611256, -0.018155143655484512, 0.4860672781664319, 0.15104355681131046, -0.1355736495630433, 0.7270130150423787, 0.14750817598778923, 0.5506708882316875, 0.961396145099069, -0.18922821074602492, 0.5691972225350067, 0.5082069513197689, 0.696050399070882, 0.02046196086066565, 0.3522416360478374, 0.0742714502740861, 0.6734373956778398, -0.034845274546419336, 0.031430672965573406, 0.4024908321494135, 0.15736686479004294, 0.632165385454945, 0.11197662686536944, 0.6690181691905683, 0.3874025868126615, 0.7758489449678193, 0.20272515867483343, 0.8716129855494666, 0.58248161652441, 0.189208307982293, 0.5210585220390657, 0.18760012407445176, 0.3451219940150463, 0.6326165329523041, 0.673528076663178, -0.27016092940480385, -0.17804138239644585, 0.29978945613128766, -0.008717055801530555, -0.06671140270368241, 0.3763758527934483, 0.9376204759917388, 0.10922970649532697, 0.847438316331619, 0.27172227162338375, 0.24329626089966186, 0.5418485223100864, 0.07915599812576542, 0.19235813555940137, 0.8750113168821768, 0.02458864221629116, 0.19526528216635503, 0.889969486358905, 0.10767743319176484, 0.8687564103070955, 0.6000839149148673, 0.22137864469200508, 0.7500624813752832, 0.21221707628955921, 0.28299720083284274, -0.06498486865656046, 0.7746045524578705, 0.8205197820677956, -0.09706569838428569, 0.11636543822117722, 0.5595983776124512, 0.40665424680012935, 0.3544344330682455, -0.1425532860858839, 0.42592696448408895, 0.6748205610227362, 0.5894351931795047, 0.5129715628288325, 0.2152327635118414, 0.660918470731104, 0.9689643343704814, 0.3746321063590913, -0.14532704767826887, 0.3787032887086399, 0.27568564250216954, 0.05518882810588677, -0.012924089610683549, 0.9299244373081138, 0.7479394132392635, 0.2778188444302556, 0.5483078893935941, 0.2372826262033902, 0.3646509214037616, 0.8241858827803639, 0.060301488447797376, 0.037004014823586756, 0.6803762077133739, 0.09976662252161735, 0.13910730093351065, 0.09113745567012417, 0.07205830740533738, -0.1398248453294032, 0.464263151227423, 0.6905983579326113, 0.42449766465320543, 0.33418305214250854, 0.5273255843446383, 0.6618452729160489, 0.2587428464342454, 0.7468090682146422, 0.3570579734697211, 0.0885441681822138, 0.5290899147853804, -0.024541164845097684, 0.7066377774838708, 0.1654940823355386, -0.172313535800673, -0.1609282396114645, 0.31010115392895726, 0.8402530154610266, -0.08217849802879522, 0.06742413504358545, 0.07297507856539304, 0.12954042463291612, 0.14629671660930774, 0.0761871065122222, 0.039484333376546644, 0.24408682728101175, 0.4390447158171714, 0.2736518731181485, 0.9093379215708027, 0.140442791331229, 0.008895590762464295, 0.5821081870828413, 0.6327688056700503, 0.06388585673312211, 0.5527786549427022, 0.03504834084769846, 0.5605666832009338, 0.4560026051952677, 0.7534541729547581, 0.8100582655020718, 0.6389786200143823, 0.39100778183628304, -0.059991357989156495, 0.47322359788003404, 0.6480939044130466, 0.2109755727070483, 0.4862885009225726, 0.6741933315586446, 0.2583738536837147, 0.02653271450281708, 0.6256332983414281, 0.7380308103610429, 0.04129295353676629, -0.028986220661658124, 1.0077553214135995, 0.5733995995735895, 0.2304262983135759, 0.5060260695780101, 0.07920000518378845, 0.7612904237716122, 0.6638506720410459, 0.13341362634729712, 0.5499463142247829, 0.6879315981230734, 0.7780454236429268, 0.4252830840153272, 0.2491928962002778, 0.12480220207232767, 0.5277665984320761, 0.06242239925126839, 0.38257496822735026, 0.520136684571722, 0.022174906582948906, 0.48726418304997154, -0.10351984061708337, 0.040466446956931294, 0.4146996897204944, 0.680004108930069, 0.6971227238774057, 1.0083236691632318, 0.6748132907859759 ], "type": "scatter3d" }, { "marker": { "size": 3 }, "mode": "markers", "name": "y_true", "x": [ 0.581688323222378, 0.2526626667839796, 0.4919175139074384, 0.6020831506568161, 0.4489222365517152, 0.38385424616931973, 0.5336193957718353, 0.5014200678480283, 0.32701812773759636, 0.4007212567278529, 0.5224256520639181, 0.04449474339743783, 0.45281322989621176, 0.5152400000270209, 0.2791311915895589, 0.3550277712254864, 0.16010443943453678, 0.4551359265930321, 0.6798989849404713, 0.20909915930727688, 0.3239815524991035, 0.6241297300166675, 0.3859806141082527, 0.29502531807884086, 0.4678035220605126, 0.021574161982192905, 0.10765749252013904, 0.6099263690455247, 0.11076789086889365, 0.020626787174647842, 0.6484768761116372, 0.5269495399628076, 0.6842015099159706, 0.5318032663918825, 0.6459658631221312, 0.24108941128410605, 0.5282428348490007, 0.11508586669446493, 0.5767230781669882, 0.5126184197180482, 0.13393237760838486, 0.12877704362899467, 0.11809267127161466, 0.5732113677060404, 0.4650277588458246, 0.19657232108052777, 0.45809586862816337, 0.4802151337551695, 0.4822176949974435, 0.6971768110878656, 0.5914745871958926, 0.3009898252002854, 0.03294746293744977, 0.16001667613033596, 0.052364660393598966, 0.549115498483072, 0.555332394470296, 0.14998707349229795, 0.6639297738597724, 0.2261637823645921, 0.3261412474552212, 0.4066650125718359, 0.6985819104452934, 0.6278144137047045, 0.10102091604167335, 0.6254424150174316, 0.14223363887666493, 0.5620995501385927, 0.47003011273244244, 0.10611484426371016, 0.03749411142440205, 0.6506007087377399, 0.0034250834369676016, 0.10336103612564117, 0.6821433004885235, 0.4878861592495521, 0.39492360528805187, 0.31755766313043843, 0.40058007756304015, 0.3239276127524767, 0.046258805645901346, 0.16131919385589116, 0.21974813225764012, 0.3473362361003947, 0.2754461810503763, 0.5051549292806663, 0.5623073095596461, 0.5379378911285656, 0.32261606951798966, 0.2746958923653975, 0.016240185298756003, 0.2474366855879214, 0.5509401545987935, 0.2445960633111747, 0.20008877390298244, 0.11407699206124698, 0.4431961767874015, 0.35051790682132405, 0.03225273795843825, 0.16927416363879821, 0.053687927336659086, 0.10746109537624514, 0.1803175978833368, 0.05263677015607784, 0.6924118338988441, 0.4436272234631362, 0.08250058312457872, 0.36796412666162304, 0.2777595192480918, 0.1355907678760479, 0.2890771086971247, 0.3966572600829247, 0.06947334393236836, 0.6682939595467622, 0.3473720525410805, 0.05404030224997812, 0.4798578454528292, 0.6636101489907303, 0.011401001252968068, 0.4772536966515514, 0.5871053222267442, 0.3119119763251488, 0.053123689006751615, 0.5302392559921149, 0.23317305693417723, 0.21201538911692763, 0.5389572407534939, 0.0034126162750669374, 0.1725044499673648, 0.6347122278227233, 0.11121731488790966, 0.05074533766883168, 0.06533174017809458, 0.36372198486698826, 0.26187806033818706, 0.3591401458905362, 0.6404353666361431, 0.16874003866224463, 0.5380268463272463, 0.4065064028495482, 0.43864598685704403, 0.019389356665052815, 0.033383496627523074, 0.10610431364908003, 0.3093571543285732, 0.25604656199629755, 0.20907701920521476, 0.6059878129603569, 0.3967002350273306, 0.23585770555824037, 0.4260951759315009, 0.6090963103660714, 0.13580114870758725, 0.2798094680518256, 0.14836763574926448, 0.35854582481586955, 0.09208662170200667, 0.23800088309281178, 0.6969059599590102, 0.6436276754129453, 0.009210078478647153, 0.2434768225634164, 0.5691618458286487, 0.5866211742791386, 0.2199036376050671, 0.461215317281515, 0.534165618981301, 0.28249892209299543, 0.08015921904992866, 0.5497961339694498, 0.5143368812413286, 0.3932086043221785, 0.5460488257090141, 0.6930754768607994, 0.15452311469833746, 0.004469277669808924, 0.43735238785862335, 0.13302819920453263, 0.6072474643616517, 0.5321300019596166, 0.32960721994299436, 0.5492323995853949, 0.6613779782046582, 0.5064489834471043, 0.18822446924628294, 0.32146383952882446, 0.05674661263297647, 0.4399670432359381, 0.2310387290561353, 0.0967159803767839, 0.16466312958845727, 0.2197313540636621, 0.567390788330198, 0.013584205045139696, 0.116881429575923, 0.18517520427871234, 0.580644884358749, 0.07676248851327404, 0.6894454926147752, 0.5484221036294178 ], "y": [ 0.040666384737487404, 0.31132378947989325, 0.3850827622982058, 0.5209234813576031, -0.1825234489657423, 0.642641899697348, 0.4320573172208956, -0.37138541221986415, -0.48175045683065026, 0.33470035232856765, 0.5631711218799518, 0.36950552481740373, 0.5499934591395721, -0.4964074042400457, 0.7038690516936106, -0.021435865247612262, 0.03520398053378537, 0.5239325252128586, 0.23844328725937314, 0.07175978644779302, -0.3816316754045598, 0.6853865120128566, 0.26088256210974115, -0.4694616681675274, 0.18510010822762646, 0.37290241456297013, 0.10642400403814023, 0.28785245140097604, -0.260304259708665, 0.7982036239173402, 0.1360265361534404, -0.43655936296893955, -0.17318155727588286, 0.6025953951087075, 0.4592215833600526, 0.22554031678749487, -0.16928780193780735, 0.44755686030730846, 0.5654666447392276, -0.35282192867458084, -0.40663384194917007, 0.4851234047137485, 0.3316591262048789, 0.47619150112954356, -0.2586194275125996, 0.6720013228850252, 0.08472445187842848, 0.5033320323147559, -0.21230825968182576, -0.013685702951121648, -0.02530483573068648, 0.03606106112362828, 0.6300023716444434, 0.2274307017190591, 0.5378103229459257, 0.31605998591913154, 0.504488829253259, 0.13244985551336774, -0.46309681515202367, 0.17015288397295103, -0.3419469726415929, -0.47880554786471496, 0.6009350646433373, 0.22359972810768614, 0.22541193635751366, 0.2387655529288305, 0.08452963992830098, -0.1771004445387721, 0.10088228608318284, 0.16613899078415484, 0.421383675331537, 0.04131905006762637, -0.16791860338560466, 0.3265208725768586, 0.40661477191319395, -0.26245829455339253, 0.6892583752427393, 0.5218596020012973, -0.12853335619356088, 0.6216676465646569, 0.42931241596913783, -0.1818575510172346, -0.23109164117320524, 0.7696795400211351, 0.6238987561936971, -0.3983368597259991, -0.30071414530521134, 0.729783734043675, 0.36902823200344803, 0.2995690635945495, -0.4215452587569354, 0.4382943300282881, 0.1987955897134951, 0.38532013275698707, 0.4872390828610108, 0.34693923201848154, 0.3510288901554588, 0.7057371728356778, 0.4500692012232749, 0.08804290928805569, 0.6018576581427106, 0.4458929630485966, 0.2772253944234746, -0.03211636162611259, -0.027576803201994238, 0.7209288151252977, 0.36093673171726115, 0.33832762614802625, 0.12826978577327008, 0.44924472454417574, 0.7650388747564885, -0.26800909891097335, 0.1833626666303848, 0.3536757059014224, -0.19833339794231614, -0.04429612778624298, -0.2829647365291783, -0.35359150006395335, 0.1827304030063155, 0.016924411507184156, 0.5227628522994228, 0.378606001325828, 0.5312207621752614, 0.01639770747199909, 0.7964256811692325, 0.3143886117696909, -0.0742451884895729, 0.6452420872226408, 0.39381484935909217, 0.7174557840280407, -0.10638406766837194, 0.6934820851542423, 0.00981861693110797, -0.3862380311216124, -0.4675860443357518, 0.10728180124516074, 0.2922658875810856, -0.1661997429615914, -0.3266405028984589, -0.24981482245654468, -0.26008490109833804, -0.4356907690044717, -0.3074672214754355, -0.3280752875725478, 0.026889799576298667, 0.25268620026986355, 0.2961814253135999, -0.03957106820296635, -0.06576761756491939, -0.15901241286796486, 0.5842414273979841, 0.5723662315550802, 0.09402192568324652, 0.2415040169879502, -0.10369567596240153, 0.2862886535884315, 0.6664823110426779, 0.7078831143262521, 0.2809856954125839, -0.1153647626844333, 0.5166056045094947, -0.19596373168047232, -0.18178330950122834, -0.02157932869232554, 0.21076775347419618, 0.18198269324594918, 0.16957576077484826, 0.23980418600829623, -0.4805914263762741, 0.646823215015381, 0.758010617968798, -0.49546415819461603, -0.2252215845894217, 0.09739081189073895, 0.5756711266477585, -0.30311800041833614, 0.19201615743056244, 0.1276214088821207, 0.48820733210510237, 0.16625924147751492, -0.04352314214979358, -0.00227170688080075, 0.4604589552731707, 0.03670332685705313, 0.681551842592528, 0.32620469497102234, -0.1026350128987592, 0.13976697920336767, -0.3936063330168997, 0.5733022678687447, 0.5799149998253497, -0.08240158495691219, -0.08502038767020587, -0.03808029000543417, 0.057756851771847084, 0.4913945506424927, 0.2981005568384374, 0.6341037595687731, 0.1890641087657231, 0.5068279451720992 ], "z": [ 0.7098805373687822, 0.3193534355880619, 0.6370824071800971, 0.6721223978961954, 0.2023766903118507, 0.7228546924858668, 0.6753850858916464, -0.027934626620696262, -0.044904232291340156, 0.5138261017805326, 0.682934178185924, 0.17022244219362836, 0.6696729670120336, -0.1841578200118187, 0.7460625188533245, 0.23645620600601763, 0.06341763849755692, 0.6563432706461924, 0.9467614945596715, 0.12004627844211863, -0.020360622992926212, 0.6016214445344273, 0.4562103136054212, -0.021660451606612438, 0.5542243678941902, 0.15489821862787562, 0.055977736093426086, 0.8006496734887739, 0.026498859581491944, 0.621018377637362, 0.914367737569223, -0.12163839564147672, 0.5788856105202967, 0.689938746650016, 0.7063189287561182, 0.24429821988748346, 0.3233517693084423, 0.3045159405695814, 0.6692791884465094, 0.001433121271324233, 0.06822393290680641, 0.3571393050996755, 0.20101013639582557, 0.6869099432683803, 0.11716601343334947, 0.6462378152106949, 0.48375587689558264, 0.6577896411224744, 0.19833152456533337, 0.9353975328309945, 0.662444686568125, 0.20264904630160224, 0.4244199101447017, 0.1618069037779376, 0.3390546206658212, 0.7050783176419974, 0.6788679013562114, 0.0979406823917694, -0.2127388338239628, 0.19199139505382123, -0.00406656236615021, -0.09949176740350758, 0.5282607417252944, 0.8579206579710354, 0.11132606126750556, 0.8479462749778761, 0.07004544509755646, 0.359846287132657, 0.5166302030282769, 0.08203634851627004, 0.2084494782779759, 0.8759554576137096, 0.027063062622314303, 0.18409133756917404, 0.7691330295844141, 0.1288268135255605, 0.7677818154875075, 0.5694843258793824, 0.20586033550860144, 0.6770985734335248, 0.22330957206673732, 0.017460193696084123, 0.022504815641624418, 0.841559776665243, 0.6491390188824329, -0.06554110044671217, 0.11678926521447035, 0.7226691813981146, 0.4429095320873451, 0.3357906479660801, 0.16342786979208668, 0.4240255452534081, 0.7127716683994553, 0.3719533758979961, 0.4284853072013777, 0.21010566344696915, 0.5734253066603651, 0.7774213648689614, 0.22999799517054084, 0.09238645714861819, 0.41388545926285214, 0.29559618232454965, 0.2163169011870559, 0.003160046272539226, 0.9031447688286535, 0.7866543998090145, 0.19448904761845542, 0.4752279856525701, 0.22759416736119042, 0.32585239272094835, 0.8214678219194486, 0.06422181951258617, 0.06701660095836565, 0.8218866220334488, 0.09390167447624799, 0.0029519101287375834, 0.09289997441706369, 0.05398704108945993, 0.037762779129516574, 0.46883885941833886, 0.6746630698726483, 0.43835303270789905, 0.3325951643834393, 0.5746997288776641, 0.8278734343939044, 0.27757618215426716, 0.48715950961635013, 0.4084362376847868, 0.3068806242845299, 0.5756377261162011, 0.010870578743563815, 0.5234318099522149, 0.009911214450080577, -0.03213423719040844, 0.001752768101689721, 0.3286843489180976, 0.8431663485972473, 0.02018429806006679, 0.05379755336750953, 0.0879204472055172, 0.09698288986939946, 0.17226622768995306, 0.07518675874546005, 0.04953010504436811, 0.20775583551310794, 0.28024938488476586, 0.2601362622688183, 0.6762074329254325, 0.259171082721795, 0.04663363960889896, 0.6844833438557854, 0.6497706005282096, 0.06945529948519016, 0.3012674807269205, 0.0214322595308497, 0.4321992879186274, 0.5357129873016123, 0.7244398891089793, 0.9356446520862683, 0.629986848476279, 0.2729085938232621, 0.03800781833563966, 0.3616787898984701, 0.6562223644069678, 0.21081923437551003, 0.5411803302174039, 0.6742293937360165, 0.30347566995470227, 0.15555018040223995, 0.6894139257185101, 0.7584342210469791, -0.09651025604026403, 0.24816859977201755, 1.015612182699686, 0.48656203522311203, 0.08907568796408541, 0.5039985989697615, 0.08247750019879155, 0.6861866102269174, 0.6692473363173823, 0.18811667687499428, 0.5963622966671256, 0.7049872519172009, 0.5434172921671676, 0.6510468550017584, 0.4107514020343803, 0.004956569554289469, 0.4828811132645452, 0.011466980821170038, 0.42553365772011625, 0.5015507322315487, 0.06354567351535947, 0.5270251465122282, 0.0007816256065248163, 0.04365218616961354, 0.4186841742955548, 0.7534284590663741, 0.47827369972462574, 0.9962443272718757, 0.6778667855968934 ], "type": "scatter3d" }, { "marker": { "size": 3 }, "mode": "markers", "name": "y_hat", "x": [ 0.581688323222378, 0.2526626667839796, 0.4919175139074384, 0.6020831506568161, 0.4489222365517152, 0.38385424616931973, 0.5336193957718353, 0.5014200678480283, 0.32701812773759636, 0.4007212567278529, 0.5224256520639181, 0.04449474339743783, 0.45281322989621176, 0.5152400000270209, 0.2791311915895589, 0.3550277712254864, 0.16010443943453678, 0.4551359265930321, 0.6798989849404713, 0.20909915930727688, 0.3239815524991035, 0.6241297300166675, 0.3859806141082527, 0.29502531807884086, 0.4678035220605126, 0.021574161982192905, 0.10765749252013904, 0.6099263690455247, 0.11076789086889365, 0.020626787174647842, 0.6484768761116372, 0.5269495399628076, 0.6842015099159706, 0.5318032663918825, 0.6459658631221312, 0.24108941128410605, 0.5282428348490007, 0.11508586669446493, 0.5767230781669882, 0.5126184197180482, 0.13393237760838486, 0.12877704362899467, 0.11809267127161466, 0.5732113677060404, 0.4650277588458246, 0.19657232108052777, 0.45809586862816337, 0.4802151337551695, 0.4822176949974435, 0.6971768110878656, 0.5914745871958926, 0.3009898252002854, 0.03294746293744977, 0.16001667613033596, 0.052364660393598966, 0.549115498483072, 0.555332394470296, 0.14998707349229795, 0.6639297738597724, 0.2261637823645921, 0.3261412474552212, 0.4066650125718359, 0.6985819104452934, 0.6278144137047045, 0.10102091604167335, 0.6254424150174316, 0.14223363887666493, 0.5620995501385927, 0.47003011273244244, 0.10611484426371016, 0.03749411142440205, 0.6506007087377399, 0.0034250834369676016, 0.10336103612564117, 0.6821433004885235, 0.4878861592495521, 0.39492360528805187, 0.31755766313043843, 0.40058007756304015, 0.3239276127524767, 0.046258805645901346, 0.16131919385589116, 0.21974813225764012, 0.3473362361003947, 0.2754461810503763, 0.5051549292806663, 0.5623073095596461, 0.5379378911285656, 0.32261606951798966, 0.2746958923653975, 0.016240185298756003, 0.2474366855879214, 0.5509401545987935, 0.2445960633111747, 0.20008877390298244, 0.11407699206124698, 0.4431961767874015, 0.35051790682132405, 0.03225273795843825, 0.16927416363879821, 0.053687927336659086, 0.10746109537624514, 0.1803175978833368, 0.05263677015607784, 0.6924118338988441, 0.4436272234631362, 0.08250058312457872, 0.36796412666162304, 0.2777595192480918, 0.1355907678760479, 0.2890771086971247, 0.3966572600829247, 0.06947334393236836, 0.6682939595467622, 0.3473720525410805, 0.05404030224997812, 0.4798578454528292, 0.6636101489907303, 0.011401001252968068, 0.4772536966515514, 0.5871053222267442, 0.3119119763251488, 0.053123689006751615, 0.5302392559921149, 0.23317305693417723, 0.21201538911692763, 0.5389572407534939, 0.0034126162750669374, 0.1725044499673648, 0.6347122278227233, 0.11121731488790966, 0.05074533766883168, 0.06533174017809458, 0.36372198486698826, 0.26187806033818706, 0.3591401458905362, 0.6404353666361431, 0.16874003866224463, 0.5380268463272463, 0.4065064028495482, 0.43864598685704403, 0.019389356665052815, 0.033383496627523074, 0.10610431364908003, 0.3093571543285732, 0.25604656199629755, 0.20907701920521476, 0.6059878129603569, 0.3967002350273306, 0.23585770555824037, 0.4260951759315009, 0.6090963103660714, 0.13580114870758725, 0.2798094680518256, 0.14836763574926448, 0.35854582481586955, 0.09208662170200667, 0.23800088309281178, 0.6969059599590102, 0.6436276754129453, 0.009210078478647153, 0.2434768225634164, 0.5691618458286487, 0.5866211742791386, 0.2199036376050671, 0.461215317281515, 0.534165618981301, 0.28249892209299543, 0.08015921904992866, 0.5497961339694498, 0.5143368812413286, 0.3932086043221785, 0.5460488257090141, 0.6930754768607994, 0.15452311469833746, 0.004469277669808924, 0.43735238785862335, 0.13302819920453263, 0.6072474643616517, 0.5321300019596166, 0.32960721994299436, 0.5492323995853949, 0.6613779782046582, 0.5064489834471043, 0.18822446924628294, 0.32146383952882446, 0.05674661263297647, 0.4399670432359381, 0.2310387290561353, 0.0967159803767839, 0.16466312958845727, 0.2197313540636621, 0.567390788330198, 0.013584205045139696, 0.116881429575923, 0.18517520427871234, 0.580644884358749, 0.07676248851327404, 0.6894454926147752, 0.5484221036294178 ], "y": [ 0.040666384737487404, 0.31132378947989325, 0.3850827622982058, 0.5209234813576031, -0.1825234489657423, 0.642641899697348, 0.4320573172208956, -0.37138541221986415, -0.48175045683065026, 0.33470035232856765, 0.5631711218799518, 0.36950552481740373, 0.5499934591395721, -0.4964074042400457, 0.7038690516936106, -0.021435865247612262, 0.03520398053378537, 0.5239325252128586, 0.23844328725937314, 0.07175978644779302, -0.3816316754045598, 0.6853865120128566, 0.26088256210974115, -0.4694616681675274, 0.18510010822762646, 0.37290241456297013, 0.10642400403814023, 0.28785245140097604, -0.260304259708665, 0.7982036239173402, 0.1360265361534404, -0.43655936296893955, -0.17318155727588286, 0.6025953951087075, 0.4592215833600526, 0.22554031678749487, -0.16928780193780735, 0.44755686030730846, 0.5654666447392276, -0.35282192867458084, -0.40663384194917007, 0.4851234047137485, 0.3316591262048789, 0.47619150112954356, -0.2586194275125996, 0.6720013228850252, 0.08472445187842848, 0.5033320323147559, -0.21230825968182576, -0.013685702951121648, -0.02530483573068648, 0.03606106112362828, 0.6300023716444434, 0.2274307017190591, 0.5378103229459257, 0.31605998591913154, 0.504488829253259, 0.13244985551336774, -0.46309681515202367, 0.17015288397295103, -0.3419469726415929, -0.47880554786471496, 0.6009350646433373, 0.22359972810768614, 0.22541193635751366, 0.2387655529288305, 0.08452963992830098, -0.1771004445387721, 0.10088228608318284, 0.16613899078415484, 0.421383675331537, 0.04131905006762637, -0.16791860338560466, 0.3265208725768586, 0.40661477191319395, -0.26245829455339253, 0.6892583752427393, 0.5218596020012973, -0.12853335619356088, 0.6216676465646569, 0.42931241596913783, -0.1818575510172346, -0.23109164117320524, 0.7696795400211351, 0.6238987561936971, -0.3983368597259991, -0.30071414530521134, 0.729783734043675, 0.36902823200344803, 0.2995690635945495, -0.4215452587569354, 0.4382943300282881, 0.1987955897134951, 0.38532013275698707, 0.4872390828610108, 0.34693923201848154, 0.3510288901554588, 0.7057371728356778, 0.4500692012232749, 0.08804290928805569, 0.6018576581427106, 0.4458929630485966, 0.2772253944234746, -0.03211636162611259, -0.027576803201994238, 0.7209288151252977, 0.36093673171726115, 0.33832762614802625, 0.12826978577327008, 0.44924472454417574, 0.7650388747564885, -0.26800909891097335, 0.1833626666303848, 0.3536757059014224, -0.19833339794231614, -0.04429612778624298, -0.2829647365291783, -0.35359150006395335, 0.1827304030063155, 0.016924411507184156, 0.5227628522994228, 0.378606001325828, 0.5312207621752614, 0.01639770747199909, 0.7964256811692325, 0.3143886117696909, -0.0742451884895729, 0.6452420872226408, 0.39381484935909217, 0.7174557840280407, -0.10638406766837194, 0.6934820851542423, 0.00981861693110797, -0.3862380311216124, -0.4675860443357518, 0.10728180124516074, 0.2922658875810856, -0.1661997429615914, -0.3266405028984589, -0.24981482245654468, -0.26008490109833804, -0.4356907690044717, -0.3074672214754355, -0.3280752875725478, 0.026889799576298667, 0.25268620026986355, 0.2961814253135999, -0.03957106820296635, -0.06576761756491939, -0.15901241286796486, 0.5842414273979841, 0.5723662315550802, 0.09402192568324652, 0.2415040169879502, -0.10369567596240153, 0.2862886535884315, 0.6664823110426779, 0.7078831143262521, 0.2809856954125839, -0.1153647626844333, 0.5166056045094947, -0.19596373168047232, -0.18178330950122834, -0.02157932869232554, 0.21076775347419618, 0.18198269324594918, 0.16957576077484826, 0.23980418600829623, -0.4805914263762741, 0.646823215015381, 0.758010617968798, -0.49546415819461603, -0.2252215845894217, 0.09739081189073895, 0.5756711266477585, -0.30311800041833614, 0.19201615743056244, 0.1276214088821207, 0.48820733210510237, 0.16625924147751492, -0.04352314214979358, -0.00227170688080075, 0.4604589552731707, 0.03670332685705313, 0.681551842592528, 0.32620469497102234, -0.1026350128987592, 0.13976697920336767, -0.3936063330168997, 0.5733022678687447, 0.5799149998253497, -0.08240158495691219, -0.08502038767020587, -0.03808029000543417, 0.057756851771847084, 0.4913945506424927, 0.2981005568384374, 0.6341037595687731, 0.1890641087657231, 0.5068279451720992 ], "z": [ 0.6601754012697598, 0.34176307405486644, 0.6367820927335144, 0.7028170147612054, 0.14990686179678525, 0.7185088707785783, 0.6361033933771063, 0.0029543915931169633, -0.06165271315456529, 0.547958134864764, 0.6707267378505074, 0.15528943347985225, 0.678523258674222, -0.274716462333672, 0.912986127426338, 0.2174177382774621, 0.11633863576716158, 0.6954996284493162, 0.9504633941023184, 0.1800790104310484, 0.03337757929282986, 0.831959317898324, 0.4640731312141163, -0.031031118852267666, 0.5225144053563957, 0.16398684067620586, 0.022858264665198233, 0.7291481099870281, 0.10582297403805999, 0.5473079234938987, 0.9021933727069478, -0.08312119922277673, 0.6162620444296756, 0.6345743036475604, 0.696520443022559, 0.24747685836914318, 0.30012219706139825, 0.2960411290180135, 0.6867974483129609, 0.01832963582891902, 0.02674830659303187, 0.3693274596042051, 0.20917974200606845, 0.6753533337956314, 0.09947546299615441, 0.5865812704663118, 0.4606750417562667, 0.7263789154848359, 0.15147008817366248, 0.9262540684578229, 0.6535436308916829, 0.20531934024532011, 0.4320780613553118, 0.1925706698795842, 0.3475713862418579, 0.6466277046828679, 0.6780142911527789, 0.08088288747474737, -0.12175489697294771, 0.24931779406486398, 0.022360329741842797, -0.021284355698280077, 0.4368583020419706, 0.8494168607294794, 0.12897476654122325, 0.8343341618557294, 0.13042180587415497, 0.3331170315993228, 0.4934896504313051, 0.09975062745330883, 0.2334693191525118, 0.865871194613105, 0.030525750712454364, 0.2072018675731519, 0.8350482417921344, 0.102004689029373, 0.786434255761641, 0.5978550996280521, 0.175895079873379, 0.7187186712357826, 0.24335768739795394, 0.03855804556284638, -0.033126885841366846, 0.7724161613089902, 0.7423158383939215, -0.019019333189149498, 0.09933492199838062, 0.6633661779693285, 0.4486714765469639, 0.3655640671432374, -0.029414045143173497, 0.45281849876245284, 0.655360440751111, 0.4782360161635444, 0.4597336736717098, 0.21758742090701338, 0.63112905416484, 0.8794507083447599, 0.2727100905516554, 0.07078648318270929, 0.4103423485639819, 0.28048709032919555, 0.16632110153787424, 0.06779093607319567, 0.9232421812864802, 0.7332300922143521, 0.24763210918738984, 0.5315787699693666, 0.2364153406041141, 0.34032428419702876, 0.7995639141089108, 0.0667168285055882, 0.07592336300070901, 0.7131165351815698, 0.09213172220913535, 0.07084143454906786, 0.08699546359355526, 0.0770661066265243, -0.10427615385521034, 0.4638393093006685, 0.695799401998475, 0.4486841839229807, 0.3446154449990941, 0.5587949888012437, 0.7002233058279097, 0.29104265995485423, 0.5913567569944946, 0.3849534708707179, 0.18915316996793158, 0.7081297936415731, 0.006175369024172176, 0.6184473735517955, 0.12150876513795077, -0.06047599623108996, -0.08615077462368656, 0.315135390407304, 0.8050264605251669, 0.021296287310762982, 0.0611067893678318, 0.07660364293180001, 0.09379071254898622, -0.015232298477013073, 0.060465592448672535, 0.03887154112965277, 0.2059411738373239, 0.3365197475457794, 0.279538876848194, 0.6997963826319862, 0.17880580162144832, 0.014836777352873044, 0.6278305491216045, 0.6829407127759263, 0.12128058494676755, 0.3590074129517413, 0.04502090124717023, 0.4998594043621639, 0.5006786918447996, 0.7293888850873302, 0.8235647610047032, 0.6516711502340213, 0.33104590803368433, -0.010220580578849095, 0.34341565927203194, 0.6416916938375785, 0.22757534008977126, 0.5181607097958876, 0.6422395210836682, 0.3598714061730275, 0.019582688630808785, 0.6590821014058912, 0.7273877560455412, -0.013205630377234427, 0.16717541744379413, 0.9687675685963781, 0.5166512700991273, 0.11860223164932866, 0.5096294194646729, 0.09896083551794703, 0.7128890539343211, 0.6406860613640291, 0.16206286457776548, 0.5635793300564071, 0.7006353014510114, 0.584451273334315, 0.5755876331713133, 0.4023516218619769, 0.10098402861142493, 0.4969778594479981, 0.043363642668587776, 0.4110254526042142, 0.5176689619038783, 0.04728486610415432, 0.542979178436739, -0.05994689992240779, 0.0751209398585029, 0.4465885992755536, 0.6772278361068884, 0.516213171702581, 0.9686665171834467, 0.6773340263313653 ], "type": "scatter3d" }, { "marker": { "size": 3 }, "mode": "lines", "name": "lines", "x": [ 0.581688323222378, 0.581688323222378, null, 0.2526626667839796, 0.2526626667839796, null, 0.4919175139074384, 0.4919175139074384, null, 0.6020831506568161, 0.6020831506568161, null, 0.4489222365517152, 0.4489222365517152, null, 0.38385424616931973, 0.38385424616931973, null, 0.5336193957718353, 0.5336193957718353, null, 0.5014200678480283, 0.5014200678480283, null, 0.32701812773759636, 0.32701812773759636, null, 0.4007212567278529, 0.4007212567278529, null, 0.5224256520639181, 0.5224256520639181, null, 0.04449474339743783, 0.04449474339743783, null, 0.45281322989621176, 0.45281322989621176, null, 0.5152400000270209, 0.5152400000270209, null, 0.2791311915895589, 0.2791311915895589, null, 0.3550277712254864, 0.3550277712254864, null, 0.16010443943453678, 0.16010443943453678, null, 0.4551359265930321, 0.4551359265930321, null, 0.6798989849404713, 0.6798989849404713, null, 0.20909915930727688, 0.20909915930727688, null, 0.3239815524991035, 0.3239815524991035, null, 0.6241297300166675, 0.6241297300166675, null, 0.3859806141082527, 0.3859806141082527, null, 0.29502531807884086, 0.29502531807884086, null, 0.4678035220605126, 0.4678035220605126, null, 0.021574161982192905, 0.021574161982192905, null, 0.10765749252013904, 0.10765749252013904, null, 0.6099263690455247, 0.6099263690455247, null, 0.11076789086889365, 0.11076789086889365, null, 0.020626787174647842, 0.020626787174647842, null, 0.6484768761116372, 0.6484768761116372, null, 0.5269495399628076, 0.5269495399628076, null, 0.6842015099159706, 0.6842015099159706, null, 0.5318032663918825, 0.5318032663918825, null, 0.6459658631221312, 0.6459658631221312, null, 0.24108941128410605, 0.24108941128410605, null, 0.5282428348490007, 0.5282428348490007, null, 0.11508586669446493, 0.11508586669446493, null, 0.5767230781669882, 0.5767230781669882, null, 0.5126184197180482, 0.5126184197180482, null, 0.13393237760838486, 0.13393237760838486, null, 0.12877704362899467, 0.12877704362899467, null, 0.11809267127161466, 0.11809267127161466, null, 0.5732113677060404, 0.5732113677060404, null, 0.4650277588458246, 0.4650277588458246, null, 0.19657232108052777, 0.19657232108052777, null, 0.45809586862816337, 0.45809586862816337, null, 0.4802151337551695, 0.4802151337551695, null, 0.4822176949974435, 0.4822176949974435, null, 0.6971768110878656, 0.6971768110878656, null, 0.5914745871958926, 0.5914745871958926, null, 0.3009898252002854, 0.3009898252002854, null, 0.03294746293744977, 0.03294746293744977, null, 0.16001667613033596, 0.16001667613033596, null, 0.052364660393598966, 0.052364660393598966, null, 0.549115498483072, 0.549115498483072, null, 0.555332394470296, 0.555332394470296, null, 0.14998707349229795, 0.14998707349229795, null, 0.6639297738597724, 0.6639297738597724, null, 0.2261637823645921, 0.2261637823645921, null, 0.3261412474552212, 0.3261412474552212, null, 0.4066650125718359, 0.4066650125718359, null, 0.6985819104452934, 0.6985819104452934, null, 0.6278144137047045, 0.6278144137047045, null, 0.10102091604167335, 0.10102091604167335, null, 0.6254424150174316, 0.6254424150174316, null, 0.14223363887666493, 0.14223363887666493, null, 0.5620995501385927, 0.5620995501385927, null, 0.47003011273244244, 0.47003011273244244, null, 0.10611484426371016, 0.10611484426371016, null, 0.03749411142440205, 0.03749411142440205, null, 0.6506007087377399, 0.6506007087377399, null, 0.0034250834369676016, 0.0034250834369676016, null, 0.10336103612564117, 0.10336103612564117, null, 0.6821433004885235, 0.6821433004885235, null, 0.4878861592495521, 0.4878861592495521, null, 0.39492360528805187, 0.39492360528805187, null, 0.31755766313043843, 0.31755766313043843, null, 0.40058007756304015, 0.40058007756304015, null, 0.3239276127524767, 0.3239276127524767, null, 0.046258805645901346, 0.046258805645901346, null, 0.16131919385589116, 0.16131919385589116, null, 0.21974813225764012, 0.21974813225764012, null, 0.3473362361003947, 0.3473362361003947, null, 0.2754461810503763, 0.2754461810503763, null, 0.5051549292806663, 0.5051549292806663, null, 0.5623073095596461, 0.5623073095596461, null, 0.5379378911285656, 0.5379378911285656, null, 0.32261606951798966, 0.32261606951798966, null, 0.2746958923653975, 0.2746958923653975, null, 0.016240185298756003, 0.016240185298756003, null, 0.2474366855879214, 0.2474366855879214, null, 0.5509401545987935, 0.5509401545987935, null, 0.2445960633111747, 0.2445960633111747, null, 0.20008877390298244, 0.20008877390298244, null, 0.11407699206124698, 0.11407699206124698, null, 0.4431961767874015, 0.4431961767874015, null, 0.35051790682132405, 0.35051790682132405, null, 0.03225273795843825, 0.03225273795843825, null, 0.16927416363879821, 0.16927416363879821, null, 0.053687927336659086, 0.053687927336659086, null, 0.10746109537624514, 0.10746109537624514, null, 0.1803175978833368, 0.1803175978833368, null, 0.05263677015607784, 0.05263677015607784, null, 0.6924118338988441, 0.6924118338988441, null, 0.4436272234631362, 0.4436272234631362, null, 0.08250058312457872, 0.08250058312457872, null, 0.36796412666162304, 0.36796412666162304, null, 0.2777595192480918, 0.2777595192480918, null, 0.1355907678760479, 0.1355907678760479, null, 0.2890771086971247, 0.2890771086971247, null, 0.3966572600829247, 0.3966572600829247, null, 0.06947334393236836, 0.06947334393236836, null, 0.6682939595467622, 0.6682939595467622, null, 0.3473720525410805, 0.3473720525410805, null, 0.05404030224997812, 0.05404030224997812, null, 0.4798578454528292, 0.4798578454528292, null, 0.6636101489907303, 0.6636101489907303, null, 0.011401001252968068, 0.011401001252968068, null, 0.4772536966515514, 0.4772536966515514, null, 0.5871053222267442, 0.5871053222267442, null, 0.3119119763251488, 0.3119119763251488, null, 0.053123689006751615, 0.053123689006751615, null, 0.5302392559921149, 0.5302392559921149, null, 0.23317305693417723, 0.23317305693417723, null, 0.21201538911692763, 0.21201538911692763, null, 0.5389572407534939, 0.5389572407534939, null, 0.0034126162750669374, 0.0034126162750669374, null, 0.1725044499673648, 0.1725044499673648, null, 0.6347122278227233, 0.6347122278227233, null, 0.11121731488790966, 0.11121731488790966, null, 0.05074533766883168, 0.05074533766883168, null, 0.06533174017809458, 0.06533174017809458, null, 0.36372198486698826, 0.36372198486698826, null, 0.26187806033818706, 0.26187806033818706, null, 0.3591401458905362, 0.3591401458905362, null, 0.6404353666361431, 0.6404353666361431, null, 0.16874003866224463, 0.16874003866224463, null, 0.5380268463272463, 0.5380268463272463, null, 0.4065064028495482, 0.4065064028495482, null, 0.43864598685704403, 0.43864598685704403, null, 0.019389356665052815, 0.019389356665052815, null, 0.033383496627523074, 0.033383496627523074, null, 0.10610431364908003, 0.10610431364908003, null, 0.3093571543285732, 0.3093571543285732, null, 0.25604656199629755, 0.25604656199629755, null, 0.20907701920521476, 0.20907701920521476, null, 0.6059878129603569, 0.6059878129603569, null, 0.3967002350273306, 0.3967002350273306, null, 0.23585770555824037, 0.23585770555824037, null, 0.4260951759315009, 0.4260951759315009, null, 0.6090963103660714, 0.6090963103660714, null, 0.13580114870758725, 0.13580114870758725, null, 0.2798094680518256, 0.2798094680518256, null, 0.14836763574926448, 0.14836763574926448, null, 0.35854582481586955, 0.35854582481586955, null, 0.09208662170200667, 0.09208662170200667, null, 0.23800088309281178, 0.23800088309281178, null, 0.6969059599590102, 0.6969059599590102, null, 0.6436276754129453, 0.6436276754129453, null, 0.009210078478647153, 0.009210078478647153, null, 0.2434768225634164, 0.2434768225634164, null, 0.5691618458286487, 0.5691618458286487, null, 0.5866211742791386, 0.5866211742791386, null, 0.2199036376050671, 0.2199036376050671, null, 0.461215317281515, 0.461215317281515, null, 0.534165618981301, 0.534165618981301, null, 0.28249892209299543, 0.28249892209299543, null, 0.08015921904992866, 0.08015921904992866, null, 0.5497961339694498, 0.5497961339694498, null, 0.5143368812413286, 0.5143368812413286, null, 0.3932086043221785, 0.3932086043221785, null, 0.5460488257090141, 0.5460488257090141, null, 0.6930754768607994, 0.6930754768607994, null, 0.15452311469833746, 0.15452311469833746, null, 0.004469277669808924, 0.004469277669808924, null, 0.43735238785862335, 0.43735238785862335, null, 0.13302819920453263, 0.13302819920453263, null, 0.6072474643616517, 0.6072474643616517, null, 0.5321300019596166, 0.5321300019596166, null, 0.32960721994299436, 0.32960721994299436, null, 0.5492323995853949, 0.5492323995853949, null, 0.6613779782046582, 0.6613779782046582, null, 0.5064489834471043, 0.5064489834471043, null, 0.18822446924628294, 0.18822446924628294, null, 0.32146383952882446, 0.32146383952882446, null, 0.05674661263297647, 0.05674661263297647, null, 0.4399670432359381, 0.4399670432359381, null, 0.2310387290561353, 0.2310387290561353, null, 0.0967159803767839, 0.0967159803767839, null, 0.16466312958845727, 0.16466312958845727, null, 0.2197313540636621, 0.2197313540636621, null, 0.567390788330198, 0.567390788330198, null, 0.013584205045139696, 0.013584205045139696, null, 0.116881429575923, 0.116881429575923, null, 0.18517520427871234, 0.18517520427871234, null, 0.580644884358749, 0.580644884358749, null, 0.07676248851327404, 0.07676248851327404, null, 0.6894454926147752, 0.6894454926147752, null, 0.5484221036294178, 0.5484221036294178, null ], "y": [ 0.040666384737487404, 0.040666384737487404, null, 0.31132378947989325, 0.31132378947989325, null, 0.3850827622982058, 0.3850827622982058, null, 0.5209234813576031, 0.5209234813576031, null, -0.1825234489657423, -0.1825234489657423, null, 0.642641899697348, 0.642641899697348, null, 0.4320573172208956, 0.4320573172208956, null, -0.37138541221986415, -0.37138541221986415, null, -0.48175045683065026, -0.48175045683065026, null, 0.33470035232856765, 0.33470035232856765, null, 0.5631711218799518, 0.5631711218799518, null, 0.36950552481740373, 0.36950552481740373, null, 0.5499934591395721, 0.5499934591395721, null, -0.4964074042400457, -0.4964074042400457, null, 0.7038690516936106, 0.7038690516936106, null, -0.021435865247612262, -0.021435865247612262, null, 0.03520398053378537, 0.03520398053378537, null, 0.5239325252128586, 0.5239325252128586, null, 0.23844328725937314, 0.23844328725937314, null, 0.07175978644779302, 0.07175978644779302, null, -0.3816316754045598, -0.3816316754045598, null, 0.6853865120128566, 0.6853865120128566, null, 0.26088256210974115, 0.26088256210974115, null, -0.4694616681675274, -0.4694616681675274, null, 0.18510010822762646, 0.18510010822762646, null, 0.37290241456297013, 0.37290241456297013, null, 0.10642400403814023, 0.10642400403814023, null, 0.28785245140097604, 0.28785245140097604, null, -0.260304259708665, -0.260304259708665, null, 0.7982036239173402, 0.7982036239173402, null, 0.1360265361534404, 0.1360265361534404, null, -0.43655936296893955, -0.43655936296893955, null, -0.17318155727588286, -0.17318155727588286, null, 0.6025953951087075, 0.6025953951087075, null, 0.4592215833600526, 0.4592215833600526, null, 0.22554031678749487, 0.22554031678749487, null, -0.16928780193780735, -0.16928780193780735, null, 0.44755686030730846, 0.44755686030730846, null, 0.5654666447392276, 0.5654666447392276, null, -0.35282192867458084, -0.35282192867458084, null, -0.40663384194917007, -0.40663384194917007, null, 0.4851234047137485, 0.4851234047137485, null, 0.3316591262048789, 0.3316591262048789, null, 0.47619150112954356, 0.47619150112954356, null, -0.2586194275125996, -0.2586194275125996, null, 0.6720013228850252, 0.6720013228850252, null, 0.08472445187842848, 0.08472445187842848, null, 0.5033320323147559, 0.5033320323147559, null, -0.21230825968182576, -0.21230825968182576, null, -0.013685702951121648, -0.013685702951121648, null, -0.02530483573068648, -0.02530483573068648, null, 0.03606106112362828, 0.03606106112362828, null, 0.6300023716444434, 0.6300023716444434, null, 0.2274307017190591, 0.2274307017190591, null, 0.5378103229459257, 0.5378103229459257, null, 0.31605998591913154, 0.31605998591913154, null, 0.504488829253259, 0.504488829253259, null, 0.13244985551336774, 0.13244985551336774, null, -0.46309681515202367, -0.46309681515202367, null, 0.17015288397295103, 0.17015288397295103, null, -0.3419469726415929, -0.3419469726415929, null, -0.47880554786471496, -0.47880554786471496, null, 0.6009350646433373, 0.6009350646433373, null, 0.22359972810768614, 0.22359972810768614, null, 0.22541193635751366, 0.22541193635751366, null, 0.2387655529288305, 0.2387655529288305, null, 0.08452963992830098, 0.08452963992830098, null, -0.1771004445387721, -0.1771004445387721, null, 0.10088228608318284, 0.10088228608318284, null, 0.16613899078415484, 0.16613899078415484, null, 0.421383675331537, 0.421383675331537, null, 0.04131905006762637, 0.04131905006762637, null, -0.16791860338560466, -0.16791860338560466, null, 0.3265208725768586, 0.3265208725768586, null, 0.40661477191319395, 0.40661477191319395, null, -0.26245829455339253, -0.26245829455339253, null, 0.6892583752427393, 0.6892583752427393, null, 0.5218596020012973, 0.5218596020012973, null, -0.12853335619356088, -0.12853335619356088, null, 0.6216676465646569, 0.6216676465646569, null, 0.42931241596913783, 0.42931241596913783, null, -0.1818575510172346, -0.1818575510172346, null, -0.23109164117320524, -0.23109164117320524, null, 0.7696795400211351, 0.7696795400211351, null, 0.6238987561936971, 0.6238987561936971, null, -0.3983368597259991, -0.3983368597259991, null, -0.30071414530521134, -0.30071414530521134, null, 0.729783734043675, 0.729783734043675, null, 0.36902823200344803, 0.36902823200344803, null, 0.2995690635945495, 0.2995690635945495, null, -0.4215452587569354, -0.4215452587569354, null, 0.4382943300282881, 0.4382943300282881, null, 0.1987955897134951, 0.1987955897134951, null, 0.38532013275698707, 0.38532013275698707, null, 0.4872390828610108, 0.4872390828610108, null, 0.34693923201848154, 0.34693923201848154, null, 0.3510288901554588, 0.3510288901554588, null, 0.7057371728356778, 0.7057371728356778, null, 0.4500692012232749, 0.4500692012232749, null, 0.08804290928805569, 0.08804290928805569, null, 0.6018576581427106, 0.6018576581427106, null, 0.4458929630485966, 0.4458929630485966, null, 0.2772253944234746, 0.2772253944234746, null, -0.03211636162611259, -0.03211636162611259, null, -0.027576803201994238, -0.027576803201994238, null, 0.7209288151252977, 0.7209288151252977, null, 0.36093673171726115, 0.36093673171726115, null, 0.33832762614802625, 0.33832762614802625, null, 0.12826978577327008, 0.12826978577327008, null, 0.44924472454417574, 0.44924472454417574, null, 0.7650388747564885, 0.7650388747564885, null, -0.26800909891097335, -0.26800909891097335, null, 0.1833626666303848, 0.1833626666303848, null, 0.3536757059014224, 0.3536757059014224, null, -0.19833339794231614, -0.19833339794231614, null, -0.04429612778624298, -0.04429612778624298, null, -0.2829647365291783, -0.2829647365291783, null, -0.35359150006395335, -0.35359150006395335, null, 0.1827304030063155, 0.1827304030063155, null, 0.016924411507184156, 0.016924411507184156, null, 0.5227628522994228, 0.5227628522994228, null, 0.378606001325828, 0.378606001325828, null, 0.5312207621752614, 0.5312207621752614, null, 0.01639770747199909, 0.01639770747199909, null, 0.7964256811692325, 0.7964256811692325, null, 0.3143886117696909, 0.3143886117696909, null, -0.0742451884895729, -0.0742451884895729, null, 0.6452420872226408, 0.6452420872226408, null, 0.39381484935909217, 0.39381484935909217, null, 0.7174557840280407, 0.7174557840280407, null, -0.10638406766837194, -0.10638406766837194, null, 0.6934820851542423, 0.6934820851542423, null, 0.00981861693110797, 0.00981861693110797, null, -0.3862380311216124, -0.3862380311216124, null, -0.4675860443357518, -0.4675860443357518, null, 0.10728180124516074, 0.10728180124516074, null, 0.2922658875810856, 0.2922658875810856, null, -0.1661997429615914, -0.1661997429615914, null, -0.3266405028984589, -0.3266405028984589, null, -0.24981482245654468, -0.24981482245654468, null, -0.26008490109833804, -0.26008490109833804, null, -0.4356907690044717, -0.4356907690044717, null, -0.3074672214754355, -0.3074672214754355, null, -0.3280752875725478, -0.3280752875725478, null, 0.026889799576298667, 0.026889799576298667, null, 0.25268620026986355, 0.25268620026986355, null, 0.2961814253135999, 0.2961814253135999, null, -0.03957106820296635, -0.03957106820296635, null, -0.06576761756491939, -0.06576761756491939, null, -0.15901241286796486, -0.15901241286796486, null, 0.5842414273979841, 0.5842414273979841, null, 0.5723662315550802, 0.5723662315550802, null, 0.09402192568324652, 0.09402192568324652, null, 0.2415040169879502, 0.2415040169879502, null, -0.10369567596240153, -0.10369567596240153, null, 0.2862886535884315, 0.2862886535884315, null, 0.6664823110426779, 0.6664823110426779, null, 0.7078831143262521, 0.7078831143262521, null, 0.2809856954125839, 0.2809856954125839, null, -0.1153647626844333, -0.1153647626844333, null, 0.5166056045094947, 0.5166056045094947, null, -0.19596373168047232, -0.19596373168047232, null, -0.18178330950122834, -0.18178330950122834, null, -0.02157932869232554, -0.02157932869232554, null, 0.21076775347419618, 0.21076775347419618, null, 0.18198269324594918, 0.18198269324594918, null, 0.16957576077484826, 0.16957576077484826, null, 0.23980418600829623, 0.23980418600829623, null, -0.4805914263762741, -0.4805914263762741, null, 0.646823215015381, 0.646823215015381, null, 0.758010617968798, 0.758010617968798, null, -0.49546415819461603, -0.49546415819461603, null, -0.2252215845894217, -0.2252215845894217, null, 0.09739081189073895, 0.09739081189073895, null, 0.5756711266477585, 0.5756711266477585, null, -0.30311800041833614, -0.30311800041833614, null, 0.19201615743056244, 0.19201615743056244, null, 0.1276214088821207, 0.1276214088821207, null, 0.48820733210510237, 0.48820733210510237, null, 0.16625924147751492, 0.16625924147751492, null, -0.04352314214979358, -0.04352314214979358, null, -0.00227170688080075, -0.00227170688080075, null, 0.4604589552731707, 0.4604589552731707, null, 0.03670332685705313, 0.03670332685705313, null, 0.681551842592528, 0.681551842592528, null, 0.32620469497102234, 0.32620469497102234, null, -0.1026350128987592, -0.1026350128987592, null, 0.13976697920336767, 0.13976697920336767, null, -0.3936063330168997, -0.3936063330168997, null, 0.5733022678687447, 0.5733022678687447, null, 0.5799149998253497, 0.5799149998253497, null, -0.08240158495691219, -0.08240158495691219, null, -0.08502038767020587, -0.08502038767020587, null, -0.03808029000543417, -0.03808029000543417, null, 0.057756851771847084, 0.057756851771847084, null, 0.4913945506424927, 0.4913945506424927, null, 0.2981005568384374, 0.2981005568384374, null, 0.6341037595687731, 0.6341037595687731, null, 0.1890641087657231, 0.1890641087657231, null, 0.5068279451720992, 0.5068279451720992, null ], "z": [ 0.6601754012697598, 0.7098805373687822, null, 0.283162206150284, 0.34176307405486644, null, 0.6346338032501165, 0.6370824071800971, null, 0.6721223978961954, 0.7256605486298391, null, 0.14990686179678525, 0.2023766903118507, null, 0.7185088707785783, 0.7228546924858668, null, 0.6028849112874047, 0.6753850858916464, null, -0.027934626620696262, 0.006024520465025891, null, -0.10459565651781173, -0.044904232291340156, null, 0.5138261017805326, 0.547958134864764, null, 0.6707267378505074, 0.682934178185924, null, 0.08389372389767391, 0.17022244219362836, null, 0.6496940591170581, 0.678523258674222, null, -0.4435308426812251, -0.1841578200118187, null, 0.7460625188533245, 1.0550955987848576, null, 0.2174177382774621, 0.2696369230420926, null, 0.06341763849755692, 0.11699561994736826, null, 0.6563432706461924, 0.7624670830100723, null, 0.9467614945596715, 1.1072243997143458, null, 0.12004627844211863, 0.19541889553729272, null, -0.020360622992926212, 0.10617857146454737, null, 0.6016214445344273, 0.9036616184637163, null, 0.39208085639611256, 0.4640731312141163, null, -0.031031118852267666, -0.018155143655484512, null, 0.4860672781664319, 0.5542243678941902, null, 0.15104355681131046, 0.16398684067620586, null, -0.1355736495630433, 0.055977736093426086, null, 0.7270130150423787, 0.8006496734887739, null, 0.026498859581491944, 0.14750817598778923, null, 0.5473079234938987, 0.621018377637362, null, 0.9021933727069478, 0.961396145099069, null, -0.18922821074602492, -0.08312119922277673, null, 0.5691972225350067, 0.6162620444296756, null, 0.5082069513197689, 0.689938746650016, null, 0.696050399070882, 0.7063189287561182, null, 0.02046196086066565, 0.24747685836914318, null, 0.30012219706139825, 0.3522416360478374, null, 0.0742714502740861, 0.3045159405695814, null, 0.6692791884465094, 0.6867974483129609, null, -0.034845274546419336, 0.01832963582891902, null, 0.02674830659303187, 0.06822393290680641, null, 0.3571393050996755, 0.4024908321494135, null, 0.15736686479004294, 0.20917974200606845, null, 0.632165385454945, 0.6869099432683803, null, 0.09947546299615441, 0.11716601343334947, null, 0.5865812704663118, 0.6690181691905683, null, 0.3874025868126615, 0.48375587689558264, null, 0.6577896411224744, 0.7758489449678193, null, 0.15147008817366248, 0.20272515867483343, null, 0.8716129855494666, 0.9353975328309945, null, 0.58248161652441, 0.662444686568125, null, 0.189208307982293, 0.20531934024532011, null, 0.4244199101447017, 0.5210585220390657, null, 0.1618069037779376, 0.1925706698795842, null, 0.3390546206658212, 0.3475713862418579, null, 0.6326165329523041, 0.7050783176419974, null, 0.673528076663178, 0.6788679013562114, null, -0.27016092940480385, 0.0979406823917694, null, -0.2127388338239628, -0.12175489697294771, null, 0.19199139505382123, 0.29978945613128766, null, -0.008717055801530555, 0.022360329741842797, null, -0.09949176740350758, -0.021284355698280077, null, 0.3763758527934483, 0.5282607417252944, null, 0.8494168607294794, 0.9376204759917388, null, 0.10922970649532697, 0.12897476654122325, null, 0.8343341618557294, 0.8479462749778761, null, 0.07004544509755646, 0.27172227162338375, null, 0.24329626089966186, 0.359846287132657, null, 0.4934896504313051, 0.5418485223100864, null, 0.07915599812576542, 0.09975062745330883, null, 0.19235813555940137, 0.2334693191525118, null, 0.865871194613105, 0.8759554576137096, null, 0.02458864221629116, 0.030525750712454364, null, 0.18409133756917404, 0.2072018675731519, null, 0.7691330295844141, 0.889969486358905, null, 0.102004689029373, 0.1288268135255605, null, 0.7677818154875075, 0.8687564103070955, null, 0.5694843258793824, 0.6000839149148673, null, 0.175895079873379, 0.22137864469200508, null, 0.6770985734335248, 0.7500624813752832, null, 0.21221707628955921, 0.24335768739795394, null, 0.017460193696084123, 0.28299720083284274, null, -0.06498486865656046, 0.022504815641624418, null, 0.7724161613089902, 0.841559776665243, null, 0.6491390188824329, 0.8205197820677956, null, -0.09706569838428569, -0.019019333189149498, null, 0.09933492199838062, 0.11678926521447035, null, 0.5595983776124512, 0.7226691813981146, null, 0.40665424680012935, 0.4486714765469639, null, 0.3357906479660801, 0.3655640671432374, null, -0.1425532860858839, 0.16342786979208668, null, 0.4240255452534081, 0.45281849876245284, null, 0.655360440751111, 0.7127716683994553, null, 0.3719533758979961, 0.5894351931795047, null, 0.4284853072013777, 0.5129715628288325, null, 0.21010566344696915, 0.21758742090701338, null, 0.5734253066603651, 0.660918470731104, null, 0.7774213648689614, 0.9689643343704814, null, 0.22999799517054084, 0.3746321063590913, null, -0.14532704767826887, 0.09238645714861819, null, 0.3787032887086399, 0.41388545926285214, null, 0.27568564250216954, 0.29559618232454965, null, 0.05518882810588677, 0.2163169011870559, null, -0.012924089610683549, 0.06779093607319567, null, 0.9031447688286535, 0.9299244373081138, null, 0.7332300922143521, 0.7866543998090145, null, 0.19448904761845542, 0.2778188444302556, null, 0.4752279856525701, 0.5483078893935941, null, 0.22759416736119042, 0.2372826262033902, null, 0.32585239272094835, 0.3646509214037616, null, 0.7995639141089108, 0.8241858827803639, null, 0.060301488447797376, 0.0667168285055882, null, 0.037004014823586756, 0.07592336300070901, null, 0.6803762077133739, 0.8218866220334488, null, 0.09213172220913535, 0.09976662252161735, null, 0.0029519101287375834, 0.13910730093351065, null, 0.08699546359355526, 0.09289997441706369, null, 0.05398704108945993, 0.0770661066265243, null, -0.1398248453294032, 0.037762779129516574, null, 0.4638393093006685, 0.46883885941833886, null, 0.6746630698726483, 0.695799401998475, null, 0.42449766465320543, 0.4486841839229807, null, 0.3325951643834393, 0.3446154449990941, null, 0.5273255843446383, 0.5746997288776641, null, 0.6618452729160489, 0.8278734343939044, null, 0.2587428464342454, 0.29104265995485423, null, 0.48715950961635013, 0.7468090682146422, null, 0.3570579734697211, 0.4084362376847868, null, 0.0885441681822138, 0.3068806242845299, null, 0.5290899147853804, 0.7081297936415731, null, -0.024541164845097684, 0.010870578743563815, null, 0.5234318099522149, 0.7066377774838708, null, 0.009911214450080577, 0.1654940823355386, null, -0.172313535800673, -0.03213423719040844, null, -0.1609282396114645, 0.001752768101689721, null, 0.31010115392895726, 0.3286843489180976, null, 0.8050264605251669, 0.8431663485972473, null, -0.08217849802879522, 0.021296287310762982, null, 0.05379755336750953, 0.06742413504358545, null, 0.07297507856539304, 0.0879204472055172, null, 0.09379071254898622, 0.12954042463291612, null, -0.015232298477013073, 0.17226622768995306, null, 0.060465592448672535, 0.0761871065122222, null, 0.03887154112965277, 0.04953010504436811, null, 0.2059411738373239, 0.24408682728101175, null, 0.28024938488476586, 0.4390447158171714, null, 0.2601362622688183, 0.279538876848194, null, 0.6762074329254325, 0.9093379215708027, null, 0.140442791331229, 0.259171082721795, null, 0.008895590762464295, 0.04663363960889896, null, 0.5821081870828413, 0.6844833438557854, null, 0.6327688056700503, 0.6829407127759263, null, 0.06388585673312211, 0.12128058494676755, null, 0.3012674807269205, 0.5527786549427022, null, 0.0214322595308497, 0.04502090124717023, null, 0.4321992879186274, 0.5605666832009338, null, 0.4560026051952677, 0.5357129873016123, null, 0.7244398891089793, 0.7534541729547581, null, 0.8100582655020718, 0.9356446520862683, null, 0.629986848476279, 0.6516711502340213, null, 0.2729085938232621, 0.39100778183628304, null, -0.059991357989156495, 0.03800781833563966, null, 0.34341565927203194, 0.47322359788003404, null, 0.6416916938375785, 0.6562223644069678, null, 0.21081923437551003, 0.22757534008977126, null, 0.4862885009225726, 0.5411803302174039, null, 0.6422395210836682, 0.6742293937360165, null, 0.2583738536837147, 0.3598714061730275, null, 0.019582688630808785, 0.15555018040223995, null, 0.6256332983414281, 0.6894139257185101, null, 0.7273877560455412, 0.7584342210469791, null, -0.09651025604026403, 0.04129295353676629, null, -0.028986220661658124, 0.24816859977201755, null, 0.9687675685963781, 1.015612182699686, null, 0.48656203522311203, 0.5733995995735895, null, 0.08907568796408541, 0.2304262983135759, null, 0.5039985989697615, 0.5096294194646729, null, 0.07920000518378845, 0.09896083551794703, null, 0.6861866102269174, 0.7612904237716122, null, 0.6406860613640291, 0.6692473363173823, null, 0.13341362634729712, 0.18811667687499428, null, 0.5499463142247829, 0.5963622966671256, null, 0.6879315981230734, 0.7049872519172009, null, 0.5434172921671676, 0.7780454236429268, null, 0.4252830840153272, 0.6510468550017584, null, 0.2491928962002778, 0.4107514020343803, null, 0.004956569554289469, 0.12480220207232767, null, 0.4828811132645452, 0.5277665984320761, null, 0.011466980821170038, 0.06242239925126839, null, 0.38257496822735026, 0.42553365772011625, null, 0.5015507322315487, 0.520136684571722, null, 0.022174906582948906, 0.06354567351535947, null, 0.48726418304997154, 0.542979178436739, null, -0.10351984061708337, 0.0007816256065248163, null, 0.040466446956931294, 0.0751209398585029, null, 0.4146996897204944, 0.4465885992755536, null, 0.6772278361068884, 0.7534284590663741, null, 0.47827369972462574, 0.6971227238774057, null, 0.9686665171834467, 1.0083236691632318, null, 0.6748132907859759, 0.6778667855968934, null ], "type": "scatter3d" } ], "layout": { "autosize": true, "height": 800, "template": { "data": { "barpolar": [ { "marker": { "line": { "color": "rgb(17,17,17)", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "bar": [ { "error_x": { "color": "#f2f5fa" }, "error_y": { "color": "#f2f5fa" }, "marker": { "line": { "color": "rgb(17,17,17)", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#A2B1C6", "gridcolor": "#506784", "linecolor": "#506784", "minorgridcolor": "#506784", "startlinecolor": "#A2B1C6" }, "baxis": { "endlinecolor": "#A2B1C6", "gridcolor": "#506784", "linecolor": "#506784", "minorgridcolor": "#506784", "startlinecolor": "#A2B1C6" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "contour" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "heatmapgl" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "heatmap" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "histogram2dcontour" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "histogram2d" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "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": { "line": { "color": "#283442" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatter": [ { "marker": { "line": { "color": "#283442" } }, "type": "scatter" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.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.0, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#506784" }, "line": { "color": "rgb(17,17,17)" } }, "header": { "fill": { "color": "#2a3f5f" }, "line": { "color": "rgb(17,17,17)" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#f2f5fa", "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.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.0, "#f0f921" ] ], "sequentialminus": [ [ 0.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.0, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#f2f5fa" }, "geo": { "bgcolor": "rgb(17,17,17)", "lakecolor": "rgb(17,17,17)", "landcolor": "rgb(17,17,17)", "showlakes": true, "showland": true, "subunitcolor": "#506784" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "dark" }, "paper_bgcolor": "rgb(17,17,17)", "plot_bgcolor": "rgb(17,17,17)", "polar": { "angularaxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" }, "bgcolor": "rgb(17,17,17)", "radialaxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3" }, "yaxis": { "backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3" }, "zaxis": { "backgroundcolor": "rgb(17,17,17)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3" } }, "shapedefaults": { "line": { "color": "#f2f5fa" } }, "sliderdefaults": { "bgcolor": "#C8D4E3", "bordercolor": "rgb(17,17,17)", "borderwidth": 1, "tickwidth": 0 }, "ternary": { "aaxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" }, "baxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" }, "bgcolor": "rgb(17,17,17)", "caxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" } }, "title": { "x": 0.05 }, "updatemenudefaults": { "bgcolor": "#506784", "borderwidth": 0 }, "xaxis": { "automargin": true, "gridcolor": "#283442", "linecolor": "#506784", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#283442", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "#283442", "linecolor": "#506784", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#283442", "zerolinewidth": 2 } } }, "title": { "text": "Regression with size_neighborhood=100" } }, "config": { "showLink": false, "linkText": "Export to plot.ly", "plotlyServerURL": "https://plot.ly" } }, "text/html": "
" }, "metadata": {}, "output_type": "display_data" } ], "source": [ "rsklpr: Rsklpr = Rsklpr(size_neighborhood=100)\n", "y_hat: np.ndarray = rsklpr(x=x, y=y)\n", "\n", "plot_results_2d(\n", " x_=x,\n", " y_=y,\n", " y_true_=y_true,\n", " estimates_=pd.DataFrame(data=y_hat, columns=[\"y_hat\"]),\n", " title=\"Regression with size_neighborhood=100\",\n", ")" ], "metadata": { "collapsed": false, "ExecuteTime": { "end_time": "2024-03-23T15:13:56.913818Z", "start_time": "2024-03-23T15:13:56.722098Z" } }, "id": "c24b621bf62cf4b8" } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.6" } }, "nbformat": 4, "nbformat_minor": 5 }