Þ ¥bonds€¬cell_resultsÞ OÙ$cf264b86-d86f-4c4a-af3b-03b34486e5ffŠ¦queuedÂ¤logs�§runningÂ¦output†¤bodyÙÎ<div class="markdown"><h3 id="Visualization">Visualization</h3>
<p>Let&#39;s test our optimizers. We will simulate a loss function that depends on two parameters using the 2D Rosenbrock function:</p>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9fÂ“°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$cf264b86-d86f-4c4a-af3b-03b34486e5ff¹depends_on_disabled_cellsÂ§runtimeÎ Ì)µpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$ac1355a2-db94-4954-ad65-6887b7dbb7adŠ¦queuedÂ¤logs�§runningÂ¦output†¤bodyƒ£msgÙ-UndefVarError: `transformed_data` not definedªstacktrace‘Œªcall_short¯top-level scope§inlinedÂ£urlÀ¤pathÙu/home/runner/work/julia-ml-course/julia-ml-course/homework/H3_Custom_Types.jl#==#ac1355a2-db94-4954-ad65-6887b7dbb7ad®source_packageÀ¤call¯top-level scopeªlinfo_type­Core.CodeInfo¤line¤fileÙ:H3_Custom_Types.jl#==#ac1355a2-db94-4954-ad65-6887b7dbb7ad¤func¯top-level scope­parent_moduleÀ¦from_cÂ«plain_errorÙÀUndefVarError: `transformed_data` not defined
Stacktrace:
 [1] top-level scope
   @ ~/work/julia-ml-course/julia-ml-course/homework/H3_Custom_Types.jl#==#ac1355a2-db94-4954-ad65-6887b7dbb7ad:1¤mimeÙ'application/vnd.pluto.stacktrace+object¬rootassigneeÀ²last_run_timestampËAÚ;9r7Á7°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$ac1355a2-db94-4954-ad65-6887b7dbb7ad¹depends_on_disabled_cellsÂ§runtimeÀµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÃÙ$3a100e93-7bba-4836-a4e6-e285aa6406c4Š¦queuedÂ¤logs�§runningÂ¦output†¤body…¦prefix§Float64¨elementsÜ ’’¦-2.463ªtext/plain’’¦-0.934ªtext/plain’’¦-1.854ªtext/plain’’¦-3.875ªtext/plain’’¥2.477ªtext/plain’’§-1.1875ªtext/plain’’¦-1.158ªtext/plain’’¦-1.224ªtext/plain’	’¦-1.344ªtext/plain’
’¦-0.319ªtext/plain’’¦-0.525ªtext/plain’’¦-1.388ªtext/plain’’¦-1.837ªtext/plain’’¦-1.316ªtext/plain’’¦-0.597ªtext/plain’’¦-1.068ªtext/plain’’¦0.1412ªtext/plain’’¦-0.959ªtext/plain’’¦-1.479ªtext/plain’’¦-2.004ªtext/plain¤more’)’¦-1.969ªtext/plain’*’¦-1.564ªtext/plain’+’¦-0.982ªtext/plain’,’¦-1.238ªtext/plain’-’¦-1.414ªtext/plain’.’¦-2.246ªtext/plain’/’¦-2.925ªtext/plain’0’§-1.3955ªtext/plain’1’¦-1.237ªtext/plain’2’¦-1.005ªtext/plain¤type¥Array¬prefix_short ¨objectid°544c4536a35da1df¤mimeÙ!application/vnd.pluto.tree+object¬rootassignee©test_data²last_run_timestampËAÚ;9qÏx1°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$3a100e93-7bba-4836-a4e6-e285aa6406c4¹depends_on_disabled_cellsÂ§runtimeÍbZµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$80c5a262-e758-4075-896f-a0bc7ce1534cŠ¦queuedÂ¤logs�§runningÂ¦output†¤bodyÙD<div class="markdown"><p>Let&#39;s see if our code works:</p>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9f¾€�°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$80c5a262-e758-4075-896f-a0bc7ce1534c¹depends_on_disabled_cellsÂ§runtimeÎ €µpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$8b519a7d-b64f-4c0c-8d74-17a963cb381dŠ¦queuedÂ¤logs�§runningÂ¦output†¤bodyÙº<div class="markdown"><div class="admonition tip"><p class="admonition-title">Tip</p><p>It is recommended to quickly review exercise 3 from homework 1 before starting.</p>

</div>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9qÐfM°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$8b519a7d-b64f-4c0c-8d74-17a963cb381d¹depends_on_disabled_cellsÂ§runtimeÎ ¸ïµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$0fbd2560-1e4c-45b7-89a6-d2b622f9f907Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyÙ2plot_loss_surface (generic function with 1 method)¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ;9rUeÃ°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$0fbd2560-1e4c-45b7-89a6-d2b622f9f907¹depends_on_disabled_cellsÂ§runtimeÎ •)µpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$ff5d316f-806c-4652-97d8-323462395c69Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyÙš<div class="markdown"><p>Submission by: <strong><em>Mara Mustermann</em></strong> &#40;m.mustermann@campus.tu-berlin.de, Matr.-Nr.: 456123&#41;</p>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9qŽ‡Ó°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$ff5d316f-806c-4652-97d8-323462395c69¹depends_on_disabled_cellsÂ§runtimeÎU®’µpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$e5e014e6-e24d-4de0-a216-61c0f9d9c331Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyƒ£msg¿UndefVarError: `dt` not definedªstacktrace‘Œªcall_short¯top-level scope§inlinedÂ£urlÀ¤pathÙu/home/runner/work/julia-ml-course/julia-ml-course/homework/H3_Custom_Types.jl#==#e5e014e6-e24d-4de0-a216-61c0f9d9c331®source_packageÀ¤call¯top-level scopeªlinfo_type­Core.CodeInfo¤line¤fileÙ:H3_Custom_Types.jl#==#e5e014e6-e24d-4de0-a216-61c0f9d9c331¤func¯top-level scope­parent_moduleÀ¦from_cÂ«plain_errorÙ²UndefVarError: `dt` not defined
Stacktrace:
 [1] top-level scope
   @ ~/work/julia-ml-course/julia-ml-course/homework/H3_Custom_Types.jl#==#e5e014e6-e24d-4de0-a216-61c0f9d9c331:1¤mimeÙ'application/vnd.pluto.stacktrace+object¬rootassigneeÀ²last_run_timestampËAÚ;9r -Ï°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$e5e014e6-e24d-4de0-a216-61c0f9d9c331¹depends_on_disabled_cellsÂ§runtimeÀµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÃÙ$02a62f7b-6014-439a-a254-49f53f204abbŠ¦queuedÂ¤logs�§runningÂ¦output†¤bodyÙ’<div class="markdown"><h3 id="Exercise-1.1-â€“-Composite-types-&amp;-constructors">Exercise 1.1 â€“ Composite types &amp; constructors</h3>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9f³Õg°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$02a62f7b-6014-439a-a254-49f53f204abb¹depends_on_disabled_cellsÂ§runtimeÎ èµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$bcdd297b-c52c-4076-9329-929d69b8021bŠ¦queuedÂ¤logs�§runningÂ¦output†¤bodyÚW<div class="markdown"><h3 id="Visualization">Visualization</h3>
<p>As we can see in this plot, our original data didn&#39;t come from a normal distribution. Standardization transforms the data such that <span class="tex">$\mu &#61; 0$</span> and <span class="tex">$\sigma&#61;1$</span>, but doesn&#39;t make it normally distributed.</p>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9f¾Þ˜°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$bcdd297b-c52c-4076-9329-929d69b8021b¹depends_on_disabled_cellsÂ§runtimeÎ á°µpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$3f81ccce-5744-42ba-aa1e-b3da6212b9efŠ¦queuedÂ¤logs�§runningÂ¦output†¤bodyƒ£msgÙ'UndefVarError: `optimizers` not definedªstacktrace‘Œªcall_short¯top-level scope§inlinedÂ£urlÀ¤pathÙu/home/runner/work/julia-ml-course/julia-ml-course/homework/H3_Custom_Types.jl#==#3f81ccce-5744-42ba-aa1e-b3da6212b9ef®source_packageÀ¤call¯top-level scopeªlinfo_type­Core.CodeInfo¤line¤fileÙ:H3_Custom_Types.jl#==#3f81ccce-5744-42ba-aa1e-b3da6212b9ef¤func¯top-level scope­parent_moduleÀ¦from_cÂ«plain_errorÙºUndefVarError: `optimizers` not defined
Stacktrace:
 [1] top-level scope
   @ ~/work/julia-ml-course/julia-ml-course/homework/H3_Custom_Types.jl#==#3f81ccce-5744-42ba-aa1e-b3da6212b9ef:1¤mimeÙ'application/vnd.pluto.stacktrace+object¬rootassigneeÀ²last_run_timestampËAÚ;9s¶J8°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$3f81ccce-5744-42ba-aa1e-b3da6212b9ef¹depends_on_disabled_cellsÂ§runtimeÀµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÃÙ$a3634333-1149-4392-a7e9-350a56d67d2bŠ¦queuedÂ¤logs�§runningÂ¦output†¤bodyÙ0plot_trajectory (generic function with 1 method)¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ;9s³:*°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$a3634333-1149-4392-a7e9-350a56d67d2b¹depends_on_disabled_cellsÂ§runtimeÎ =ðµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$be2c5285-fbd8-4c37-8b17-db6db95c8a4eŠ¦queuedÂ¤logs�§runningÂ¦output†¤bodyÚÊ<div class="markdown"><div class="admonition Task"><p class="admonition-title">Task (2 points)</p><p>Now define two functions <code>transform</code> and <code>inverse_transform</code>:</p>
<ol>
<li><p>A function <code>transform</code> that takes an array and a <code>Standardize</code> object and implements the standardization</p>
</li>
</ol>
<p class="tex">$$X&#39; &#61; \frac&#123;X-\mu&#125;&#123;\sigma&#125; \quad .$$</p>
<ol start="2">
<li><p>A function <code>inverse_transform</code> that takes an array and a <code>Standardize</code> object and implements the inverse standardization</p>
</li>
</ol>
<p class="tex">$$X &#61; \left&#40;X&#39; \cdot \sigma\right&#41; &#43; \mu \quad .$$</p>

</div>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9r+–°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$be2c5285-fbd8-4c37-8b17-db6db95c8a4e¹depends_on_disabled_cellsÂ§runtimeÎ Læµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$ef9a0669-2d02-4f1b-aa99-6f6473d37c0fŠ¦queuedÂ¤logs�§runningÂ¦output†¤bodyÚ)<div class="markdown"><div class="admonition Task"><p class="admonition-title">Task (2 points)</p><p>Define a type <code>GradientDescent</code> that implements <a href="https://en.wikipedia.org/wiki/Gradient_descent">gradient descent</a>. It should:</p>
<ul>
<li><p>be a sub-type of <code>AbstractRule</code></p>
</li>
<li><p>have a learning rate <code>lr</code> as its only field</p>
</li>
<li><p>have a default learning rate of <code>0.1</code>, implemented in an outer constructor <code>GradientDescent&#40;&#41;</code></p>
</li>
</ul>

</div>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9rA5°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$ef9a0669-2d02-4f1b-aa99-6f6473d37c0f¹depends_on_disabled_cellsÂ§runtimeÎ 	4bµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$aaea0bbf-868d-4fe0-b348-307449d06517Š¦queuedÂ¤logs�§runningÂ¦output†¤body ¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ;9f¾dØ°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$aaea0bbf-868d-4fe0-b348-307449d06517¹depends_on_disabled_cellsÂ§runtimeÍ&yµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$c080e799-b5c5-42cf-b5f1-8c36da89fc8fŠ¦queuedÂ¤logs�§runningÂ¦output†¤bodyÙo<div class="markdown"><h3 id="Exercise-2.3-â€“-apply&#33;">Exercise 2.3 â€“ <code>apply&#33;</code></h3>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9fÁÀD°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$c080e799-b5c5-42cf-b5f1-8c36da89fc8f¹depends_on_disabled_cellsÂ§runtimeÎ í�µpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$569173af-9e54-49cb-b1cb-88b8cbda57a6Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyÙy<div class="markdown"><p>And let&#39;s test the inverse transformation. The following vectors should be equal:</p>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9f¾Ç°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$569173af-9e54-49cb-b1cb-88b8cbda57a6¹depends_on_disabled_cellsÂ§runtimeÎ DSµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$f60be2e0-9b43-46b5-96ef-7747ab56e164Š¦queuedÂ¤logs�§runningÂ¦output†¤body ¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ;9sº®÷°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$f60be2e0-9b43-46b5-96ef-7747ab56e164¹depends_on_disabled_cellsÂ§runtimeÍ2µpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$dc35d701-ab40-4933-b4c5-35a81b3f834aŠ¦queuedÂ¤logs�§runningÂ¦output†¤bodyÚ5<bond def="lr1" unique_id="upglgzzvirmf"><input type='range' min='1' max='20' value='15'><script>
					const input_el = currentScript.previousElementSibling
					const output_el = currentScript.nextElementSibling
					const displays = ["0.01", "0.02", "0.03", "0.04", "0.05", "0.06", "0.07", "0.08", "0.09", "0.1", "0.11", "0.12", "0.13", "0.14", "0.15", "0.16", "0.17", "0.18", "0.19", "0.2"]

					let update_output = () => {
						output_el.value = displays[input_el.valueAsNumber - 1]
					}
					
					input_el.addEventListener("input", update_output)
					// We also poll for changes because the `input_el.value` can change from the outside, e.g. https://github.com/JuliaPluto/PlutoUI.jl/issues/277
					let id = setInterval(update_output, 200)
					invalidation.then(() => {
						clearInterval(id)
						input_el.removeEventListener("input", update_output)
					})
					</script><output style='
						font-family: system-ui;
    					font-size: 15px;
    					margin-left: 3px;
    					transform: translateY(-4px);
    					display: inline-block;'>0.15</output></bond>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9s¦€�°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$dc35d701-ab40-4933-b4c5-35a81b3f834a¹depends_on_disabled_cellsÂ§runtimeÎ[µpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$a96abf48-cacf-41f8-bb7a-3d085bdb0a62Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyÚÏ<div class="markdown"><p>You can also implement <a href="https://en.wikipedia.org/wiki/Stochastic_gradient_descent#Extensions_and_variants">more variants</a> or simply use <a href="https://fluxml.ai/Optimisers.jl/dev/api/#Optimisation-Rules">those implemented in Optimisers.jl</a>.</p>
<p>Click <code>plot_trajectory</code> below to reveal the code that produced the plot. The most relevant part is the inner loop where the optimizer is called:</p>
<pre><code class="language-julia">state &#61; Optimisers.setup&#40;opt, params&#41;

for i in 1:steps
	grad &#61; ... # Compute gradient. We will learn how this works next week.

	state, params &#61; Optimisers.update&#40;state, params, grad&#41;
end</code></pre>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9fÂh0°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$a96abf48-cacf-41f8-bb7a-3d085bdb0a62¹depends_on_disabled_cellsÂ§runtimeÎ bïµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$58a671a1-3059-4fa9-b758-f3a76a573aa5Š¦queuedÂ¤logs�§runningÂ¦output†¤body ¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ;9fÁM4°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$58a671a1-3059-4fa9-b758-f3a76a573aa5¹depends_on_disabled_cellsÂ§runtimeÍ"Áµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$4eac0e3f-7212-4038-a24e-8d6ca3fbe659Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyÙÅ<div class="markdown"><div class="admonition danger"><p class="admonition-title">Keep working on it!</p><p>Make sure that you define a struct called <code>GradientDescent</code>.</p>

</div>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9rB‰°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$4eac0e3f-7212-4038-a24e-8d6ca3fbe659¹depends_on_disabled_cellsÂ§runtimeÎ ë"µpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$3d638561-6760-4260-991a-b0b0c77745a3Š¦queuedÂ¤logs�§runningÂ¦output†¤body ¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ;9pöÿ›°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$3d638561-6760-4260-991a-b0b0c77745a3¹depends_on_disabled_cellsÂ§runtimeÎ €›µpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$17ff11e9-84f8-4911-845b-930a53c73e0eŠ¦queuedÂ¤logs�§runningÂ¦output†¤bodyƒ£msg¿UndefVarError: `dt` not definedªstacktrace‘Œªcall_short¯top-level scope§inlinedÂ£urlÀ¤pathÙu/home/runner/work/julia-ml-course/julia-ml-course/homework/H3_Custom_Types.jl#==#17ff11e9-84f8-4911-845b-930a53c73e0e®source_packageÀ¤call¯top-level scopeªlinfo_type­Core.CodeInfo¤line¤fileÙ:H3_Custom_Types.jl#==#17ff11e9-84f8-4911-845b-930a53c73e0e¤func¯top-level scope­parent_moduleÀ¦from_cÂ«plain_errorÙ²UndefVarError: `dt` not defined
Stacktrace:
 [1] top-level scope
   @ ~/work/julia-ml-course/julia-ml-course/homework/H3_Custom_Types.jl#==#17ff11e9-84f8-4911-845b-930a53c73e0e:1¤mimeÙ'application/vnd.pluto.stacktrace+object¬rootassigneeÀ²last_run_timestampËAÚ;9r"èK°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$17ff11e9-84f8-4911-845b-930a53c73e0e¹depends_on_disabled_cellsÂ§runtimeÀµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÃÙ$3ac8faba-1af9-4fc6-a1d0-37225b9ebb02Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyÚÈ<div class="markdown"><h2 id="Exercise-2-â€“-Gradient-based-optimization">Exercise 2 â€“ Gradient-based optimization</h2>
<p>As we have seen in the previous exercise, strucs / composite types are a common way to implement algorithms. In this exercise, we will extend the <a href="https://en.wikipedia.org/wiki/Gradient_descent">gradient-based optimization algorithms</a> from <a href="https://github.com/FluxML/Optimisers.jl/">Optimisers.jl</a>.</p>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9f¾ÿÅ°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$3ac8faba-1af9-4fc6-a1d0-37225b9ebb02¹depends_on_disabled_cellsÂ§runtimeÎ tµµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$bb0d58f9-380e-43fa-9524-0108a2816884Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyƒ£msgÙ(UndefVarError: `Standardize` not definedªstacktrace‘Œªcall_short¯top-level scope§inlinedÂ£urlÀ¤pathÙu/home/runner/work/julia-ml-course/julia-ml-course/homework/H3_Custom_Types.jl#==#bb0d58f9-380e-43fa-9524-0108a2816884®source_packageÀ¤call¯top-level scopeªlinfo_type­Core.CodeInfo¤line¤fileÙ:H3_Custom_Types.jl#==#bb0d58f9-380e-43fa-9524-0108a2816884¤func¯top-level scope­parent_moduleÀ¦from_cÂ«plain_errorÙ»UndefVarError: `Standardize` not defined
Stacktrace:
 [1] top-level scope
   @ ~/work/julia-ml-course/julia-ml-course/homework/H3_Custom_Types.jl#==#bb0d58f9-380e-43fa-9524-0108a2816884:1¤mimeÙ'application/vnd.pluto.stacktrace+object¬rootassigneeÀ²last_run_timestampËAÚ;9r-�ç°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$bb0d58f9-380e-43fa-9524-0108a2816884¹depends_on_disabled_cellsÂ§runtimeÀµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÃÙ$5061a130-fc0a-4306-bdf5-6966e8de938aŠ¦queuedÂ¤logs�§runningÂ¦output†¤body ¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ;9q¸fo°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$5061a130-fc0a-4306-bdf5-6966e8de938a¹depends_on_disabled_cellsÂ§runtimeÎ þªµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$ddd6e83e-5a0d-4ff0-afe4-dedfc860994cŠ¦queuedÂ¤logs�§runningÂ¦output†¤bodyÙR<div class="markdown"><h3 id="Student-information">Student information</h3>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9f³�q°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$ddd6e83e-5a0d-4ff0-afe4-dedfc860994c¹depends_on_disabled_cellsÂ§runtimeÎ ÔÞµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$f9192279-9d12-485e-bb9d-650be2dbd878Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyÚT<bond def="lr2" unique_id="enqjwulslcus"><input type='range' min='1' max='50' value='10'><script>
					const input_el = currentScript.previousElementSibling
					const output_el = currentScript.nextElementSibling
					const displays = ["0.001", "0.002", "0.003", "0.004", "0.005", "0.006", "0.007", "0.008", "0.009", "0.01", "0.011", "0.012", "0.013", "0.014", "0.015", "0.016", "0.017", "0.018", "0.019", "0.02", "0.021", "0.022", "0.023", "0.024", "0.025", "0.026", "0.027", "0.028", "0.029", "0.03", "0.031", "0.032", "0.033", "0.034", "0.035", "0.036", "0.037", "0.038", "0.039", "0.04", "0.041", "0.042", "0.043", "0.044", "0.045", "0.046", "0.047", "0.048", "0.049", "0.05"]

					let update_output = () => {
						output_el.value = displays[input_el.valueAsNumber - 1]
					}
					
					input_el.addEventListener("input", update_output)
					// We also poll for changes because the `input_el.value` can change from the outside, e.g. https://github.com/JuliaPluto/PlutoUI.jl/issues/277
					let id = setInterval(update_output, 200)
					invalidation.then(() => {
						clearInterval(id)
						input_el.removeEventListener("input", update_output)
					})
					</script><output style='
						font-family: system-ui;
    					font-size: 15px;
    					margin-left: 3px;
    					transform: translateY(-4px);
    					display: inline-block;'>0.01</output></bond>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9s¦½°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$f9192279-9d12-485e-bb9d-650be2dbd878¹depends_on_disabled_cellsÂ§runtimeÎ ÿËµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$78fcd02f-1a6e-4799-b042-4542a1ec7847Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyƒ£msg¿UndefVarError: `dt` not definedªstacktrace‘Œªcall_short¯top-level scope§inlinedÂ£urlÀ¤pathÙu/home/runner/work/julia-ml-course/julia-ml-course/homework/H3_Custom_Types.jl#==#78fcd02f-1a6e-4799-b042-4542a1ec7847®source_packageÀ¤call¯top-level scopeªlinfo_type­Core.CodeInfo¤line¤fileÙ:H3_Custom_Types.jl#==#78fcd02f-1a6e-4799-b042-4542a1ec7847¤func¯top-level scope­parent_moduleÀ¦from_cÂ«plain_errorÙ²UndefVarError: `dt` not defined
Stacktrace:
 [1] top-level scope
   @ ~/work/julia-ml-course/julia-ml-course/homework/H3_Custom_Types.jl#==#78fcd02f-1a6e-4799-b042-4542a1ec7847:1¤mimeÙ'application/vnd.pluto.stacktrace+object¬rootassigneeÀ²last_run_timestampËAÚ;9r?Ä °persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$78fcd02f-1a6e-4799-b042-4542a1ec7847¹depends_on_disabled_cellsÂ§runtimeÀµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÃÙ$2341dd4a-a35a-4a62-815a-e972d04844abŠ¦queuedÂ¤logs�§runningÂ¦output†¤bodyÙè<div class="markdown"><p>Let&#39;s plot the trajectory of our optimizers on the &quot;loss surface&quot;.</p>
<p>Add as many optimizers and sliders as you want, change the initial parameters and the number of steps taken.</p>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9fÂL�°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$2341dd4a-a35a-4a62-815a-e972d04844ab¹depends_on_disabled_cellsÂ§runtimeÎ µpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$d36914f8-f7d4-407a-a842-436f4035157bŠ¦queuedÂ¤logs�§runningÂ¦output†¤bodyÙý<div class="markdown"><h2 id="Exercise-1-â€“-Standardization">Exercise 1 â€“ Standardization</h2>
<p>In this exercise, we will refactor the standardization code from homework 1 by using custom types. Let&#39;s load the dataset from last time:</p>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9f³¿Ë°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$d36914f8-f7d4-407a-a842-436f4035157b¹depends_on_disabled_cellsÂ§runtimeÎ ³ªµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$3b65f124-75c2-4fb3-8b59-94015500acbfŠ¦queuedÂ¤logs�§runningÂ¦output†¤body ¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ;9rO$y°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$3b65f124-75c2-4fb3-8b59-94015500acbf¹depends_on_disabled_cellsÂ§runtimeÍN•µpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$755b8685-0711-48a2-a3eb-f80af39f10e1Š¦queuedÂ¤logs�§runningÂ¦output†¤body…¦prefix³Plots.PlotlyBackend¨elements�¤type¦struct¬prefix_short­PlotlyBackend¨objectid°ffffffffb3054924¤mimeÙ!application/vnd.pluto.tree+object¬rootassigneeÀ²last_run_timestampËAÚ;9pé­§°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$755b8685-0711-48a2-a3eb-f80af39f10e1¹depends_on_disabled_cellsÂ§runtimeÎ•(lµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$3bb76227-82cd-4924-bfb3-1b8504e2dc44Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyÙ%loss (generic function with 1 method)¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ;9rJÒ1°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$3bb76227-82cd-4924-bfb3-1b8504e2dc44¹depends_on_disabled_cellsÂ§runtimeÎ 	Œ µpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$5dc7d04d-f6a5-4265-b890-d74ea4b3c602Š¦queuedÂ¤logs�§runningÂ¦output†¤body ¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ;9fÁ©¤°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$5dc7d04d-f6a5-4265-b890-d74ea4b3c602¹depends_on_disabled_cellsÂ§runtimeÍ$Þµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$fd30da51-0890-4ebe-8b14-8975ec12fec0Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyÙÁ<div class="markdown"><div class="admonition danger"><p class="admonition-title">Keep working on it!</p><p>Make sure that you define a struct called <code>Standardize</code>.</p>

</div>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9r*Ä¬°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$fd30da51-0890-4ebe-8b14-8975ec12fec0¹depends_on_disabled_cellsÂ§runtimeÎÒ(µpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$8ece9aea-20f5-41db-95ca-08c8d4d2d4c1Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyÙ¤<div class="markdown"><div class="admonition Task"><p class="admonition-title">Task </p><p>Please add your student information to the cell below.</p>

</div>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9qºû�°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$8ece9aea-20f5-41db-95ca-08c8d4d2d4c1¹depends_on_disabled_cellsÂ§runtimeÎ Ÿµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$b0d679ba-13f8-4e70-ac42-68acb2ff83d1Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyÚD<div class="markdown"><div class="admonition Task"><p class="admonition-title">Task (1 point)</p><p>Define an <code>Optimisers.init</code> function for <code>GradientDescent</code> that returns <code>nothing</code>.</p>
<p>We return <code>nothing</code> since gradient descent doesn&#39;t require a state.</p>

</div>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9rA¾¶°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$b0d679ba-13f8-4e70-ac42-68acb2ff83d1¹depends_on_disabled_cellsÂ§runtimeÎ :Ž¹µpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$f83196a4-a0fd-44a3-b3d1-29730599830dŠ¦queuedÂ¤logs�§runningÂ¦output†¤bodyƒ£msg¿UndefVarError: `dt` not definedªstacktrace‘Œªcall_short¯top-level scope§inlinedÂ£urlÀ¤pathÙu/home/runner/work/julia-ml-course/julia-ml-course/homework/H3_Custom_Types.jl#==#f83196a4-a0fd-44a3-b3d1-29730599830d®source_packageÀ¤call¯top-level scopeªlinfo_type­Core.CodeInfo¤line¤fileÙ:H3_Custom_Types.jl#==#f83196a4-a0fd-44a3-b3d1-29730599830d¤func¯top-level scope­parent_moduleÀ¦from_cÂ«plain_errorÙ²UndefVarError: `dt` not defined
Stacktrace:
 [1] top-level scope
   @ ~/work/julia-ml-course/julia-ml-course/homework/H3_Custom_Types.jl#==#f83196a4-a0fd-44a3-b3d1-29730599830d:1¤mimeÙ'application/vnd.pluto.stacktrace+object¬rootassignee°transformed_data²last_run_timestampËAÚ;9r2Aš°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$f83196a4-a0fd-44a3-b3d1-29730599830d¹depends_on_disabled_cellsÂ§runtimeÀµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÃÙ$6d5bf1e5-5ab0-4351-89d0-ddb6fcfa27b6Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyÙÅ<div class="markdown"><div class="admonition danger"><p class="admonition-title">Keep working on it!</p><p>Make sure that you define a struct called <code>GradientDescent</code>.</p>

</div>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9rAaá°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$6d5bf1e5-5ab0-4351-89d0-ddb6fcfa27b6¹depends_on_disabled_cellsÂ§runtimeÎ Xµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$822d03c6-48f8-47b0-8f25-b2de45e4c589Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyÚs<div class="markdown"><div class="admonition Task"><p class="admonition-title">Optional task</p><p>Implement the <em>Adam</em> optimizer, which was introduced             in <a href="https://arxiv.org/abs/1412.6980">this paper</a> by Kingma and Ba.             Add it to the visualization above and compare it to Optimizer.jl&#39;s Adam implementation.</p>

</div>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9s¸ 2°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$822d03c6-48f8-47b0-8f25-b2de45e4c589¹depends_on_disabled_cellsÂ§runtimeÎMD4µpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$bebbf87b-cd7b-43d7-8025-938fc4c6944dŠ¦queuedÂ¤logs�§runningÂ¦output†¤bodyÚ‚<div class="markdown"><div class="admonition Task"><p class="admonition-title">Task (1 point)</p><p>Define an <code>Optimisers.apply&#33;</code> function for <code>GradientDescent</code> that</p>
<ul>
<li><p>doesn&#39;t modify the state &#40;since gradient descent doesn&#39;t require a state&#41;</p>
</li>
<li><p>scales the gradient by the learning rate</p>
</li>
</ul>

</div>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9rB0ˆ°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$bebbf87b-cd7b-43d7-8025-938fc4c6944d¹depends_on_disabled_cellsÂ§runtimeÎ 9µpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$c2adc38f-84e3-486f-93d8-b88eea63a09bŠ¦queuedÂ¤logs�§runningÂ¦output†¤bodyÙ�<div class="markdown"><h3 id="Exercise-1.2-â€“-Transform-&amp;-Inverse-transform">Exercise 1.2 â€“ Transform &amp; Inverse transform</h3>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9f¾–Ù°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$c2adc38f-84e3-486f-93d8-b88eea63a09b¹depends_on_disabled_cellsÂ§runtimeÎ @Aµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$5370c50b-a9b8-41dc-8cfe-1f0389df97c3Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyÙl<div class="markdown"><h3 id="Optional-Task-â€“-Adam-optimizer">Optional Task â€“ Adam optimizer</h3>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9fÂ}ú°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$5370c50b-a9b8-41dc-8cfe-1f0389df97c3¹depends_on_disabled_cellsÂ§runtimeÎ òµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$32e8ee04-4378-4377-ae47-b65e5ce70667Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyÙc<div class="markdown"><h3 id="Exercise-2.2-â€“-init">Exercise 2.2 â€“ <code>init</code></h3>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9fÁd,°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$32e8ee04-4378-4377-ae47-b65e5ce70667¹depends_on_disabled_cellsÂ§runtimeÎ ïHµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$befba318-8595-4fc4-b42e-9c9125e7abfbŠ¦queuedÂ¤logs�§runningÂ¦output†¤bodyÚ¥<div class="markdown"><div class="admonition tip"><p class="admonition-title">Tip</p><p>Statefulness could also have been implemented by making the state a field in the struct of the optimizer and/or making the struct mutable.</p>
<p>However, mutable structs are usually less performant. The dimensionality of the state also often depends on the dimensionality of the input parameters we optimize over.</p>

</div>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9r@‘°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$befba318-8595-4fc4-b42e-9c9125e7abfb¹depends_on_disabled_cellsÂ§runtimeÎ 3éµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$d5052369-0b47-42e7-b661-058c7365c032Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyÚ<div class="markdown"><div class="admonition tip"><p class="admonition-title">Tip</p><p><strong>Reminder:</strong> By convention, functions that modify their inputs in-place are given an exclamation point <code>&#33;</code> at the end of their name.</p>

</div>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9r@Ýµ°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$d5052369-0b47-42e7-b661-058c7365c032¹depends_on_disabled_cellsÂ§runtimeÎ –÷µpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$cf3c52c7-fc5e-4191-be9d-394660385801Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyƒ£msgÙ(UndefVarError: `Standardize` not definedªstacktrace‘Œªcall_short¯top-level scope§inlinedÂ£urlÀ¤pathÙu/home/runner/work/julia-ml-course/julia-ml-course/homework/H3_Custom_Types.jl#==#cf3c52c7-fc5e-4191-be9d-394660385801®source_packageÀ¤call¯top-level scopeªlinfo_type­Core.CodeInfo¤line¤fileÙ:H3_Custom_Types.jl#==#cf3c52c7-fc5e-4191-be9d-394660385801¤func¯top-level scope­parent_moduleÀ¦from_cÂ«plain_errorÙ»UndefVarError: `Standardize` not defined
Stacktrace:
 [1] top-level scope
   @ ~/work/julia-ml-course/julia-ml-course/homework/H3_Custom_Types.jl#==#cf3c52c7-fc5e-4191-be9d-394660385801:1¤mimeÙ'application/vnd.pluto.stacktrace+object¬rootassignee¢dt²last_run_timestampËAÚ;9r]§°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$cf3c52c7-fc5e-4191-be9d-394660385801¹depends_on_disabled_cellsÂ§runtimeÀµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÃÙ$2cd9cef0-d746-411a-861f-b8a035f4a1d3Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyƒ£msgÙ-UndefVarError: `transformed_data` not definedªstacktrace‘Œªcall_short¯top-level scope§inlinedÂ£urlÀ¤pathÙu/home/runner/work/julia-ml-course/julia-ml-course/homework/H3_Custom_Types.jl#==#2cd9cef0-d746-411a-861f-b8a035f4a1d3®source_packageÀ¤call¯top-level scopeªlinfo_type­Core.CodeInfo¤line¤fileÙ:H3_Custom_Types.jl#==#2cd9cef0-d746-411a-861f-b8a035f4a1d3¤func¯top-level scope­parent_moduleÀ¦from_cÂ«plain_errorÙÀUndefVarError: `transformed_data` not defined
Stacktrace:
 [1] top-level scope
   @ ~/work/julia-ml-course/julia-ml-course/homework/H3_Custom_Types.jl#==#2cd9cef0-d746-411a-861f-b8a035f4a1d3:1¤mimeÙ'application/vnd.pluto.stacktrace+object¬rootassigneeÀ²last_run_timestampËAÚ;9r5À°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$2cd9cef0-d746-411a-861f-b8a035f4a1d3¹depends_on_disabled_cellsÂ§runtimeÀµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÃÙ$d15eb189-6e4d-4c70-a1cb-159e6a4eb8ebŠ¦queuedÂ¤logs�§runningÂ¦output†¤bodyÚI<div class="markdown"><div class="admonition tip"><p class="admonition-title">Tip</p><p>Gradient descent is typically used in deep learning in combination with mini-batches, which introduce stochasticity.</p>
<p>This example had no stochasticity and other optimization algorithms would have been better suited.</p>

</div>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9s¶râ°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$d15eb189-6e4d-4c70-a1cb-159e6a4eb8eb¹depends_on_disabled_cellsÂ§runtimeÎ Ð�µpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$955a9751-38d0-4327-9a95-a0523c2d54b8Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyƒ£msg¿UndefVarError: `dt` not definedªstacktrace‘Œªcall_short¯top-level scope§inlinedÂ£urlÀ¤pathÙu/home/runner/work/julia-ml-course/julia-ml-course/homework/H3_Custom_Types.jl#==#955a9751-38d0-4327-9a95-a0523c2d54b8®source_packageÀ¤call¯top-level scopeªlinfo_type­Core.CodeInfo¤line¤fileÙ:H3_Custom_Types.jl#==#955a9751-38d0-4327-9a95-a0523c2d54b8¤func¯top-level scope­parent_moduleÀ¦from_cÂ«plain_errorÙ²UndefVarError: `dt` not defined
Stacktrace:
 [1] top-level scope
   @ ~/work/julia-ml-course/julia-ml-course/homework/H3_Custom_Types.jl#==#955a9751-38d0-4327-9a95-a0523c2d54b8:1¤mimeÙ'application/vnd.pluto.stacktrace+object¬rootassigneeÀ²last_run_timestampËAÚ;9r%¦°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$955a9751-38d0-4327-9a95-a0523c2d54b8¹depends_on_disabled_cellsÂ§runtimeÀµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÃÙ$62a1289b-ce6a-444d-8b20-92bd4fa3d05dŠ¦queuedÂ¤logs�§runningÂ¦output†¤bodyÙa<div class="markdown"><p>For the purpose of plotting, we define a range of parameters:</p>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9fÂ4×°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$62a1289b-ce6a-444d-8b20-92bd4fa3d05d¹depends_on_disabled_cellsÂ§runtimeÎ é$µpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$221fd504-4cd6-4bab-b2a5-a590fff26a52Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyƒ£msgÙ(UndefVarError: `Standardize` not definedªstacktrace‘Œªcall_short¯top-level scope§inlinedÂ£urlÀ¤pathÙu/home/runner/work/julia-ml-course/julia-ml-course/homework/H3_Custom_Types.jl#==#221fd504-4cd6-4bab-b2a5-a590fff26a52®source_packageÀ¤call¯top-level scopeªlinfo_type­Core.CodeInfo¤line¤fileÙ:H3_Custom_Types.jl#==#221fd504-4cd6-4bab-b2a5-a590fff26a52¤func¯top-level scope­parent_moduleÀ¦from_cÂ«plain_errorÙ»UndefVarError: `Standardize` not defined
Stacktrace:
 [1] top-level scope
   @ ~/work/julia-ml-course/julia-ml-course/homework/H3_Custom_Types.jl#==#221fd504-4cd6-4bab-b2a5-a590fff26a52:1¤mimeÙ'application/vnd.pluto.stacktrace+object¬rootassigneeÀ²last_run_timestampËAÚ;9r/€Ð°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$221fd504-4cd6-4bab-b2a5-a590fff26a52¹depends_on_disabled_cellsÂ§runtimeÀµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÃÙ$a191392f-eb62-459d-8554-901d9db29950Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyƒ£msgÙ-UndefVarError: `transformed_data` not definedªstacktrace‘Œªcall_short¯top-level scope§inlinedÂ£urlÀ¤pathÙu/home/runner/work/julia-ml-course/julia-ml-course/homework/H3_Custom_Types.jl#==#a191392f-eb62-459d-8554-901d9db29950®source_packageÀ¤call¯top-level scopeªlinfo_type­Core.CodeInfo¤line¤fileÙ:H3_Custom_Types.jl#==#a191392f-eb62-459d-8554-901d9db29950¤func¯top-level scope­parent_moduleÀ¦from_cÂ«plain_errorÙÀUndefVarError: `transformed_data` not defined
Stacktrace:
 [1] top-level scope
   @ ~/work/julia-ml-course/julia-ml-course/homework/H3_Custom_Types.jl#==#a191392f-eb62-459d-8554-901d9db29950:1¤mimeÙ'application/vnd.pluto.stacktrace+object¬rootassigneeÀ²last_run_timestampËAÚ;9r:Ã°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$a191392f-eb62-459d-8554-901d9db29950¹depends_on_disabled_cellsÂ§runtimeÀµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÃÙ$67d7c60c-1c5e-4760-a9e1-4538e2ccc10eŠ¦queuedÂ¤logs�§runningÂ¦output†¤bodyÚD<div class="markdown"><h4 id="Initializing-the-optimizer">Initializing the optimizer</h4>
<p>Some optimizers require a state. This state is used to save additional information about previous optimization steps, for example in optimizers that use &quot;momentum&quot; terms like <a href="https://en.wikipedia.org/wiki/Stochastic_gradient_descent#Adam">ADAM</a>.</p>
<p>When setting up an Optimizer in Optimisers.jl, <code>init</code> is called on it, which initializes a state. <code>init</code> takes two arguments: an optimizer object and an array of initial parameters.</p>
<pre><code class="language-julia">function Optimisers.init&#40;alg::MyOptimiser, params_init::AbstractArray&#41;
	state &#61; ... # some computation
	return state
end</code></pre>
<p>The state is then updated in the <code>apply&#33;</code> function.</p>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9fÀ±°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$67d7c60c-1c5e-4760-a9e1-4538e2ccc10e¹depends_on_disabled_cellsÂ§runtimeÎ -Èµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$d16b1a65-5da9-46ac-b0b8-59e55ced37f3Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyÙd<div class="markdown"><h3 id="Exercise-2.1-â€“-Constructor">Exercise 2.1 â€“ Constructor</h3>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9fÁ>°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$d16b1a65-5da9-46ac-b0b8-59e55ced37f3¹depends_on_disabled_cellsÂ§runtimeÎ îîµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$7de85c6f-996a-4d5b-8236-271922aeb908Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyƒ£msgÙ(UndefVarError: `Standardize` not definedªstacktrace‘Œªcall_short¯top-level scope§inlinedÂ£urlÀ¤pathÙu/home/runner/work/julia-ml-course/julia-ml-course/homework/H3_Custom_Types.jl#==#7de85c6f-996a-4d5b-8236-271922aeb908®source_packageÀ¤call¯top-level scopeªlinfo_type­Core.CodeInfo¤line¤fileÙ:H3_Custom_Types.jl#==#7de85c6f-996a-4d5b-8236-271922aeb908¤func¯top-level scope­parent_moduleÀ¦from_cÂ«plain_errorÙ»UndefVarError: `Standardize` not defined
Stacktrace:
 [1] top-level scope
   @ ~/work/julia-ml-course/julia-ml-course/homework/H3_Custom_Types.jl#==#7de85c6f-996a-4d5b-8236-271922aeb908:1¤mimeÙ'application/vnd.pluto.stacktrace+object¬rootassigneeÀ²last_run_timestampËAÚ;9r=§°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$7de85c6f-996a-4d5b-8236-271922aeb908¹depends_on_disabled_cellsÂ§runtimeÀµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÃÙ$edb7814a-eddf-4c87-8857-19bb0a0c0241Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyÚ7<div class="markdown"><h1 id="Feedback">Feedback</h1>
<p>This is the fourth iteration of the <em>&quot;Julia for Machine Learning&quot;</em> class. Please help us make the course better&#33;</p>
<p>You can write whatever you want in the following string. Feel free to add or delete whatever you want.</p>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9fÂ™°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$edb7814a-eddf-4c87-8857-19bb0a0c0241¹depends_on_disabled_cellsÂ§runtimeÎ ùµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$2258b8c6-e8b7-4c06-9ece-53b254db6a2cŠ¦queuedÂ¤logs�§runningÂ¦output†¤bodyÚõ<div class="markdown"><div class="admonition Task"><p class="admonition-title">Task (4 points)</p><p>Create a parametric composite type <code>Standardize</code> with two fields <code>Î¼</code> and <code>Ïƒ</code> using the type parameter <code>T&lt;:Real</code>.</p>
<p>These two fields will hold the mean and the standard deviation of the standardization transformation.</p>
<p><code>Standardize</code> should have two constructors:</p>
<ol>
<li><p>An inner constructor that takes two numbers <span class="tex">$Î¼$</span> and <span class="tex">$Ïƒ$</span>. Throw an <code>error</code> if <span class="tex">$Ïƒ â‰¤ 0$</span>.</p>
</li>
<li><p>An outer constructor that takes an array <code>data</code>, computes its mean and standard deviation and calls the inner constructor.</p>
</li>
</ol>
<hr />
<p>You are allowed to use the <code>mean</code> and <code>std</code> functions from the standard library package <a href="https://docs.julialang.org/en/v1/stdlib/Statistics/">Statistics.jl</a>.</p>

</div>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9qÙW÷°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$2258b8c6-e8b7-4c06-9ece-53b254db6a2c¹depends_on_disabled_cellsÂ§runtimeÎSéµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$8e8d9f57-0f04-4a91-b69f-273fe1fafd61Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyÙ+<style>.dont-panic{ display: none }</style>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9f³MÓ°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$8e8d9f57-0f04-4a91-b69f-273fe1fafd61¹depends_on_disabled_cellsÂ§runtimeÎ ëŠµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$f7347c06-c1b7-11ed-3b8e-fbf167ce9cbaŠ¦queuedÂ¤logs�§runningÂ¦output†¤bodyÚ1	<h1 style="text-align:left">
		Julia for Machine Learning
	</h1>
	<div style="text-align:left">
		<p style="font-weight:bold; font-size: 35px; font-variant: small-caps; margin: 0px">
			Homework 3: Custom types
		</p>
		<p style="font-size: 20px;">
			TU Berlin, Winter Semester 25/26<br>
		</p>
	</div>
¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9f³a°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$f7347c06-c1b7-11ed-3b8e-fbf167ce9cba¹depends_on_disabled_cellsÂ§runtimeÎ ÌZµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$c322fd53-78db-40ae-b7ba-612200ab6617Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyÚG<div class="markdown"><h3 id="Interlude:-Gradient-based-optimization-in-Deep-Learning">Interlude: Gradient-based optimization in Deep Learning</h3>
<p>Gradient-based optimization methods are used in deep learning, where we want to optimize a neural network <span class="tex">$f$</span> that is parametrized by parameters <span class="tex">$\theta$</span> &#40;e.g. the weights and biases of <span class="tex">$f$</span>&#41;.</p>
<p>This neural network could e.g. be a classifier that predicts the output class <span class="tex">$\hat&#123;y&#125;$</span> for some input image <span class="tex">$x$</span>:</p>
<p class="tex">$$\hat&#123;y&#125; &#61; f_\theta&#40;x&#41;$$</p>
<p>In <a href="https://en.wikipedia.org/wiki/Supervised_learning">supervised learning</a>, we are also given true labels <span class="tex">$y$</span>. Based on the true and predicted labels, we define a loss</p>
<p class="tex">$$\mathcal&#123;L&#125;_\theta&#40;\hat&#123;y&#125;, y&#41;$$</p>
<p>which depends on <span class="tex">$\theta$</span>, since the parameters of our neural network determine the prediction <span class="tex">$\hat&#123;y&#125;$</span>.</p>
<p>To optimize <span class="tex">$\theta$</span>, we typically compute the gradient of our loss with respect to our parameters and update the parameters using gradient-based optimization methods.</p>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9f¿!°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$c322fd53-78db-40ae-b7ba-612200ab6617¹depends_on_disabled_cellsÂ§runtimeÎ +\µpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$dc4f7f55-dde5-4ee6-b43d-7f64269b55d1Š¦queuedÂ¤logs�§runningÂ¦output†¤body ¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ;9fÂS°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$dc4f7f55-dde5-4ee6-b43d-7f64269b55d1¹depends_on_disabled_cellsÂ§runtimeÍ%Vµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$cd7c244d-8a4c-4aaf-ad4b-891744e004beŠ¦queuedÂ¤logs�§runningÂ¦output†¤bodyÛ ¿$<script src="https://cdn.plot.ly/plotly-2.6.3.min.js"></script>    <div id="0d63e998-7dcf-4e3a-8dee-ebc43df35fcf" style="width:600px;height:400px;"></div>
    <script>
    
    Plotly.newPlot('0d63e998-7dcf-4e3a-8dee-ebc43df35fcf', [
    {
        "showlegend": false,
        "xaxis": "x",
        "colorbar": {
            "y": 0.5329861111111112,
            "title": "",
            "len": 0.914342738407699,
            "x": 0.760492308253135
        },
        "name": "y1",
        "colorscale": [
            [
                0.0,
                "rgba(0, 0, 4, 1.000)"
            ],
            [
                0.00392156862745098,
                "rgba(1, 0, 5, 1.000)"
            ],
            [
                0.00784313725490196,
                "rgba(1, 1, 6, 1.000)"
            ],
            [
                0.011764705882352941,
                "rgba(1, 1, 8, 1.000)"
            ],
            [
                0.01568627450980392,
                "rgba(2, 1, 10, 1.000)"
            ],
            [
                0.0196078431372549,
                "rgba(2, 2, 12, 1.000)"
            ],
            [
                0.023529411764705882,
                "rgba(2, 2, 14, 1.000)"
            ],
            [
                0.027450980392156862,
                "rgba(3, 2, 16, 1.000)"
            ],
            [
                0.03137254901960784,
                "rgba(4, 3, 18, 1.000)"
            ],
            [
                0.03529411764705882,
                "rgba(4, 3, 20, 1.000)"
            ],
            [
                0.0392156862745098,
                "rgba(5, 4, 23, 1.000)"
            ],
            [
                0.043137254901960784,
                "rgba(6, 4, 25, 1.000)"
            ],
            [
                0.047058823529411764,
                "rgba(7, 5, 27, 1.000)"
            ],
            [
                0.050980392156862744,
                "rgba(8, 5, 29, 1.000)"
            ],
            [
                0.054901960784313725,
                "rgba(9, 6, 31, 1.000)"
            ],
            [
                0.058823529411764705,
                "rgba(10, 7, 34, 1.000)"
            ],
            [
                0.06274509803921569,
                "rgba(11, 7, 36, 1.000)"
            ],
            [
                0.06666666666666667,
                "rgba(12, 8, 38, 1.000)"
            ],
            [
                0.07058823529411765,
                "rgba(13, 8, 41, 1.000)"
            ],
            [
                0.07450980392156863,
                "rgba(14, 9, 43, 1.000)"
            ],
            [
                0.0784313725490196,
                "rgba(16, 9, 45, 1.000)"
            ],
            [
                0.08235294117647059,
                "rgba(17, 10, 48, 1.000)"
            ],
            [
                0.08627450980392157,
                "rgba(18, 10, 50, 1.000)"
            ],
            [
                0.09019607843137255,
                "rgba(20, 11, 52, 1.000)"
            ],
            [
                0.09411764705882353,
                "rgba(21, 11, 55, 1.000)"
            ],
            [
                0.09803921568627451,
                "rgba(22, 11, 57, 1.000)"
            ],
            [
                0.10196078431372549,
                "rgba(24, 12, 60, 1.000)"
            ],
            [
                0.10588235294117647,
                "rgba(25, 12, 62, 1.000)"
            ],
            [
                0.10980392156862745,
                "rgba(27, 12, 65, 1.000)"
            ],
            [
                0.11372549019607843,
                "rgba(28, 12, 67, 1.000)"
            ],
            [
                0.11764705882352941,
                "rgba(30, 12, 69, 1.000)"
            ],
            [
                0.12156862745098039,
                "rgba(31, 12, 72, 1.000)"
            ],
            [
                0.12549019607843137,
                "rgba(33, 12, 74, 1.000)"
            ],
            [
                0.12941176470588237,
                "rgba(35, 12, 76, 1.000)"
            ],
            [
                0.13333333333333333,
                "rgba(36, 12, 79, 1.000)"
            ],
            [
                0.13725490196078433,
                "rgba(38, 12, 81, 1.000)"
            ],
            [
                0.1411764705882353,
                "rgba(40, 11, 83, 1.000)"
            ],
            [
                0.1450980392156863,
                "rgba(41, 11, 85, 1.000)"
            ],
            [
                0.14901960784313725,
                "rgba(43, 11, 87, 1.000)"
            ],
            [
                0.15294117647058825,
                "rgba(45, 11, 89, 1.000)"
            ],
            [
                0.1568627450980392,
                "rgba(47, 10, 91, 1.000)"
            ],
            [
                0.1607843137254902,
                "rgba(49, 10, 92, 1.000)"
            ],
            [
                0.16470588235294117,
                "rgba(50, 10, 94, 1.000)"
            ],
            [
                0.16862745098039217,
                "rgba(52, 10, 95, 1.000)"
            ],
            [
                0.17254901960784313,
                "rgba(54, 9, 97, 1.000)"
            ],
            [
                0.17647058823529413,
                "rgba(56, 9, 98, 1.000)"
            ],
            [
                0.1803921568627451,
                "rgba(57, 9, 99, 1.000)"
            ],
            [
                0.1843137254901961,
                "rgba(59, 9, 100, 1.000)"
            ],
            [
                0.18823529411764706,
                "rgba(61, 9, 101, 1.000)"
            ],
            [
                0.19215686274509805,
                "rgba(62, 9, 102, 1.000)"
            ],
            [
                0.19607843137254902,
                "rgba(64, 10, 103, 1.000)"
            ],
            [
                0.2,
                "rgba(66, 10, 104, 1.000)"
            ],
            [
                0.20392156862745098,
                "rgba(68, 10, 104, 1.000)"
            ],
            [
                0.20784313725490197,
                "rgba(69, 10, 105, 1.000)"
            ],
            [
                0.21176470588235294,
                "rgba(71, 11, 106, 1.000)"
            ],
            [
                0.21568627450980393,
                "rgba(73, 11, 106, 1.000)"
            ],
            [
                0.2196078431372549,
                "rgba(74, 12, 107, 1.000)"
            ],
            [
                0.2235294117647059,
                "rgba(76, 12, 107, 1.000)"
            ],
            [
                0.22745098039215686,
                "rgba(77, 13, 108, 1.000)"
            ],
            [
                0.23137254901960785,
                "rgba(79, 13, 108, 1.000)"
            ],
            [
                0.23529411764705882,
                "rgba(81, 14, 108, 1.000)"
            ],
            [
                0.23921568627450981,
                "rgba(82, 14, 109, 1.000)"
            ],
            [
                0.24313725490196078,
                "rgba(84, 15, 109, 1.000)"
            ],
            [
                0.24705882352941178,
                "rgba(85, 15, 109, 1.000)"
            ],
            [
                0.25098039215686274,
                "rgba(87, 16, 110, 1.000)"
            ],
            [
                0.2549019607843137,
                "rgba(89, 16, 110, 1.000)"
            ],
            [
                0.25882352941176473,
                "rgba(90, 17, 110, 1.000)"
            ],
            [
                0.2627450980392157,
                "rgba(92, 18, 110, 1.000)"
            ],
            [
                0.26666666666666666,
                "rgba(93, 18, 110, 1.000)"
            ],
            [
                0.27058823529411763,
                "rgba(95, 19, 110, 1.000)"
            ],
            [
                0.27450980392156865,
                "rgba(97, 19, 110, 1.000)"
            ],
            [
                0.2784313725490196,
                "rgba(98, 20, 110, 1.000)"
            ],
            [
                0.2823529411764706,
                "rgba(100, 21, 110, 1.000)"
            ],
            [
                0.28627450980392155,
                "rgba(101, 21, 110, 1.000)"
            ],
            [
                0.2901960784313726,
                "rgba(103, 22, 110, 1.000)"
            ],
            [
                0.29411764705882354,
                "rgba(105, 22, 110, 1.000)"
            ],
            [
                0.2980392156862745,
                "rgba(106, 23, 110, 1.000)"
            ],
            [
                0.30196078431372547,
                "rgba(108, 24, 110, 1.000)"
            ],
            [
                0.3058823529411765,
                "rgba(109, 24, 110, 1.000)"
            ],
            [
                0.30980392156862746,
                "rgba(111, 25, 110, 1.000)"
            ],
            [
                0.3137254901960784,
                "rgba(113, 25, 110, 1.000)"
            ],
            [
                0.3176470588235294,
                "rgba(114, 26, 110, 1.000)"
            ],
            [
                0.3215686274509804,
                "rgba(116, 26, 110, 1.000)"
            ],
            [
                0.3254901960784314,
                "rgba(117, 27, 110, 1.000)"
            ],
            [
                0.32941176470588235,
                "rgba(119, 28, 109, 1.000)"
            ],
            [
                0.3333333333333333,
                "rgba(120, 28, 109, 1.000)"
            ],
            [
                0.33725490196078434,
                "rgba(122, 29, 109, 1.000)"
            ],
            [
                0.3411764705882353,
                "rgba(124, 29, 109, 1.000)"
            ],
            [
                0.34509803921568627,
                "rgba(125, 30, 109, 1.000)"
            ],
            [
                0.34901960784313724,
                "rgba(127, 30, 108, 1.000)"
            ],
            [
                0.35294117647058826,
                "rgba(128, 31, 108, 1.000)"
            ],
            [
                0.3568627450980392,
                "rgba(130, 32, 108, 1.000)"
            ],
            [
                0.3607843137254902,
                "rgba(132, 32, 107, 1.000)"
            ],
            [
                0.36470588235294116,
                "rgba(133, 33, 107, 1.000)"
            ],
            [
                0.3686274509803922,
                "rgba(135, 33, 107, 1.000)"
            ],
            [
                0.37254901960784315,
                "rgba(136, 34, 106, 1.000)"
            ],
            [
                0.3764705882352941,
                "rgba(138, 34, 106, 1.000)"
            ],
            [
                0.3803921568627451,
                "rgba(140, 35, 105, 1.000)"
            ],
            [
                0.3843137254901961,
                "rgba(141, 35, 105, 1.000)"
            ],
            [
                0.38823529411764707,
                "rgba(143, 36, 105, 1.000)"
            ],
            [
                0.39215686274509803,
                "rgba(144, 37, 104, 1.000)"
            ],
            [
                0.396078431372549,
                "rgba(146, 37, 104, 1.000)"
            ],
            [
                0.4,
                "rgba(147, 38, 103, 1.000)"
            ],
            [
                0.403921568627451,
                "rgba(149, 38, 103, 1.000)"
            ],
            [
                0.40784313725490196,
                "rgba(151, 39, 102, 1.000)"
            ],
            [
                0.4117647058823529,
                "rgba(152, 39, 102, 1.000)"
            ],
            [
                0.41568627450980394,
                "rgba(154, 40, 101, 1.000)"
            ],
            [
                0.4196078431372549,
                "rgba(155, 41, 100, 1.000)"
            ],
            [
                0.4235294117647059,
                "rgba(157, 41, 100, 1.000)"
            ],
            [
                0.42745098039215684,
                "rgba(159, 42, 99, 1.000)"
            ],
            [
                0.43137254901960786,
                "rgba(160, 42, 99, 1.000)"
            ],
            [
                0.43529411764705883,
                "rgba(162, 43, 98, 1.000)"
            ],
            [
                0.4392156862745098,
                "rgba(163, 44, 97, 1.000)"
            ],
            [
                0.44313725490196076,
                "rgba(165, 44, 96, 1.000)"
            ],
            [
                0.4470588235294118,
                "rgba(166, 45, 96, 1.000)"
            ],
            [
                0.45098039215686275,
                "rgba(168, 46, 95, 1.000)"
            ],
            [
                0.4549019607843137,
                "rgba(169, 46, 94, 1.000)"
            ],
            [
                0.4588235294117647,
                "rgba(171, 47, 94, 1.000)"
            ],
            [
                0.4627450980392157,
                "rgba(173, 48, 93, 1.000)"
            ],
            [
                0.4666666666666667,
                "rgba(174, 48, 92, 1.000)"
            ],
            [
                0.47058823529411764,
                "rgba(176, 49, 91, 1.000)"
            ],
            [
                0.4745098039215686,
                "rgba(177, 50, 90, 1.000)"
            ],
            [
                0.47843137254901963,
                "rgba(179, 50, 90, 1.000)"
            ],
            [
                0.4823529411764706,
                "rgba(180, 51, 89, 1.000)"
            ],
            [
                0.48627450980392156,
                "rgba(182, 52, 88, 1.000)"
            ],
            [
                0.49019607843137253,
                "rgba(183, 53, 87, 1.000)"
            ],
            [
                0.49411764705882355,
                "rgba(185, 53, 86, 1.000)"
            ],
            [
                0.4980392156862745,
                "rgba(186, 54, 85, 1.000)"
            ],
            [
                0.5019607843137255,
                "rgba(188, 55, 84, 1.000)"
            ],
            [
                0.5058823529411764,
                "rgba(189, 56, 83, 1.000)"
            ],
            [
                0.5098039215686274,
                "rgba(191, 57, 82, 1.000)"
            ],
            [
                0.5137254901960784,
                "rgba(192, 58, 81, 1.000)"
            ],
            [
                0.5176470588235295,
                "rgba(193, 58, 80, 1.000)"
            ],
            [
                0.5215686274509804,
                "rgba(195, 59, 79, 1.000)"
            ],
            [
                0.5254901960784314,
                "rgba(196, 60, 78, 1.000)"
            ],
            [
                0.5294117647058824,
                "rgba(198, 61, 77, 1.000)"
            ],
            [
                0.5333333333333333,
                "rgba(199, 62, 76, 1.000)"
            ],
            [
                0.5372549019607843,
                "rgba(200, 63, 75, 1.000)"
            ],
            [
                0.5411764705882353,
                "rgba(202, 64, 74, 1.000)"
            ],
            [
                0.5450980392156862,
                "rgba(203, 65, 73, 1.000)"
            ],
            [
                0.5490196078431373,
                "rgba(204, 66, 72, 1.000)"
            ],
            [
                0.5529411764705883,
                "rgba(206, 67, 71, 1.000)"
            ],
            [
                0.5568627450980392,
                "rgba(207, 68, 70, 1.000)"
            ],
            [
                0.5607843137254902,
                "rgba(208, 69, 69, 1.000)"
            ],
            [
                0.5647058823529412,
                "rgba(210, 70, 68, 1.000)"
            ],
            [
                0.5686274509803921,
                "rgba(211, 71, 67, 1.000)"
            ],
            [
                0.5725490196078431,
                "rgba(212, 72, 66, 1.000)"
            ],
            [
                0.5764705882352941,
                "rgba(213, 74, 65, 1.000)"
            ],
            [
                0.5803921568627451,
                "rgba(215, 75, 63, 1.000)"
            ],
            [
                0.5843137254901961,
                "rgba(216, 76, 62, 1.000)"
            ],
            [
                0.5882352941176471,
                "rgba(217, 77, 61, 1.000)"
            ],
            [
                0.592156862745098,
                "rgba(218, 78, 60, 1.000)"
            ],
            [
                0.596078431372549,
                "rgba(219, 80, 59, 1.000)"
            ],
            [
                0.6,
                "rgba(221, 81, 58, 1.000)"
            ],
            [
                0.6039215686274509,
                "rgba(222, 82, 56, 1.000)"
            ],
            [
                0.6078431372549019,
                "rgba(223, 83, 55, 1.000)"
            ],
            [
                0.611764705882353,
                "rgba(224, 85, 54, 1.000)"
            ],
            [
                0.615686274509804,
                "rgba(225, 86, 53, 1.000)"
            ],
            [
                0.6196078431372549,
                "rgba(226, 87, 52, 1.000)"
            ],
            [
                0.6235294117647059,
                "rgba(227, 89, 51, 1.000)"
            ],
            [
                0.6274509803921569,
                "rgba(228, 90, 49, 1.000)"
            ],
            [
                0.6313725490196078,
                "rgba(229, 92, 48, 1.000)"
            ],
            [
                0.6352941176470588,
                "rgba(230, 93, 47, 1.000)"
            ],
            [
                0.6392156862745098,
                "rgba(231, 94, 46, 1.000)"
            ],
            [
                0.6431372549019608,
                "rgba(232, 96, 45, 1.000)"
            ],
            [
                0.6470588235294118,
                "rgba(233, 97, 43, 1.000)"
            ],
            [
                0.6509803921568628,
                "rgba(234, 99, 42, 1.000)"
            ],
            [
                0.6549019607843137,
                "rgba(235, 100, 41, 1.000)"
            ],
            [
                0.6588235294117647,
                "rgba(235, 102, 40, 1.000)"
            ],
            [
                0.6627450980392157,
                "rgba(236, 103, 38, 1.000)"
            ],
            [
                0.6666666666666666,
                "rgba(237, 105, 37, 1.000)"
            ],
            [
                0.6705882352941176,
                "rgba(238, 106, 36, 1.000)"
            ],
            [
                0.6745098039215687,
                "rgba(239, 108, 35, 1.000)"
            ],
            [
                0.6784313725490196,
                "rgba(239, 110, 33, 1.000)"
            ],
            [
                0.6823529411764706,
                "rgba(240, 111, 32, 1.000)"
            ],
            [
                0.6862745098039216,
                "rgba(241, 113, 31, 1.000)"
            ],
            [
                0.6901960784313725,
                "rgba(241, 115, 29, 1.000)"
            ],
            [
                0.6941176470588235,
                "rgba(242, 116, 28, 1.000)"
            ],
            [
                0.6980392156862745,
                "rgba(243, 118, 27, 1.000)"
            ],
            [
                0.7019607843137254,
                "rgba(243, 120, 25, 1.000)"
            ],
            [
                0.7058823529411765,
                "rgba(244, 121, 24, 1.000)"
            ],
            [
                0.7098039215686275,
                "rgba(245, 123, 23, 1.000)"
            ],
            [
                0.7137254901960784,
                "rgba(245, 125, 21, 1.000)"
            ],
            [
                0.7176470588235294,
                "rgba(246, 126, 20, 1.000)"
            ],
            [
                0.7215686274509804,
                "rgba(246, 128, 19, 1.000)"
            ],
            [
                0.7254901960784313,
                "rgba(247, 130, 18, 1.000)"
            ],
            [
                0.7294117647058823,
                "rgba(247, 132, 16, 1.000)"
            ],
            [
                0.7333333333333333,
                "rgba(248, 133, 15, 1.000)"
            ],
            [
                0.7372549019607844,
                "rgba(248, 135, 14, 1.000)"
            ],
            [
                0.7411764705882353,
                "rgba(248, 137, 12, 1.000)"
            ],
            [
                0.7450980392156863,
                "rgba(249, 139, 11, 1.000)"
            ],
            [
                0.7490196078431373,
                "rgba(249, 140, 10, 1.000)"
            ],
            [
                0.7529411764705882,
                "rgba(249, 142, 9, 1.000)"
            ],
            [
                0.7568627450980392,
                "rgba(250, 144, 8, 1.000)"
            ],
            [
                0.7607843137254902,
                "rgba(250, 146, 7, 1.000)"
            ],
            [
                0.7647058823529411,
                "rgba(250, 148, 7, 1.000)"
            ],
            [
                0.7686274509803922,
                "rgba(251, 150, 6, 1.000)"
            ],
            [
                0.7725490196078432,
                "rgba(251, 151, 6, 1.000)"
            ],
            [
                0.7764705882352941,
                "rgba(251, 153, 6, 1.000)"
            ],
            [
                0.7803921568627451,
                "rgba(251, 155, 6, 1.000)"
            ],
            [
                0.7843137254901961,
                "rgba(251, 157, 7, 1.000)"
            ],
            [
                0.788235294117647,
                "rgba(252, 159, 7, 1.000)"
            ],
            [
                0.792156862745098,
                "rgba(252, 161, 8, 1.000)"
            ],
            [
                0.796078431372549,
                "rgba(252, 163, 9, 1.000)"
            ],
            [
                0.8,
                "rgba(252, 165, 10, 1.000)"
            ],
            [
                0.803921568627451,
                "rgba(252, 166, 12, 1.000)"
            ],
            [
                0.807843137254902,
                "rgba(252, 168, 13, 1.000)"
            ],
            [
                0.8117647058823529,
                "rgba(252, 170, 15, 1.000)"
            ],
            [
                0.8156862745098039,
                "rgba(252, 172, 17, 1.000)"
            ],
            [
                0.8196078431372549,
                "rgba(252, 174, 18, 1.000)"
            ],
            [
                0.8235294117647058,
                "rgba(252, 176, 20, 1.000)"
            ],
            [
                0.8274509803921568,
                "rgba(252, 178, 22, 1.000)"
            ],
            [
                0.8313725490196079,
                "rgba(252, 180, 24, 1.000)"
            ],
            [
                0.8352941176470589,
                "rgba(251, 182, 26, 1.000)"
            ],
            [
                0.8392156862745098,
                "rgba(251, 184, 29, 1.000)"
            ],
            [
                0.8431372549019608,
                "rgba(251, 186, 31, 1.000)"
            ],
            [
                0.8470588235294118,
                "rgba(251, 188, 33, 1.000)"
            ],
            [
                0.8509803921568627,
                "rgba(251, 190, 35, 1.000)"
            ],
            [
                0.8549019607843137,
                "rgba(250, 192, 38, 1.000)"
            ],
            [
                0.8588235294117647,
                "rgba(250, 194, 40, 1.000)"
            ],
            [
                0.8627450980392157,
                "rgba(250, 196, 42, 1.000)"
            ],
            [
                0.8666666666666667,
                "rgba(250, 198, 45, 1.000)"
            ],
            [
                0.8705882352941177,
                "rgba(249, 199, 47, 1.000)"
            ],
            [
                0.8745098039215686,
                "rgba(249, 201, 50, 1.000)"
            ],
            [
                0.8784313725490196,
                "rgba(249, 203, 53, 1.000)"
            ],
            [
                0.8823529411764706,
                "rgba(248, 205, 55, 1.000)"
            ],
            [
                0.8862745098039215,
                "rgba(248, 207, 58, 1.000)"
            ],
            [
                0.8901960784313725,
                "rgba(247, 209, 61, 1.000)"
            ],
            [
                0.8941176470588236,
                "rgba(247, 211, 64, 1.000)"
            ],
            [
                0.8980392156862745,
                "rgba(246, 213, 67, 1.000)"
            ],
            [
                0.9019607843137255,
                "rgba(246, 215, 70, 1.000)"
            ],
            [
                0.9058823529411765,
                "rgba(245, 217, 73, 1.000)"
            ],
            [
                0.9098039215686274,
                "rgba(245, 219, 76, 1.000)"
            ],
            [
                0.9137254901960784,
                "rgba(244, 221, 79, 1.000)"
            ],
            [
                0.9176470588235294,
                "rgba(244, 223, 83, 1.000)"
            ],
            [
                0.9215686274509803,
                "rgba(244, 225, 86, 1.000)"
            ],
            [
                0.9254901960784314,
                "rgba(243, 227, 90, 1.000)"
            ],
            [
                0.9294117647058824,
                "rgba(243, 229, 93, 1.000)"
            ],
            [
                0.9333333333333333,
                "rgba(242, 230, 97, 1.000)"
            ],
            [
                0.9372549019607843,
                "rgba(242, 232, 101, 1.000)"
            ],
            [
                0.9411764705882353,
                "rgba(242, 234, 105, 1.000)"
            ],
            [
                0.9450980392156862,
                "rgba(241, 236, 109, 1.000)"
            ],
            [
                0.9490196078431372,
                "rgba(241, 237, 113, 1.000)"
            ],
            [
                0.9529411764705882,
                "rgba(241, 239, 117, 1.000)"
            ],
            [
                0.9568627450980393,
                "rgba(241, 241, 121, 1.000)"
            ],
            [
                0.9607843137254902,
                "rgba(242, 242, 125, 1.000)"
            ],
            [
                0.9647058823529412,
                "rgba(242, 244, 130, 1.000)"
            ],
            [
                0.9686274509803922,
                "rgba(243, 245, 134, 1.000)"
            ],
            [
                0.9725490196078431,
                "rgba(243, 246, 138, 1.000)"
            ],
            [
                0.9764705882352941,
                "rgba(244, 248, 142, 1.000)"
            ],
            [
                0.9803921568627451,
                "rgba(245, 249, 146, 1.000)"
            ],
            [
                0.984313725490196,
                "rgba(246, 250, 150, 1.000)"
            ],
            [
                0.9882352941176471,
                "rgba(248, 251, 154, 1.000)"
            ],
            [
                0.9921568627450981,
                "rgba(249, 252, 157, 1.000)"
            ],
            [
                0.996078431372549,
                "rgba(250, 253, 161, 1.000)"
            ],
            [
                1.0,
                "rgba(252, 255, 164, 1.000)"
            ]
        ],
        "yaxis": "y",
        "zmin": -0.11839999999999999,
        "z": [
            [
                14.0,
                13.619200000000001,
                13.276800000000001,
                12.972800000000001,
                12.7072,
                12.48,
                12.2912,
                12.1408,
                12.028799999999999,
                11.955199999999998,
                11.919999999999998,
                11.923200000000001,
                11.9648,
                12.044799999999999,
                12.163200000000002,
                12.320000000000004,
                12.515200000000002,
                12.7488,
                13.0208,
                13.3312,
                13.680000000000001,
                14.067200000000001,
                14.492799999999999,
                14.9568,
                15.4592,
                16.0,
                16.5792,
                17.196800000000003,
                17.852800000000006,
                18.5472,
                19.280000000000005,
                20.0512,
                20.860800000000005,
                21.708799999999997,
                22.5952,
                23.52,
                24.4832,
                25.4848,
                26.524800000000003,
                27.6032,
                28.720000000000002,
                29.875200000000003,
                31.068800000000003,
                32.300799999999995,
                33.57119999999999,
                34.879999999999995,
                36.227199999999996,
                37.6128,
                39.03679999999999,
                40.499199999999995,
                42.0
            ],
            [
                13.3856,
                12.9792,
                12.6112,
                12.2816,
                11.9904,
                11.737599999999999,
                11.5232,
                11.347199999999999,
                11.209599999999998,
                11.110399999999997,
                11.049599999999998,
                11.0272,
                11.043199999999999,
                11.0976,
                11.1904,
                11.3216,
                11.491200000000001,
                11.6992,
                11.945599999999999,
                12.2304,
                12.5536,
                12.9152,
                13.315199999999997,
                13.753599999999997,
                14.2304,
                14.7456,
                15.299199999999999,
                15.891200000000001,
                16.521600000000003,
                17.1904,
                17.897600000000004,
                18.6432,
                19.427200000000003,
                20.249599999999994,
                21.1104,
                22.0096,
                22.9472,
                23.923199999999998,
                24.9376,
                25.9904,
                27.0816,
                28.2112,
                29.379200000000004,
                30.58559999999999,
                31.830399999999994,
                33.1136,
                34.435199999999995,
                35.7952,
                37.193599999999996,
                38.630399999999995,
                40.105599999999995
            ],
            [
                12.8224,
                12.390400000000001,
                11.9968,
                11.6416,
                11.3248,
                11.0464,
                10.8064,
                10.6048,
                10.441600000000001,
                10.3168,
                10.230400000000001,
                10.182400000000001,
                10.172800000000002,
                10.201600000000003,
                10.268800000000002,
                10.374400000000001,
                10.5184,
                10.700800000000001,
                10.921600000000002,
                11.180800000000003,
                11.478400000000002,
                11.814400000000003,
                12.188800000000002,
                12.6016,
                13.052800000000001,
                13.5424,
                14.070400000000003,
                14.636800000000003,
                15.241599999999998,
                15.884799999999998,
                16.5664,
                17.2864,
                18.044800000000002,
                18.8416,
                19.676800000000004,
                20.550400000000003,
                21.462400000000006,
                22.412800000000004,
                23.401600000000006,
                24.428800000000006,
                25.4944,
                26.5984,
                27.740800000000004,
                28.9216,
                30.140800000000002,
                31.398400000000002,
                32.6944,
                34.02880000000001,
                35.4016,
                36.812799999999996,
                38.2624
            ],
            [
                12.3104,
                11.8528,
                11.4336,
                11.0528,
                10.7104,
                10.4064,
                10.140799999999999,
                9.9136,
                9.7248,
                9.5744,
                9.4624,
                9.3888,
                9.3536,
                9.3568,
                9.3984,
                9.4784,
                9.5968,
                9.7536,
                9.9488,
                10.182400000000001,
                10.454400000000001,
                10.764800000000003,
                11.113600000000002,
                11.500799999999998,
                11.9264,
                12.3904,
                12.892800000000001,
                13.4336,
                14.012799999999999,
                14.6304,
                15.286399999999999,
                15.980799999999999,
                16.7136,
                17.4848,
                18.294400000000003,
                19.142400000000002,
                20.028800000000004,
                20.9536,
                21.916800000000006,
                22.918400000000005,
                23.958399999999997,
                25.0368,
                26.1536,
                27.3088,
                28.5024,
                29.7344,
                31.004800000000003,
                32.3136,
                33.6608,
                35.04639999999999,
                36.4704
            ],
            [
                11.849599999999999,
                11.3664,
                10.9216,
                10.515199999999998,
                10.147199999999998,
                9.8176,
                9.526399999999999,
                9.2736,
                9.059199999999999,
                8.8832,
                8.7456,
                8.6464,
                8.5856,
                8.563199999999998,
                8.5792,
                8.633599999999998,
                8.726399999999998,
                8.8576,
                9.027199999999999,
                9.2352,
                9.4816,
                9.7664,
                10.0896,
                10.451199999999998,
                10.851199999999999,
                11.289599999999998,
                11.766399999999999,
                12.2816,
                12.835199999999997,
                13.427199999999997,
                14.057599999999999,
                14.7264,
                15.433599999999998,
                16.179199999999998,
                16.9632,
                17.785600000000002,
                18.646400000000003,
                19.5456,
                20.483200000000004,
                21.459200000000003,
                22.473599999999998,
                23.5264,
                24.6176,
                25.747199999999996,
                26.9152,
                28.1216,
                29.366400000000002,
                30.649599999999996,
                31.9712,
                33.33119999999999,
                34.72959999999999
            ],
            [
                11.440000000000001,
                10.9312,
                10.4608,
                10.0288,
                9.6352,
                9.280000000000001,
                8.9632,
                8.684800000000001,
                8.4448,
                8.2432,
                8.08,
                7.9552000000000005,
                7.868800000000001,
                7.820800000000001,
                7.811200000000001,
                7.840000000000002,
                7.907200000000002,
                8.0128,
                8.1568,
                8.339200000000002,
                8.560000000000002,
                8.819200000000002,
                9.1168,
                9.4528,
                9.827200000000001,
                10.240000000000002,
                10.691200000000002,
                11.180800000000001,
                11.708800000000002,
                12.2752,
                12.88,
                13.523200000000001,
                14.204800000000002,
                14.924800000000003,
                15.683199999999998,
                16.48,
                17.3152,
                18.1888,
                19.100800000000003,
                20.0512,
                21.040000000000003,
                22.067200000000003,
                23.132800000000007,
                24.236800000000006,
                25.379200000000004,
                26.560000000000006,
                27.7792,
                29.0368,
                30.332800000000002,
                31.6672,
                33.040000000000006
            ],
            [
                11.0816,
                10.5472,
                10.0512,
                9.5936,
                9.1744,
                8.793600000000001,
                8.4512,
                8.1472,
                7.881600000000001,
                7.6544,
                7.4656,
                7.3152,
                7.2032,
                7.129600000000001,
                7.0944,
                7.097600000000001,
                7.1392000000000015,
                7.2192,
                7.3376,
                7.494400000000001,
                7.689600000000001,
                7.923200000000001,
                8.195199999999998,
                8.5056,
                8.8544,
                9.2416,
                9.667200000000001,
                10.131200000000002,
                10.633600000000001,
                11.174399999999999,
                11.753599999999999,
                12.3712,
                13.0272,
                13.7216,
                14.454399999999998,
                15.2256,
                16.0352,
                16.8832,
                17.7696,
                18.6944,
                19.657600000000002,
                20.659200000000002,
                21.699200000000005,
                22.777600000000003,
                23.894400000000005,
                25.049600000000005,
                26.243199999999998,
                27.475199999999997,
                28.7456,
                30.0544,
                31.401600000000002
            ],
            [
                10.7744,
                10.2144,
                9.6928,
                9.2096,
                8.7648,
                8.3584,
                7.990399999999999,
                7.6608,
                7.369600000000001,
                7.1168000000000005,
                6.902399999999999,
                6.7264,
                6.5888,
                6.4896,
                6.4288,
                6.4064000000000005,
                6.4224000000000006,
                6.476799999999999,
                6.569599999999999,
                6.700799999999999,
                6.870400000000001,
                7.0784,
                7.324799999999998,
                7.609599999999999,
                7.932799999999999,
                8.2944,
                8.6944,
                9.1328,
                9.6096,
                10.124799999999999,
                10.678399999999998,
                11.270399999999999,
                11.900799999999998,
                12.5696,
                13.276799999999996,
                14.022399999999998,
                14.806399999999998,
                15.628799999999998,
                16.4896,
                17.3888,
                18.3264,
                19.302400000000002,
                20.316800000000004,
                21.369600000000002,
                22.460800000000003,
                23.590400000000002,
                24.758399999999998,
                25.964799999999997,
                27.2096,
                28.492799999999995,
                29.8144
            ],
            [
                10.5184,
                9.9328,
                9.3856,
                8.876800000000001,
                8.4064,
                7.974400000000001,
                7.5808,
                7.2256,
                6.908800000000001,
                6.630400000000001,
                6.3904000000000005,
                6.188800000000001,
                6.025600000000001,
                5.900800000000001,
                5.814400000000001,
                5.766400000000001,
                5.756799999999999,
                5.7856000000000005,
                5.8528,
                5.958400000000001,
                6.102400000000002,
                6.2848000000000015,
                6.505600000000002,
                6.7648,
                7.062400000000001,
                7.398400000000001,
                7.772800000000002,
                8.1856,
                8.6368,
                9.1264,
                9.6544,
                10.220800000000002,
                10.825600000000001,
                11.468800000000002,
                12.150400000000001,
                12.870400000000004,
                13.6288,
                14.4256,
                15.260800000000003,
                16.134400000000003,
                17.0464,
                17.9968,
                18.9856,
                20.012800000000002,
                21.078400000000002,
                22.1824,
                23.324800000000003,
                24.5056,
                25.724800000000005,
                26.982400000000005,
                28.278400000000005
            ],
            [
                10.3136,
                9.7024,
                9.1296,
                8.5952,
                8.0992,
                7.6416,
                7.2224,
                6.8416,
                6.499200000000001,
                6.195200000000001,
                5.929600000000001,
                5.7024,
                5.5136,
                5.3632,
                5.2512,
                5.1776,
                5.142399999999999,
                5.1456,
                5.187200000000001,
                5.267200000000001,
                5.385600000000001,
                5.542400000000001,
                5.737600000000001,
                5.9712,
                6.243200000000001,
                6.5536,
                6.902400000000001,
                7.289600000000001,
                7.7151999999999985,
                8.1792,
                8.6816,
                9.2224,
                9.8016,
                10.419200000000002,
                11.0752,
                11.7696,
                12.502399999999998,
                13.273599999999998,
                14.083200000000001,
                14.9312,
                15.817599999999999,
                16.7424,
                17.7056,
                18.707199999999997,
                19.7472,
                20.8256,
                21.942400000000003,
                23.0976,
                24.291200000000003,
                25.523200000000003,
                26.793600000000005
            ],
            [
                10.16,
                9.5232,
                8.924800000000001,
                8.3648,
                7.843199999999999,
                7.360000000000001,
                6.9152000000000005,
                6.508799999999999,
                6.1408000000000005,
                5.8112,
                5.5200000000000005,
                5.2672,
                5.0528,
                4.876799999999999,
                4.7392,
                4.64,
                4.579199999999999,
                4.556799999999999,
                4.572799999999999,
                4.6272,
                4.720000000000001,
                4.8512,
                5.0208,
                5.228799999999999,
                5.4752,
                5.76,
                6.083200000000001,
                6.4448,
                6.8447999999999976,
                7.283199999999998,
                7.759999999999998,
                8.2752,
                8.8288,
                9.4208,
                10.0512,
                10.720000000000002,
                11.427199999999997,
                12.172799999999999,
                12.956799999999998,
                13.7792,
                14.639999999999997,
                15.5392,
                16.4768,
                17.4528,
                18.4672,
                19.52,
                20.6112,
                21.7408,
                22.908800000000003,
                24.1152,
                25.360000000000003
            ],
            [
                10.0576,
                9.395199999999999,
                8.7712,
                8.1856,
                7.638399999999999,
                7.129600000000002,
                6.6592,
                6.2272,
                5.8336000000000015,
                5.478400000000001,
                5.161600000000001,
                4.8832,
                4.6432,
                4.441600000000001,
                4.2784,
                4.153600000000001,
                4.067200000000001,
                4.0192000000000005,
                4.009600000000001,
                4.038400000000001,
                4.105600000000002,
                4.211200000000001,
                4.3552,
                4.5376,
                4.758400000000001,
                5.017600000000001,
                5.315200000000002,
                5.651200000000001,
                6.025600000000002,
                6.4384,
                6.889600000000001,
                7.379200000000001,
                7.907200000000001,
                8.473600000000001,
                9.078399999999998,
                9.721599999999999,
                10.4032,
                11.1232,
                11.881600000000002,
                12.678400000000003,
                13.513600000000004,
                14.387200000000004,
                15.299200000000006,
                16.249599999999997,
                17.238400000000002,
                18.265600000000003,
                19.3312,
                20.4352,
                21.5776,
                22.7584,
                23.977600000000002
            ],
            [
                10.0064,
                9.3184,
                8.668800000000001,
                8.0576,
                7.484799999999999,
                6.950400000000002,
                6.4544,
                5.9968,
                5.577600000000001,
                5.1968000000000005,
                4.8544,
                4.550400000000001,
                4.284800000000001,
                4.0576,
                3.8688000000000002,
                3.7184,
                3.6064,
                3.5328,
                3.4976000000000003,
                3.5008000000000004,
                3.5424,
                3.6224,
                3.7408,
                3.897600000000001,
                4.0928,
                4.3264000000000005,
                4.598400000000001,
                4.9088,
                5.257600000000001,
                5.644799999999999,
                6.0704,
                6.5344,
                7.036800000000001,
                7.577600000000001,
                8.156799999999999,
                8.7744,
                9.430399999999999,
                10.1248,
                10.857600000000001,
                11.628800000000002,
                12.438400000000001,
                13.286400000000002,
                14.172800000000004,
                15.097599999999998,
                16.0608,
                17.0624,
                18.1024,
                19.180799999999998,
                20.2976,
                21.452799999999996,
                22.6464
            ],
            [
                10.0064,
                9.2928,
                8.617600000000001,
                7.9807999999999995,
                7.382399999999999,
                6.822400000000002,
                6.300800000000001,
                5.8176000000000005,
                5.372800000000001,
                4.9664,
                4.5984,
                4.268800000000001,
                3.9776000000000002,
                3.7248,
                3.5103999999999997,
                3.3343999999999996,
                3.1967999999999996,
                3.0975999999999995,
                3.0368,
                3.0143999999999997,
                3.0303999999999998,
                3.0847999999999995,
                3.1776,
                3.3088,
                3.4783999999999993,
                3.6864,
                3.9328000000000003,
                4.2176,
                4.5408,
                4.902399999999998,
                5.3024,
                5.7408,
                6.217600000000001,
                6.732800000000001,
                7.286399999999998,
                7.8784,
                8.508799999999999,
                9.177599999999998,
                9.884799999999998,
                10.630400000000002,
                11.4144,
                12.236800000000002,
                13.097600000000003,
                13.996799999999999,
                14.9344,
                15.910400000000001,
                16.924799999999998,
                17.977599999999995,
                19.0688,
                20.1984,
                21.3664
            ],
            [
                10.0576,
                9.3184,
                8.617600000000001,
                7.9552,
                7.331199999999999,
                6.745600000000001,
                6.1983999999999995,
                5.6896,
                5.219200000000001,
                4.7872,
                4.3936,
                4.0384,
                3.7216000000000005,
                3.4432,
                3.2032,
                3.0016,
                2.8384,
                2.7136000000000005,
                2.6272,
                2.5792,
                2.5696,
                2.5984,
                2.6656000000000004,
                2.7712000000000008,
                2.9151999999999996,
                3.0976,
                3.3184,
                3.5776,
                3.8751999999999995,
                4.2112,
                4.5856,
                4.9984,
                5.449600000000002,
                5.9392000000000005,
                6.467200000000001,
                7.033600000000001,
                7.6384,
                8.281599999999997,
                8.9632,
                9.6832,
                10.441600000000001,
                11.2384,
                12.073600000000003,
                12.947200000000002,
                13.859200000000001,
                14.809600000000005,
                15.798399999999997,
                16.825599999999998,
                17.8912,
                18.995199999999997,
                20.1376
            ],
            [
                10.16,
                9.395199999999999,
                8.668800000000001,
                7.9807999999999995,
                7.331199999999999,
                6.720000000000001,
                6.1472,
                5.6128,
                5.1168000000000005,
                4.6592,
                4.24,
                3.8592000000000004,
                3.5168000000000004,
                3.2128,
                2.9472,
                2.7200000000000006,
                2.5312,
                2.3808000000000002,
                2.2688,
                2.1952000000000003,
                2.1600000000000006,
                2.1632000000000002,
                2.2048000000000005,
                2.2848000000000006,
                2.4032,
                2.5600000000000005,
                2.7552000000000003,
                2.9888,
                3.2608000000000006,
                3.571200000000001,
                3.9200000000000004,
                4.3072,
                4.732800000000001,
                5.196800000000001,
                5.699200000000002,
                6.240000000000002,
                6.8192,
                7.436800000000001,
                8.0928,
                8.787200000000002,
                9.52,
                10.2912,
                11.100800000000001,
                11.9488,
                12.8352,
                13.760000000000003,
                14.723200000000002,
                15.7248,
                16.764800000000005,
                17.843199999999996,
                18.96
            ],
            [
                10.3136,
                9.5232,
                8.7712,
                8.0576,
                7.382399999999999,
                6.745600000000001,
                6.1472,
                5.587199999999999,
                5.065600000000001,
                4.5824,
                4.1376,
                3.7312000000000003,
                3.3632,
                3.0336,
                2.7424,
                2.4896000000000003,
                2.2752,
                2.0992,
                1.9616,
                1.8624,
                1.8016,
                1.7792,
                1.7952,
                1.8496,
                1.9423999999999997,
                2.0736,
                2.2432,
                2.4511999999999996,
                2.6975999999999996,
                2.9824,
                3.3055999999999996,
                3.6672,
                4.0672,
                4.505600000000001,
                4.982400000000001,
                5.497600000000001,
                6.0512,
                6.643199999999999,
                7.273600000000001,
                7.9424,
                8.6496,
                9.395199999999999,
                10.1792,
                11.0016,
                11.862400000000001,
                12.761600000000001,
                13.699200000000001,
                14.675200000000002,
                15.689600000000002,
                16.742399999999996,
                17.833599999999997
            ],
            [
                10.5184,
                9.7024,
                8.924800000000001,
                8.1856,
                7.484799999999999,
                6.822400000000002,
                6.1983999999999995,
                5.6128,
                5.065600000000001,
                4.5568,
                4.0864,
                3.6544000000000003,
                3.2608,
                2.9055999999999997,
                2.5888,
                2.3104000000000005,
                2.0704000000000002,
                1.8688000000000002,
                1.7056,
                1.5808,
                1.4944000000000002,
                1.4464000000000001,
                1.4368,
                1.4656,
                1.5328,
                1.6384,
                1.7824000000000002,
                1.9648,
                2.1856,
                2.4448000000000008,
                2.7424000000000004,
                3.0784,
                3.4528000000000003,
                3.8656,
                4.3168,
                4.806400000000001,
                5.3344000000000005,
                5.900800000000001,
                6.505600000000002,
                7.148800000000002,
                7.8304,
                8.550400000000002,
                9.308800000000002,
                10.105599999999999,
                10.9408,
                11.814400000000001,
                12.726399999999998,
                13.6768,
                14.665600000000001,
                15.6928,
                16.7584
            ],
            [
                10.7744,
                9.932799999999999,
                9.1296,
                8.3648,
                7.638399999999999,
                6.950400000000002,
                6.300800000000001,
                5.6896,
                5.1168000000000005,
                4.5824,
                4.0864,
                3.6288000000000005,
                3.2096000000000005,
                2.8288,
                2.4864,
                2.1824000000000003,
                1.9168,
                1.6896,
                1.5008000000000001,
                1.3504,
                1.2384000000000002,
                1.1648,
                1.1296000000000002,
                1.1328000000000003,
                1.1744,
                1.2544000000000002,
                1.3728000000000002,
                1.5296,
                1.7248000000000003,
                1.9584000000000004,
                2.2304,
                2.5408000000000004,
                2.8896000000000006,
                3.2768000000000006,
                3.7024,
                4.166400000000001,
                4.6688,
                5.209600000000001,
                5.788800000000001,
                6.4064000000000005,
                7.062400000000001,
                7.756800000000001,
                8.489600000000003,
                9.260800000000001,
                10.070400000000001,
                10.918400000000004,
                11.804799999999998,
                12.7296,
                13.6928,
                14.6944,
                15.7344
            ],
            [
                11.0816,
                10.2144,
                9.3856,
                8.5952,
                7.843199999999999,
                7.129600000000002,
                6.4544,
                5.8176000000000005,
                5.219200000000001,
                4.6592,
                4.1376,
                3.6544000000000003,
                3.2096000000000005,
                2.8032,
                2.4352,
                2.1056000000000004,
                1.8144,
                1.5615999999999999,
                1.3472,
                1.1712,
                1.0335999999999999,
                0.9343999999999999,
                0.8735999999999999,
                0.8512,
                0.8672,
                0.9216,
                1.0144,
                1.1455999999999997,
                1.3152,
                1.5232,
                1.7696,
                2.0544,
                2.3776,
                2.7392000000000003,
                3.1391999999999998,
                3.5776000000000003,
                4.054399999999999,
                4.5696,
                5.1232,
                5.7152,
                6.3456,
                7.014400000000001,
                7.721600000000001,
                8.4672,
                9.2512,
                10.0736,
                10.934399999999997,
                11.833599999999999,
                12.7712,
                13.7472,
                14.761600000000001
            ],
            [
                11.44,
                10.5472,
                9.6928,
                8.8768,
                8.0992,
                7.360000000000001,
                6.6592,
                5.9968,
                5.372800000000001,
                4.7872,
                4.24,
                3.7312000000000003,
                3.2608,
                2.8288,
                2.4352,
                2.08,
                1.7631999999999999,
                1.4848,
                1.2448000000000001,
                1.0432000000000001,
                0.8800000000000001,
                0.7552000000000001,
                0.6688000000000001,
                0.6208,
                0.6112000000000001,
                0.6400000000000001,
                0.7072,
                0.8128000000000002,
                0.9568000000000001,
                1.1392000000000002,
                1.3600000000000003,
                1.6192000000000002,
                1.9168000000000003,
                2.2527999999999997,
                2.6272,
                3.040000000000001,
                3.4912,
                3.9807999999999995,
                4.5088,
                5.0752000000000015,
                5.68,
                6.323200000000001,
                7.0048,
                7.7248,
                8.483200000000002,
                9.280000000000003,
                10.1152,
                10.9888,
                11.9008,
                12.851199999999999,
                13.84
            ],
            [
                11.849599999999999,
                10.931199999999999,
                10.051200000000001,
                9.2096,
                8.4064,
                7.6416,
                6.9152000000000005,
                6.2272,
                5.577600000000001,
                4.9664,
                4.3936,
                3.8592000000000004,
                3.3632000000000004,
                2.9055999999999997,
                2.4864,
                2.1056000000000004,
                1.7631999999999999,
                1.4592,
                1.1936,
                0.9663999999999999,
                0.7776000000000001,
                0.6272,
                0.5152,
                0.4416,
                0.40640000000000004,
                0.4096,
                0.4512,
                0.5312000000000001,
                0.6496,
                0.8064,
                1.0016000000000003,
                1.2352000000000003,
                1.5072000000000005,
                1.8176,
                2.1663999999999994,
                2.5536000000000003,
                2.9792,
                3.4432,
                3.9456000000000007,
                4.486400000000001,
                5.065599999999999,
                5.6832,
                6.339200000000001,
                7.033600000000002,
                7.766400000000001,
                8.537600000000003,
                9.347199999999999,
                10.1952,
                11.081600000000002,
                12.006400000000001,
                12.9696
            ],
            [
                12.3104,
                11.3664,
                10.4608,
                9.5936,
                8.7648,
                7.974400000000001,
                7.2224,
                6.508799999999999,
                5.8336000000000015,
                5.1968000000000005,
                4.5984,
                4.038400000000001,
                3.5168000000000004,
                3.0336,
                2.5888,
                2.1824000000000003,
                1.8144,
                1.4848,
                1.1936,
                0.9408,
                0.7264000000000002,
                0.5504,
                0.4128,
                0.3136,
                0.25279999999999997,
                0.2304,
                0.2463999999999999,
                0.30080000000000007,
                0.39359999999999995,
                0.5248000000000002,
                0.6944,
                0.9024000000000001,
                1.1488,
                1.4336000000000002,
                1.7568,
                2.1184000000000003,
                2.5183999999999997,
                2.9568,
                3.4336,
                3.948800000000001,
                4.502399999999999,
                5.094399999999999,
                5.724800000000001,
                6.393599999999999,
                7.1008,
                7.846400000000001,
                8.6304,
                9.452800000000002,
                10.313600000000001,
                11.2128,
                12.150400000000001
            ],
            [
                12.8224,
                11.8528,
                10.9216,
                10.028799999999999,
                9.174399999999999,
                8.358400000000001,
                7.5808,
                6.8416,
                6.140800000000001,
                5.478400000000001,
                4.8544,
                4.268800000000001,
                3.7216000000000005,
                3.2127999999999997,
                2.7424,
                2.3104000000000005,
                1.9167999999999998,
                1.5616,
                1.2448000000000001,
                0.9663999999999999,
                0.7264000000000002,
                0.5248,
                0.3616,
                0.2368,
                0.1504,
                0.1024,
                0.09280000000000004,
                0.12160000000000001,
                0.18880000000000008,
                0.29440000000000005,
                0.4384,
                0.6208,
                0.8416000000000001,
                1.1008,
                1.3984000000000003,
                1.7344000000000006,
                2.1088,
                2.5216000000000003,
                2.9728000000000003,
                3.4624000000000006,
                3.9904,
                4.5568,
                5.161600000000001,
                5.8048,
                6.4864,
                7.206400000000002,
                7.9648,
                8.7616,
                9.596800000000002,
                10.4704,
                11.3824
            ],
            [
                13.3856,
                12.3904,
                11.4336,
                10.5152,
                9.6352,
                8.793600000000001,
                7.990400000000001,
                7.2256,
                6.499200000000001,
                5.8112,
                5.1616,
                4.550400000000001,
                3.9776000000000002,
                3.4432,
                2.9471999999999996,
                2.4896000000000003,
                2.0704,
                1.6896,
                1.3472000000000002,
                1.0432,
                0.7776000000000001,
                0.5504,
                0.3616,
                0.2112,
                0.09920000000000001,
                0.0256,
                -0.009599999999999997,
                -0.006399999999999989,
                0.03520000000000001,
                0.11520000000000002,
                0.23360000000000014,
                0.3904000000000001,
                0.5856000000000001,
                0.8192,
                1.0912,
                1.4016000000000004,
                1.7504,
                2.1376,
                2.5632,
                3.0272000000000006,
                3.5295999999999994,
                4.0704,
                4.6496,
                5.267199999999999,
                5.9232,
                6.617600000000001,
                7.350399999999999,
                8.121599999999999,
                8.9312,
                9.779200000000001,
                10.665600000000001
            ],
            [
                14.0,
                12.9792,
                11.9968,
                11.0528,
                10.147199999999998,
                9.280000000000001,
                8.4512,
                7.6608,
                6.908800000000001,
                6.195200000000001,
                5.5200000000000005,
                4.8832,
                4.284800000000001,
                3.7248,
                3.2032,
                2.7200000000000006,
                2.2752,
                1.8688000000000002,
                1.5008000000000001,
                1.1712,
                0.8800000000000001,
                0.6272,
                0.4128,
                0.2368,
                0.09920000000000001,
                0.0,
                -0.0608,
                -0.0832,
                -0.06719999999999998,
                -0.012799999999999978,
                0.08000000000000007,
                0.21120000000000005,
                0.3808,
                0.5888000000000001,
                0.8351999999999999,
                1.1200000000000003,
                1.4432,
                1.8048000000000002,
                2.2048000000000005,
                2.6432,
                3.12,
                3.6352,
                4.1888000000000005,
                4.780799999999999,
                5.411200000000001,
                6.080000000000002,
                6.787199999999999,
                7.5328,
                8.3168,
                9.1392,
                10.0
            ],
            [
                14.665600000000001,
                13.619200000000001,
                12.6112,
                11.641599999999999,
                10.710399999999998,
                9.8176,
                8.963199999999999,
                8.1472,
                7.369600000000001,
                6.630400000000001,
                5.9296,
                5.267200000000001,
                4.6432,
                4.0576,
                3.5103999999999997,
                3.0016000000000007,
                2.5312,
                2.0992,
                1.7056000000000002,
                1.3504,
                1.0336000000000003,
                0.7552000000000001,
                0.5152,
                0.3136,
                0.1504,
                0.0256,
                -0.0608,
                -0.10880000000000001,
                -0.11839999999999999,
                -0.08959999999999999,
                -0.022399999999999975,
                0.08319999999999994,
                0.22720000000000007,
                0.4096000000000001,
                0.6303999999999998,
                0.8896000000000002,
                1.1871999999999998,
                1.5232,
                1.8976000000000002,
                2.3104000000000005,
                2.7615999999999996,
                3.2512,
                3.7792000000000003,
                4.345599999999999,
                4.9504,
                5.593600000000002,
                6.2752,
                6.9952000000000005,
                7.7536000000000005,
                8.5504,
                9.3856
            ],
            [
                15.3824,
                14.3104,
                13.276800000000001,
                12.2816,
                11.3248,
                10.406400000000001,
                9.526399999999999,
                8.6848,
                7.8816000000000015,
                7.1168000000000005,
                6.3904000000000005,
                5.702400000000001,
                5.0528,
                4.4416,
                3.8688,
                3.3344000000000005,
                2.8384,
                2.3808000000000002,
                1.9616000000000002,
                1.5808,
                1.2384,
                0.9344000000000001,
                0.6688000000000001,
                0.4416,
                0.2528,
                0.1024,
                -0.009599999999999997,
                -0.0832,
                -0.11839999999999999,
                -0.1152,
                -0.07359999999999994,
                0.006400000000000017,
                0.12480000000000002,
                0.2816000000000001,
                0.4767999999999999,
                0.7104000000000001,
                0.9824,
                1.2927999999999997,
                1.6416000000000004,
                2.0288000000000004,
                2.4543999999999997,
                2.9184,
                3.4208000000000007,
                3.9615999999999993,
                4.540800000000001,
                5.1584,
                5.814399999999999,
                6.508799999999999,
                7.2416,
                8.0128,
                8.8224
            ],
            [
                16.1504,
                15.0528,
                13.9936,
                12.972800000000001,
                11.9904,
                11.0464,
                10.140799999999999,
                9.2736,
                8.4448,
                7.6544,
                6.902399999999999,
                6.188800000000001,
                5.5136,
                4.876799999999999,
                4.2783999999999995,
                3.7184,
                3.1967999999999996,
                2.7136000000000005,
                2.2688,
                1.8624,
                1.4944000000000002,
                1.1648,
                0.8735999999999999,
                0.6208,
                0.40639999999999993,
                0.2304,
                0.09279999999999998,
                -0.0064000000000000445,
                -0.06719999999999998,
                -0.08960000000000001,
                -0.07359999999999994,
                -0.019199999999999995,
                0.0736,
                0.20479999999999998,
                0.37440000000000007,
                0.5824000000000003,
                0.8288000000000001,
                1.1136,
                1.4368000000000003,
                1.7984000000000004,
                2.1983999999999995,
                2.6368,
                3.113600000000001,
                3.6287999999999996,
                4.1823999999999995,
                4.774400000000002,
                5.4048,
                6.0736,
                6.780800000000001,
                7.526400000000001,
                8.3104
            ],
            [
                16.9696,
                15.846400000000001,
                14.761600000000001,
                13.7152,
                12.707199999999998,
                11.737600000000002,
                10.8064,
                9.9136,
                9.0592,
                8.2432,
                7.465599999999999,
                6.726400000000001,
                6.025600000000001,
                5.3632,
                4.7392,
                4.1536,
                3.6064,
                3.0976000000000004,
                2.6272000000000006,
                2.1952000000000003,
                1.8016,
                1.4464000000000001,
                1.1296,
                0.8512000000000002,
                0.6112,
                0.4096,
                0.2464,
                0.12160000000000001,
                0.03520000000000001,
                -0.012799999999999978,
                -0.022399999999999975,
                0.006400000000000017,
                0.0736,
                0.17920000000000003,
                0.32319999999999993,
                0.5056000000000003,
                0.7264,
                0.9856,
                1.2832000000000003,
                1.6192000000000002,
                1.9936,
                2.4064000000000005,
                2.8576000000000006,
                3.3471999999999995,
                3.8752,
                4.441600000000001,
                5.046399999999999,
                5.6896,
                6.371200000000002,
                7.091199999999999,
                7.849599999999999
            ],
            [
                17.84,
                16.6912,
                15.5808,
                14.508799999999999,
                13.4752,
                12.480000000000002,
                11.523200000000001,
                10.6048,
                9.7248,
                8.8832,
                8.08,
                7.315200000000002,
                6.5888,
                5.900799999999999,
                5.2512,
                4.640000000000001,
                4.0672,
                3.5328,
                3.0368000000000004,
                2.5792,
                2.1600000000000006,
                1.7792000000000003,
                1.4368,
                1.1328000000000003,
                0.8672,
                0.6400000000000001,
                0.4512000000000001,
                0.30080000000000007,
                0.18880000000000008,
                0.11520000000000002,
                0.08000000000000007,
                0.08320000000000005,
                0.12480000000000002,
                0.20479999999999998,
                0.32319999999999993,
                0.4800000000000002,
                0.6751999999999999,
                0.9088,
                1.1808,
                1.4912,
                1.84,
                2.2272,
                2.6528,
                3.1168,
                3.6191999999999998,
                4.160000000000002,
                4.739199999999999,
                5.3568,
                6.0128,
                6.7072,
                7.4399999999999995
            ],
            [
                18.7616,
                17.5872,
                16.4512,
                15.353599999999998,
                14.294399999999996,
                13.2736,
                12.2912,
                11.347199999999999,
                10.441600000000001,
                9.5744,
                8.7456,
                7.9552000000000005,
                7.2032,
                6.4896,
                5.814399999999999,
                5.1776,
                4.579199999999999,
                4.0192000000000005,
                3.4976000000000003,
                3.0143999999999997,
                2.5696,
                2.1632000000000002,
                1.7952,
                1.4655999999999996,
                1.1744,
                0.9216,
                0.7072,
                0.5311999999999999,
                0.39359999999999995,
                0.29439999999999983,
                0.23359999999999992,
                0.21120000000000005,
                0.22719999999999996,
                0.28159999999999996,
                0.37440000000000007,
                0.5056000000000003,
                0.6751999999999999,
                0.8832,
                1.1296000000000004,
                1.4144,
                1.7375999999999998,
                2.0991999999999997,
                2.499200000000001,
                2.9376,
                3.4144,
                3.929600000000001,
                4.483199999999999,
                5.075200000000001,
                5.7056000000000004,
                6.3744,
                7.0816
            ],
            [
                19.7344,
                18.534399999999998,
                17.3728,
                16.2496,
                15.164799999999998,
                14.118400000000003,
                13.1104,
                12.1408,
                11.209600000000002,
                10.3168,
                9.4624,
                8.6464,
                7.868800000000001,
                7.129600000000001,
                6.4288,
                5.766400000000001,
                5.142399999999999,
                4.556800000000001,
                4.009600000000001,
                3.5008000000000004,
                3.0303999999999998,
                2.5984000000000003,
                2.2048000000000005,
                1.8496,
                1.5328000000000004,
                1.2544000000000002,
                1.0144,
                0.8128000000000002,
                0.6496000000000002,
                0.5248000000000002,
                0.4384000000000001,
                0.3904000000000002,
                0.3808,
                0.4096000000000001,
                0.4768000000000001,
                0.5824000000000003,
                0.7264,
                0.9088,
                1.1296000000000004,
                1.3888000000000003,
                1.6864000000000001,
                2.0224,
                2.3968000000000007,
                2.8096,
                3.2608,
                3.7504000000000013,
                4.2783999999999995,
                4.8448,
                5.4496,
                6.092799999999999,
                6.7744
            ],
            [
                20.7584,
                19.5328,
                18.3456,
                17.1968,
                16.086399999999998,
                15.0144,
                13.980799999999999,
                12.985599999999998,
                12.0288,
                11.1104,
                10.2304,
                9.388800000000003,
                8.585600000000003,
                7.820800000000001,
                7.0944,
                6.4064000000000005,
                5.756799999999999,
                5.1456,
                4.572800000000001,
                4.038399999999999,
                3.5424,
                3.0848000000000004,
                2.6656000000000004,
                2.2848,
                1.9424000000000003,
                1.6384,
                1.3727999999999998,
                1.1456000000000002,
                0.9568000000000001,
                0.8064,
                0.6944,
                0.6208,
                0.5855999999999999,
                0.5888000000000001,
                0.6304000000000001,
                0.7104000000000001,
                0.8288000000000001,
                0.9856,
                1.1808,
                1.4144,
                1.6864000000000001,
                1.9968000000000001,
                2.345600000000001,
                2.7327999999999997,
                3.1584,
                3.622400000000001,
                4.1248,
                4.6656,
                5.244800000000001,
                5.8624,
                6.5184
            ],
            [
                21.833599999999997,
                20.5824,
                19.369600000000002,
                18.195200000000003,
                17.0592,
                15.9616,
                14.9024,
                13.881599999999999,
                12.899199999999999,
                11.955199999999998,
                11.049599999999998,
                10.182400000000001,
                9.3536,
                8.563199999999998,
                7.8111999999999995,
                7.097600000000001,
                6.4224000000000006,
                5.7856000000000005,
                5.187200000000001,
                4.6272,
                4.1056,
                3.6224,
                3.1776,
                2.7712,
                2.4032,
                2.0736,
                1.7823999999999995,
                1.5296,
                1.3152,
                1.1391999999999998,
                1.0016000000000003,
                0.9024000000000001,
                0.8415999999999999,
                0.8192,
                0.8351999999999999,
                0.8896,
                0.9823999999999998,
                1.1136,
                1.2832,
                1.4912,
                1.7375999999999998,
                2.0224,
                2.345600000000001,
                2.7072,
                3.1072,
                3.5456000000000008,
                4.022399999999999,
                4.5376,
                5.091200000000001,
                5.6832,
                6.313599999999999
            ],
            [
                22.96,
                21.6832,
                20.444800000000004,
                19.2448,
                18.0832,
                16.960000000000004,
                15.8752,
                14.8288,
                13.8208,
                12.851199999999999,
                11.919999999999998,
                11.0272,
                10.172800000000002,
                9.3568,
                8.5792,
                7.840000000000002,
                7.1392000000000015,
                6.476800000000001,
                5.8528,
                5.267200000000001,
                4.720000000000001,
                4.211200000000001,
                3.7408,
                3.3088,
                2.9152000000000005,
                2.5600000000000005,
                2.2432,
                1.9648000000000005,
                1.7248000000000003,
                1.5232,
                1.3600000000000003,
                1.2352000000000003,
                1.1488,
                1.1008,
                1.0912000000000002,
                1.1200000000000003,
                1.1872000000000003,
                1.2928000000000002,
                1.4368000000000003,
                1.6192000000000002,
                1.84,
                2.0991999999999997,
                2.3968000000000007,
                2.7327999999999997,
                3.1072,
                3.520000000000001,
                3.9711999999999996,
                4.4608,
                4.9888,
                5.5552,
                6.16
            ],
            [
                24.1376,
                22.8352,
                21.5712,
                20.3456,
                19.158399999999997,
                18.009600000000006,
                16.8992,
                15.827200000000001,
                14.793600000000001,
                13.798399999999999,
                12.8416,
                11.923200000000001,
                11.043199999999999,
                10.2016,
                9.3984,
                8.633600000000001,
                7.9072000000000005,
                7.2192,
                6.569600000000001,
                5.958400000000001,
                5.385600000000001,
                4.8512,
                4.3552,
                3.8976,
                3.4784,
                3.0976,
                2.7551999999999994,
                2.4512000000000005,
                2.1856,
                1.9584,
                1.7696,
                1.6192000000000002,
                1.5072,
                1.4336000000000002,
                1.3984000000000003,
                1.4016,
                1.4432,
                1.5232,
                1.6416000000000004,
                1.7984,
                1.9936,
                2.2272,
                2.4992,
                2.8096,
                3.1584,
                3.5456000000000008,
                3.9711999999999996,
                4.4352,
                4.937600000000001,
                5.4784,
                6.057600000000001
            ],
            [
                25.3664,
                24.038400000000003,
                22.7488,
                21.4976,
                20.284799999999997,
                19.110400000000002,
                17.9744,
                16.8768,
                15.817600000000002,
                14.796800000000001,
                13.8144,
                12.8704,
                11.9648,
                11.0976,
                10.2688,
                9.4784,
                8.726399999999998,
                8.0128,
                7.3376,
                6.700799999999999,
                6.1024,
                5.542399999999999,
                5.0208,
                4.5376,
                4.0928,
                3.6864,
                3.318399999999999,
                2.9888,
                2.6975999999999996,
                2.4448,
                2.2304,
                2.0544,
                1.9167999999999998,
                1.8175999999999992,
                1.7568,
                1.7343999999999997,
                1.7504,
                1.8048000000000002,
                1.8976000000000002,
                2.0288,
                2.1983999999999995,
                2.4063999999999997,
                2.6528,
                2.9376,
                3.2608,
                3.622400000000001,
                4.022399999999999,
                4.4608,
                4.937600000000001,
                5.4528,
                6.006399999999999
            ],
            [
                26.6464,
                25.2928,
                23.9776,
                22.7008,
                21.4624,
                20.262400000000003,
                19.1008,
                17.9776,
                16.892800000000005,
                15.846400000000001,
                14.8384,
                13.868800000000004,
                12.9376,
                12.044799999999999,
                11.1904,
                10.374400000000001,
                9.5968,
                8.857600000000001,
                8.1568,
                7.494400000000001,
                6.870400000000001,
                6.2848,
                5.737600000000001,
                5.228800000000001,
                4.758400000000001,
                4.3264000000000005,
                3.9328000000000003,
                3.577600000000001,
                3.2608000000000006,
                2.9824,
                2.7424000000000004,
                2.5408000000000004,
                2.3776,
                2.2527999999999997,
                2.1664000000000003,
                2.1184000000000003,
                2.1088000000000005,
                2.1376,
                2.2048000000000005,
                2.3104000000000005,
                2.4543999999999997,
                2.6368,
                2.8576000000000006,
                3.1168,
                3.4144,
                3.7504000000000013,
                4.1248,
                4.5376,
                4.9888,
                5.4784,
                6.006399999999999
            ],
            [
                27.977600000000002,
                26.598400000000005,
                25.2576,
                23.9552,
                22.6912,
                21.465600000000006,
                20.2784,
                19.1296,
                18.019200000000005,
                16.947200000000002,
                15.913600000000002,
                14.918400000000002,
                13.9616,
                13.043200000000002,
                12.163200000000002,
                11.3216,
                10.5184,
                9.753600000000002,
                9.027200000000002,
                8.339200000000002,
                7.689600000000001,
                7.0784,
                6.505600000000002,
                5.971200000000001,
                5.475200000000002,
                5.017600000000001,
                4.598400000000001,
                4.2176,
                3.8751999999999995,
                3.571200000000001,
                3.3056000000000014,
                3.0784000000000007,
                2.8896000000000006,
                2.7392000000000003,
                2.627200000000001,
                2.5536000000000003,
                2.5184000000000006,
                2.5216000000000007,
                2.5632000000000006,
                2.6432,
                2.7616000000000005,
                2.9184,
                3.113600000000001,
                3.3472000000000004,
                3.6192000000000006,
                3.929600000000001,
                4.2783999999999995,
                4.6656,
                5.091200000000001,
                5.5552,
                6.057600000000001
            ],
            [
                29.360000000000003,
                27.955200000000005,
                26.588800000000003,
                25.260800000000003,
                23.9712,
                22.720000000000002,
                21.507199999999997,
                20.332800000000002,
                19.1968,
                18.0992,
                17.039999999999996,
                16.0192,
                15.0368,
                14.092799999999997,
                13.187199999999999,
                12.320000000000004,
                11.491200000000001,
                10.700800000000001,
                9.9488,
                9.2352,
                8.559999999999999,
                7.923199999999999,
                7.324799999999998,
                6.7648,
                6.243200000000001,
                5.76,
                5.3152,
                4.9087999999999985,
                4.5408,
                4.2112,
                3.9200000000000004,
                3.6672,
                3.4527999999999994,
                3.2767999999999993,
                3.1391999999999998,
                3.04,
                2.9792,
                2.9568,
                2.9728000000000003,
                3.0271999999999997,
                3.12,
                3.2512,
                3.4208,
                3.6287999999999996,
                3.8752,
                4.16,
                4.483199999999999,
                4.8448,
                5.244800000000001,
                5.6832,
                6.16
            ],
            [
                30.793600000000005,
                29.363200000000006,
                27.971200000000003,
                26.617600000000003,
                25.302400000000002,
                24.025600000000004,
                22.7872,
                21.5872,
                20.4256,
                19.302400000000002,
                18.217599999999997,
                17.171200000000002,
                16.1632,
                15.1936,
                14.2624,
                13.369600000000002,
                12.515200000000002,
                11.699200000000003,
                10.921600000000002,
                10.182400000000001,
                9.4816,
                8.8192,
                8.195199999999998,
                7.609600000000001,
                7.062400000000001,
                6.5536,
                6.083200000000001,
                5.651199999999999,
                5.257600000000001,
                4.9024,
                4.5856,
                4.3072,
                4.0672,
                3.8656,
                3.7024,
                3.5776000000000003,
                3.4912,
                3.4432,
                3.4336,
                3.4623999999999997,
                3.5296000000000003,
                3.6352,
                3.7792000000000003,
                3.9616000000000002,
                4.1823999999999995,
                4.441600000000001,
                4.739199999999999,
                5.075200000000001,
                5.4496,
                5.8624,
                6.313599999999999
            ],
            [
                32.278400000000005,
                30.82240000000001,
                29.404800000000005,
                28.025600000000004,
                26.684800000000003,
                25.382400000000004,
                24.1184,
                22.892800000000005,
                21.7056,
                20.556800000000003,
                19.446399999999997,
                18.374400000000005,
                17.3408,
                16.3456,
                15.388800000000002,
                14.470400000000005,
                13.590400000000002,
                12.748800000000003,
                11.945600000000002,
                11.180800000000003,
                10.454400000000001,
                9.7664,
                9.1168,
                8.505600000000001,
                7.932800000000002,
                7.398400000000001,
                6.902400000000001,
                6.4448,
                6.025600000000002,
                5.644800000000001,
                5.302400000000001,
                4.9984,
                4.732800000000001,
                4.505600000000001,
                4.3168,
                4.166400000000001,
                4.054400000000001,
                3.9808000000000012,
                3.9456000000000007,
                3.948800000000001,
                3.9904,
                4.0704,
                4.1888000000000005,
                4.345600000000001,
                4.540800000000001,
                4.774400000000002,
                5.0464,
                5.356800000000001,
                5.7056000000000004,
                6.0928,
                6.5184
            ],
            [
                33.8144,
                32.3328,
                30.889599999999998,
                29.4848,
                28.118399999999998,
                26.790400000000005,
                25.5008,
                24.249600000000004,
                23.036800000000003,
                21.862400000000004,
                20.726399999999998,
                19.628800000000002,
                18.569599999999998,
                17.5488,
                16.566399999999998,
                15.622399999999999,
                14.716799999999997,
                13.8496,
                13.0208,
                12.2304,
                11.478399999999999,
                10.7648,
                10.0896,
                9.4528,
                8.8544,
                8.2944,
                7.772799999999999,
                7.289599999999998,
                6.8447999999999976,
                6.4384,
                6.0704,
                5.7408,
                5.4496,
                5.1968,
                4.982400000000001,
                4.806400000000001,
                4.6688,
                4.5696,
                4.5088,
                4.4864,
                4.502399999999999,
                4.5568,
                4.6496,
                4.780799999999999,
                4.9504,
                5.1584,
                5.4048,
                5.6895999999999995,
                6.0128,
                6.3744,
                6.7744
            ],
            [
                35.4016,
                33.894400000000005,
                32.4256,
                30.9952,
                29.603199999999998,
                28.249600000000008,
                26.934400000000004,
                25.657600000000006,
                24.419200000000004,
                23.219200000000004,
                22.0576,
                20.934400000000004,
                19.8496,
                18.8032,
                17.795199999999998,
                16.8256,
                15.8944,
                15.001600000000002,
                14.147200000000002,
                13.3312,
                12.5536,
                11.8144,
                11.113600000000002,
                10.451200000000002,
                9.827200000000001,
                9.2416,
                8.6944,
                8.185599999999999,
                7.7151999999999985,
                7.283200000000001,
                6.889600000000001,
                6.5344,
                6.217600000000001,
                5.9392000000000005,
                5.699200000000002,
                5.497600000000001,
                5.3344000000000005,
                5.209600000000001,
                5.1232,
                5.0752,
                5.0656,
                5.094399999999999,
                5.1616,
                5.267200000000001,
                5.411200000000001,
                5.5936,
                5.8144,
                6.0736,
                6.3712,
                6.7072,
                7.0816
            ],
            [
                37.040000000000006,
                35.507200000000005,
                34.012800000000006,
                32.5568,
                31.1392,
                29.76000000000001,
                28.419200000000004,
                27.11680000000001,
                25.852800000000006,
                24.627200000000006,
                23.44,
                22.291200000000003,
                21.1808,
                20.108800000000002,
                19.0752,
                18.080000000000002,
                17.123199999999997,
                16.204800000000002,
                15.324800000000003,
                14.483200000000002,
                13.680000000000001,
                12.9152,
                12.188800000000002,
                11.500800000000002,
                10.851200000000002,
                10.240000000000002,
                9.667200000000001,
                9.1328,
                8.6368,
                8.179200000000002,
                7.760000000000002,
                7.379200000000001,
                7.036800000000001,
                6.732800000000001,
                6.467200000000003,
                6.240000000000002,
                6.0512000000000015,
                5.900800000000001,
                5.788800000000001,
                5.7152,
                5.68,
                5.6832,
                5.724800000000001,
                5.8048,
                5.923200000000001,
                6.080000000000002,
                6.2752,
                6.508800000000001,
                6.780800000000001,
                7.091200000000001,
                7.440000000000001
            ],
            [
                38.72959999999999,
                37.17119999999999,
                35.6512,
                34.169599999999996,
                32.726400000000005,
                31.321600000000004,
                29.955199999999998,
                28.6272,
                27.3376,
                26.0864,
                24.873599999999996,
                23.699200000000005,
                22.563200000000002,
                21.465600000000002,
                20.4064,
                19.385600000000004,
                18.4032,
                17.4592,
                16.5536,
                15.6864,
                14.8576,
                14.067199999999998,
                13.315199999999997,
                12.6016,
                11.9264,
                11.289599999999998,
                10.691199999999998,
                10.131199999999998,
                9.6096,
                9.1264,
                8.6816,
                8.2752,
                7.907199999999998,
                7.5775999999999994,
                7.286399999999998,
                7.033599999999998,
                6.8192,
                6.643199999999999,
                6.5056,
                6.406399999999999,
                6.3456,
                6.323200000000001,
                6.339199999999999,
                6.393599999999999,
                6.4864,
                6.617600000000001,
                6.787199999999999,
                6.995199999999999,
                7.2416,
                7.526400000000001,
                7.849599999999999
            ],
            [
                40.4704,
                38.886399999999995,
                37.34080000000001,
                35.8336,
                34.3648,
                32.934400000000004,
                31.5424,
                30.188800000000004,
                28.8736,
                27.5968,
                26.358399999999996,
                25.158400000000007,
                23.996800000000004,
                22.873600000000003,
                21.788800000000002,
                20.742400000000004,
                19.7344,
                18.7648,
                17.833599999999997,
                16.9408,
                16.086399999999998,
                15.2704,
                14.492799999999999,
                13.7536,
                13.052800000000001,
                12.3904,
                11.766399999999999,
                11.180799999999998,
                10.633600000000001,
                10.124800000000002,
                9.6544,
                9.2224,
                8.8288,
                8.4736,
                8.156799999999999,
                7.8784,
                7.6384,
                7.436800000000001,
                7.273600000000001,
                7.1488000000000005,
                7.062400000000001,
                7.014400000000001,
                7.0048,
                7.033600000000002,
                7.1008,
                7.2064,
                7.3504000000000005,
                7.5328,
                7.7536000000000005,
                8.0128,
                8.3104
            ],
            [
                42.2624,
                40.6528,
                39.08160000000001,
                37.54880000000001,
                36.0544,
                34.598400000000005,
                33.180800000000005,
                31.801600000000004,
                30.460800000000003,
                29.158400000000004,
                27.894399999999997,
                26.668800000000008,
                25.481600000000004,
                24.332800000000006,
                23.222400000000004,
                22.150400000000005,
                21.1168,
                20.1216,
                19.1648,
                18.2464,
                17.3664,
                16.5248,
                15.721599999999999,
                14.956800000000003,
                14.230400000000003,
                13.5424,
                12.892800000000001,
                12.2816,
                11.708800000000002,
                11.174400000000002,
                10.678400000000002,
                10.220800000000002,
                9.8016,
                9.4208,
                9.078399999999998,
                8.7744,
                8.5088,
                8.281600000000001,
                8.0928,
                7.9424,
                7.830400000000002,
                7.756800000000001,
                7.721600000000001,
                7.7248,
                7.766400000000001,
                7.846400000000001,
                7.9648,
                8.1216,
                8.3168,
                8.550400000000002,
                8.8224
            ],
            [
                44.105599999999995,
                42.4704,
                40.8736,
                39.3152,
                37.795199999999994,
                36.3136,
                34.8704,
                33.46559999999999,
                32.0992,
                30.771200000000004,
                29.4816,
                28.230400000000003,
                27.017599999999998,
                25.8432,
                24.707199999999997,
                23.6096,
                22.550399999999996,
                21.529599999999995,
                20.5472,
                19.6032,
                18.6976,
                17.8304,
                17.0016,
                16.2112,
                15.4592,
                14.7456,
                14.0704,
                13.433599999999997,
                12.835199999999997,
                12.2752,
                11.753599999999999,
                11.270399999999999,
                10.825599999999998,
                10.419199999999998,
                10.0512,
                9.721599999999999,
                9.430399999999999,
                9.177599999999998,
                8.9632,
                8.787199999999999,
                8.6496,
                8.550399999999998,
                8.4896,
                8.4672,
                8.4832,
                8.5376,
                8.6304,
                8.7616,
                8.9312,
                9.1392,
                9.3856
            ],
            [
                46.0,
                44.3392,
                42.7168,
                41.132799999999996,
                39.587199999999996,
                38.08,
                36.6112,
                35.18079999999999,
                33.7888,
                32.4352,
                31.12,
                29.843200000000003,
                28.6048,
                27.4048,
                26.243199999999998,
                25.12,
                24.035199999999996,
                22.988799999999998,
                21.980800000000002,
                21.011200000000002,
                20.080000000000002,
                19.1872,
                18.332800000000002,
                17.516800000000003,
                16.739199999999997,
                16.0,
                15.299199999999999,
                14.6368,
                14.012799999999999,
                13.427200000000001,
                12.88,
                12.3712,
                11.900799999999998,
                11.468799999999998,
                11.0752,
                10.720000000000002,
                10.4032,
                10.1248,
                9.884799999999998,
                9.6832,
                9.52,
                9.395199999999999,
                9.3088,
                9.260800000000001,
                9.2512,
                9.280000000000001,
                9.3472,
                9.452800000000002,
                9.596800000000002,
                9.779200000000001,
                10.0
            ]
        ],
        "zmax": 46.0,
        "y": [
            -2.0,
            -1.92,
            -1.84,
            -1.76,
            -1.68,
            -1.6,
            -1.52,
            -1.44,
            -1.36,
            -1.28,
            -1.2,
            -1.12,
            -1.04,
            -0.96,
            -0.88,
            -0.8,
            -0.72,
            -0.64,
            -0.56,
            -0.48,
            -0.4,
            -0.32,
            -0.24,
            -0.16,
            -0.08,
            0.0,
            0.08,
            0.16,
            0.24,
            0.32,
            0.4,
            0.48,
            0.56,
            0.64,
            0.72,
            0.8,
            0.88,
            0.96,
            1.04,
            1.12,
            1.2,
            1.28,
            1.36,
            1.44,
            1.52,
            1.6,
            1.68,
            1.76,
            1.84,
            1.92,
            2.0
        ],
        "type": "contour",
        "contours": {
            "showlabels": false,
            "coloring": "fill"
        },
        "ncontours": 17,
        "showscale": true,
        "x": [
            -2.0,
            -1.92,
            -1.84,
            -1.76,
            -1.68,
            -1.6,
            -1.52,
            -1.44,
            -1.36,
            -1.28,
            -1.2,
            -1.12,
            -1.04,
            -0.96,
            -0.88,
            -0.8,
            -0.72,
            -0.64,
            -0.56,
            -0.48,
            -0.4,
            -0.32,
            -0.24,
            -0.16,
            -0.08,
            0.0,
            0.08,
            0.16,
            0.24,
            0.32,
            0.4,
            0.48,
            0.56,
            0.64,
            0.72,
            0.8,
            0.88,
            0.96,
            1.04,
            1.12,
            1.2,
            1.28,
            1.36,
            1.44,
            1.52,
            1.6,
            1.68,
            1.76,
            1.84,
            1.92,
            2.0
        ]
    }
]
, {
    "showlegend": true,
    "xaxis": {
        "showticklabels": true,
        "gridwidth": 0.5,
        "tickvals": [
            -2.0,
            -1.0,
            0.0,
            1.0,
            2.0
        ],
        "range": [
            -2.0,
            2.0
        ],
        "domain": [
            0.061654272382618835,
            0.760492308253135
        ],
        "mirror": false,
        "tickangle": 0,
        "showline": true,
        "ticktext": [
            "âˆ’2",
            "âˆ’1",
            "0",
            "1",
            "2"
        ],
        "zeroline": false,
        "tickfont": {
            "color": "rgba(0, 0, 0, 1.000)",
            "family": "sans-serif",
            "size": 11
        },
        "zerolinecolor": "rgba(0, 0, 0, 1.000)",
        "anchor": "y",
        "visible": true,
        "ticks": "inside",
        "tickmode": "array",
        "linecolor": "rgba(0, 0, 0, 1.000)",
        "showgrid": true,
        "title": "Parameter 1",
        "gridcolor": "rgba(0, 0, 0, 0.100)",
        "titlefont": {
            "color": "rgba(0, 0, 0, 1.000)",
            "family": "sans-serif",
            "size": 15
        },
        "tickcolor": "rgb(0, 0, 0)",
        "type": "-"
    },
    "paper_bgcolor": "rgba(255, 255, 255, 1.000)",
    "annotations": [],
    "height": 400,
    "margin": {
        "l": 0,
        "b": 20,
        "r": 0,
        "t": 20
    },
    "plot_bgcolor": "rgba(255, 255, 255, 1.000)",
    "yaxis": {
        "showticklabels": true,
        "gridwidth": 0.5,
        "tickvals": [
            -2.0,
            -1.0,
            0.0,
            1.0,
            2.0
        ],
        "range": [
            -2.0,
            2.0
        ],
        "domain": [
            0.07581474190726165,
            0.9901574803149606
        ],
        "mirror": false,
        "tickangle": 0,
        "showline": true,
        "ticktext": [
            "âˆ’2",
            "âˆ’1",
            "0",
            "1",
            "2"
        ],
        "zeroline": false,
        "tickfont": {
            "color": "rgba(0, 0, 0, 1.000)",
            "family": "sans-serif",
            "size": 11
        },
        "zerolinecolor": "rgba(0, 0, 0, 1.000)",
        "anchor": "x",
        "visible": true,
        "ticks": "inside",
        "tickmode": "array",
        "linecolor": "rgba(0, 0, 0, 1.000)",
        "showgrid": true,
        "title": "Parameter 2",
        "gridcolor": "rgba(0, 0, 0, 0.100)",
        "titlefont": {
            "color": "rgba(0, 0, 0, 1.000)",
            "family": "sans-serif",
            "size": 15
        },
        "tickcolor": "rgb(0, 0, 0)",
        "type": "-"
    },
    "legend": {
        "yanchor": "auto",
        "xanchor": "auto",
        "bordercolor": "rgba(0, 0, 0, 1.000)",
        "bgcolor": "rgba(255, 255, 255, 1.000)",
        "borderwidth": 1,
        "tracegroupgap": 0,
        "y": 1.0,
        "font": {
            "color": "rgba(0, 0, 0, 1.000)",
            "family": "sans-serif",
            "size": 11
        },
        "title": {
            "font": {
                "color": "rgba(0, 0, 0, 1.000)",
                "family": "sans-serif",
                "size": 15
            },
            "text": ""
        },
        "traceorder": "normal",
        "x": 1.0
    },
    "width": 600
}
);
    
    </script>
¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9s|õ°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$cd7c244d-8a4c-4aaf-ad4b-891744e004be¹depends_on_disabled_cellsÂ§runtimeÎW–Ñçµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$ed873ea2-d4bd-46e7-b89b-4e5494b606e6Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyƒ£msgÙ,UndefVarError: `GradientDescent` not definedªstacktrace‘Œªcall_short¯top-level scope§inlinedÂ£urlÀ¤pathÙu/home/runner/work/julia-ml-course/julia-ml-course/homework/H3_Custom_Types.jl#==#ed873ea2-d4bd-46e7-b89b-4e5494b606e6®source_packageÀ¤call¯top-level scopeªlinfo_type­Core.CodeInfo¤line¤fileÙ:H3_Custom_Types.jl#==#ed873ea2-d4bd-46e7-b89b-4e5494b606e6¤func¯top-level scope­parent_moduleÀ¦from_cÂ«plain_errorÙ¿UndefVarError: `GradientDescent` not defined
Stacktrace:
 [1] top-level scope
   @ ~/work/julia-ml-course/julia-ml-course/homework/H3_Custom_Types.jl#==#ed873ea2-d4bd-46e7-b89b-4e5494b606e6:1¤mimeÙ'application/vnd.pluto.stacktrace+object¬rootassigneeªoptimizers²last_run_timestampËAÚ;9sª�¨°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$ed873ea2-d4bd-46e7-b89b-4e5494b606e6¹depends_on_disabled_cellsÂ§runtimeÀµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÃÙ$b3832fb6-dd19-4b38-8117-b0a11d1bc34fŠ¦queuedÂ¤logs�§runningÂ¦output†¤bodyÚ—<div class="markdown"><h3 id="Interlude:-Understanding-Optimisers.jl">Interlude: Understanding Optimisers.jl</h3>
<p>All optimization algorithms in Optimisers.jl are sub-types of the abstract type <code>AbstractRule</code>.</p>
<p>To extend Optimisers.jl, we simply need to define a custom sub-type and overload two functions <code>init</code> and <code>apply&#33;</code> using multiple dispatch.</p>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9f¿:û°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$b3832fb6-dd19-4b38-8117-b0a11d1bc34f¹depends_on_disabled_cellsÂ§runtimeÎ :µpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$bdcb27c5-0603-49ac-b831-d78c558b31f0Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyÙb<div class="markdown"><p>Due date: <strong>Monday, November 10th 2025 at 23:59</strong></p>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9f³yB°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$bdcb27c5-0603-49ac-b831-d78c558b31f0¹depends_on_disabled_cellsÂ§runtimeÎ ¥9µpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$33866006-11d7-46cc-870b-fec519a2b541Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyÙÑ<div class="markdown"><div class="admonition tip"><p class="admonition-title">Tip</p><p>The purpose of this exercise is to teach you how to extend functionality from external Julia packages.</p>

</div>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9r?è°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$33866006-11d7-46cc-870b-fec519a2b541¹depends_on_disabled_cellsÂ§runtimeÎ ä�µpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$44ec9e94-f6af-431e-8841-bae44431dfa3Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyÙ÷<div class="markdown"><div class="admonition warning"><p class="admonition-title">Missing Response</p><p>Please replace <code>&quot;Mara Mustermann&quot;</code> with your name. Use <code>Shift&#43;Enter</code> to run your edits.</p>

</div>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9q•¦ã°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$44ec9e94-f6af-431e-8841-bae44431dfa3¹depends_on_disabled_cellsÂ§runtimeÎ�]µpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$57a8108f-9ad3-4cc2-9372-bb291fc3bf86Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyÚMŒ<script>
	
// Load the library for consistent smooth scrolling
const {default: scrollIntoView} = await import("data:text/javascript;base64,dmFyIFE9ZT0+Im9iamVjdCI9PXR5cGVvZiBlJiZudWxsIT1lJiYxPT09ZS5ub2RlVHlwZSxVPShlLHQpPT4oIXR8fCJoaWRkZW4iIT09ZSkmJiJ2aXNpYmxlIiE9PWUmJiJjbGlwIiE9PWUsQT0oZSx0KT0+e2lmKGUuY2xpZW50SGVpZ2h0PGUuc2Nyb2xsSGVpZ2h0fHxlLmNsaWVudFdpZHRoPGUuc2Nyb2xsV2lkdGgpe2xldCBsPWdldENvbXB1dGVkU3R5bGUoZSxudWxsKTtyZXR1cm4gVShsLm92ZXJmbG93WSx0KXx8VShsLm92ZXJmbG93WCx0KXx8KGU9PntsZXQgdD0oZT0+e2lmKCFlLm93bmVyRG9jdW1lbnR8fCFlLm93bmVyRG9jdW1lbnQuZGVmYXVsdFZpZXcpcmV0dXJuIG51bGw7dHJ5e3JldHVybiBlLm93bmVyRG9jdW1lbnQuZGVmYXVsdFZpZXcuZnJhbWVFbGVtZW50fWNhdGNoe3JldHVybiBudWxsfX0pKGUpO3JldHVybiEhdCYmKHQuY2xpZW50SGVpZ2h0PGUuc2Nyb2xsSGVpZ2h0fHx0LmNsaWVudFdpZHRoPGUuc2Nyb2xsV2lkdGgpfSkoZSl9cmV0dXJuITF9LFg9KGUsdCxsLG8sbixyLGkscyk9PnI8ZSYmaT50fHxyPmUmJmk8dD8wOnI8PWUmJnM8PWx8fGk+PXQmJnM+PWw/ci1lLW86aT50JiZzPGx8fHI8ZSYmcz5sP2ktdCtuOjAsJD1lPT5lLnBhcmVudEVsZW1lbnQ/PyhlLmdldFJvb3ROb2RlKCkuaG9zdHx8bnVsbCksdHQ9KGUsdCk9Pnt2YXIgbCxvLG4scjtpZih0eXBlb2YgZG9jdW1lbnQ+InUiKXJldHVybltdO2xldHtzY3JvbGxNb2RlOmksYmxvY2s6cyxpbmxpbmU6YSxib3VuZGFyeTpoLHNraXBPdmVyZmxvd0hpZGRlbkVsZW1lbnRzOnV9PXQsZz0iZnVuY3Rpb24iPT10eXBlb2YgaD9oOmU9PmUhPT1oO2lmKCFRKGUpKXRocm93IFR5cGVFcnJvcigiSW52YWxpZCB0YXJnZXQiKTtsZXQgdj1kb2N1bWVudC5zY3JvbGxpbmdFbGVtZW50fHxkb2N1bWVudC5kb2N1bWVudEVsZW1lbnQsbT1bXSx3PWU7Zm9yKDtRKHcpJiZnKHcpOyl7aWYoKHc9JCh3KSk9PT12KXttLnB1c2godyk7YnJlYWt9bnVsbCE9dyYmdz09PWRvY3VtZW50LmJvZHkmJkEodykmJiFBKGRvY3VtZW50LmRvY3VtZW50RWxlbWVudCl8fG51bGwhPXcmJkEodyx1KSYmbS5wdXNoKHcpfWxldCBXPW51bGwhPShvPW51bGw9PShsPXdpbmRvdy52aXN1YWxWaWV3cG9ydCk/dm9pZCAwOmwud2lkdGgpP286aW5uZXJXaWR0aCxIPW51bGwhPShyPW51bGw9PShuPXdpbmRvdy52aXN1YWxWaWV3cG9ydCk/dm9pZCAwOm4uaGVpZ2h0KT9yOmlubmVySGVpZ2h0LHtzY3JvbGxYOl8sc2Nyb2xsWTp4fT13aW5kb3cse2hlaWdodDpFLHdpZHRoOlQsdG9wOk4scmlnaHQ6TCxib3R0b206WSxsZWZ0OkN9PWUuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCksUj0ic3RhcnQiPT09c3x8Im5lYXJlc3QiPT09cz9OOiJlbmQiPT09cz9ZOk4rRS8yLFY9ImNlbnRlciI9PT1hP0MrVC8yOiJlbmQiPT09YT9MOkMsQj1bXTtmb3IobGV0IEQ9MDtEPG0ubGVuZ3RoO0QrKyl7bGV0IE89bVtEXSx7aGVpZ2h0Omosd2lkdGg6SSx0b3A6UyxyaWdodDpxLGJvdHRvbTp6LGxlZnQ6Rn09Ty5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKTtpZigiaWYtbmVlZGVkIj09PWkmJk4+PTAmJkM+PTAmJlk8PUgmJkw8PVcmJk4+PVMmJlk8PXomJkM+PUYmJkw8PXEpYnJlYWs7bGV0IEc9Z2V0Q29tcHV0ZWRTdHlsZShPKSxKPXBhcnNlSW50KEcuYm9yZGVyTGVmdFdpZHRoLDEwKSxLPXBhcnNlSW50KEcuYm9yZGVyVG9wV2lkdGgsMTApLFA9cGFyc2VJbnQoRy5ib3JkZXJSaWdodFdpZHRoLDEwKSxaPXBhcnNlSW50KEcuYm9yZGVyQm90dG9tV2lkdGgsMTApLGVlPTAsZXQ9MCxlbD0ib2Zmc2V0V2lkdGgiaW4gTz9PLm9mZnNldFdpZHRoLU8uY2xpZW50V2lkdGgtSi1QOjAsZW89Im9mZnNldEhlaWdodCJpbiBPP08ub2Zmc2V0SGVpZ2h0LU8uY2xpZW50SGVpZ2h0LUstWjowLGVuPSJvZmZzZXRXaWR0aCJpbiBPPzA9PT1PLm9mZnNldFdpZHRoPzA6SS9PLm9mZnNldFdpZHRoOjAsZXI9Im9mZnNldEhlaWdodCJpbiBPPzA9PT1PLm9mZnNldEhlaWdodD8wOmovTy5vZmZzZXRIZWlnaHQ6MDtpZih2PT09TyllZT0ic3RhcnQiPT09cz9SOiJlbmQiPT09cz9SLUg6Im5lYXJlc3QiPT09cz9YKHgseCtILEgsSyxaLHgrUix4K1IrRSxFKTpSLUgvMixldD0ic3RhcnQiPT09YT9WOiJjZW50ZXIiPT09YT9WLVcvMjoiZW5kIj09PWE/Vi1XOlgoXyxfK1csVyxKLFAsXytWLF8rVitULFQpLGVlPU1hdGgubWF4KDAsZWUreCksZXQ9TWF0aC5tYXgoMCxldCtfKTtlbHNle2VlPSJzdGFydCI9PT1zP1ItUy1LOiJlbmQiPT09cz9SLXorWitlbzoibmVhcmVzdCI9PT1zP1goUyx6LGosSyxaK2VvLFIsUitFLEUpOlItKFMrai8yKStlby8yLGV0PSJzdGFydCI9PT1hP1YtRi1KOiJjZW50ZXIiPT09YT9WLShGK0kvMikrZWwvMjoiZW5kIj09PWE/Vi1xK1ArZWw6WChGLHEsSSxKLFArZWwsVixWK1QsVCk7bGV0e3Njcm9sbExlZnQ6ZWksc2Nyb2xsVG9wOmVkfT1PO2VlPU1hdGgubWF4KDAsTWF0aC5taW4oZWQrZWUvZXIsTy5zY3JvbGxIZWlnaHQtai9lcitlbykpLGV0PU1hdGgubWF4KDAsTWF0aC5taW4oZWkrZXQvZW4sTy5zY3JvbGxXaWR0aC1JL2VuK2VsKSksUis9ZWQtZWUsVis9ZWktZXR9Qi5wdXNoKHtlbDpPLHRvcDplZSxsZWZ0OmV0fSl9cmV0dXJuIEJ9LGY9ZT0+e3ZhciB0O3JldHVybiExPT09ZT97YmxvY2s6ImVuZCIsaW5saW5lOiJuZWFyZXN0In06KHQ9ZSk9PT1PYmplY3QodCkmJjAhPT1PYmplY3Qua2V5cyh0KS5sZW5ndGg/ZTp7YmxvY2s6InN0YXJ0IixpbmxpbmU6Im5lYXJlc3QifX07ZnVuY3Rpb24gYyhlLHQpe3ZhciBsO2lmKCFlLmlzQ29ubmVjdGVkfHwhKGU9PntsZXQgdD1lO2Zvcig7dCYmdC5wYXJlbnROb2RlOyl7aWYodC5wYXJlbnROb2RlPT09ZG9jdW1lbnQpcmV0dXJuITA7dD10LnBhcmVudE5vZGUgaW5zdGFuY2VvZiBTaGFkb3dSb290P3QucGFyZW50Tm9kZS5ob3N0OnQucGFyZW50Tm9kZX1yZXR1cm4hMX0pKGUpKXJldHVybjtpZigib2JqZWN0Ij09dHlwZW9mKGw9dCkmJiJmdW5jdGlvbiI9PXR5cGVvZiBsLmJlaGF2aW9yKXJldHVybiB0LmJlaGF2aW9yKHR0KGUsdCkpO2xldCBvPSJib29sZWFuIj09dHlwZW9mIHR8fG51bGw9PXQ/dm9pZCAwOnQuYmVoYXZpb3I7Zm9yKGxldHtlbDpuLHRvcDpyLGxlZnQ6aX1vZiB0dChlLGYodCkpKW4uc2Nyb2xsKHt0b3A6cixsZWZ0OmksYmVoYXZpb3I6b30pfXZhciBkLHA9KCk9PihkfHwoZD0icGVyZm9ybWFuY2UiaW4gd2luZG93P3BlcmZvcm1hbmNlLm5vdy5iaW5kKHBlcmZvcm1hbmNlKTpEYXRlLm5vdyksZCgpKTtmdW5jdGlvbiBiKGUpe2xldCB0PU1hdGgubWluKChwKCktZS5zdGFydFRpbWUpL2UuZHVyYXRpb24sMSksbD1lLmVhc2UodCksbz1lLnN0YXJ0WCsoZS54LWUuc3RhcnRYKSpsLG49ZS5zdGFydFkrKGUueS1lLnN0YXJ0WSkqbDtlLm1ldGhvZChvLG4sdCxsKSxvIT09ZS54fHxuIT09ZS55P3JlcXVlc3RBbmltYXRpb25GcmFtZSgoKT0+YihlKSk6ZS5jYigpfWZ1bmN0aW9uIHkoZSx0LGwpe2xldCBvPWFyZ3VtZW50cy5sZW5ndGg+MyYmdm9pZCAwIT09YXJndW1lbnRzWzNdP2FyZ3VtZW50c1szXTo2MDAsbj1hcmd1bWVudHMubGVuZ3RoPjQmJnZvaWQgMCE9PWFyZ3VtZW50c1s0XT9hcmd1bWVudHNbNF06ZT0+MSstLWUqZSplKmUqZSxyPWFyZ3VtZW50cy5sZW5ndGg+NT9hcmd1bWVudHNbNV06dm9pZCAwLGk9YXJndW1lbnRzLmxlbmd0aD42P2FyZ3VtZW50c1s2XTp2b2lkIDAscz1lLnNjcm9sbExlZnQsYT1lLnNjcm9sbFRvcDtiKHtzY3JvbGxhYmxlOmUsbWV0aG9kKHQsbCxvLG4pe2xldCByPU1hdGguY2VpbCh0KSxzPU1hdGguY2VpbChsKTtlLnNjcm9sbExlZnQ9cixlLnNjcm9sbFRvcD1zLGk/Lih7dGFyZ2V0OmUsZWxhcHNlZDpvLHZhbHVlOm4sbGVmdDpyLHRvcDpzfSl9LHN0YXJ0VGltZTpwKCksc3RhcnRYOnMsc3RhcnRZOmEseDp0LHk6bCxkdXJhdGlvbjpvLGVhc2U6bixjYjpyfSl9dmFyIE09ZT0+ZSYmIWUuYmVoYXZpb3J8fCJzbW9vdGgiPT09ZS5iZWhhdmlvcixrPWZ1bmN0aW9uKGUsdCl7bGV0IGw9dHx8e307cmV0dXJuIE0obCk/YyhlLHtibG9jazpsLmJsb2NrLGlubGluZTpsLmlubGluZSxzY3JvbGxNb2RlOmwuc2Nyb2xsTW9kZSxib3VuZGFyeTpsLmJvdW5kYXJ5LHNraXBPdmVyZmxvd0hpZGRlbkVsZW1lbnRzOmwuc2tpcE92ZXJmbG93SGlkZGVuRWxlbWVudHMsYmVoYXZpb3I6ZT0+UHJvbWlzZS5hbGwoZS5yZWR1Y2UoKGUsdCk9PntsZXR7ZWw6byxsZWZ0Om4sdG9wOnJ9PXQsaT1vLnNjcm9sbExlZnQscz1vLnNjcm9sbFRvcDtyZXR1cm4gaT09PW4mJnM9PT1yP2U6Wy4uLmUsbmV3IFByb21pc2UoZT0+eShvLG4scixsLmR1cmF0aW9uLGwuZWFzZSwoKT0+ZSh7ZWw6byxsZWZ0OltpLG5dLHRvcDpbcyxyXX0pLGwub25TY3JvbGxDaGFuZ2UpKV19LFtdKSl9KTpQcm9taXNlLnJlc29sdmUoYyhlLHQpKX07ZXhwb3J0e2sgYXMgZGVmYXVsdH07")

const indent = true
const aside = true
const title_text = "Table of Contents"
const include_definitions = false


const tocNode = html`<nav class="plutoui-toc">
	<header>
	 <span class="toc-toggle open-toc"></span>
	 <span class="toc-toggle closed-toc"></span>
	 ${title_text}
	</header>
	<section></section>
</nav>`

tocNode.classList.toggle("aside", aside)
tocNode.classList.toggle("indent", indent)


const getParentCell = el => el.closest("pluto-cell")

const getHeaders = () => {
	const depth = Math.max(1, Math.min(6, 3)) // should be in range 1:6
	const range = Array.from({length: depth}, (x, i) => i+1) // [1, ..., depth]
	
	const selector = [
		...(include_definitions ? [
			`pluto-notebook pluto-cell .pluto-docs-binding`, 
			`pluto-notebook pluto-cell assignee:not(:empty)`, 
		] : []),
		...range.map(i => `pluto-notebook pluto-cell h${i}`)
	].join(",")
	return Array.from(document.querySelectorAll(selector)).filter(el => 
		// exclude headers inside of a pluto-docs-binding block
		!(el.nodeName.startsWith("H") && el.closest(".pluto-docs-binding"))
	)
}


const document_click_handler = (event) => {
	const path = (event.path || event.composedPath())
	const toc = path.find(elem => elem?.classList?.contains?.("toc-toggle"))
	if (toc) {
		event.stopImmediatePropagation()
		toc.closest(".plutoui-toc").classList.toggle("hide")
	}
}

document.addEventListener("click", document_click_handler)


const header_to_index_entry_map = new Map()
const currently_highlighted_set = new Set()

const last_toc_element_click_time = { current: 0 }

const intersection_callback = (ixs) => {
	let on_top = ixs.filter(ix => ix.intersectionRatio > 0 && ix.intersectionRect.y < ix.rootBounds.height / 2)
	if(on_top.length > 0){
		currently_highlighted_set.forEach(a => a.classList.remove("in-view"))
		currently_highlighted_set.clear()
		on_top.slice(0,1).forEach(i => {
			let div = header_to_index_entry_map.get(i.target)
			div.classList.add("in-view")
			currently_highlighted_set.add(div)
			
			/// scroll into view
			/*
			const toc_height = tocNode.offsetHeight
			const div_pos = div.offsetTop
			const div_height = div.offsetHeight
			const current_scroll = tocNode.scrollTop
			const header_height = tocNode.querySelector("header").offsetHeight
			
			const scroll_to_top = div_pos - header_height
			const scroll_to_bottom = div_pos + div_height - toc_height
			
			// if we set a scrollTop, then the browser will stop any currently ongoing smoothscroll animation. So let's only do this if you are not currently in a smoothscroll.
			if(Date.now() - last_toc_element_click_time.current >= 2000)
				if(current_scroll < scroll_to_bottom){
					tocNode.scrollTop = scroll_to_bottom
				} else if(current_scroll > scroll_to_top){
					tocNode.scrollTop = scroll_to_top
				}
			*/
		})
	}
}
let intersection_observer_1 = new IntersectionObserver(intersection_callback, {
	root: null, // i.e. the viewport
  	threshold: 1,
	rootMargin: "-15px", // slightly smaller than the viewport
	// delay: 100,
})
let intersection_observer_2 = new IntersectionObserver(intersection_callback, {
	root: null, // i.e. the viewport
  	threshold: 1,
	rootMargin: "15px", // slightly larger than the viewport
	// delay: 100,
})

const render = (elements) => {
	header_to_index_entry_map.clear()
	currently_highlighted_set.clear()
	intersection_observer_1.disconnect()
	intersection_observer_2.disconnect()

		let last_level = `H1`
	return html`${elements.map(h => {
	const parent_cell = getParentCell(h)

		let [className, title_el] = h.matches(`.pluto-docs-binding`) ? ["pluto-docs-binding-el", h.firstElementChild] : [h.nodeName, h]

	const a = html`<a 
		class="${className}" 
		title="${title_el.innerText}"
		href="#${parent_cell.id}"
	>${title_el.innerHTML}</a>`
	/* a.onmouseover=()=>{
		parent_cell.firstElementChild.classList.add(
			'highlight-pluto-cell-shoulder'
		)
	}
	a.onmouseout=() => {
		parent_cell.firstElementChild.classList.remove(
			'highlight-pluto-cell-shoulder'
		)
	} */
		
		
	a.onclick=(e) => {
		e.preventDefault();
		last_toc_element_click_time.current = Date.now()
		scrollIntoView(h, {
			behavior: 'smooth', 
			block: 'start',
		}).then(() => 
			// sometimes it doesn't scroll to the right place
			// solution: try a second time!
			scrollIntoView(h, {
				behavior: 'smooth', 
				block: 'start',
			})
	   )
	}

	const row =  html`<div class="toc-row ${className} after-${last_level}">${a}</div>`
		intersection_observer_1.observe(title_el)
		intersection_observer_2.observe(title_el)
		header_to_index_entry_map.set(title_el, row)

	if(className.startsWith("H"))
		last_level = className
		
	return row
})}`
}

const invalidated = { current: false }

const updateCallback = () => {
	if (!invalidated.current) {
		tocNode.querySelector("section").replaceWith(
			html`<section>${render(getHeaders())}</section>`
		)
	}
}
updateCallback()
setTimeout(updateCallback, 100)
setTimeout(updateCallback, 1000)
setTimeout(updateCallback, 5000)

const notebook = document.querySelector("pluto-notebook")


// We have a mutationobserver for each cell:
const mut_observers = {
	current: [],
}

const createCellObservers = () => {
	mut_observers.current.forEach((o) => o.disconnect())
	mut_observers.current = Array.from(notebook.querySelectorAll("pluto-cell")).map(el => {
		const o = new MutationObserver(updateCallback)
		o.observe(el, {attributeFilter: ["class"]})
		return o
	})
}
createCellObservers()

// And one for the notebook's child list, which updates our cell observers:
const notebookObserver = new MutationObserver(() => {
	updateCallback()
	createCellObservers()
})
notebookObserver.observe(notebook, {childList: true})

// And finally, an observer for the document.body classList, to make sure that the toc also works when it is loaded during notebook initialization
const bodyClassObserver = new MutationObserver(updateCallback)
bodyClassObserver.observe(document.body, {attributeFilter: ["class"]})

// Hide/show the ToC when the screen gets small
let match_listener = () => 
	tocNode.classList.toggle("hide", (tocNode.closest("pluto-editor") ?? document.body).scrollWidth < 1000)
for(let s of [1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000]) {
	let m = matchMedia(`(max-width: ${s}px)`)
	m.addListener(match_listener)
	invalidation.then(() => m.removeListener(match_listener))
}
match_listener()

invalidation.then(() => {
	invalidated.current = true
	intersection_observer_1.disconnect()
	intersection_observer_2.disconnect()
	notebookObserver.disconnect()
	bodyClassObserver.disconnect()
	mut_observers.current.forEach((o) => o.disconnect())
	document.removeEventListener("click", document_click_handler)
})

return tocNode
</script>
<style>
@media not print {

.plutoui-toc {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Cantarell, "Apple Color Emoji",
		"Segoe UI Emoji", "Segoe UI Symbol", system-ui, sans-serif;
	--main-bg-color: #fafafa;
	--pluto-output-color: hsl(0, 0%, 36%);
	--pluto-output-h-color: hsl(0, 0%, 21%);
	--sidebar-li-active-bg: rgb(235, 235, 235);
	--icon-filter: unset;
}

@media (prefers-color-scheme: dark) {
	.plutoui-toc {
		--main-bg-color: #303030;
		--pluto-output-color: hsl(0, 0%, 90%);
		--pluto-output-h-color: hsl(0, 0%, 97%);
		--sidebar-li-active-bg: rgb(82, 82, 82);
		--icon-filter: invert(1);
	}
}

.plutoui-toc.aside {
	color: var(--pluto-output-color);
	position: fixed;
	right: 1rem;
	top: 5rem;
	width: min(80vw, 300px);
	padding: 0.5rem;
	padding-top: 0em;
	/* border: 3px solid rgba(0, 0, 0, 0.15); */
	border-radius: 10px;
	/* box-shadow: 0 0 11px 0px #00000010; */
	max-height: calc(100vh - 5rem - 90px);
	overflow: auto;
	z-index: 40;
	background-color: var(--main-bg-color);
	transition: transform 300ms cubic-bezier(0.18, 0.89, 0.45, 1.12);
}

.plutoui-toc.aside.hide {
	transform: translateX(calc(100% - 28px));
}
.plutoui-toc.aside.hide section {
	display: none;
}
.plutoui-toc.aside.hide header {
	margin-bottom: 0em;
	padding-bottom: 0em;
	border-bottom: none;
}
}  /* End of Media print query */
.plutoui-toc.aside.hide .open-toc,
.plutoui-toc.aside:not(.hide) .closed-toc,
.plutoui-toc:not(.aside) .closed-toc {
	display: none;
}

@media (prefers-reduced-motion) {
  .plutoui-toc.aside {
	transition-duration: 0s;
  }
}

.toc-toggle {
	cursor: pointer;
    padding: 1em;
    margin: -1em;
    margin-right: -0.7em;
    line-height: 1em;
    display: flex;
}

.toc-toggle::before {
    content: "";
    display: inline-block;
    height: 1em;
    width: 1em;
    background-image: url("https://cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/list-outline.svg");
	/* generated using https://dopiaza.org/tools/datauri/index.php */
    background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1MTIiIGhlaWdodD0iNTEyIiB2aWV3Qm94PSIwIDAgNTEyIDUxMiI+PHRpdGxlPmlvbmljb25zLXY1LW88L3RpdGxlPjxsaW5lIHgxPSIxNjAiIHkxPSIxNDQiIHgyPSI0NDgiIHkyPSIxNDQiIHN0eWxlPSJmaWxsOm5vbmU7c3Ryb2tlOiMwMDA7c3Ryb2tlLWxpbmVjYXA6cm91bmQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS13aWR0aDozMnB4Ii8+PGxpbmUgeDE9IjE2MCIgeTE9IjI1NiIgeDI9IjQ0OCIgeTI9IjI1NiIgc3R5bGU9ImZpbGw6bm9uZTtzdHJva2U6IzAwMDtzdHJva2UtbGluZWNhcDpyb3VuZDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLXdpZHRoOjMycHgiLz48bGluZSB4MT0iMTYwIiB5MT0iMzY4IiB4Mj0iNDQ4IiB5Mj0iMzY4IiBzdHlsZT0iZmlsbDpub25lO3N0cm9rZTojMDAwO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2Utd2lkdGg6MzJweCIvPjxjaXJjbGUgY3g9IjgwIiBjeT0iMTQ0IiByPSIxNiIgc3R5bGU9ImZpbGw6bm9uZTtzdHJva2U6IzAwMDtzdHJva2UtbGluZWNhcDpyb3VuZDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLXdpZHRoOjMycHgiLz48Y2lyY2xlIGN4PSI4MCIgY3k9IjI1NiIgcj0iMTYiIHN0eWxlPSJmaWxsOm5vbmU7c3Ryb2tlOiMwMDA7c3Ryb2tlLWxpbmVjYXA6cm91bmQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS13aWR0aDozMnB4Ii8+PGNpcmNsZSBjeD0iODAiIGN5PSIzNjgiIHI9IjE2IiBzdHlsZT0iZmlsbDpub25lO3N0cm9rZTojMDAwO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2Utd2lkdGg6MzJweCIvPjwvc3ZnPg==");
    background-size: 1em;
	filter: var(--icon-filter);
}

.aside .toc-toggle.open-toc:hover::before {
    background-image: url("https://cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/arrow-forward-outline.svg");
	/* generated using https://dopiaza.org/tools/datauri/index.php */
    background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1MTIiIGhlaWdodD0iNTEyIiB2aWV3Qm94PSIwIDAgNTEyIDUxMiI+PHRpdGxlPmlvbmljb25zLXY1LWE8L3RpdGxlPjxwb2x5bGluZSBwb2ludHM9IjI2OCAxMTIgNDEyIDI1NiAyNjggNDAwIiBzdHlsZT0iZmlsbDpub25lO3N0cm9rZTojMDAwO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2Utd2lkdGg6NDhweCIvPjxsaW5lIHgxPSIzOTIiIHkxPSIyNTYiIHgyPSIxMDAiIHkyPSIyNTYiIHN0eWxlPSJmaWxsOm5vbmU7c3Ryb2tlOiMwMDA7c3Ryb2tlLWxpbmVjYXA6cm91bmQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS13aWR0aDo0OHB4Ii8+PC9zdmc+");
}
.aside .toc-toggle.closed-toc:hover::before {
    background-image: url("https://cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/arrow-back-outline.svg");
	/* generated using https://dopiaza.org/tools/datauri/index.php */
    background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1MTIiIGhlaWdodD0iNTEyIiB2aWV3Qm94PSIwIDAgNTEyIDUxMiI+PHRpdGxlPmlvbmljb25zLXY1LWE8L3RpdGxlPjxwb2x5bGluZSBwb2ludHM9IjI0NCA0MDAgMTAwIDI1NiAyNDQgMTEyIiBzdHlsZT0iZmlsbDpub25lO3N0cm9rZTojMDAwO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2Utd2lkdGg6NDhweCIvPjxsaW5lIHgxPSIxMjAiIHkxPSIyNTYiIHgyPSI0MTIiIHkyPSIyNTYiIHN0eWxlPSJmaWxsOm5vbmU7c3Ryb2tlOiMwMDA7c3Ryb2tlLWxpbmVjYXA6cm91bmQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS13aWR0aDo0OHB4Ii8+PC9zdmc+");
}



.plutoui-toc header {
	display: flex;
	align-items: center;
	gap: .3em;
	font-size: 1.5em;
	/* margin-top: -0.1em; */
	margin-bottom: 0.4em;
	padding: 0.5rem;
	margin-left: 0;
	margin-right: 0;
	font-weight: bold;
	/* border-bottom: 2px solid rgba(0, 0, 0, 0.15); */
	position: sticky;
	top: 0px;
	background: var(--main-bg-color);
	z-index: 41;
}
.plutoui-toc.aside header {
	padding-left: 0;
	padding-right: 0;
}

.plutoui-toc section .toc-row {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	padding: .1em;
	border-radius: .2em;
}

.plutoui-toc section .toc-row.H1 {
	margin-top: 1em;
}


.plutoui-toc.aside section .toc-row.in-view {
	background: var(--sidebar-li-active-bg);
}


	
.highlight-pluto-cell-shoulder {
	background: rgba(0, 0, 0, 0.05);
	background-clip: padding-box;
}

.plutoui-toc section a {
	text-decoration: none;
	font-weight: normal;
	color: var(--pluto-output-color);
}
.plutoui-toc section a:hover {
	color: var(--pluto-output-h-color);
}

.plutoui-toc.indent section a.H1 {
	font-weight: 700;
	line-height: 1em;
}

.plutoui-toc.indent section .after-H2 a { padding-left: 10px; }
.plutoui-toc.indent section .after-H3 a { padding-left: 20px; }
.plutoui-toc.indent section .after-H4 a { padding-left: 30px; }
.plutoui-toc.indent section .after-H5 a { padding-left: 40px; }
.plutoui-toc.indent section .after-H6 a { padding-left: 50px; }

.plutoui-toc.indent section a.H1 { padding-left: 0px; }
.plutoui-toc.indent section a.H2 { padding-left: 10px; }
.plutoui-toc.indent section a.H3 { padding-left: 20px; }
.plutoui-toc.indent section a.H4 { padding-left: 30px; }
.plutoui-toc.indent section a.H5 { padding-left: 40px; }
.plutoui-toc.indent section a.H6 { padding-left: 50px; }


.plutoui-toc.indent section a.pluto-docs-binding-el,
.plutoui-toc.indent section a.ASSIGNEE
	{
	font-family: JuliaMono, monospace;
	font-size: .8em;
	/* background: black; */
	font-weight: 700;
    font-style: italic;
	color: var(--cm-var-color); /* this is stealing a variable from Pluto, but it's fine if that doesnt work */
}
.plutoui-toc.indent section a.pluto-docs-binding-el::before,
.plutoui-toc.indent section a.ASSIGNEE::before
	{
	content: "> ";
	opacity: .3;
}
</style>
¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9q±wS°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$57a8108f-9ad3-4cc2-9372-bb291fc3bf86¹depends_on_disabled_cellsÂ§runtimeÍ/µpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$50b34968-a45f-4c5b-a83d-7a5b47740007Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyÚ’<div class="markdown"><h4 id="Applying-the-update-step">Applying the update step</h4>
<p>The actual update step is handled automatically by Optimisers.jl. After implementing the &quot;internal&quot; functions <code>init</code> and <code>apply&#33;</code> to define a custom optimizer, we can use the &quot;public&quot; API:</p>
<ul>
<li><p><code>Optimisers.setup</code>: calls <code>init</code> to set up the optimizer</p>
</li>
<li><p><code>Optimisers.update</code>: calls <code>apply&#33;</code> to compute <code>new_grad</code> and <code>next_state</code> and performs the update step <code>params_new &#61; params - new_grad</code></p>
</li>
</ul>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9fÀñ$°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$50b34968-a45f-4c5b-a83d-7a5b47740007¹depends_on_disabled_cellsÂ§runtimeÎ 
	µpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$06c0ad65-22d4-4c8e-ae19-4f05ba125e79Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyÙ·<div class="markdown"><h3 id="Initializing-packages">Initializing packages</h3>
<p><strong>Note:</strong> Running this notebook for the first time can take several minutes.</p>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9f³§Ò°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$06c0ad65-22d4-4c8e-ae19-4f05ba125e79¹depends_on_disabled_cellsÂ§runtimeÎ  µpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$dcbf8963-4a5c-4e7d-81a9-3dce27fb3117Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyÚj<div class="markdown"><p>Let&#39;s check whether the transformed data has <span class="tex">$\mu&#39;&#61;0$</span> and <span class="tex">$\sigma&#39;&#61;1$</span>.</p>
<p>Note that due to <a href="https://en.wikipedia.org/wiki/Machine_epsilon">rounding errors</a> arising from floating point arithmetic, the results will not be exactly zero and one:</p>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9f¾°î°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$dcbf8963-4a5c-4e7d-81a9-3dce27fb3117¹depends_on_disabled_cellsÂ§runtimeÎ ·|µpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$5762be30-3084-4eda-9642-19dc9d4dcb10Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyÙÅ<div class="markdown"><div class="admonition danger"><p class="admonition-title">Keep working on it!</p><p>Make sure that you define a struct called <code>GradientDescent</code>.</p>

</div>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9rBê°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$5762be30-3084-4eda-9642-19dc9d4dcb10¹depends_on_disabled_cellsÂ§runtimeÎ n,}µpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$39063d08-d687-45a2-8367-734b12dcefeaŠ¦queuedÂ¤logs�§runningÂ¦output†¤bodyÙÁ<div class="markdown"><div class="admonition danger"><p class="admonition-title">Keep working on it!</p><p>Make sure that you define a struct called <code>Standardize</code>.</p>

</div>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9r:éæ°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$39063d08-d687-45a2-8367-734b12dcefea¹depends_on_disabled_cellsÂ§runtimeÎ é4µpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$582cf667-b85b-4a7d-bb17-88d4776fc240Š¦queuedÂ¤logs�§runningÂ¦output†¤body ¤mimeªtext/plain¬rootassigneeÀ²last_run_timestampËAÚ;9pùRß°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$582cf667-b85b-4a7d-bb17-88d4776fc240¹depends_on_disabled_cellsÂ§runtimeÎ ÓÊ,µpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$d03e4e95-faab-4ab3-ab27-81189cbd8231Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyƒ¨elements“’¤name’±"Mara Mustermann"ªtext/plain’¥email’Ù""m.mustermann@campus.tu-berlin.de"ªtext/plain’¢id’¦456123ªtext/plain¤typeªNamedTuple¨objectid°8ccd0da495edb27b¤mimeÙ!application/vnd.pluto.tree+object¬rootassignee§student²last_run_timestampËAÚ;9q&=2°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$d03e4e95-faab-4ab3-ab27-81189cbd8231¹depends_on_disabled_cellsÂ§runtimeÍBÎµpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂÙ$e0705a25-a01e-43a8-8c1d-ccf0da22fca7Š¦queuedÂ¤logs�§runningÂ¦output†¤bodyÚ<div class="markdown"><h4 id="Updating-the-optimizer">Updating the optimizer</h4>
<p>The function <code>apply&#33;</code> is can do two things before the final update step is applied:</p>
<ol>
<li><p>it can modify the gradient</p>
</li>
<li><p>it can update the optimizer state</p>
</li>
</ol>
<pre><code class="language-julia">function Optimisers.apply&#33;&#40;alg::MyOptimiser, state, params, grad&#41;
  grad_new &#61; ... # some computation
  state_new &#61; ... # some computation
  return state_new, grad_new
end</code></pre>
</div>¤mime©text/html¬rootassigneeÀ²last_run_timestampËAÚ;9fÀÑÝ°persist_js_stateÂ·has_pluto_hook_featuresÂ§cell_idÙ$e0705a25-a01e-43a8-8c1d-ccf0da22fca7¹depends_on_disabled_cellsÂ§runtimeÎ °¹µpublished_object_keys�¸depends_on_skipped_cellsÂ§erroredÂ±cell_dependenciesÞ OÙ$cf264b86-d86f-4c4a-af3b-03b34486e5ff„´precedence_heuristic	§cell_idÙ$cf264b86-d86f-4c4a-af3b-03b34486e5ff´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$ac1355a2-db94-4954-ad65-6887b7dbb7ad„´precedence_heuristic	§cell_idÙ$ac1355a2-db94-4954-ad65-6887b7dbb7ad´downstream_cells_map€²upstream_cells_map‚°transformed_data‘Ù$f83196a4-a0fd-44a3-b3d1-29730599830d£std�Ù$3a100e93-7bba-4836-a4e6-e285aa6406c4„´precedence_heuristic	§cell_idÙ$3a100e93-7bba-4836-a4e6-e285aa6406c4´downstream_cells_map�©test_data”Ù$cf3c52c7-fc5e-4191-be9d-394660385801Ù$f83196a4-a0fd-44a3-b3d1-29730599830dÙ$a191392f-eb62-459d-8554-901d9db29950Ù$78fcd02f-1a6e-4799-b042-4542a1ec7847²upstream_cells_map€Ù$80c5a262-e758-4075-896f-a0bc7ce1534c„´precedence_heuristic	§cell_idÙ$80c5a262-e758-4075-896f-a0bc7ce1534c´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$8b519a7d-b64f-4c0c-8d74-17a963cb381d„´precedence_heuristic	§cell_idÙ$8b519a7d-b64f-4c0c-8d74-17a963cb381d´downstream_cells_map€²upstream_cells_mapƒ§@md_str�£tip�¨getindex�Ù$0fbd2560-1e4c-45b7-89a6-d2b622f9f907„´precedence_heuristic	§cell_idÙ$0fbd2560-1e4c-45b7-89a6-d2b622f9f907´downstream_cells_map�±plot_loss_surface’Ù$cd7c244d-8a4c-4aaf-ad4b-891744e004beÙ$a3634333-1149-4392-a7e9-350a56d67d2b²upstream_cells_map„¢P2‘Ù$3b65f124-75c2-4fb3-8b59-94015500acbf¢P1‘Ù$3b65f124-75c2-4fb3-8b59-94015500acbf¤loss‘Ù$3bb76227-82cd-4924-bfb3-1b8504e2dc44§contour�Ù$ff5d316f-806c-4652-97d8-323462395c69„´precedence_heuristic	§cell_idÙ$ff5d316f-806c-4652-97d8-323462395c69´downstream_cells_map€²upstream_cells_mapƒ§@md_str�§student‘Ù$d03e4e95-faab-4ab3-ab27-81189cbd8231¨getindex�Ù$e5e014e6-e24d-4de0-a216-61c0f9d9c331„´precedence_heuristic	§cell_idÙ$e5e014e6-e24d-4de0-a216-61c0f9d9c331´downstream_cells_map€²upstream_cells_map‚¦typeof�¢dt‘Ù$cf3c52c7-fc5e-4191-be9d-394660385801Ù$02a62f7b-6014-439a-a254-49f53f204abb„´precedence_heuristic	§cell_idÙ$02a62f7b-6014-439a-a254-49f53f204abb´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$bcdd297b-c52c-4076-9329-929d69b8021b„´precedence_heuristic	§cell_idÙ$bcdd297b-c52c-4076-9329-929d69b8021b´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$3f81ccce-5744-42ba-aa1e-b3da6212b9ef„´precedence_heuristic	§cell_idÙ$3f81ccce-5744-42ba-aa1e-b3da6212b9ef´downstream_cells_map€²upstream_cells_map‚ªoptimizers‘Ù$ed873ea2-d4bd-46e7-b89b-4e5494b606e6¯plot_trajectory‘Ù$a3634333-1149-4392-a7e9-350a56d67d2bÙ$a3634333-1149-4392-a7e9-350a56d67d2b„´precedence_heuristic	§cell_idÙ$a3634333-1149-4392-a7e9-350a56d67d2b´downstream_cells_map�¯plot_trajectory‘Ù$3f81ccce-5744-42ba-aa1e-b3da6212b9ef²upstream_cells_map‹¡:�¯Zygote.gradient�±Optimisers.update�ªOptimisers‘Ù$582cf667-b85b-4a7d-bb17-88d4776fc240¤loss‘Ù$3bb76227-82cd-4924-bfb3-1b8504e2dc44§similar�¦Zygote‘Ù$755b8685-0711-48a2-a3eb-f80af39f10e1±plot_loss_surface‘Ù$0fbd2560-1e4c-45b7-89a6-d2b622f9f907°Optimisers.setup�¡+�¥plot!�Ù$be2c5285-fbd8-4c37-8b17-db6db95c8a4e„´precedence_heuristic	§cell_idÙ$be2c5285-fbd8-4c37-8b17-db6db95c8a4e´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¤task‘Ù$5061a130-fc0a-4306-bdf5-6966e8de938a¨getindex�Ù$ef9a0669-2d02-4f1b-aa99-6f6473d37c0f„´precedence_heuristic	§cell_idÙ$ef9a0669-2d02-4f1b-aa99-6f6473d37c0f´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¤task‘Ù$5061a130-fc0a-4306-bdf5-6966e8de938a¨getindex�Ù$aaea0bbf-868d-4fe0-b348-307449d06517„´precedence_heuristic	§cell_idÙ$aaea0bbf-868d-4fe0-b348-307449d06517´downstream_cells_map€²upstream_cells_map€Ù$c080e799-b5c5-42cf-b5f1-8c36da89fc8f„´precedence_heuristic	§cell_idÙ$c080e799-b5c5-42cf-b5f1-8c36da89fc8f´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$569173af-9e54-49cb-b1cb-88b8cbda57a6„´precedence_heuristic	§cell_idÙ$569173af-9e54-49cb-b1cb-88b8cbda57a6´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$f60be2e0-9b43-46b5-96ef-7747ab56e164„´precedence_heuristic	§cell_idÙ$f60be2e0-9b43-46b5-96ef-7747ab56e164´downstream_cells_map�¨feedback�²upstream_cells_map€Ù$dc35d701-ab40-4933-b4c5-35a81b3f834a„´precedence_heuristic	§cell_idÙ$dc35d701-ab40-4933-b4c5-35a81b3f834a´downstream_cells_map�£lr1‘Ù$ed873ea2-d4bd-46e7-b89b-4e5494b606e6²upstream_cells_map‰¤Core�¤Base�¡:�·PlutoRunner.create_bond�«PlutoRunner�¯Core.applicable�¥@bind�¨Base.get�¦Slider�Ù$a96abf48-cacf-41f8-bb7a-3d085bdb0a62„´precedence_heuristic	§cell_idÙ$a96abf48-cacf-41f8-bb7a-3d085bdb0a62´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$58a671a1-3059-4fa9-b758-f3a76a573aa5„´precedence_heuristic	§cell_idÙ$58a671a1-3059-4fa9-b758-f3a76a573aa5´downstream_cells_map€²upstream_cells_map€Ù$4eac0e3f-7212-4038-a24e-8d6ca3fbe659„´precedence_heuristic	§cell_idÙ$4eac0e3f-7212-4038-a24e-8d6ca3fbe659´downstream_cells_map€²upstream_cells_mapÞ §@md_str�­Base.getindex�£â‰ˆ�§Nothing�¡!�¥Tuple�©hasmethod�ª@isdefined�§Float64�©ismissing�¯GradientDescent�ªOptimisers‘Ù$582cf667-b85b-4a7d-bb17-88d4776fc240§nothing�­still_missing�¦Vector�¤Base�§correct�¬keep_working�±Optimisers.apply!�©isnothing�Ù$3d638561-6760-4260-991a-b0b0c77745a3„´precedence_heuristic§cell_idÙ$3d638561-6760-4260-991a-b0b0c77745a3´downstream_cells_map�ªStatistics�²upstream_cells_map€Ù$17ff11e9-84f8-4911-845b-930a53c73e0e„´precedence_heuristic	§cell_idÙ$17ff11e9-84f8-4911-845b-930a53c73e0e´downstream_cells_map€²upstream_cells_map�¢dt‘Ù$cf3c52c7-fc5e-4191-be9d-394660385801Ù$3ac8faba-1af9-4fc6-a1d0-37225b9ebb02„´precedence_heuristic	§cell_idÙ$3ac8faba-1af9-4fc6-a1d0-37225b9ebb02´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$bb0d58f9-380e-43fa-9524-0108a2816884„´precedence_heuristic	§cell_idÙ$bb0d58f9-380e-43fa-9524-0108a2816884´downstream_cells_map�©transform“Ù$f83196a4-a0fd-44a3-b3d1-29730599830dÙ$39063d08-d687-45a2-8367-734b12dcefeaÙ$7de85c6f-996a-4d5b-8236-271922aeb908²upstream_cells_map‚§missing�«Standardize�Ù$5061a130-fc0a-4306-bdf5-6966e8de938a„´precedence_heuristic	§cell_idÙ$5061a130-fc0a-4306-bdf5-6966e8de938a´downstream_cells_map‚¤task–Ù$8ece9aea-20f5-41db-95ca-08c8d4d2d4c1Ù$2258b8c6-e8b7-4c06-9ece-53b254db6a2cÙ$be2c5285-fbd8-4c37-8b17-db6db95c8a4eÙ$ef9a0669-2d02-4f1b-aa99-6f6473d37c0fÙ$b0d679ba-13f8-4e70-ac42-68acb2ff83d1Ù$bebbf87b-cd7b-43d7-8025-938fc4c6944d¨md_parse�²upstream_cells_map†®Markdown.parse�³Markdown.Admonition�«Markdown.MD�¡*�¨Markdown�¢==�Ù$ddd6e83e-5a0d-4ff0-afe4-dedfc860994c„´precedence_heuristic	§cell_idÙ$ddd6e83e-5a0d-4ff0-afe4-dedfc860994c´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$f9192279-9d12-485e-bb9d-650be2dbd878„´precedence_heuristic	§cell_idÙ$f9192279-9d12-485e-bb9d-650be2dbd878´downstream_cells_map�£lr2‘Ù$ed873ea2-d4bd-46e7-b89b-4e5494b606e6²upstream_cells_map‰¤Core�¤Base�¡:�·PlutoRunner.create_bond�«PlutoRunner�¯Core.applicable�¥@bind�¨Base.get�¦Slider�Ù$78fcd02f-1a6e-4799-b042-4542a1ec7847„´precedence_heuristic	§cell_idÙ$78fcd02f-1a6e-4799-b042-4542a1ec7847´downstream_cells_map€²upstream_cells_mapƒ©test_data‘Ù$3a100e93-7bba-4836-a4e6-e285aa6406c4´plot_standardization‘Ù$7de85c6f-996a-4d5b-8236-271922aeb908¢dt‘Ù$cf3c52c7-fc5e-4191-be9d-394660385801Ù$2341dd4a-a35a-4a62-815a-e972d04844ab„´precedence_heuristic	§cell_idÙ$2341dd4a-a35a-4a62-815a-e972d04844ab´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$d36914f8-f7d4-407a-a842-436f4035157b„´precedence_heuristic	§cell_idÙ$d36914f8-f7d4-407a-a842-436f4035157b´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$3b65f124-75c2-4fb3-8b59-94015500acbf„´precedence_heuristic	§cell_idÙ$3b65f124-75c2-4fb3-8b59-94015500acbf´downstream_cells_map‚¢P2‘Ù$0fbd2560-1e4c-45b7-89a6-d2b622f9f907¢P1‘Ù$0fbd2560-1e4c-45b7-89a6-d2b622f9f907²upstream_cells_map�¥range�Ù$755b8685-0711-48a2-a3eb-f80af39f10e1„´precedence_heuristic§cell_idÙ$755b8685-0711-48a2-a3eb-f80af39f10e1´downstream_cells_map‡¦Zygote‘Ù$a3634333-1149-4392-a7e9-350a56d67d2b­PlotlyKaleido�§PlutoUI�¥Plots�ªPlotlyBase�¬LaTeXStrings�²PlutoTeachingTools�²upstream_cells_map�¦plotly�Ù$3bb76227-82cd-4924-bfb3-1b8504e2dc44„´precedence_heuristic	§cell_idÙ$3bb76227-82cd-4924-bfb3-1b8504e2dc44´downstream_cells_map�¤loss’Ù$0fbd2560-1e4c-45b7-89a6-d2b622f9f907Ù$a3634333-1149-4392-a7e9-350a56d67d2b²upstream_cells_map„¡-�¡^�¡+�¡*�Ù$5dc7d04d-f6a5-4265-b890-d74ea4b3c602„´precedence_heuristic	§cell_idÙ$5dc7d04d-f6a5-4265-b890-d74ea4b3c602´downstream_cells_map€²upstream_cells_map€Ù$fd30da51-0890-4ebe-8b14-8975ec12fec0„´precedence_heuristic	§cell_idÙ$fd30da51-0890-4ebe-8b14-8975ec12fec0´downstream_cells_map€²upstream_cells_mapÞ §@md_str�­Base.getindex�£â‰ˆ�¡!�¥Tuple�©hasmethod�ª@isdefined�©ismissing�­still_missing�¦Vector�¤Base�§correct�¬keep_working�£Int�«Standardize�©isnothing�Ù$8ece9aea-20f5-41db-95ca-08c8d4d2d4c1„´precedence_heuristic	§cell_idÙ$8ece9aea-20f5-41db-95ca-08c8d4d2d4c1´downstream_cells_map€²upstream_cells_map�¤task‘Ù$5061a130-fc0a-4306-bdf5-6966e8de938aÙ$b0d679ba-13f8-4e70-ac42-68acb2ff83d1„´precedence_heuristic	§cell_idÙ$b0d679ba-13f8-4e70-ac42-68acb2ff83d1´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¤task‘Ù$5061a130-fc0a-4306-bdf5-6966e8de938a¨getindex�Ù$f83196a4-a0fd-44a3-b3d1-29730599830d„´precedence_heuristic	§cell_idÙ$f83196a4-a0fd-44a3-b3d1-29730599830d´downstream_cells_map�°transformed_data“Ù$2cd9cef0-d746-411a-861f-b8a035f4a1d3Ù$ac1355a2-db94-4954-ad65-6887b7dbb7adÙ$a191392f-eb62-459d-8554-901d9db29950²upstream_cells_mapƒ©test_data‘Ù$3a100e93-7bba-4836-a4e6-e285aa6406c4¢dt‘Ù$cf3c52c7-fc5e-4191-be9d-394660385801©transform‘Ù$bb0d58f9-380e-43fa-9524-0108a2816884Ù$6d5bf1e5-5ab0-4351-89d0-ddb6fcfa27b6„´precedence_heuristic	§cell_idÙ$6d5bf1e5-5ab0-4351-89d0-ddb6fcfa27b6´downstream_cells_map€²upstream_cells_map�§@md_str�­Base.getindex�£â‰ˆ�¡!�¥Tuple�©hasmethod�ª@isdefined�§Float64�¯GradientDescent�¤Base�§correct�¬keep_working�¨hasfield�Ù$822d03c6-48f8-47b0-8f25-b2de45e4c589„´precedence_heuristic	§cell_idÙ$822d03c6-48f8-47b0-8f25-b2de45e4c589´downstream_cells_map€²upstream_cells_map…§@md_str�³Markdown.Admonition�«Markdown.MD�¨Markdown�¨getindex�Ù$bebbf87b-cd7b-43d7-8025-938fc4c6944d„´precedence_heuristic	§cell_idÙ$bebbf87b-cd7b-43d7-8025-938fc4c6944d´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¤task‘Ù$5061a130-fc0a-4306-bdf5-6966e8de938a¨getindex�Ù$c2adc38f-84e3-486f-93d8-b88eea63a09b„´precedence_heuristic	§cell_idÙ$c2adc38f-84e3-486f-93d8-b88eea63a09b´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$5370c50b-a9b8-41dc-8cfe-1f0389df97c3„´precedence_heuristic	§cell_idÙ$5370c50b-a9b8-41dc-8cfe-1f0389df97c3´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$32e8ee04-4378-4377-ae47-b65e5ce70667„´precedence_heuristic	§cell_idÙ$32e8ee04-4378-4377-ae47-b65e5ce70667´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$befba318-8595-4fc4-b42e-9c9125e7abfb„´precedence_heuristic	§cell_idÙ$befba318-8595-4fc4-b42e-9c9125e7abfb´downstream_cells_map€²upstream_cells_mapƒ§@md_str�£tip�¨getindex�Ù$d5052369-0b47-42e7-b661-058c7365c032„´precedence_heuristic	§cell_idÙ$d5052369-0b47-42e7-b661-058c7365c032´downstream_cells_map€²upstream_cells_mapƒ§@md_str�£tip�¨getindex�Ù$cf3c52c7-fc5e-4191-be9d-394660385801„´precedence_heuristic	§cell_idÙ$cf3c52c7-fc5e-4191-be9d-394660385801´downstream_cells_map�¢dt–Ù$e5e014e6-e24d-4de0-a216-61c0f9d9c331Ù$17ff11e9-84f8-4911-845b-930a53c73e0eÙ$955a9751-38d0-4327-9a95-a0523c2d54b8Ù$f83196a4-a0fd-44a3-b3d1-29730599830dÙ$a191392f-eb62-459d-8554-901d9db29950Ù$78fcd02f-1a6e-4799-b042-4542a1ec7847²upstream_cells_map‚©test_data‘Ù$3a100e93-7bba-4836-a4e6-e285aa6406c4«Standardize�Ù$2cd9cef0-d746-411a-861f-b8a035f4a1d3„´precedence_heuristic	§cell_idÙ$2cd9cef0-d746-411a-861f-b8a035f4a1d3´downstream_cells_map€²upstream_cells_map‚°transformed_data‘Ù$f83196a4-a0fd-44a3-b3d1-29730599830d¤mean�Ù$d15eb189-6e4d-4c70-a1cb-159e6a4eb8eb„´precedence_heuristic	§cell_idÙ$d15eb189-6e4d-4c70-a1cb-159e6a4eb8eb´downstream_cells_map€²upstream_cells_mapƒ§@md_str�£tip�¨getindex�Ù$955a9751-38d0-4327-9a95-a0523c2d54b8„´precedence_heuristic	§cell_idÙ$955a9751-38d0-4327-9a95-a0523c2d54b8´downstream_cells_map€²upstream_cells_map�¢dt‘Ù$cf3c52c7-fc5e-4191-be9d-394660385801Ù$62a1289b-ce6a-444d-8b20-92bd4fa3d05d„´precedence_heuristic	§cell_idÙ$62a1289b-ce6a-444d-8b20-92bd4fa3d05d´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$221fd504-4cd6-4bab-b2a5-a590fff26a52„´precedence_heuristic	§cell_idÙ$221fd504-4cd6-4bab-b2a5-a590fff26a52´downstream_cells_map�±inverse_transform’Ù$a191392f-eb62-459d-8554-901d9db29950Ù$39063d08-d687-45a2-8367-734b12dcefea²upstream_cells_map‚§missing�«Standardize�Ù$a191392f-eb62-459d-8554-901d9db29950„´precedence_heuristic	§cell_idÙ$a191392f-eb62-459d-8554-901d9db29950´downstream_cells_map€²upstream_cells_map…£â‰ˆ�©test_data‘Ù$3a100e93-7bba-4836-a4e6-e285aa6406c4±inverse_transform‘Ù$221fd504-4cd6-4bab-b2a5-a590fff26a52°transformed_data‘Ù$f83196a4-a0fd-44a3-b3d1-29730599830d¢dt‘Ù$cf3c52c7-fc5e-4191-be9d-394660385801Ù$67d7c60c-1c5e-4760-a9e1-4538e2ccc10e„´precedence_heuristic	§cell_idÙ$67d7c60c-1c5e-4760-a9e1-4538e2ccc10e´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$d16b1a65-5da9-46ac-b0b8-59e55ced37f3„´precedence_heuristic	§cell_idÙ$d16b1a65-5da9-46ac-b0b8-59e55ced37f3´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$7de85c6f-996a-4d5b-8236-271922aeb908„´precedence_heuristic	§cell_idÙ$7de85c6f-996a-4d5b-8236-271922aeb908´downstream_cells_map�´plot_standardization‘Ù$78fcd02f-1a6e-4799-b042-4542a1ec7847²upstream_cells_mapŠ©histogram�£exp�ªhistogram!�¡/�¡^�¢Ï€�¥plot!�¡*�«Standardize�©transform‘Ù$bb0d58f9-380e-43fa-9524-0108a2816884Ù$edb7814a-eddf-4c87-8857-19bb0a0c0241„´precedence_heuristic	§cell_idÙ$edb7814a-eddf-4c87-8857-19bb0a0c0241´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$2258b8c6-e8b7-4c06-9ece-53b254db6a2c„´precedence_heuristic	§cell_idÙ$2258b8c6-e8b7-4c06-9ece-53b254db6a2c´downstream_cells_map€²upstream_cells_mapƒ§@md_str�¤task‘Ù$5061a130-fc0a-4306-bdf5-6966e8de938a¨getindex�Ù$8e8d9f57-0f04-4a91-b69f-273fe1fafd61„´precedence_heuristic	§cell_idÙ$8e8d9f57-0f04-4a91-b69f-273fe1fafd61´downstream_cells_map€²upstream_cells_mapƒ¤Base�®Base.Docs.HTML�©@html_str�Ù$f7347c06-c1b7-11ed-3b8e-fbf167ce9cba„´precedence_heuristic	§cell_idÙ$f7347c06-c1b7-11ed-3b8e-fbf167ce9cba´downstream_cells_map€²upstream_cells_mapƒ¤Base�®Base.Docs.HTML�©@html_str�Ù$c322fd53-78db-40ae-b7ba-612200ab6617„´precedence_heuristic	§cell_idÙ$c322fd53-78db-40ae-b7ba-612200ab6617´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$dc4f7f55-dde5-4ee6-b43d-7f64269b55d1„´precedence_heuristic	§cell_idÙ$dc4f7f55-dde5-4ee6-b43d-7f64269b55d1´downstream_cells_map€²upstream_cells_map€Ù$cd7c244d-8a4c-4aaf-ad4b-891744e004be„´precedence_heuristic	§cell_idÙ$cd7c244d-8a4c-4aaf-ad4b-891744e004be´downstream_cells_map€²upstream_cells_map�±plot_loss_surface‘Ù$0fbd2560-1e4c-45b7-89a6-d2b622f9f907Ù$ed873ea2-d4bd-46e7-b89b-4e5494b606e6„´precedence_heuristic	§cell_idÙ$ed873ea2-d4bd-46e7-b89b-4e5494b606e6´downstream_cells_map�ªoptimizers‘Ù$3f81ccce-5744-42ba-aa1e-b3da6212b9ef²upstream_cells_map‡¤Dict�¤ADAM�¯GradientDescent�¨Momentum�¢=>�£lr1‘Ù$dc35d701-ab40-4933-b4c5-35a81b3f834a£lr2‘Ù$f9192279-9d12-485e-bb9d-650be2dbd878Ù$b3832fb6-dd19-4b38-8117-b0a11d1bc34f„´precedence_heuristic	§cell_idÙ$b3832fb6-dd19-4b38-8117-b0a11d1bc34f´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$bdcb27c5-0603-49ac-b831-d78c558b31f0„´precedence_heuristic	§cell_idÙ$bdcb27c5-0603-49ac-b831-d78c558b31f0´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$33866006-11d7-46cc-870b-fec519a2b541„´precedence_heuristic	§cell_idÙ$33866006-11d7-46cc-870b-fec519a2b541´downstream_cells_map€²upstream_cells_mapƒ§@md_str�£tip�¨getindex�Ù$44ec9e94-f6af-431e-8841-bae44431dfa3„´precedence_heuristic	§cell_idÙ$44ec9e94-f6af-431e-8841-bae44431dfa3´downstream_cells_map€²upstream_cells_map‰§@md_str�£isa�§correct�­still_missing�¡!�§student‘Ù$d03e4e95-faab-4ab3-ab27-81189cbd8231¢==�¦Number�¨getindex�Ù$57a8108f-9ad3-4cc2-9372-bb291fc3bf86„´precedence_heuristic	§cell_idÙ$57a8108f-9ad3-4cc2-9372-bb291fc3bf86´downstream_cells_map€²upstream_cells_map�¯TableOfContents�Ù$50b34968-a45f-4c5b-a83d-7a5b47740007„´precedence_heuristic	§cell_idÙ$50b34968-a45f-4c5b-a83d-7a5b47740007´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$06c0ad65-22d4-4c8e-ae19-4f05ba125e79„´precedence_heuristic	§cell_idÙ$06c0ad65-22d4-4c8e-ae19-4f05ba125e79´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$dcbf8963-4a5c-4e7d-81a9-3dce27fb3117„´precedence_heuristic	§cell_idÙ$dcbf8963-4a5c-4e7d-81a9-3dce27fb3117´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�Ù$5762be30-3084-4eda-9642-19dc9d4dcb10„´precedence_heuristic	§cell_idÙ$5762be30-3084-4eda-9642-19dc9d4dcb10´downstream_cells_map€²upstream_cells_map�§@md_str�­Base.getindex�¡!�¥Tuple�©hasmethod�ª@isdefined�¯Optimisers.init�§Float64�¯GradientDescent�ªOptimisers‘Ù$582cf667-b85b-4a7d-bb17-88d4776fc240¦Vector�¤Base�§correct�¬keep_working�©isnothing�Ù$39063d08-d687-45a2-8367-734b12dcefea„´precedence_heuristic	§cell_idÙ$39063d08-d687-45a2-8367-734b12dcefea´downstream_cells_map€²upstream_cells_map�§@md_str�­Base.getindex�±inverse_transform‘Ù$221fd504-4cd6-4bab-b2a5-a590fff26a52£â‰ˆ�¡!�ª@isdefined�©ismissing�­still_missing�¤Base�§correct�¬keep_working�«not_defined�«Standardize�©transform‘Ù$bb0d58f9-380e-43fa-9524-0108a2816884©isnothing�Ù$582cf667-b85b-4a7d-bb17-88d4776fc240„´precedence_heuristic§cell_idÙ$582cf667-b85b-4a7d-bb17-88d4776fc240´downstream_cells_map�ªOptimisers“Ù$5762be30-3084-4eda-9642-19dc9d4dcb10Ù$4eac0e3f-7212-4038-a24e-8d6ca3fbe659Ù$a3634333-1149-4392-a7e9-350a56d67d2b²upstream_cells_map€Ù$d03e4e95-faab-4ab3-ab27-81189cbd8231„´precedence_heuristic	§cell_idÙ$d03e4e95-faab-4ab3-ab27-81189cbd8231´downstream_cells_map�§student’Ù$ff5d316f-806c-4652-97d8-323462395c69Ù$44ec9e94-f6af-431e-8841-bae44431dfa3²upstream_cells_map€Ù$e0705a25-a01e-43a8-8c1d-ccf0da22fca7„´precedence_heuristic	§cell_idÙ$e0705a25-a01e-43a8-8c1d-ccf0da22fca7´downstream_cells_map€²upstream_cells_map‚§@md_str�¨getindex�´cell_execution_orderÜ OÙ$755b8685-0711-48a2-a3eb-f80af39f10e1Ù$3d638561-6760-4260-991a-b0b0c77745a3Ù$582cf667-b85b-4a7d-bb17-88d4776fc240Ù$8e8d9f57-0f04-4a91-b69f-273fe1fafd61Ù$f7347c06-c1b7-11ed-3b8e-fbf167ce9cbaÙ$bdcb27c5-0603-49ac-b831-d78c558b31f0Ù$ddd6e83e-5a0d-4ff0-afe4-dedfc860994cÙ$d03e4e95-faab-4ab3-ab27-81189cbd8231Ù$ff5d316f-806c-4652-97d8-323462395c69Ù$44ec9e94-f6af-431e-8841-bae44431dfa3Ù$06c0ad65-22d4-4c8e-ae19-4f05ba125e79Ù$57a8108f-9ad3-4cc2-9372-bb291fc3bf86Ù$5061a130-fc0a-4306-bdf5-6966e8de938aÙ$8ece9aea-20f5-41db-95ca-08c8d4d2d4c1Ù$d36914f8-f7d4-407a-a842-436f4035157bÙ$3a100e93-7bba-4836-a4e6-e285aa6406c4Ù$8b519a7d-b64f-4c0c-8d74-17a963cb381dÙ$02a62f7b-6014-439a-a254-49f53f204abbÙ$2258b8c6-e8b7-4c06-9ece-53b254db6a2cÙ$aaea0bbf-868d-4fe0-b348-307449d06517Ù$80c5a262-e758-4075-896f-a0bc7ce1534cÙ$cf3c52c7-fc5e-4191-be9d-394660385801Ù$e5e014e6-e24d-4de0-a216-61c0f9d9c331Ù$17ff11e9-84f8-4911-845b-930a53c73e0eÙ$955a9751-38d0-4327-9a95-a0523c2d54b8Ù$fd30da51-0890-4ebe-8b14-8975ec12fec0Ù$c2adc38f-84e3-486f-93d8-b88eea63a09bÙ$be2c5285-fbd8-4c37-8b17-db6db95c8a4eÙ$bb0d58f9-380e-43fa-9524-0108a2816884Ù$221fd504-4cd6-4bab-b2a5-a590fff26a52Ù$dcbf8963-4a5c-4e7d-81a9-3dce27fb3117Ù$f83196a4-a0fd-44a3-b3d1-29730599830dÙ$2cd9cef0-d746-411a-861f-b8a035f4a1d3Ù$ac1355a2-db94-4954-ad65-6887b7dbb7adÙ$569173af-9e54-49cb-b1cb-88b8cbda57a6Ù$a191392f-eb62-459d-8554-901d9db29950Ù$39063d08-d687-45a2-8367-734b12dcefeaÙ$bcdd297b-c52c-4076-9329-929d69b8021bÙ$7de85c6f-996a-4d5b-8236-271922aeb908Ù$78fcd02f-1a6e-4799-b042-4542a1ec7847Ù$3ac8faba-1af9-4fc6-a1d0-37225b9ebb02Ù$33866006-11d7-46cc-870b-fec519a2b541Ù$c322fd53-78db-40ae-b7ba-612200ab6617Ù$b3832fb6-dd19-4b38-8117-b0a11d1bc34fÙ$67d7c60c-1c5e-4760-a9e1-4538e2ccc10eÙ$befba318-8595-4fc4-b42e-9c9125e7abfbÙ$e0705a25-a01e-43a8-8c1d-ccf0da22fca7Ù$d5052369-0b47-42e7-b661-058c7365c032Ù$50b34968-a45f-4c5b-a83d-7a5b47740007Ù$d16b1a65-5da9-46ac-b0b8-59e55ced37f3Ù$ef9a0669-2d02-4f1b-aa99-6f6473d37c0fÙ$58a671a1-3059-4fa9-b758-f3a76a573aa5Ù$6d5bf1e5-5ab0-4351-89d0-ddb6fcfa27b6Ù$32e8ee04-4378-4377-ae47-b65e5ce70667Ù$b0d679ba-13f8-4e70-ac42-68acb2ff83d1Ù$5dc7d04d-f6a5-4265-b890-d74ea4b3c602Ù$5762be30-3084-4eda-9642-19dc9d4dcb10Ù$c080e799-b5c5-42cf-b5f1-8c36da89fc8fÙ$bebbf87b-cd7b-43d7-8025-938fc4c6944dÙ$dc4f7f55-dde5-4ee6-b43d-7f64269b55d1Ù$4eac0e3f-7212-4038-a24e-8d6ca3fbe659Ù$cf264b86-d86f-4c4a-af3b-03b34486e5ffÙ$3bb76227-82cd-4924-bfb3-1b8504e2dc44Ù$62a1289b-ce6a-444d-8b20-92bd4fa3d05dÙ$3b65f124-75c2-4fb3-8b59-94015500acbfÙ$0fbd2560-1e4c-45b7-89a6-d2b622f9f907Ù$cd7c244d-8a4c-4aaf-ad4b-891744e004beÙ$2341dd4a-a35a-4a62-815a-e972d04844abÙ$dc35d701-ab40-4933-b4c5-35a81b3f834aÙ$f9192279-9d12-485e-bb9d-650be2dbd878Ù$ed873ea2-d4bd-46e7-b89b-4e5494b606e6Ù$a96abf48-cacf-41f8-bb7a-3d085bdb0a62Ù$a3634333-1149-4392-a7e9-350a56d67d2bÙ$3f81ccce-5744-42ba-aa1e-b3da6212b9efÙ$d15eb189-6e4d-4c70-a1cb-159e6a4eb8ebÙ$5370c50b-a9b8-41dc-8cfe-1f0389df97c3Ù$822d03c6-48f8-47b0-8f25-b2de45e4c589Ù$edb7814a-eddf-4c87-8857-19bb0a0c0241Ù$f60be2e0-9b43-46b5-96ef-7747ab56e164´last_hot_reload_timeË        ©shortpath²H3_Custom_Types.jl®process_status¥ready¤pathÙM/home/runner/work/julia-ml-course/julia-ml-course/homework/H3_Custom_Types.jl­pluto_version¨v0.20.19®last_save_timeËAÚ;9f§;?ªcell_orderÜ OÙ$8e8d9f57-0f04-4a91-b69f-273fe1fafd61Ù$ff5d316f-806c-4652-97d8-323462395c69Ù$f7347c06-c1b7-11ed-3b8e-fbf167ce9cbaÙ$bdcb27c5-0603-49ac-b831-d78c558b31f0Ù$ddd6e83e-5a0d-4ff0-afe4-dedfc860994cÙ$8ece9aea-20f5-41db-95ca-08c8d4d2d4c1Ù$d03e4e95-faab-4ab3-ab27-81189cbd8231Ù$44ec9e94-f6af-431e-8841-bae44431dfa3Ù$06c0ad65-22d4-4c8e-ae19-4f05ba125e79Ù$755b8685-0711-48a2-a3eb-f80af39f10e1Ù$57a8108f-9ad3-4cc2-9372-bb291fc3bf86Ù$5061a130-fc0a-4306-bdf5-6966e8de938aÙ$d36914f8-f7d4-407a-a842-436f4035157bÙ$3a100e93-7bba-4836-a4e6-e285aa6406c4Ù$8b519a7d-b64f-4c0c-8d74-17a963cb381dÙ$02a62f7b-6014-439a-a254-49f53f204abbÙ$2258b8c6-e8b7-4c06-9ece-53b254db6a2cÙ$3d638561-6760-4260-991a-b0b0c77745a3Ù$aaea0bbf-868d-4fe0-b348-307449d06517Ù$80c5a262-e758-4075-896f-a0bc7ce1534cÙ$cf3c52c7-fc5e-4191-be9d-394660385801Ù$e5e014e6-e24d-4de0-a216-61c0f9d9c331Ù$17ff11e9-84f8-4911-845b-930a53c73e0eÙ$955a9751-38d0-4327-9a95-a0523c2d54b8Ù$fd30da51-0890-4ebe-8b14-8975ec12fec0Ù$c2adc38f-84e3-486f-93d8-b88eea63a09bÙ$be2c5285-fbd8-4c37-8b17-db6db95c8a4eÙ$bb0d58f9-380e-43fa-9524-0108a2816884Ù$221fd504-4cd6-4bab-b2a5-a590fff26a52Ù$dcbf8963-4a5c-4e7d-81a9-3dce27fb3117Ù$f83196a4-a0fd-44a3-b3d1-29730599830dÙ$2cd9cef0-d746-411a-861f-b8a035f4a1d3Ù$ac1355a2-db94-4954-ad65-6887b7dbb7adÙ$569173af-9e54-49cb-b1cb-88b8cbda57a6Ù$a191392f-eb62-459d-8554-901d9db29950Ù$39063d08-d687-45a2-8367-734b12dcefeaÙ$bcdd297b-c52c-4076-9329-929d69b8021bÙ$78fcd02f-1a6e-4799-b042-4542a1ec7847Ù$7de85c6f-996a-4d5b-8236-271922aeb908Ù$3ac8faba-1af9-4fc6-a1d0-37225b9ebb02Ù$582cf667-b85b-4a7d-bb17-88d4776fc240Ù$33866006-11d7-46cc-870b-fec519a2b541Ù$c322fd53-78db-40ae-b7ba-612200ab6617Ù$b3832fb6-dd19-4b38-8117-b0a11d1bc34fÙ$67d7c60c-1c5e-4760-a9e1-4538e2ccc10eÙ$befba318-8595-4fc4-b42e-9c9125e7abfbÙ$e0705a25-a01e-43a8-8c1d-ccf0da22fca7Ù$d5052369-0b47-42e7-b661-058c7365c032Ù$50b34968-a45f-4c5b-a83d-7a5b47740007Ù$d16b1a65-5da9-46ac-b0b8-59e55ced37f3Ù$ef9a0669-2d02-4f1b-aa99-6f6473d37c0fÙ$58a671a1-3059-4fa9-b758-f3a76a573aa5Ù$6d5bf1e5-5ab0-4351-89d0-ddb6fcfa27b6Ù$32e8ee04-4378-4377-ae47-b65e5ce70667Ù$b0d679ba-13f8-4e70-ac42-68acb2ff83d1Ù$5dc7d04d-f6a5-4265-b890-d74ea4b3c602Ù$5762be30-3084-4eda-9642-19dc9d4dcb10Ù$c080e799-b5c5-42cf-b5f1-8c36da89fc8fÙ$bebbf87b-cd7b-43d7-8025-938fc4c6944dÙ$dc4f7f55-dde5-4ee6-b43d-7f64269b55d1Ù$4eac0e3f-7212-4038-a24e-8d6ca3fbe659Ù$cf264b86-d86f-4c4a-af3b-03b34486e5ffÙ$3bb76227-82cd-4924-bfb3-1b8504e2dc44Ù$62a1289b-ce6a-444d-8b20-92bd4fa3d05dÙ$3b65f124-75c2-4fb3-8b59-94015500acbfÙ$cd7c244d-8a4c-4aaf-ad4b-891744e004beÙ$0fbd2560-1e4c-45b7-89a6-d2b622f9f907Ù$2341dd4a-a35a-4a62-815a-e972d04844abÙ$dc35d701-ab40-4933-b4c5-35a81b3f834aÙ$f9192279-9d12-485e-bb9d-650be2dbd878Ù$ed873ea2-d4bd-46e7-b89b-4e5494b606e6Ù$3f81ccce-5744-42ba-aa1e-b3da6212b9efÙ$a96abf48-cacf-41f8-bb7a-3d085bdb0a62Ù$a3634333-1149-4392-a7e9-350a56d67d2bÙ$d15eb189-6e4d-4c70-a1cb-159e6a4eb8ebÙ$5370c50b-a9b8-41dc-8cfe-1f0389df97c3Ù$822d03c6-48f8-47b0-8f25-b2de45e4c589Ù$edb7814a-eddf-4c87-8857-19bb0a0c0241Ù$f60be2e0-9b43-46b5-96ef-7747ab56e164±published_objects€¥nbpkgŠ¯install_time_nsÏ   TQÚ´¬instantiatedÃ²installed_versions‰ªStatistics¦stdlib¦Zygote¥0.7.5­PlotlyKaleido¥2.3.0ªPlotlyBase¦0.8.20¥Plots§1.40.11§PlutoUI¦0.7.62¬LaTeXStrings¥1.4.0ªOptimisers¥0.4.5²PlutoTeachingTools¥0.3.1°terminal_outputsŠªStatisticsÚ#
[0m[1mResolving...[22m
[90m===[39m
[33m[1mâ”Œ [22m[39m[33m[1mWarning: [22m[39mPkg operation failed. Fixing stdlib dependencies and trying again...
[33m[1mâ”” [22m[39m[90m@ GracefulPkg ~/.julia/packages/GracefulPkg/LmTcK/src/apply strategies.jl:92[39m

[0m[1mResolving...[22m
[90m===[39m
[32m[1m  No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_odetpikzic/Project.toml`
[32m[1m  No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_odetpikzic/Manifest.toml`

[0m[1mInstantiating...[22m
[90m===[39m

[0m[1mPrecompiling...[22m
[90m===[39m
[32m[1mPrecompiling[22m[39m packages...
  27323.3 ms[32m  âœ“ [39mZygote
   1060.8 ms[32m  âœ“ [39mZygote â†’ ZygoteColorsExt¦ZygoteÚ#
[0m[1mResolving...[22m
[90m===[39m
[33m[1mâ”Œ [22m[39m[33m[1mWarning: [22m[39mPkg operation failed. Fixing stdlib dependencies and trying again...
[33m[1mâ”” [22m[39m[90m@ GracefulPkg ~/.julia/packages/GracefulPkg/LmTcK/src/apply strategies.jl:92[39m

[0m[1mResolving...[22m
[90m===[39m
[32m[1m  No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_odetpikzic/Project.toml`
[32m[1m  No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_odetpikzic/Manifest.toml`

[0m[1mInstantiating...[22m
[90m===[39m

[0m[1mPrecompiling...[22m
[90m===[39m
[32m[1mPrecompiling[22m[39m packages...
  27323.3 ms[32m  âœ“ [39mZygote
   1060.8 ms[32m  âœ“ [39mZygote â†’ ZygoteColorsExtªnbpkg_syncÚ#
[0m[1mResolving...[22m
[90m===[39m
[33m[1mâ”Œ [22m[39m[33m[1mWarning: [22m[39mPkg operation failed. Fixing stdlib dependencies and trying again...
[33m[1mâ”” [22m[39m[90m@ GracefulPkg ~/.julia/packages/GracefulPkg/LmTcK/src/apply strategies.jl:92[39m

[0m[1mResolving...[22m
[90m===[39m
[32m[1m  No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_odetpikzic/Project.toml`
[32m[1m  No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_odetpikzic/Manifest.toml`

[0m[1mInstantiating...[22m
[90m===[39m

[0m[1mPrecompiling...[22m
[90m===[39m
[32m[1mPrecompiling[22m[39m packages...
  27323.3 ms[32m  âœ“ [39mZygote
   1060.8 ms[32m  âœ“ [39mZygote â†’ ZygoteColorsExt­PlotlyKaleidoÚ#
[0m[1mResolving...[22m
[90m===[39m
[33m[1mâ”Œ [22m[39m[33m[1mWarning: [22m[39mPkg operation failed. Fixing stdlib dependencies and trying again...
[33m[1mâ”” [22m[39m[90m@ GracefulPkg ~/.julia/packages/GracefulPkg/LmTcK/src/apply strategies.jl:92[39m

[0m[1mResolving...[22m
[90m===[39m
[32m[1m  No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_odetpikzic/Project.toml`
[32m[1m  No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_odetpikzic/Manifest.toml`

[0m[1mInstantiating...[22m
[90m===[39m

[0m[1mPrecompiling...[22m
[90m===[39m
[32m[1mPrecompiling[22m[39m packages...
  27323.3 ms[32m  âœ“ [39mZygote
   1060.8 ms[32m  âœ“ [39mZygote â†’ ZygoteColorsExt§PlutoUIÚ#
[0m[1mResolving...[22m
[90m===[39m
[33m[1mâ”Œ [22m[39m[33m[1mWarning: [22m[39mPkg operation failed. Fixing stdlib dependencies and trying again...
[33m[1mâ”” [22m[39m[90m@ GracefulPkg ~/.julia/packages/GracefulPkg/LmTcK/src/apply strategies.jl:92[39m

[0m[1mResolving...[22m
[90m===[39m
[32m[1m  No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_odetpikzic/Project.toml`
[32m[1m  No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_odetpikzic/Manifest.toml`

[0m[1mInstantiating...[22m
[90m===[39m

[0m[1mPrecompiling...[22m
[90m===[39m
[32m[1mPrecompiling[22m[39m packages...
  27323.3 ms[32m  âœ“ [39mZygote
   1060.8 ms[32m  âœ“ [39mZygote â†’ ZygoteColorsExt¥PlotsÚ#
[0m[1mResolving...[22m
[90m===[39m
[33m[1mâ”Œ [22m[39m[33m[1mWarning: [22m[39mPkg operation failed. Fixing stdlib dependencies and trying again...
[33m[1mâ”” [22m[39m[90m@ GracefulPkg ~/.julia/packages/GracefulPkg/LmTcK/src/apply strategies.jl:92[39m

[0m[1mResolving...[22m
[90m===[39m
[32m[1m  No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_odetpikzic/Project.toml`
[32m[1m  No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_odetpikzic/Manifest.toml`

[0m[1mInstantiating...[22m
[90m===[39m

[0m[1mPrecompiling...[22m
[90m===[39m
[32m[1mPrecompiling[22m[39m packages...
  27323.3 ms[32m  âœ“ [39mZygote
   1060.8 ms[32m  âœ“ [39mZygote â†’ ZygoteColorsExtªPlotlyBaseÚ#
[0m[1mResolving...[22m
[90m===[39m
[33m[1mâ”Œ [22m[39m[33m[1mWarning: [22m[39mPkg operation failed. Fixing stdlib dependencies and trying again...
[33m[1mâ”” [22m[39m[90m@ GracefulPkg ~/.julia/packages/GracefulPkg/LmTcK/src/apply strategies.jl:92[39m

[0m[1mResolving...[22m
[90m===[39m
[32m[1m  No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_odetpikzic/Project.toml`
[32m[1m  No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_odetpikzic/Manifest.toml`

[0m[1mInstantiating...[22m
[90m===[39m

[0m[1mPrecompiling...[22m
[90m===[39m
[32m[1mPrecompiling[22m[39m packages...
  27323.3 ms[32m  âœ“ [39mZygote
   1060.8 ms[32m  âœ“ [39mZygote â†’ ZygoteColorsExt¬LaTeXStringsÚ#
[0m[1mResolving...[22m
[90m===[39m
[33m[1mâ”Œ [22m[39m[33m[1mWarning: [22m[39mPkg operation failed. Fixing stdlib dependencies and trying again...
[33m[1mâ”” [22m[39m[90m@ GracefulPkg ~/.julia/packages/GracefulPkg/LmTcK/src/apply strategies.jl:92[39m

[0m[1mResolving...[22m
[90m===[39m
[32m[1m  No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_odetpikzic/Project.toml`
[32m[1m  No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_odetpikzic/Manifest.toml`

[0m[1mInstantiating...[22m
[90m===[39m

[0m[1mPrecompiling...[22m
[90m===[39m
[32m[1mPrecompiling[22m[39m packages...
  27323.3 ms[32m  âœ“ [39mZygote
   1060.8 ms[32m  âœ“ [39mZygote â†’ ZygoteColorsExtªOptimisersÚ#
[0m[1mResolving...[22m
[90m===[39m
[33m[1mâ”Œ [22m[39m[33m[1mWarning: [22m[39mPkg operation failed. Fixing stdlib dependencies and trying again...
[33m[1mâ”” [22m[39m[90m@ GracefulPkg ~/.julia/packages/GracefulPkg/LmTcK/src/apply strategies.jl:92[39m

[0m[1mResolving...[22m
[90m===[39m
[32m[1m  No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_odetpikzic/Project.toml`
[32m[1m  No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_odetpikzic/Manifest.toml`

[0m[1mInstantiating...[22m
[90m===[39m

[0m[1mPrecompiling...[22m
[90m===[39m
[32m[1mPrecompiling[22m[39m packages...
  27323.3 ms[32m  âœ“ [39mZygote
   1060.8 ms[32m  âœ“ [39mZygote â†’ ZygoteColorsExt²PlutoTeachingToolsÚ#
[0m[1mResolving...[22m
[90m===[39m
[33m[1mâ”Œ [22m[39m[33m[1mWarning: [22m[39mPkg operation failed. Fixing stdlib dependencies and trying again...
[33m[1mâ”” [22m[39m[90m@ GracefulPkg ~/.julia/packages/GracefulPkg/LmTcK/src/apply strategies.jl:92[39m

[0m[1mResolving...[22m
[90m===[39m
[32m[1m  No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_odetpikzic/Project.toml`
[32m[1m  No Changes[22m[39m to `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_odetpikzic/Manifest.toml`

[0m[1mInstantiating...[22m
[90m===[39m

[0m[1mPrecompiling...[22m
[90m===[39m
[32m[1mPrecompiling[22m[39m packages...
  27323.3 ms[32m  âœ“ [39mZygote
   1060.8 ms[32m  âœ“ [39mZygote â†’ ZygoteColorsExt§enabledÃ·restart_recommended_msgÀ´restart_required_msgÀ­busy_packages�¶waiting_for_permissionÂÙ,waiting_for_permission_but_probably_disabledÂ«cell_inputsÞ OÙ$cf264b86-d86f-4c4a-af3b-03b34486e5ff„§cell_idÙ$cf264b86-d86f-4c4a-af3b-03b34486e5ff¤codeÙ’md"### Visualization
Let's test our optimizers. We will simulate a loss function that depends on two parameters using the 2D Rosenbrock function:"¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$ac1355a2-db94-4954-ad65-6887b7dbb7ad„§cell_idÙ$ac1355a2-db94-4954-ad65-6887b7dbb7ad¤codeµstd(transformed_data)¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÂÙ$3a100e93-7bba-4836-a4e6-e285aa6406c4„§cell_idÙ$3a100e93-7bba-4836-a4e6-e285aa6406c4¤codeÚhtest_data = [
    -2.463,
    -0.934,
    -1.854,
    -3.875,
    2.477,
    -1.1875,
    -1.158,
    -1.224,
    -1.344,
    -0.319,
    -0.525,
    -1.388,
    -1.837,
    -1.316,
    -0.597,
    -1.068,
    0.1412,
    -0.959,
    -1.479,
    -2.004,
    -0.1953,
    -1.222,
    -1.457,
    -0.768,
    -0.4158,
    -3.06,
    -1.428,
    -1.165,
    -0.226,
    -1.204,
    -1.135,
    -0.835,
    -2.46,
    -1.36,
    -1.239,
    -1.266,
    -0.8613,
    -1.226,
    -1.055,
    -1.037,
    -1.969,
    -1.564,
    -0.982,
    -1.238,
    -1.414,
    -2.246,
    -2.925,
    -1.3955,
    -1.237,
    -1.005,
]¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$80c5a262-e758-4075-896f-a0bc7ce1534c„§cell_idÙ$80c5a262-e758-4075-896f-a0bc7ce1534c¤codeÙ md"Let's see if our code works:"¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$8b519a7d-b64f-4c0c-8d74-17a963cb381d„§cell_idÙ$8b519a7d-b64f-4c0c-8d74-17a963cb381d¤codeÙXtip(md"It is recommended to quickly review exercise 3 from homework 1 before starting.")¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$0fbd2560-1e4c-45b7-89a6-d2b622f9f907„§cell_idÙ$0fbd2560-1e4c-45b7-89a6-d2b622f9f907¤codeÙÐfunction plot_loss_surface(; kwargs...)
    return contour(
        P1,
        P2,
        (p1, p2) -> loss((p1, p2));
        xlabel="Parameter 1",
        ylabel="Parameter 2",
        kwargs...,
    )
end¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$ff5d316f-806c-4652-97d8-323462395c69„§cell_idÙ$ff5d316f-806c-4652-97d8-323462395c69¤codeÙ¦# Please don't edit your name here, but in the cell below. Thanks!
md"Submission by: **_$(student.name)_** ($(student.email), Matr.-Nr.: $(student.id))" # DO NOT EDIT¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$e5e014e6-e24d-4de0-a216-61c0f9d9c331„§cell_idÙ$e5e014e6-e24d-4de0-a216-61c0f9d9c331¤codeªtypeof(dt)¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÂÙ$02a62f7b-6014-439a-a254-49f53f204abb„§cell_idÙ$02a62f7b-6014-439a-a254-49f53f204abb¤codeÙ7md"### Exercise 1.1 â€“ Composite types & constructors"¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$bcdd297b-c52c-4076-9329-929d69b8021b„§cell_idÙ$bcdd297b-c52c-4076-9329-929d69b8021b¤codeÙÞmd"### Visualization
As we can see in this plot, our original data didn't come from a normal distribution.
Standardization transforms the data such that $\mu = 0$ and $\sigma=1$, but doesn't make it normally distributed.
"¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$3f81ccce-5744-42ba-aa1e-b3da6212b9ef„§cell_idÙ$3f81ccce-5744-42ba-aa1e-b3da6212b9ef¤codeÙ>plot_trajectory(optimizers; steps=50, params_init=[-2.0, 1.0])¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÂÙ$a3634333-1149-4392-a7e9-350a56d67d2b„§cell_idÙ$a3634333-1149-4392-a7e9-350a56d67d2b¤codeÚõfunction plot_trajectory(optimizers; steps=30, params_init=[-1.0, 1.0])
    # Plot the level sets of the loss function
    p = plot_loss_surface(; c=:gray, colorbar=false)

    # Allocate an array to save the trajectory
    trajectory = similar(params_init, 2, steps + 1)
    trajectory[:, 1] = params_init

    for (name, opt) in optimizers
        # Use initial parameters
        params = params_init

        # Setup the optimizer
        state = Optimisers.setup(opt, params)

        for i in 1:steps
            # Compute the gradient
            # We will learn how this works in the lecture on autodiff next week
            grad = Zygote.gradient(loss, params)[1]

            # Update state and parameters
            state, params = Optimisers.update(state, params, grad)

            # Save params into trajectory
            trajectory[:, i+1] = params
        end
        # Plot trajectory on top of the loss surface
        plot!(
            p,
            trajectory[1, :],
            trajectory[2, :];
            label="$name",
            marker=:o,
            markerstrokewidth=0.5,
            markersize=2,
            lw=2,
            legend=:topright,
            xlims=(-2, 2),
            ylims=(-2, 2),
        )
    end
    return p
end¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$be2c5285-fbd8-4c37-8b17-db6db95c8a4e„§cell_idÙ$be2c5285-fbd8-4c37-8b17-db6db95c8a4e¤codeÚ—task(
    md"Now define two functions `transform` and `inverse_transform`:
1. A function `transform` that takes an array and a `Standardize` object and implements the standardization

$X' = \frac{X-\mu}{\sigma} \quad .$

2. A function `inverse_transform` that takes an array and a `Standardize` object and implements the inverse standardization

$X = \left(X' \cdot \sigma\right) + \mu \quad .$

",
    2,
)¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$ef9a0669-2d02-4f1b-aa99-6f6473d37c0f„§cell_idÙ$ef9a0669-2d02-4f1b-aa99-6f6473d37c0f¤codeÚMtask(
    md"Define a type `GradientDescent` that implements [gradient descent](https://en.wikipedia.org/wiki/Gradient_descent). It should:

*  be a sub-type of `AbstractRule`
*  have a learning rate `lr` as its only field
*  have a default learning rate of `0.1`, implemented in an outer constructor `GradientDescent()`

",
    2,
)¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$aaea0bbf-868d-4fe0-b348-307449d06517„§cell_idÙ$aaea0bbf-868d-4fe0-b348-307449d06517¤code·# Write your code here!¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÂÙ$c080e799-b5c5-42cf-b5f1-8c36da89fc8f„§cell_idÙ$c080e799-b5c5-42cf-b5f1-8c36da89fc8f¤codeÙ!md"### Exercise 2.3 â€“ `apply!`"¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$569173af-9e54-49cb-b1cb-88b8cbda57a6„§cell_idÙ$569173af-9e54-49cb-b1cb-88b8cbda57a6¤codeÙUmd"And let's test the inverse transformation. The following vectors should be equal:"¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$f60be2e0-9b43-46b5-96ef-7747ab56e164„§cell_idÙ$f60be2e0-9b43-46b5-96ef-7747ab56e164¤codeÙºfeedback = """
The homework took me around XX minutes.

In the lecture / homework I would have liked more detailed explanations on:
* foo
* bar

I liked:
* baz

I didn't like:
* qux
""";¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÂÙ$dc35d701-ab40-4933-b4c5-35a81b3f834a„§cell_idÙ$dc35d701-ab40-4933-b4c5-35a81b3f834a¤codeÙ>@bind lr1 Slider(0.01:0.01:0.2, default=0.15, show_value=true)¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÂÙ$a96abf48-cacf-41f8-bb7a-3d085bdb0a62„§cell_idÙ$a96abf48-cacf-41f8-bb7a-3d085bdb0a62¤codeÚLmd"You can also implement [more variants](https://en.wikipedia.org/wiki/Stochastic_gradient_descent#Extensions_and_variants) or simply use [those implemented in Optimisers.jl](https://fluxml.ai/Optimisers.jl/dev/api/#Optimisation-Rules).

Click `plot_trajectory` below to reveal the code that produced the plot.
The most relevant part is the inner loop where the optimizer is called:

```julia
state = Optimisers.setup(opt, params)

for i in 1:steps
	grad = ... # Compute gradient. We will learn how this works next week.

	state, params = Optimisers.update(state, params, grad)
end
```
"¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$58a671a1-3059-4fa9-b758-f3a76a573aa5„§cell_idÙ$58a671a1-3059-4fa9-b758-f3a76a573aa5¤code¶# Write your code here¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÂÙ$4eac0e3f-7212-4038-a24e-8d6ca3fbe659„§cell_idÙ$4eac0e3f-7212-4038-a24e-8d6ca3fbe659¤codeÚNif !@isdefined(GradientDescent)
    keep_working(md"Make sure that you define a struct called `GradientDescent`.")
elseif !hasmethod(
    Optimisers.apply!, Tuple{GradientDescent,Nothing,Vector{Float64},Vector{Float64}}
)
    keep_working()
else
    let
        gd = GradientDescent(2.0)
        grad = [1.0, 2.0]
        state_new, grad_new = Optimisers.apply!(gd, nothing, [0.0, 0.0], grad)
        if ismissing(grad_new)
            still_missing()
        elseif isnothing(grad_new)
            keep_working()
        elseif !isnothing(state_new)
            keep_working(md"Don't modify the state.")
        elseif !(grad_new â‰ˆ [2.0, 4.0])
            keep_working(
                md"The answer is not quite right. There is an error in the update of the gradient.",
            )
        else
            correct()
        end
    end
end¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$3d638561-6760-4260-991a-b0b0c77745a3„§cell_idÙ$3d638561-6760-4260-991a-b0b0c77745a3¤code°using Statistics¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÂÙ$17ff11e9-84f8-4911-845b-930a53c73e0e„§cell_idÙ$17ff11e9-84f8-4911-845b-930a53c73e0e¤code¥dt.Î¼¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÂÙ$3ac8faba-1af9-4fc6-a1d0-37225b9ebb02„§cell_idÙ$3ac8faba-1af9-4fc6-a1d0-37225b9ebb02¤codeÚ]md"## Exercise 2 â€“ Gradient-based optimization
As we have seen in the previous exercise, strucs / composite types are a common way to implement algorithms.
In this exercise, we will extend the [gradient-based optimization algorithms](https://en.wikipedia.org/wiki/Gradient_descent) from [Optimisers.jl](https://github.com/FluxML/Optimisers.jl/).
"¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$bb0d58f9-380e-43fa-9524-0108a2816884„§cell_idÙ$bb0d58f9-380e-43fa-9524-0108a2816884¤codeÙbfunction transform(xs, dt::Standardize)
    return missing # Replace `missing` with your code!
end¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÂÙ$5061a130-fc0a-4306-bdf5-6966e8de938a„§cell_idÙ$5061a130-fc0a-4306-bdf5-6966e8de938a¤codeÚxbegin
    md_parse(str) = Markdown.parse(str)
    md_parse(md::Markdown.MD) = md
    function task(text, pts=1)
        if pts == 1
            pts_str = "(1 point)"
        elseif pts == 0
            pts_str = ""
        else
            pts_str = "($pts points)"
        end
        Markdown.MD(Markdown.Admonition("Task", "Task " * pts_str, [md_parse(text)]))
    end
end;¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$ddd6e83e-5a0d-4ff0-afe4-dedfc860994c„§cell_idÙ$ddd6e83e-5a0d-4ff0-afe4-dedfc860994c¤code»md"### Student information"¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$f9192279-9d12-485e-bb9d-650be2dbd878„§cell_idÙ$f9192279-9d12-485e-bb9d-650be2dbd878¤codeÙA@bind lr2 Slider(0.001:0.001:0.05, default=0.01, show_value=true)¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÂÙ$78fcd02f-1a6e-4799-b042-4542a1ec7847„§cell_idÙ$78fcd02f-1a6e-4799-b042-4542a1ec7847¤codeÙ#plot_standardization(test_data, dt)¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÂÙ$2341dd4a-a35a-4a62-815a-e972d04844ab„§cell_idÙ$2341dd4a-a35a-4a62-815a-e972d04844ab¤codeÙ¹md"""Let's plot the trajectory of our optimizers on the "loss surface".

Add as many optimizers and sliders as you want, change the initial parameters and the number of steps taken.
"""¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$d36914f8-f7d4-407a-a842-436f4035157b„§cell_idÙ$d36914f8-f7d4-407a-a842-436f4035157b¤codeÙ°md"## Exercise 1 â€“ Standardization
In this exercise, we will refactor the standardization code from homework 1 by using custom types.
Let's load the dataset from last time:
"¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$3b65f124-75c2-4fb3-8b59-94015500acbf„§cell_idÙ$3b65f124-75c2-4fb3-8b59-94015500acbf¤codeÙ"P1 = P2 = range(-2, 2; length=51);¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÂÙ$755b8685-0711-48a2-a3eb-f80af39f10e1„§cell_idÙ$755b8685-0711-48a2-a3eb-f80af39f10e1¤codeÙ£begin
    using PlutoUI
    using PlutoTeachingTools
    using Zygote

    using LaTeXStrings
    using Plots
    import PlotlyBase, PlotlyKaleido
    plotly()
end¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÂÙ$3bb76227-82cd-4924-bfb3-1b8504e2dc44„§cell_idÙ$3bb76227-82cd-4924-bfb3-1b8504e2dc44¤codeÙJloss(params) = 2 * params[1]^2 + (2 * params[2] - params[1])^2 - params[1]¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÂÙ$5dc7d04d-f6a5-4265-b890-d74ea4b3c602„§cell_idÙ$5dc7d04d-f6a5-4265-b890-d74ea4b3c602¤code¶# Write your code here¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÂÙ$fd30da51-0890-4ebe-8b14-8975ec12fec0„§cell_idÙ$fd30da51-0890-4ebe-8b14-8975ec12fec0¤codeÚÞif !@isdefined(Standardize)
    keep_working(md"Make sure that you define a struct called `Standardize`.")
elseif !hasmethod(Standardize, Tuple{Int,Int})
    keep_working(md"The inner constructor has not yet been defined.")
elseif !hasmethod(Standardize, Tuple{Vector{Int}})
    keep_working(md"The outer constructor has not yet been defined.")
else
    let
        dtt1 = Standardize(0, 1)
        train = [1, 4, 5]
        dtt2 = Standardize(train)

        if ismissing(dtt1)
            still_missing()
        elseif isnothing(dtt1)
            keep_working(
                md"Did you forget to return a `new` object in the inner constructor?"
            )
        elseif ismissing(dtt1)
            still_missing(md"Your inner constructor still returns `missing`.")
        elseif isnothing(dtt2)
            keep_working(md"Did you forget to write `return` in the outer constructor?")
        elseif ismissing(dtt2)
            still_missing(md"Replace `missing` in the outer constructor with your answer.")
        elseif !(dtt2.Î¼ â‰ˆ 3.3333333333333335)
            keep_working(
                md"The answer is not quite right. The mean `Î¼` wasn't computed correctly in the outer constructor.",
            )
        elseif !(dtt2.Ïƒ â‰ˆ 2.081665999466133)
            keep_working(
                md"The answer is not quite right. The standard deviation `Ïƒ` wasn't computed correctly in the outer constructor.",
            )
        else
            correct()
        end
    end
end¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$8ece9aea-20f5-41db-95ca-08c8d4d2d4c1„§cell_idÙ$8ece9aea-20f5-41db-95ca-08c8d4d2d4c1¤codeÙAtask("Please add your student information to the cell below.", 0)¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$b0d679ba-13f8-4e70-ac42-68acb2ff83d1„§cell_idÙ$b0d679ba-13f8-4e70-ac42-68acb2ff83d1¤codeÙ¡task(md"Define an `Optimisers.init` function for `GradientDescent` that returns `nothing`.

We return `nothing` since gradient descent doesn't require a state.")¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$f83196a4-a0fd-44a3-b3d1-29730599830d„§cell_idÙ$f83196a4-a0fd-44a3-b3d1-29730599830d¤codeÙ+transformed_data = transform(test_data, dt)¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÂÙ$6d5bf1e5-5ab0-4351-89d0-ddb6fcfa27b6„§cell_idÙ$6d5bf1e5-5ab0-4351-89d0-ddb6fcfa27b6¤codeÚif !@isdefined(GradientDescent)
    keep_working(md"Make sure that you define a struct called `GradientDescent`.")
elseif !hasmethod(GradientDescent, Tuple{Float64})
    keep_working(md"The inner constructor has not yet been defined.")
elseif !hasmethod(GradientDescent, Tuple{})
    keep_working(md"The outer constructor has not yet been defined.")
else
    let
        gd1 = GradientDescent(1.2)
        gd2 = GradientDescent()
        if !hasfield(GradientDescent, :lr)
            keep_working(md"`GradientDescent` should have a field called `lr`.")
        elseif !(gd1.lr â‰ˆ 1.2)
            keep_working()
        elseif !(gd2.lr â‰ˆ 0.1)
            keep_working(md"The default value for `lr` should be `0.1`.")
        else
            correct()
        end
    end
end¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$822d03c6-48f8-47b0-8f25-b2de45e4c589„§cell_idÙ$822d03c6-48f8-47b0-8f25-b2de45e4c589¤codeÚeMarkdown.MD(
    Markdown.Admonition(
        "Task",
        "Optional task",
        [
            md"Implement the *Adam* optimizer, which was introduced
            in [this paper](https://arxiv.org/abs/1412.6980) by Kingma and Ba.
            Add it to the visualization above and compare it to Optimizer.jl's Adam implementation.",
        ],
    ),
)¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$bebbf87b-cd7b-43d7-8025-938fc4c6944d„§cell_idÙ$bebbf87b-cd7b-43d7-8025-938fc4c6944d¤codeÙÃtask(md"Define an `Optimisers.apply!` function for `GradientDescent` that
* doesn't modify the state (since gradient descent doesn't require a state)
* scales the gradient by the learning rate
")¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$c2adc38f-84e3-486f-93d8-b88eea63a09b„§cell_idÙ$c2adc38f-84e3-486f-93d8-b88eea63a09b¤codeÙ6md"### Exercise 1.2 â€“ Transform & Inverse transform"¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$5370c50b-a9b8-41dc-8cfe-1f0389df97c3„§cell_idÙ$5370c50b-a9b8-41dc-8cfe-1f0389df97c3¤codeÙ(md"### Optional Task â€“ Adam optimizer"¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$32e8ee04-4378-4377-ae47-b65e5ce70667„§cell_idÙ$32e8ee04-4378-4377-ae47-b65e5ce70667¤code¿md"### Exercise 2.2 â€“ `init`"¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$befba318-8595-4fc4-b42e-9c9125e7abfb„§cell_idÙ$befba318-8595-4fc4-b42e-9c9125e7abfb¤codeÚDtip(
    md"Statefulness could also have been implemented by making the state a field in the struct of the optimizer and/or making the struct mutable.

However, mutable structs are usually less performant. The dimensionality of the state also often depends on the dimensionality of the input parameters we optimize over.",
)¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$d5052369-0b47-42e7-b661-058c7365c032„§cell_idÙ$d5052369-0b47-42e7-b661-058c7365c032¤codeÙ•tip(
    md"**Reminder:** By convention, functions that modify their inputs in-place are given an exclamation point `!` at the end of their name.",
)¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$cf3c52c7-fc5e-4191-be9d-394660385801„§cell_idÙ$cf3c52c7-fc5e-4191-be9d-394660385801¤codeÙ;dt = Standardize(test_data) # dt like "data transformation"¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÂÙ$2cd9cef0-d746-411a-861f-b8a035f4a1d3„§cell_idÙ$2cd9cef0-d746-411a-861f-b8a035f4a1d3¤code¶mean(transformed_data)¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÂÙ$d15eb189-6e4d-4c70-a1cb-159e6a4eb8eb„§cell_idÙ$d15eb189-6e4d-4c70-a1cb-159e6a4eb8eb¤codeÙètip(
    md"Gradient descent is typically used in deep learning in combination with mini-batches, which introduce stochasticity.

This example had no stochasticity and other optimization algorithms would have been better suited.",
)¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$955a9751-38d0-4327-9a95-a0523c2d54b8„§cell_idÙ$955a9751-38d0-4327-9a95-a0523c2d54b8¤code¥dt.Ïƒ¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÂÙ$62a1289b-ce6a-444d-8b20-92bd4fa3d05d„§cell_idÙ$62a1289b-ce6a-444d-8b20-92bd4fa3d05d¤codeÙAmd"For the purpose of plotting, we define a range of parameters:"¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$221fd504-4cd6-4bab-b2a5-a590fff26a52„§cell_idÙ$221fd504-4cd6-4bab-b2a5-a590fff26a52¤codeÙjfunction inverse_transform(xs, dt::Standardize)
    return missing # Replace `missing` with your code!
end¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÂÙ$a191392f-eb62-459d-8554-901d9db29950„§cell_idÙ$a191392f-eb62-459d-8554-901d9db29950¤codeÙ5inverse_transform(transformed_data, dt) â‰ˆ test_data¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÂÙ$67d7c60c-1c5e-4760-a9e1-4538e2ccc10e„§cell_idÙ$67d7c60c-1c5e-4760-a9e1-4538e2ccc10e¤codeÚ’md"""#### Initializing the optimizer
Some optimizers require a state. This state is used to save additional information about previous optimization steps, for example in optimizers that use "momentum" terms like [ADAM](https://en.wikipedia.org/wiki/Stochastic_gradient_descent#Adam).

When setting up an Optimizer in Optimisers.jl, `init` is called on it, which initializes a state.
`init` takes two arguments: an optimizer object and an array of initial parameters.

```julia
function Optimisers.init(alg::MyOptimiser, params_init::AbstractArray)
	state = ... # some computation
	return state
end
```

The state is then updated in the `apply!` function.
"""¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$d16b1a65-5da9-46ac-b0b8-59e55ced37f3„§cell_idÙ$d16b1a65-5da9-46ac-b0b8-59e55ced37f3¤codeÙ$md"### Exercise 2.1 â€“ Constructor"¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$7de85c6f-996a-4d5b-8236-271922aeb908„§cell_idÙ$7de85c6f-996a-4d5b-8236-271922aeb908¤codeÚ±function plot_standardization(xs, dt::Standardize; nbins=20, scale=80)
    p = histogram(xs; nbins=nbins, alpha=0.7, label="Original data")
    histogram!(p, transform(xs, dt); nbins=nbins, alpha=0.5, label="Standardized data")
    plot!(
        p,
        x -> 1 / (2Ï€) * exp(-0.5 * x^2) * scale;
        color=:gray,
        lw=2,
        style=:dash,
        label="Standard normal distribution (scaled)",
    )
    return p
end¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$edb7814a-eddf-4c87-8857-19bb0a0c0241„§cell_idÙ$edb7814a-eddf-4c87-8857-19bb0a0c0241¤codeÙìmd"""# Feedback
This is the fourth iteration of the *"Julia for Machine Learning"* class. Please help us make the course better!

You can write whatever you want in the following string. Feel free to add or delete whatever you want.
"""¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$2258b8c6-e8b7-4c06-9ece-53b254db6a2c„§cell_idÙ$2258b8c6-e8b7-4c06-9ece-53b254db6a2c¤codeÚŸtask(
    md"Create a parametric composite type `Standardize` with two fields `Î¼` and `Ïƒ` using the type parameter `T<:Real`.

These two fields will hold the mean and the standard deviation of the standardization transformation.

`Standardize` should have two constructors:
1. An inner constructor that takes two numbers $Î¼$ and $Ïƒ$. Throw an `error` if $Ïƒ â‰¤ 0$.
2. An outer constructor that takes an array `data`, computes its mean and standard deviation and calls the inner constructor.

---

You are allowed to use the `mean` and `std` functions from the standard library package [Statistics.jl](https://docs.julialang.org/en/v1/stdlib/Statistics/).
",
    4,
)¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$8e8d9f57-0f04-4a91-b69f-273fe1fafd61„§cell_idÙ$8e8d9f57-0f04-4a91-b69f-273fe1fafd61¤codeÙ5html"""<style>.dont-panic{ display: none }</style>"""¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$f7347c06-c1b7-11ed-3b8e-fbf167ce9cba„§cell_idÙ$f7347c06-c1b7-11ed-3b8e-fbf167ce9cba¤codeÚ<html"""
	<h1 style="text-align:left">
		Julia for Machine Learning
	</h1>
	<div style="text-align:left">
		<p style="font-weight:bold; font-size: 35px; font-variant: small-caps; margin: 0px">
			Homework 3: Custom types
		</p>
		<p style="font-size: 20px;">
			TU Berlin, Winter Semester 25/26<br>
		</p>
	</div>
"""¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$c322fd53-78db-40ae-b7ba-612200ab6617„§cell_idÙ$c322fd53-78db-40ae-b7ba-612200ab6617¤codeÚpmd"""### Interlude: Gradient-based optimization in Deep Learning
Gradient-based optimization methods are used in deep learning, where we want to optimize a neural network $f$ that is parametrized by parameters $\theta$ (e.g. the weights and biases of $f$).

This neural network could e.g. be a classifier that predicts the output class $\hat{y}$ for some input image $x$:

$\hat{y} = f_\theta(x)$

In [supervised learning](https://en.wikipedia.org/wiki/Supervised_learning),
we are also given true labels $y$.
Based on the true and predicted labels, we define a loss

$\mathcal{L}_\theta(\hat{y}, y)$

which depends on $\theta$, since the parameters of our neural network determine the prediction $\hat{y}$.

To optimize $\theta$, we typically compute the gradient of our loss with respect to our parameters and update the parameters using gradient-based optimization methods.
"""¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$dc4f7f55-dde5-4ee6-b43d-7f64269b55d1„§cell_idÙ$dc4f7f55-dde5-4ee6-b43d-7f64269b55d1¤code¶# Write your code here¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÂÙ$cd7c244d-8a4c-4aaf-ad4b-891744e004be„§cell_idÙ$cd7c244d-8a4c-4aaf-ad4b-891744e004be¤code¾plot_loss_surface(; fill=true)¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÂÙ$ed873ea2-d4bd-46e7-b89b-4e5494b606e6„§cell_idÙ$ed873ea2-d4bd-46e7-b89b-4e5494b606e6¤codeÙÂoptimizers = Dict(
    "GradientDescent" => GradientDescent(lr1), # our implementation
    "Momentum" => Momentum(lr2),    # from Optimisers.jl
    "ADAM" => ADAM(0.1),    # from Optimisers.jl
)¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÂÙ$b3832fb6-dd19-4b38-8117-b0a11d1bc34f„§cell_idÙ$b3832fb6-dd19-4b38-8117-b0a11d1bc34f¤codeÚ md"""### Interlude: Understanding Optimisers.jl
All optimization algorithms in Optimisers.jl are sub-types of the abstract type `AbstractRule`.

To extend Optimisers.jl, we simply need to define a custom sub-type and overload two functions `init` and `apply!` using multiple dispatch.
"""¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$bdcb27c5-0603-49ac-b831-d78c558b31f0„§cell_idÙ$bdcb27c5-0603-49ac-b831-d78c558b31f0¤codeÙ5md"Due date: **Monday, November 10th 2025 at 23:59**"¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$33866006-11d7-46cc-870b-fec519a2b541„§cell_idÙ$33866006-11d7-46cc-870b-fec519a2b541¤codeÙvtip(
    md"The purpose of this exercise is to teach you how to extend functionality from external Julia packages.",
)¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$44ec9e94-f6af-431e-8841-bae44431dfa3„§cell_idÙ$44ec9e94-f6af-431e-8841-bae44431dfa3¤codeÚif student.name == "Mara Mustermann"
    still_missing(md"""Please replace `"Mara Mustermann"` with your name.
            Use `Shift+Enter` to run your edits.""")
elseif student.email == "m.mustermann@campus.tu-berlin.de"
    still_missing(md"Please enter your TU Berlin E-Mail address.")
elseif student.id == 456123
    still_missing(md"Please enter your TU Berlin student ID (Matrikelnummer).")
elseif !isa(student.id, Number)
    still_missing(md"Please enter your TU Berlin student ID as number, not a string.")
else
    correct()
end¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$57a8108f-9ad3-4cc2-9372-bb291fc3bf86„§cell_idÙ$57a8108f-9ad3-4cc2-9372-bb291fc3bf86¤code±TableOfContents()¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÂÙ$50b34968-a45f-4c5b-a83d-7a5b47740007„§cell_idÙ$50b34968-a45f-4c5b-a83d-7a5b47740007¤codeÚªmd"""#### Applying the update step
The actual update step is handled automatically by Optimisers.jl.
After implementing the "internal" functions `init` and `apply!` to define a custom optimizer, we can use the "public" API:

- `Optimisers.setup`: calls `init` to set up the optimizer
- `Optimisers.update`: calls `apply!` to compute `new_grad` and `next_state` and performs the update step `params_new = params - new_grad`
"""¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$06c0ad65-22d4-4c8e-ae19-4f05ba125e79„§cell_idÙ$06c0ad65-22d4-4c8e-ae19-4f05ba125e79¤codeÙkmd"### Initializing packages
**Note:** Running this notebook for the first time can take several minutes.
"¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$dcbf8963-4a5c-4e7d-81a9-3dce27fb3117„§cell_idÙ$dcbf8963-4a5c-4e7d-81a9-3dce27fb3117¤codeÙômd"Let's check whether the transformed data has $\mu'=0$ and $\sigma'=1$.

Note that due to [rounding errors](https://en.wikipedia.org/wiki/Machine_epsilon) arising from floating point arithmetic, the results will not be exactly zero and one:
"¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$5762be30-3084-4eda-9642-19dc9d4dcb10„§cell_idÙ$5762be30-3084-4eda-9642-19dc9d4dcb10¤codeÚÕif !@isdefined(GradientDescent)
    keep_working(md"Make sure that you define a struct called `GradientDescent`.")
elseif !hasmethod(Optimisers.init, Tuple{GradientDescent,Vector{Float64}})
    keep_working()
else
    let
        gd = GradientDescent()
        state = Optimisers.init(gd, [1.0])
        if !isnothing(state)
            keep_working(md"Initializing `GradientDescent` should return `nothing`.")
        else
            correct()
        end
    end
end¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$39063d08-d687-45a2-8367-734b12dcefea„§cell_idÙ$39063d08-d687-45a2-8367-734b12dcefea¤codeÚ(if !@isdefined(Standardize)
    keep_working(md"Make sure that you define a struct called `Standardize`.")
elseif !@isdefined(transform)
    not_defined(:transform)
elseif !@isdefined(inverse_transform)
    not_defined(:inverse_transform)
else
    let
        train = [1, 4, 5]
        test = [2, 1, 3]
        dtt = Standardize(train)

        res_tf = transform(test, dtt)
        sol_tf = [-0.6405126152203485, -1.12089707663561, -0.1601281538050872]

        res_itf = inverse_transform(res_tf, dtt)

        if ismissing(res_tf)
            still_missing(md"Replace `missing` in `transform` with your answer.")
        elseif isnothing(res_tf)
            keep_working(md"Did you forget to write `return` in `transform`?")
        elseif !(res_tf â‰ˆ sol_tf)
            keep_working(md"The answer is not quite right. Keep working on `transform`.")
        elseif ismissing(res_itf)
            still_missing(md"Replace `missing` in `inverse_transform` with your answer.")
        elseif isnothing(res_itf)
            keep_working(md"Did you forget to write `return` in `inverse_transform`?")
        elseif !(res_itf â‰ˆ test)
            keep_working(
                md"The answer is not quite right. Keep working on `inverse_transform`."
            )
        else
            correct()
        end
    end
end¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃÙ$582cf667-b85b-4a7d-bb17-88d4776fc240„§cell_idÙ$582cf667-b85b-4a7d-bb17-88d4776fc240¤code°using Optimisers¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÂÙ$d03e4e95-faab-4ab3-ab27-81189cbd8231„§cell_idÙ$d03e4e95-faab-4ab3-ab27-81189cbd8231¤codeÙ‘student = (
    name="Mara Mustermann",
    email="m.mustermann@campus.tu-berlin.de", # TU Berlin email address
    id=456123, # Matrikelnummer
)¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÂÙ$e0705a25-a01e-43a8-8c1d-ccf0da22fca7„§cell_idÙ$e0705a25-a01e-43a8-8c1d-ccf0da22fca7¤codeÚumd"""#### Updating the optimizer
The function `apply!` is can do two things before the final update step is applied:
1. it can modify the gradient
1. it can update the optimizer state

```julia
function Optimisers.apply!(alg::MyOptimiser, state, params, grad)
  grad_new = ... # some computation
  state_new = ... # some computation
  return state_new, grad_new
end
```
"""¨metadataƒ©show_logsÃ¨disabledÂ®skip_as_scriptÂ«code_foldedÃ«notebook_idÙ$ac42f60e-a829-11f0-147b-db1b68dd41ad«in_temp_dirÂ¨metadata€