stat-methods/notebooks/kotlin/distribution-demo.ipynb

345 lines
3.6 MiB
Plaintext
Raw Normal View History

2023-09-23 09:41:04 +03:00
{
"cells":[
{
"cell_type":"code",
"source":[
"@file:Repository(\"https:\/\/repo.kotlin.link\")\n",
"@file:DependsOn(\"space.kscience:plotlykt-jupyter:0.5.0\")"
],
"execution_count":1,
"outputs":[
{
"data":{
"text\/html":[
" <div id=\"kotlin_out_0\"\/>\n",
" <script type=\"text\/javascript\">\n",
" if(!window.kotlinQueues) {\n",
" window.kotlinQueues = {};\n",
" }\n",
" if(!window.kotlinQueues[\"plotly\"]) {\n",
" var resQueue = [];\n",
" window.kotlinQueues[\"plotly\"] = resQueue;\n",
" window[\"call_plotly\"] = function(f) {\n",
" resQueue.push(f);\n",
" }\n",
" }\n",
" (function (){\n",
" var modifiers = [(function(script) {\n",
" script.src = \"https:\/\/cdn.plot.ly\/plotly-1.54.6.min.js\"\n",
" script.type = \"text\/javascript\";\n",
"}),\n",
"(function(script) {\n",
" script.textContent = \"\/**\\r\\n* plotly.js v1.54.6\\r\\n* Copyright 2012-2020, Plotly, Inc.\\r\\n* All rights reserved.\\r\\n* Licensed under the MIT license\\r\\n*\/\\r\\n!function(t){if(\\\"object\\\"==typeof exports&&\\\"undefined\\\"!=typeof module)module.exports=t();else if(\\\"function\\\"==typeof define&&define.amd)define([],t);else{(\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:this).Plotly=t()}}((function(){return function t(e,r,n){function a(o,s){if(!r[o]){if(!e[o]){var l=\\\"function\\\"==typeof require&&require;if(!s&&l)return l(o,!0);if(i)return i(o,!0);var c=new Error(\\\"Cannot find module '\\\"+o+\\\"'\\\");throw c.code=\\\"MODULE_NOT_FOUND\\\",c}var u=r[o]={exports:{}};e[o][0].call(u.exports,(function(t){return a(e[o][1][t]||t)}),u,u.exports,t,e,r,n)}return r[o].exports}for(var i=\\\"function\\\"==typeof require&&require,o=0;o<n.length;o++)a(n[o]);return a}({1:[function(t,e,r){\\\"use strict\\\";var n=t(\\\"..\/src\/lib\\\"),a={\\\"X,X div\\\":\\\"direction:ltr;font-family:'Open Sans', verdana, arial, sans-serif;margin:0;padding:0;\\\",\\\"X input,X button\\\":\\\"font-family:'Open Sans', verdana, arial, sans-serif;\\\",\\\"X input:focus,X button:focus\\\":\\\"outline:none;\\\",\\\"X a\\\":\\\"text-decoration:none;\\\",\\\"X a:hover\\\":\\\"text-decoration:none;\\\",\\\"X .crisp\\\":\\\"shape-rendering:crispEdges;\\\",\\\"X .user-select-none\\\":\\\"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;\\\",\\\"X svg\\\":\\\"overflow:hidden;\\\",\\\"X svg a\\\":\\\"fill:#447adb;\\\",\\\"X svg a:hover\\\":\\\"fill:#3c6dc5;\\\",\\\"X .main-svg\\\":\\\"position:absolute;top:0;left:0;pointer-events:none;\\\",\\\"X .main-svg .draglayer\\\":\\\"pointer-events:all;\\\",\\\"X .cursor-default\\\":\\\"cursor:default;\\\",\\\"X .cursor-pointer\\\":\\\"cursor:pointer;\\\",\\\"X .cursor-crosshair\\\":\\\"cursor:crosshair;\\\",\\\"X .cursor-move\\\":\\\"cursor:move;\\\",\\\"X .cursor-col-resize\\\":\\\"cursor:col-resize;\\\",\\\"X .cursor-row-resize\\\":\\\"cursor:row-resize;\\\",\\\"X .cursor-ns-resize\\\":\\\"cursor:ns-resize;\\\",\\\"X .cursor-ew-resize\\\":\\\"cursor:ew-resize;\\\",\\\"X .cursor-sw-resize\\\":\\\"cursor:sw-resize;\\\",\\\"X .cursor-s-resize\\\":\\\"cursor:s-resize;\\\",\\\"X .cursor-se-resize\\\":\\\"cursor:se-resize;\\\",\\\"X .cursor-w-resize\\\":\\\"cursor:w-resize;\\\",\\\"X .cursor-e-resize\\\":\\\"cursor:e-resize;\\\",\\\"X .cursor-nw-resize\\\":\\\"cursor:nw-resize;\\\",\\\"X .cursor-n-resize\\\":\\\"cursor:n-resize;\\\",\\\"X .cursor-ne-resize\\\":\\\"cursor:ne-resize;\\\",\\\"X .cursor-grab\\\":\\\"cursor:-webkit-grab;cursor:grab;\\\",\\\"X .modebar\\\":\\\"position:absolute;top:2px;right:2px;\\\",\\\"X .ease-bg\\\":\\\"-webkit-transition:background-color 0.3s ease 0s;-moz-transition:background-color 0.3s ease 0s;-ms-transition:background-color 0.3s ease 0s;-o-transition:background-color 0.3s ease 0s;transition:background-color 0.3s ease 0s;\\\",\\\"X .modebar--hover>:not(.watermark)\\\":\\\"opacity:0;-webkit-transition:opacity 0.3s ease 0s;-moz-transition:opacity 0.3s ease 0s;-ms-transition:opacity 0.3s ease 0s;-o-transition:opacity 0.3s ease 0s;transition:opacity 0.3s ease 0s;\\\",\\\"X:hover .modebar--hover .modebar-group\\\":\\\"opacity:1;\\\",\\\"X .modebar-group\\\":\\\"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;\\\",\\\"X .modebar-btn\\\":\\\"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;\\\",\\\"X .modebar-btn svg\\\":\\\"position:relative;top:2px;\\\",\\\"X .modebar.vertical\\\":\\\"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;\\\",\\\"X .modebar.vertical svg\\\":\\\"top:-1px;\\\",\\\"X .modebar.vertical .modebar-group\\\":\\\"display:block;float:none;padding-left:0px;padding-bottom:8px;\\\",\\\"X .modebar.vertical .modebar-group .modebar-btn\\\":\
" script.type = \"text\/javascript\";\n",
"})];\n",
" var e = document.getElementById(\"kotlin_out_0\");\n",
" modifiers.forEach(function (gen) {\n",
" var script = document.createElement(\"script\");\n",
" gen(script)\n",
" script.addEventListener(\"load\", function() {\n",
" window[\"call_plotly\"] = function(f) {f();};\n",
" window.kotlinQueues[\"plotly\"].forEach(function(f) {f();});\n",
" window.kotlinQueues[\"plotly\"] = [];\n",
" }, false);\n",
" script.addEventListener(\"error\", function() {\n",
" window[\"call_plotly\"] = function(f) {};\n",
" window.kotlinQueues[\"plotly\"] = [];\n",
" var div = document.createElement(\"div\");\n",
" div.style.color = 'darkred';\n",
" div.textContent = 'Error loading resource plotly';\n",
" document.getElementById(\"kotlin_out_0\").appendChild(div);\n",
" }, false);\n",
" \n",
" e.appendChild(script);\n",
" });\n",
" })();\n",
" <\/script>"
]
},
"metadata":{
},
"output_type":"display_data"
},
{
"data":{
"text\/html":[
" <div id=\"kotlin_out_1\"\/>\n",
" <script type=\"text\/javascript\">\n",
" if(!window.kotlinQueues) {\n",
" window.kotlinQueues = {};\n",
" }\n",
" if(!window.kotlinQueues[\"plotlyConnect\"]) {\n",
" var resQueue = [];\n",
" window.kotlinQueues[\"plotlyConnect\"] = resQueue;\n",
" window[\"call_plotlyConnect\"] = function(f) {\n",
" resQueue.push(f);\n",
" }\n",
" }\n",
" (function (){\n",
" var modifiers = [(function(script) {\n",
" script.textContent = \"\/**\\r\\n * Use existing plotly or load it from the CDN if it is not available\\r\\n * @param action\\r\\n *\/\\r\\nfunction withPlotly(action) {\\r\\n if (typeof Plotly !== \\\"undefined\\\") {\\r\\n action(Plotly);\\r\\n } else if (typeof window.promiseOfPlotly !== \\\"undefined\\\") {\\r\\n window.promiseOfPlotly.then(plotly => action(plotly));\\r\\n } else {\\r\\n console.warn(\\\"Plotly not defined. Loading the script from CDN\\\")\\r\\n window.promiseOfPlotly = new Promise((accept, reject) => {\\r\\n let plotlyLoaderScript = document.createElement(\\\"script\\\");\\r\\n plotlyLoaderScript.src = \\\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/plotly.js\/1.54.6\/plotly.min.js\\\";\\r\\n plotlyLoaderScript.type = 'text\/javascript';\\r\\n plotlyLoaderScript.onload = () => {\\r\\n accept(Plotly);\\r\\n }\\r\\n plotlyLoaderScript.onerror = (error) => {\\r\\n console.error(error);\\r\\n reject(error)\\r\\n }\\r\\n document.head.appendChild(plotlyLoaderScript);\\r\\n });\\r\\n }\\r\\n}\\r\\n\\r\\n\/**\\r\\n * Request and parse json from given address\\r\\n * @param url {URL}\\r\\n * @param callback\\r\\n * @return Promise<Json>\\r\\n *\/\\r\\nfunction getJSON(url, callback) {\\r\\n\\r\\n function handleErrors(response) {\\r\\n if (!response.ok) {\\r\\n throw Error(response.statusText);\\r\\n }\\r\\n return response;\\r\\n }\\r\\n\\r\\n try {\\r\\n fetch(url, {\\r\\n method: 'GET',\\r\\n headers: {\\r\\n Accept: 'application\/json',\\r\\n }\\r\\n })\\r\\n .then(handleErrors)\\r\\n .then(response => response.json())\\r\\n .then(json => callback(json))\\r\\n .catch(error => console.log(error));\\r\\n } catch (e) {\\r\\n alert(\\\"Fetch of plot data failed with error: \\\" + e)\\r\\n }\\r\\n}\\r\\n\\r\\n\/**\\r\\n * Safe call for Plotly.newPlot\\r\\n * @param id\\r\\n * @param data\\r\\n * @param layout\\r\\n * @param config\\r\\n *\/\\r\\nfunction makePlot(id, data, layout, config) {\\r\\n withPlotly(plotly => plotly.newPlot(id, data, layout, config))\\r\\n}\\r\\n\\r\\n\/**\\r\\n * Create a plot taking data from given url\\r\\n * @param id {string} element id for plot\\r\\n * @param from {URL} json server url\\r\\n * @param config {object} plotly configuration\\r\\n * @return {JSON}\\r\\n *\/\\r\\nfunction createPlotFrom(id, from, config = {}) {\\r\\n getJSON(from, json => withPlotly(plotly => {\\r\\n plotly.newPlot(id, json.data, json.layout, config)\\r\\n }));\\r\\n}\\r\\n\\r\\n\/**\\r\\n * Update a plot taking data from given url\\r\\n * @param id {string} element id for plot\\r\\n * @param from {URL} json server url\\r\\n * @return {JSON}\\r\\n *\/\\r\\nfunction updatePlotFrom(id, from) {\\r\\n getJSON(from, json => withPlotly(plotly => plotly.react(id, json.data, json.layout)));\\r\\n}\\r\\n\\r\\n\/**\\r\\n * Start pull updates with regular requests from client side\\r\\n * @param id {string}\\r\\n * @param from\\r\\n * @param millis\\r\\n *\/\\r\\nfunction startPull(id, from, millis) {\\r\\n let action = function () {\\r\\n updatePlotFrom(id, from)\\r\\n };\\r\\n window.setInterval(action, millis)\\r\\n}\\r\\n\\r\\n\/**\\r\\n * Start push updates via websocket\\r\\n * @param id {string} element id for plot\\r\\n * @param ws {URL} a websocket address\\r\\n *\/\\r\\nfunction startPush(id, ws) {\\r\\n let socket = new WebSocket(ws);\\r\\n\\r\\n socket.onopen = function () {\\r\\n console.log(\\\"[Plotly.kt] A connection for plot with id = \\\" + id + \\\" with server established on \\\" + ws);\\r\\n };\\r\\n\\r\\n socket.onclose = function (event) {\\r\\n if (event.wasClean) {\\r\\n console.log(\\\"The connection with server is closed\\\");\\r\\n } else {\\r\\n co
" script.type = \"text\/javascript\";\n",
"})];\n",
" var e = document.getElementById(\"kotlin_out_1\");\n",
" modifiers.forEach(function (gen) {\n",
" var script = document.createElement(\"script\");\n",
" gen(script)\n",
" script.addEventListener(\"load\", function() {\n",
" window[\"call_plotlyConnect\"] = function(f) {f();};\n",
" window.kotlinQueues[\"plotlyConnect\"].forEach(function(f) {f();});\n",
" window.kotlinQueues[\"plotlyConnect\"] = [];\n",
" }, false);\n",
" script.addEventListener(\"error\", function() {\n",
" window[\"call_plotlyConnect\"] = function(f) {};\n",
" window.kotlinQueues[\"plotlyConnect\"] = [];\n",
" var div = document.createElement(\"div\");\n",
" div.style.color = 'darkred';\n",
" div.textContent = 'Error loading resource plotlyConnect';\n",
" document.getElementById(\"kotlin_out_1\").appendChild(div);\n",
" }, false);\n",
" \n",
" e.appendChild(script);\n",
" });\n",
" })();\n",
" <\/script>"
]
},
"metadata":{
},
"output_type":"display_data"
}
],
"metadata":{
"datalore":{
"node_id":"95bp68596YxRjfaTQo9VrU",
"type":"CODE",
"hide_input_from_viewers":true,
"hide_output_from_viewers":true
}
}
},
{
"cell_type":"code",
"source":[
"Plotly.jupyter.notebook()"
],
"execution_count":2,
"outputs":[
{
"data":{
"text\/html":[
"<div style=\"color: blue;\">Plotly notebook integration switch into the legacy mode.<\/div>\n"
]
},
"metadata":{
},
"output_type":"display_data"
}
],
"metadata":{
"datalore":{
"node_id":"o0t3zzBuK1DeFJt7m4JP6o",
"type":"CODE",
"hide_input_from_viewers":true,
"hide_output_from_viewers":true
}
}
},
{
"cell_type":"code",
"source":[
"import kotlin.math.PI\n",
"import kotlin.math.exp\n",
"import kotlin.math.pow\n",
"import kotlin.math.sqrt\n",
"\n",
"typealias Parameters = Map<String, Double>\n",
"\n",
"fun interface Distribution {\n",
" fun value(parameters: Parameters): Double\n",
"}\n",
"\n",
"fun normal(mean: Double, sigma: Double): Distribution = Distribution { parameters ->\n",
" val x: Double = parameters[\"x\"] ?: error(\"X not found\")\n",
" 1.0 \/ sqrt(2 * PI * sigma) * exp(-(x - mean).pow(2) \/ 2 \/ sigma.pow(2))\n",
"}\n",
"\n",
"operator fun Distribution.plus(other: Distribution): Distribution = Distribution { parameters ->\n",
" this.value(parameters) + other.value(parameters)\n",
"}\n",
"\n",
"data class DistributionMax(val arg: Parameters, val value: Double)\n",
"\n",
"fun Distribution.findMax1D(\n",
" parameter: String,\n",
" range: ClosedFloatingPointRange<Double>,\n",
" tolerance: Double = 0.05,\n",
"): DistributionMax {\n",
" require(range.endInclusive > range.start) { \"Wrong range: $range\" }\n",
" val numPoints = ((range.endInclusive - range.start) \/ tolerance).toInt()\n",
" val xs: List<Map<String, Double>> = List(numPoints) { i -> mapOf(parameter to range.start + tolerance * i) }\n",
" val pointValues = xs.map { it to value(it) }\n",
"\n",
" val max = pointValues.maxByOrNull { it.second } ?: error(\"Maximum not found\")\n",
" return DistributionMax(max.first, max.second)\n",
"}\n",
"\n",
"data class ConfidenceInterval1D(val cl: Double, val left: Parameters, val right: Parameters)\n",
"\n",
"fun Distribution.findConfidenceInterval1D(\n",
" parameter: String,\n",
" range: ClosedFloatingPointRange<Double>,\n",
" cl: Double = 0.90,\n",
" tolerance: Double = 0.05,\n",
"): ConfidenceInterval1D {\n",
" require(range.endInclusive > range.start) { \"Wrong range: $range\" }\n",
" require(cl > 0)\n",
" val alpha = (1.0 - cl) \/ 2.0\n",
"\n",
" val numPoints = ((range.endInclusive - range.start) \/ tolerance).toInt()\n",
" val xs: List<Map<String, Double>> = List(numPoints) { i -> mapOf(parameter to range.start + tolerance * i) }\n",
" val pointValues = xs.map { it to value(it) }\n",
"\n",
" val norm: Double = pointValues.sumOf { it.second }\n",
"\n",
" var left = pointValues.first()\n",
" var leftSum = 0.0\n",
" var leftIndex = 0\n",
" while (leftSum < alpha * norm) {\n",
" left = pointValues[leftIndex]\n",
" leftSum += left.second\n",
" leftIndex++\n",
" }\n",
"\n",
" var right = pointValues.last()\n",
" var rightSum = 0.0\n",
" var rightIndex = pointValues.size - 1\n",
" while (rightSum < alpha * norm) {\n",
" right = pointValues[rightIndex]\n",
" rightSum += right.second\n",
" rightIndex--\n",
" }\n",
"\n",
" return ConfidenceInterval1D(cl, left.first, right.first)\n",
"}\n",
"\n",
"val Parameters.x get() = get(\"x\") ?: error(\"Value 'x' not found\")\n",
"\n",
"fun Distribution.filter(block: (Parameters) -> Boolean): Distribution = Distribution {\n",
" if (block(it)) this.value(it) else 0.0\n",
"}"
],
"execution_count":3,
"outputs":[
],
"metadata":{
"datalore":{
"node_id":"6TPJ0w6JKMJN7az3N7uslt",
"type":"CODE",
"hide_input_from_viewers":true,
"hide_output_from_viewers":true
}
}
},
{
"cell_type":"code",
"source":[
"val distribution = (normal(0.0, 1.0) + normal(1.0, 0.2)).filter { it.x > 0.0 }\n",
"\n",
"val max = distribution.findMax1D(\"x\", -2.0..2.0)\n",
"val interval = distribution.findConfidenceInterval1D(\"x\", -4.0..4.0)\n",
"\n",
"val xs: List<Double> = (-500..500).map { it.toDouble() \/ 250 }\n",
"\n",
"val ys: List<Double> = xs.map { x ->\n",
" val arg: Parameters = mapOf(\"x\" to x)\n",
" distribution.value(arg)\n",
"}\n",
"\n",
"Plotly.plot {\n",
" scatter {\n",
" x.numbers = xs\n",
" y.numbers = ys\n",
" }\n",
" scatter {\n",
" name = \"maximum\"\n",
" x.numbers = listOf(max.arg.x)\n",
" y.numbers = listOf(max.value)\n",
" }\n",
" scatter {\n",
" name = \"interval\"\n",
" x.numbers = listOf(interval.left.x, interval.right.x)\n",
" y.numbers = listOf(0.0, 0.0)\n",
" }\n",
"}"
],
"execution_count":4,
"outputs":[
{
"data":{
"text\/html":[
"<html>\n",
" <head>\n",
" <meta charset=\"utf-8\">\n",
" <title>Plotly.kt<\/title>\n",
" <script type=\"text\/javascript\" src=\"https:\/\/cdn.plot.ly\/plotly-1.54.6.min.js\"><\/script>\n",
" <\/head>\n",
" <body>\n",
" <div id=\"space.kscience.plotly.Plot@7578541a\">\n",
" <script>if(typeof Plotly !== \"undefined\"){\n",
" Plotly.react(\n",
" 'space.kscience.plotly.Plot@7578541a',\n",
" [{\"type\":\"scatter\",\"x\":[-2.0,-1.996,-1.992,-1.988,-1.984,-1.98,-1.976,-1.972,-1.968,-1.964,-1.96,-1.956,-1.952,-1.948,-1.944,-1.94,-1.936,-1.932,-1.928,-1.924,-1.92,-1.916,-1.912,-1.908,-1.904,-1.9,-1.896,-1.892,-1.888,-1.884,-1.88,-1.876,-1.872,-1.868,-1.864,-1.86,-1.856,-1.852,-1.848,-1.844,-1.84,-1.836,-1.832,-1.828,-1.824,-1.82,-1.816,-1.812,-1.808,-1.804,-1.8,-1.796,-1.792,-1.788,-1.784,-1.78,-1.776,-1.772,-1.768,-1.764,-1.76,-1.756,-1.752,-1.748,-1.744,-1.74,-1.736,-1.732,-1.728,-1.724,-1.72,-1.716,-1.712,-1.708,-1.704,-1.7,-1.696,-1.692,-1.688,-1.684,-1.68,-1.676,-1.672,-1.668,-1.664,-1.66,-1.656,-1.652,-1.648,-1.644,-1.64,-1.636,-1.632,-1.628,-1.624,-1.62,-1.616,-1.612,-1.608,-1.604,-1.6,-1.596,-1.592,-1.588,-1.584,-1.58,-1.576,-1.572,-1.568,-1.564,-1.56,-1.556,-1.552,-1.548,-1.544,-1.54,-1.536,-1.532,-1.528,-1.524,-1.52,-1.516,-1.512,-1.508,-1.504,-1.5,-1.496,-1.492,-1.488,-1.484,-1.48,-1.476,-1.472,-1.468,-1.464,-1.46,-1.456,-1.452,-1.448,-1.444,-1.44,-1.436,-1.432,-1.428,-1.424,-1.42,-1.416,-1.412,-1.408,-1.404,-1.4,-1.396,-1.392,-1.388,-1.384,-1.38,-1.376,-1.372,-1.368,-1.364,-1.36,-1.356,-1.352,-1.348,-1.344,-1.34,-1.336,-1.332,-1.328,-1.324,-1.32,-1.316,-1.312,-1.308,-1.304,-1.3,-1.296,-1.292,-1.288,-1.284,-1.28,-1.276,-1.272,-1.268,-1.264,-1.26,-1.256,-1.252,-1.248,-1.244,-1.24,-1.236,-1.232,-1.228,-1.224,-1.22,-1.216,-1.212,-1.208,-1.204,-1.2,-1.196,-1.192,-1.188,-1.184,-1.18,-1.176,-1.172,-1.168,-1.164,-1.16,-1.156,-1.152,-1.148,-1.144,-1.14,-1.136,-1.132,-1.128,-1.124,-1.12,-1.116,-1.112,-1.108,-1.104,-1.1,-1.096,-1.092,-1.088,-1.084,-1.08,-1.076,-1.072,-1.068,-1.064,-1.06,-1.056,-1.052,-1.048,-1.044,-1.04,-1.036,-1.032,-1.028,-1.024,-1.02,-1.016,-1.012,-1.008,-1.004,-1.0,-0.996,-0.992,-0.988,-0.984,-0.98,-0.976,-0.972,-0.968,-0.964,-0.96,-0.956,-0.952,-0.948,-0.944,-0.94,-0.936,-0.932,-0.928,-0.924,-0.92,-0.916,-0.912,-0.908,-0.904,-0.9,-0.896,-0.892,-0.888,-0.884,-0.88,-0.876,-0.872,-0.868,-0.864,-0.86,-0.856,-0.852,-0.848,-0.844,-0.84,-0.836,-0.832,-0.828,-0.824,-0.82,-0.816,-0.812,-0.808,-0.804,-0.8,-0.796,-0.792,-0.788,-0.784,-0.78,-0.776,-0.772,-0.768,-0.764,-0.76,-0.756,-0.752,-0.748,-0.744,-0.74,-0.736,-0.732,-0.728,-0.724,-0.72,-0.716,-0.712,-0.708,-0.704,-0.7,-0.696,-0.692,-0.688,-0.684,-0.68,-0.676,-0.672,-0.668,-0.664,-0.66,-0.656,-0.652,-0.648,-0.644,-0.64,-0.636,-0.632,-0.628,-0.624,-0.62,-0.616,-0.612,-0.608,-0.604,-0.6,-0.596,-0.592,-0.588,-0.584,-0.58,-0.576,-0.572,-0.568,-0.564,-0.56,-0.556,-0.552,-0.548,-0.544,-0.54,-0.536,-0.532,-0.528,-0.524,-0.52,-0.516,-0.512,-0.508,-0.504,-0.5,-0.496,-0.492,-0.488,-0.484,-0.48,-0.476,-0.472,-0.468,-0.464,-0.46,-0.456,-0.452,-0.448,-0.444,-0.44,-0.436,-0.432,-0.428,-0.424,-0.42,-0.416,-0.412,-0.408,-0.404,-0.4,-0.396,-0.392,-0.388,-0.384,-0.38,-0.376,-0.372,-0.368,-0.364,-0.36,-0.356,-0.352,-0.348,-0.344,-0.34,-0.336,-0.332,-0.328,-0.324,-0.32,-0.316,-0.312,-0.308,-0.304,-0.3,-0.296,-0.292,-0.288,-0.284,-0.28,-0.276,-0.272,-0.268,-0.264,-0.26,-0.256,-0.252,-0.248,-0.244,-0.24,-0.236,-0.232,-0.228,-0.224,-0.22,-0.216,-0.212,-0.208,-0.204,-0.2,-0.196,-0.192,-0.188,-0.184,-0.18,-0.176,-0.172,-0.168,-0.164,-0.16,-0.156,-0.152,-0.148,-0.144,-0.14,-0.136,-0.132,-0.128,-0.124,-0.12,-0.116,-0.112,-0.108,-0.104,-0.1,-0.096,-0.092,-0.088,-0.084,-0.08,-0.076,-0.072,-0.068,-0.064,-0.06,-0.056,-0.052,-0.048,-0.044,-0.04,-0.036,-0.032,-0.028,-0.024,-0.02,-0.016,-0.012,-0.008,-0.004,0.0,0.004,0.008,0.012,0.016,0.02,0.024,0.028,0.032,0.036,0.04,0.044,0.048,0.052,0.056,0.06,0.064,0.068,0.072,0.076,0.08,0.084,0.088,0.092,0.096,0.1,0.104,0.108,0.112,0.116,0.12,0.124,0.128,0.132,0.136,0.14,0.144,0.148,0.152,0.156,0.16,0.164,0.168,0.172,0.176,0.18,0.184,0.188,0.192,0.196,0.2,0.204,0.208,0.212,0.216,0.22,0.224,0.228,0.232,0.236,0.24,0.244,0.248,0.252,0.256,0.26,0.264,0.268,0.272,0.276,0.28,0.284,0.288,0.292,0.296,0.3,0.304,0.308,0.312,0.316,0.32,0.324,0.328,0.332,0.336,0.34,0.344,0.348,0.352,0.356,0.36,0.364,0.368,0.372,0.376,0.38,0.384,0.388,0.392,0.396,0.4,0.404,0.408,0.412,0.416,0.42,0.424,0.428,0.432,0.436,0.44,0.444,0.448,0.452,0.456,0.4
" {},\n",
" {}\n",
" ); \n",
"} else {\n",
" console.error(\"Plotly not loaded\")\n",
"}<\/script>\n",
" <\/div>\n",
" <\/body>\n",
"<\/html>\n"
]
},
"metadata":{
},
"output_type":"display_data"
}
],
"metadata":{
"datalore":{
"node_id":"Gx4S9n66NIxezCRooEklet",
"type":"CODE",
"hide_input_from_viewers":true,
"hide_output_from_viewers":true
}
}
}
],
"metadata":{
"kernelspec":{
"display_name":"Kotlin",
"language":"kotlin",
"name":"kotlin"
},
"datalore":{
"computation_mode":"REACTIVE",
"package_manager":"pip",
"base_environment":"default",
"packages":[
],
"report_row_ids":[
],
"version":3
}
},
"nbformat":4,
"nbformat_minor":4
}