{ "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": "