vlbthambawita commited on
Commit
a87c29e
·
verified ·
1 Parent(s): 8f5084b

Release site-v1.0.3 (part 2)

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. lecture-02/assets/Katex-BuUbKNzG.js +0 -0
  2. lecture-02/assets/PerceptronPlayground-DauUBgxr.js +1 -0
  3. lecture-02/assets/SlideWrapper-C34Y14yR.js +1 -0
  4. lecture-02/assets/default-A5OOL8XO.js +1 -0
  5. lecture-02/assets/index-BRVUm3_6.js +46 -0
  6. lecture-02/assets/index-Bc3H5Jm0.css +0 -0
  7. lecture-02/assets/interactive-B3FqelG7.js +1 -0
  8. lecture-02/assets/md-BEyfrkX32.js +1 -0
  9. lecture-02/assets/md-BNpOqr5d.js +1 -0
  10. lecture-02/assets/md-BWa-9V8C2.js +1 -0
  11. lecture-02/assets/md-Bja0-0_W.js +1 -0
  12. lecture-02/assets/md-BogGe-l_.js +18 -0
  13. lecture-02/assets/md-C2mYSVdr.js +1 -0
  14. lecture-02/assets/md-CSL0Sr8I.js +1 -0
  15. lecture-02/assets/md-CiMC_C1d2.js +1 -0
  16. lecture-02/assets/md-CmjeJDum.js +1 -0
  17. lecture-02/assets/md-CskVyE9c2.js +1 -0
  18. lecture-02/assets/md-DE5q4xMj.js +10 -0
  19. lecture-02/assets/md-DMN_0eSx.js +1 -0
  20. lecture-02/assets/md-DN1adK8J.js +1 -0
  21. lecture-02/assets/md-DQNDl3y5.js +1 -0
  22. lecture-02/assets/md-DQQXWQyl.js +1 -0
  23. lecture-02/assets/md-DTjbijE-2.js +1 -0
  24. lecture-02/assets/md-DX2Ec6q82.js +1 -0
  25. lecture-02/assets/md-Dc2hhIb1.js +1 -0
  26. lecture-02/assets/md-DfR_9CeO.js +1 -0
  27. lecture-02/assets/md-DfiJa7pa.js +1 -0
  28. lecture-02/assets/md-Dfk2xxNa.js +1 -0
  29. lecture-02/assets/md-DkOhBsH72.js +3 -0
  30. lecture-02/assets/md-Dr4FkHvo2.js +1 -0
  31. lecture-02/assets/md-DuoqZThg.js +1 -0
  32. lecture-02/assets/md-Pa5cvCqg2.js +5 -0
  33. lecture-02/assets/md-SRfUxs1P2.js +1 -0
  34. lecture-02/assets/md-Udpkj3Y1.js +1 -0
  35. lecture-02/assets/md-eBbKSq5M2.js +1 -0
  36. lecture-02/assets/md-xJci9bFZ.js +1 -0
  37. lecture-02/assets/slidev/404-CWdjs5kx.js +1 -0
  38. lecture-02/assets/slidev/CodeBlockWrapper-ClYx9M-I.js +1 -0
  39. lecture-02/assets/slidev/DrawingControls-1u13NB8P.js +1 -0
  40. lecture-02/assets/slidev/DrawingLayer-B_4rAFGl.js +1 -0
  41. lecture-02/assets/slidev/KaTexBlockWrapper-M48-zhMq.js +1 -0
  42. lecture-02/assets/slidev/NoteDisplay-C3x6Bkvc.js +1 -0
  43. lecture-02/assets/slidev/NoteEditable-Bn2MFV6B.js +1 -0
  44. lecture-02/assets/slidev/TimerBar-DXeFq3ot.js +1 -0
  45. lecture-02/assets/slidev/VClicks-buBFUjdS.js +1 -0
  46. lecture-02/assets/slidev/notes-CnMlvFmG.js +1 -0
  47. lecture-02/assets/slidev/notes-edit-BkT-GYNi.js +2 -0
  48. lecture-02/assets/slidev/overview-v0VPTUGO.js +1 -0
  49. lecture-02/assets/slidev/play-Mg5_I3MA.js +2 -0
  50. lecture-02/assets/slidev/presenter-DVUYqPtJ.js +1 -0
lecture-02/assets/Katex-BuUbKNzG.js ADDED
The diff for this file is too large to render. See raw diff
 
lecture-02/assets/PerceptronPlayground-DauUBgxr.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,C as t,Ct as n,S as r,T as i,Z as a,_ as o,b as s,c,dt as l,et as u,g as d,m as f,tt as p,v as m,y as h}from"./modules/shiki-CRDHBXw7.js";import{t as g}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as _}from"./slidev/context-Dpnqq1ol.js";import{t as v}from"./WidgetFrame-i_n0SXJC.js";import{t as y}from"./Katex-BuUbKNzG.js";import{n as b,t as x}from"./PlotLine-C3bT02q3.js";import{t as S}from"./StepButton-BfWgSKte.js";import{n as C,t as w}from"./PlotPoints-DFeqey9j.js";import{t as T}from"./useRandom-D_d9WpzZ.js";var E={class:`dl-perc__toggle`},D={class:`dl-perc__weights`},O={key:0,class:`dl-perc__done`},k={key:1,class:`dl-perc__warn`},A=g(i({__name:`PerceptronPlayground`,props:{mode:{default:`train`},separable:{type:Boolean,default:!0},eta:{default:.1},points:{default:24},seed:{default:20260101}},setup(i){let{$slidev:g,$nav:A,$clicksContext:j,$clicks:ee,$page:te,$renderContext:ne,$frontmatter:re}=_(),M=i,N=[-1,7],P=l(M.separable),F=l(M.eta),I=l(0),L=l(0),R=l(0),z=l(0),B=l(0),V=l(0),H=l(null),U=d(()=>{let e=T(M.seed),t=.62,n=P.value?2.4:.85,r=[];for(let i=0;i<M.points;i++){let a=i%2==0?0:1,o=3+(a===1?n:-n),s=3+(a===1?n*.55:-n*.55);r.push({x:o+e()*t,y:s+e()*t,label:a})}return r}),W=e=>I.value*e.x+L.value*e.y+R.value,G=e=>+(W(e)>=0),K=d(()=>U.value.filter(e=>G(e)!==e.label).length),q=d(()=>K.value===0&&B.value>0);function J(){I.value=0,L.value=0,R.value=0,z.value=0,B.value=0,V.value=0,H.value=null}a(P,J);function Y(){let e=z.value%U.value.length,t=U.value[e],n=t.label-G(t);n!==0&&(I.value+=F.value*n*t.x,L.value+=F.value*n*t.y,R.value+=F.value*n,B.value++),H.value=e,z.value++,z.value%U.value.length===0&&V.value++}function X(){let e=U.value.length-z.value%U.value.length;for(let t=0;t<e;t++)Y()}let Z=d(()=>{let[e,t]=N;if(Math.abs(L.value)>1e-9){let n=e=>-(I.value*e+R.value)/L.value;return{from:[e,n(e)],to:[t,n(t)]}}if(Math.abs(I.value)>1e-9){let n=-R.value/I.value;return{from:[n,e],to:[n,t]}}return null}),Q=d(()=>U.value.map((e,t)=>({x:e.x,y:e.y,cls:G(e)===e.label?`ok${e.label}`:`wrong`,highlight:t===H.value}))),$={ok0:`var(--dl-accent)`,ok1:`var(--dl-heading)`,wrong:`var(--dl-danger)`},ie={ok0:`circle`,ok1:`square`,wrong:`triangle`};return(i,a)=>{let l=x,d=w,g=C,_=S,T=b,A=y,j=v;return e(),m(j,{"max-width":`44rem`},{controls:u(()=>[M.mode===`train`?(e(),s(f,{key:0},[t(_,{label:`One sample`,glyph:`▶`,disabled:q.value,onClick:Y},null,8,[`disabled`]),t(_,{label:`One epoch`,variant:`ghost`,disabled:q.value,onClick:X},null,8,[`disabled`]),t(_,{label:`Reset`,variant:`ghost`,onClick:J}),t(T,{modelValue:F.value,"onUpdate:modelValue":a[0]||=e=>F.value=e,label:`learning rate η`,min:.01,max:.5,step:.01,class:`dl-perc__eta`},null,8,[`modelValue`])],64)):h(`v-if`,!0),o(`label`,E,[p(o(`input`,{"onUpdate:modelValue":a[1]||=e=>P.value=e,type:`checkbox`},null,512),[[c,P.value]]),a[2]||=r(` linearly separable `,-1)])]),readout:u(()=>[o(`div`,D,[t(A,{expr:`w_1 = ${I.value.toFixed(2)},\\; w_2 = ${L.value.toFixed(2)},\\; b = ${R.value.toFixed(2)}`},null,8,[`expr`])]),o(`div`,null,[r(n(K.value)+` misclassified of `+n(U.value.length)+` · `+n(B.value)+` weight update`+n(B.value===1?``:`s`)+` · `+n(V.value)+` epoch`+n(V.value===1?``:`s`)+` `,1),q.value?(e(),s(`span`,O,`converged — no error left to learn from`)):!P.value&&V.value>=3?(e(),s(`span`,k,` still updating: the classes overlap, so the rule never settles `)):h(`v-if`,!0)])]),default:u(()=>[t(g,{"x-domain":N,"y-domain":N,width:480,height:330,"x-label":`x₁`,"y-label":`x₂`,"x-ticks":5,"y-ticks":5},{default:u(()=>[Z.value?(e(),m(l,{key:0,from:Z.value.from,to:Z.value.to,color:`var(--dl-accent-strong)`,width:2.5},null,8,[`from`,`to`])):h(`v-if`,!0),t(d,{points:Q.value,colors:$,shapes:ie,radius:6},null,8,[`points`])]),_:1})]),_:1})}}}),[[`__scopeId`,`data-v-90659d39`]]);export{A as t};
lecture-02/assets/SlideWrapper-C34Y14yR.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{$ as e,B as t,C as n,K as r,O as i,Q as a,R as o,St as s,T as c,U as l,Z as u,_ as d,b as f,bt as p,dt as m,g as h,gt as g,i as _,lt as v,m as ee,v as y,y as b,yt as x,z as te}from"./modules/shiki-CRDHBXw7.js";import{A as S,Q as C,X as w,Z as T,t as E,tt as D,z as O}from"./useNav-0H1CZeft.js";import{t as k}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{N as A,p as ne}from"./modules/vue-jGGq3ahv.js";import{_ as re,d as j,f as M,g as N,h as P,m as F,p as I,v as L}from"./slidev/context-Dpnqq1ol.js";import{n as R,r as z,t as B}from"./syncState-BY3YUPaY.js";import{a as V,p as H}from"./index-BRVUm3_6.js";import{t as U}from"./useDrawings-B5C1Zlkn.js";var W=[`innerHTML`],G=c({__name:`DrawingPreview`,props:{page:{}},setup(e){let{drawingState:n}=U();return(r,i)=>x(n)[e.page]?(t(),f(`svg`,{key:0,class:`w-full h-full absolute top-0 pointer-events-none`,innerHTML:x(n)[e.page]},null,8,W)):b(`v-if`,!0)}}),K=v({}),q=[],J=[];R(K,`$syncUp`,!0),R(K,`$syncDown`,!0),R(K,`$paused`,!1),R(K,`$onSet`,e=>q.push(e)),R(K,`$onPatch`,e=>J.push(e)),z(),R(K,`$patch`,async()=>!1);var Y=B(K,K,!0),X=window.navigator.userAgent.match(/Chrome\/(\d+)/)?.[1];X&&Number(X);var Z=window.navigator.userAgent.match(/Chrome\/(\d+)/)?.[1];Z&&Number(Z);var ie=new class{_screenshotSession=null;getSnapshot(e,t){let n=e+(t?`-dark`:`-light`),r=Y.state[n];if(!r)return;let i=O(e);if(i&&r?.revision===i?.meta.slide.revision)return r.image}async saveSnapshot(e,t,n){return!1}async startCapturing(e){return!1}},ae=[`id`],oe=[`id`],se={class:`slidev-slide-container w-full h-full relative`},ce=[`src`],Q=m(null),le=k(c({__name:`SlideContainer`,props:{width:{type:Number},meta:{default:()=>({})},isMain:{type:Boolean,default:!1},no:{type:Number,required:!1},useSnapshot:{type:Boolean,default:!1},contentStyle:{type:Object,default:()=>({})}},setup(n){let r=n,{isPrintMode:i}=E(),c=m(null),p=ne(c),g=m(null),v=h(()=>r.width??p.width.value),y=h(()=>r.width?r.width/w.value:p.height.value),x=h(()=>S.value&&!i.value?+S.value:Math.min(v.value/C.value,y.value/T.value)),D=h(()=>({...r.contentStyle,height:`${T.value}px`,width:`${C.value}px`,"--slidev-slide-scale":x.value})),O=h(()=>r.width?{width:`${r.width}px`,height:`${r.width/w.value}px`}:{});if(r.isMain){let e=document.documentElement.style;a(()=>e.setProperty(`--slidev-slide-scale`,x.value.toString())),te(()=>e.removeProperty(`--slidev-slide-scale`))}A(re,x),A(N,g),e(()=>{r.isMain&&(Q.value=g.value)}),o(()=>{u(()=>r.isMain&&x.value,()=>{_()})});let k=h(()=>{if(!(r.no==null||!r.useSnapshot))return ie.getSnapshot(r.no,H.value)});return(e,r)=>k.value?(t(),f(ee,{key:1},[b(` Image Snapshot `),d(`div`,se,[d(`img`,{src:k.value,class:`w-full h-full object-cover`,style:s(O.value)},null,12,ce),r[0]||=d(`div`,{absolute:``,"bottom-1":``,"right-1":``,"p0.5":``,"text-cyan:75":``,"bg-cyan:10":``,rounded:``,title:`Snapshot`},[d(`div`,{class:`i-carbon-camera`})],-1)])],2112)):(t(),f(`div`,{key:0,id:n.isMain?`slide-container`:void 0,ref_key:`container`,ref:c,class:`slidev-slide-container`,style:s(O.value)},[d(`div`,{id:n.isMain?`slide-content`:void 0,ref_key:`slideElement`,ref:g,class:`slidev-slide-content`,style:s(D.value)},[l(e.$slots,`default`,{},void 0,!0)],12,oe),l(e.$slots,`controls`,{},void 0,!0)],12,ae))}}),[[`__scopeId`,`data-v-0167a76e`]]),ue=Object.assign({}),de=Object.assign({}),fe=Object.assign({}),pe=Object.assign({}),me=Object.assign({}),he=Object.assign({}),ge=Object.assign({}),_e=Object.assign({}),ve=Object.assign({}),ye=Object.assign({}),be=Object.assign({}),$=Object.assign({}),xe=[Object.values(ue)[0],Object.values(de)[0],Object.values(fe)[0]].filter(Boolean),Se={render:()=>xe.map(e=>i(e))},Ce=[Object.values(pe)[0],Object.values(me)[0],Object.values(he)[0]].filter(Boolean),we={render:()=>Ce.map(e=>i(e))},Te=[Object.values(ge)[0],Object.values(_e)[0],Object.values(ve)[0]].filter(Boolean),Ee={render:()=>Te.map(e=>i(e))},De=[Object.values(ye)[0],Object.values(be)[0],Object.values($)[0]].filter(Boolean),Oe={render:()=>De.map(e=>i(e))},ke=[`data-slidev-no`,`lang`],Ae=k(c({__name:`SlideWrapper`,props:{clicksContext:{type:Object,required:!0},renderContext:{type:String,default:`slide`},route:{type:Object,required:!0}},setup(e){let i=e,a=h(()=>i.route.meta?.slide?.frontmatter.zoom??1);A(P,i.route),A(I,i.route.meta.slide.frontmatter),A(M,m(i.route.no)),A(F,m(i.renderContext)),A(j,g(i,`clicksContext`)),A(L,a);let o=h(()=>({"user-select":D.selectable?void 0:`none`,"--slidev-slide-zoom-scale":a.value===1?void 0:a.value}));return(a,c)=>(t(),f(`div`,{"data-slidev-no":i.route.no,class:p(x(V)(e.route,[`slide`,`presenter`].includes(i.renderContext)?``:`disable-view-transition`)),style:s(o.value),lang:i.route.meta.slide.frontmatter.lang},[n(x(Oe)),(t(),y(r(i.route.component))),n(x(Ee))],14,ke))}}),[[`__scopeId`,`data-v-a7136532`]]);export{Q as a,le as i,we as n,G as o,Se as r,Ae as t};
lecture-02/assets/default-A5OOL8XO.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,C as t,U as n,b as r}from"./modules/shiki-CRDHBXw7.js";import{t as i}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as a}from"./slidev/context-Dpnqq1ol.js";import{t as o}from"./DeckFooter-JTMZpkwe.js";var s={class:`slidev-layout dl-default`},c=i({__name:`default`,setup(i){let{$slidev:c,$nav:l,$clicksContext:u,$clicks:d,$page:f,$renderContext:p,$frontmatter:m}=a();return(i,a)=>{let c=o;return e(),r(`div`,s,[n(i.$slots,`default`,{},void 0,!0),t(c)])}}},[[`__scopeId`,`data-v-3f3da7ce`]]);export{c as t};
lecture-02/assets/index-BRVUm3_6.js ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./modules/file-saver-BpWusTEB.js","./rolldown-runtime-hePW80VL.js","./slidev/entry-BM9MjO68.js","./modules/shiki-CRDHBXw7.js","./modules/shiki-BrmBd2_v.css","./_plugin-vue_export-helper-BDNMzG2s.js","./entry-Dba4BKje.css","./slidev/overview-v0VPTUGO.js","./useNav-0H1CZeft.js","./modules/vue-jGGq3ahv.js","./slidev/context-Dpnqq1ol.js","./modules/unplugin-icons-BOSF4mXp.js","./slidev/IconButton-BiAlWjlk.js","./slidev/NoteDisplay-C3x6Bkvc.js","./NoteDisplay-DCBzjb4F.css","./SlideWrapper-C34Y14yR.js","./syncState-BY3YUPaY.js","./useDrawings-B5C1Zlkn.js","./SlideWrapper-O3NT4xUm.css","./slidev/NoteEditable-Bn2MFV6B.js","./overview-BIQ10iVu.css","./slidev/notes-CnMlvFmG.js","./slidev/Modal-DRjfPn8c.js","./slidev/TimerBar-DXeFq3ot.js","./slidev/notes-edit-BkT-GYNi.js","./slidev/presenter-DVUYqPtJ.js","./slidev/DrawingControls-1u13NB8P.js","./slidev/VerticalDivider-BuDt2kNg.js","./DrawingControls-Dhbx0szf.css","./slidev/shortcuts-ByMJT9fF.js","./shortcuts-nRB69a7e.css","./presenter-J5ibmAMh.css","./slidev/play-Mg5_I3MA.js","./play-D_7yfuao.css","./slidev/404-CWdjs5kx.js","./404-bkedjYjP.css"])))=>i.map(i=>d[i]);
2
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{A as t,B as n,C as r,E as i,F as a,I as o,L as s,Q as c,T as l,W as u,Z as d,b as f,dt as p,g as m,it as h,k as g,lt as _,m as v,mt as y,ot as b,s as x,t as S,vt as C,y as w,yt as T}from"./modules/shiki-CRDHBXw7.js";import{$ as E,A as ee,B as te,G as ne,H as re,Q as D,R as ie,Z as ae,c as oe,et as O,h as se,j as k,l as ce,n as le,p as A,q as j,t as ue,tt as M,w as de,z as fe}from"./useNav-0H1CZeft.js";import{A as pe,L as me,R as he,S as ge,T as _e,V as ve,f as ye,g as be,i as xe,j as Se,o as Ce,x as we,z as Te}from"./modules/vue-jGGq3ahv.js";import{a as Ee,c as De,d as Oe,f as ke,g as Ae,i as je,m as Me,o as Ne,p as Pe,r as Fe,s as Ie,u as Le,y as Re}from"./slidev/context-Dpnqq1ol.js";import{n as N,r as ze,t as Be}from"./syncState-BY3YUPaY.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})(),p(!1),p(!1);var Ve=new Set([`link`,`style`,`script`,`noscript`]),He=new Set([`title`,`titleTemplate`,`script`,`style`,`noscript`]),Ue=new Set([`base`,`meta`,`link`,`style`,`script`,`noscript`]),We=new Set([`title`,`base`,`htmlAttrs`,`bodyAttrs`,`meta`,`link`,`style`,`script`,`noscript`]),Ge=new Set([`base`,`title`,`titleTemplate`,`bodyAttrs`,`htmlAttrs`,`templateParams`]),Ke=new Set([`key`,`tagPosition`,`tagPriority`,`tagDuplicateStrategy`,`innerHTML`,`textContent`,`processTemplateParams`]),qe=new Set([`templateParams`,`htmlAttrs`,`bodyAttrs`]),Je=new Set([`theme-color`,`google-site-verification`,`author`,`og:locale:alternate`,`og:image`,`og:video`,`og:audio`,`article:author`,`article:tag`,`book:author`,`book:tag`,`twitter:image`]),Ye={critical:-8,high:-1,low:2},Xe=e=>typeof e==`number`?Number.isFinite(e):e;function Ze(e){return e===`__proto__`||e===`constructor`||e===`prototype`}function Qe(e,t,n,r){for(let i=n;i<e.length;i+=1)try{let n=r?r.run(()=>e[i](...t)):e[i](...t);if(n&&typeof n.then==`function`)return Promise.resolve(n).then(()=>Qe(e,t,i+1,r))}catch(e){return Promise.reject(e)}}var $e=class{_hooks;constructor(){this._hooks={}}hook(e,t){return!e||typeof t!=`function`?()=>{}:(this._hooks[e]=this._hooks[e]||[],this._hooks[e].push(t),()=>{t&&=(this.removeHook(e,t),void 0)})}removeHook(e,t){let n=this._hooks[e];if(n){let r=n.indexOf(t);r!==-1&&n.splice(r,1),n.length===0&&(this._hooks[e]=void 0)}}callHook(e,...t){let n=this._hooks[e];if(!(!n||n.length===0))return Qe(n,t,0)}};function et(e){let t=new $e;for(let n in e||{})t.hook(n,e[n]);return t}function tt(e,t,n){if(e.hooks?._hooks?.[t]?.length)return e.hooks?.callHook(t,n)}var nt=/^(?:viewport|description|keywords|robots)$/,rt=[`name`,`property`,`http-equiv`];function it(e){let t=e.indexOf(`:`);if(t===-1)return!1;let n=e.slice(t+1);return Je.has(n)||n.startsWith(`og:image:`)||n.startsWith(`og:video:`)||n.startsWith(`og:audio:`)||n.startsWith(`twitter:image:`)}function at(e){let{props:t,tag:n,key:r}=e;if(Ge.has(n))return n;if(n===`link`){if(t.rel===`canonical`)return`canonical`;if(t.rel===`alternate`&&t.hreflang)return`alternate:${t.hreflang}`}if(t.charset)return`charset`;if(n===`meta`)for(let e of rt){let n=t[e];if(n!==void 0)return`meta:${n}${(typeof n!=`string`||!n.includes(`:`))&&!nt.test(n)&&r?`:key:${r}`:``}`}return r?`${n}:key:${r}`:t.id?`${n}:id:${t.id}`:n===`link`&&t.rel&&t.href?`link:${t.rel}:${t.href}`:He.has(n)&&(e.textContent||e.innerHTML)?`${n}:content:${e.textContent||e.innerHTML}`:void 0}function ot(e){let t=e._h||e._d||e.textContent||e.innerHTML;if(t)return t;let n=Object.keys(e.props).sort(),r=`${e.tag}:`,i=``;for(let t of n)r+=`${i}${t}:${String(e.props[t])}`,i=`,`;return r}function st(e,t,n){if(n===`_resolver`)return e;typeof e==`function`&&(!n||n!==`titleTemplate`&&!n.startsWith(`on`))&&(e=e());let r=t?t(n,e):e;if(Array.isArray(r)){let e;for(let n=0;n<r.length;n++){let i=st(r[n],t);e?e[n]=i:i!==r[n]&&(e=r.slice(0,n),e[n]=i)}return e||r}if(r?.constructor===Object){let e;for(let n in r){let i=Ze(n),a=i?void 0:st(r[n],t,n);if(!e&&(i||a!==r[n])){e={};for(let t in r){if(t===n)break;e[t]=r[t]}}e&&!i&&(e[n]=a)}return e||r}return r}var ct=/[\s"'<>/=\x00-\x1F\x7F]/;function lt(e,t){let n=e===`style`,r=n?new Map:new Set,i=e=>{if(e){if(n){let t=e.indexOf(`:`);t>0&&r.set(e.slice(0,t).trim(),e.slice(t+1).trim())}else e.split(` `).forEach(e=>e&&r.add(e))}};if(typeof t==`string`)(n?t.split(`;`):[t]).forEach(i);else if(Array.isArray(t))t.forEach(i);else if(t&&typeof t==`object`)for(let e in t){let a=t[e];a&&a!==`false`&&(n?r.set(e.trim(),String(a)):i(e))}return r}function ut(e,t){if(e.props=e.props||{},!t)return e;if(e.tag===`templateParams`)return e.props=t,e;let n=Ue.has(e.tag)||e.tag===`htmlAttrs`||e.tag===`bodyAttrs`;for(let r in t){if(Ze(r))continue;let i=r.startsWith(`data-`),a=n&&!Ke.has(r),o=a&&!i?r.toLowerCase():r;if(a&&(!o||ct.test(o)))continue;let s=t[r];if(s===null)e.props[o]=null;else if(r===`class`||r===`style`)e.props[r]=lt(r,s);else if(Ke.has(r)){if((r===`textContent`||r===`innerHTML`)&&typeof s==`object`){let n=t.type||`application/json`;(n.endsWith(`json`)||n===`speculationrules`||n===`importmap`)&&(e.props.type=t.type=n,e[r]=JSON.stringify(s))}else e[r]=s}else if(s!==void 0){let t=String(s),n=e.tag===`meta`&&o===`content`;e.props[o]=t===`true`||t===``?i||n?t:!0:!s&&i&&t===`false`?`false`:s}}return e}function dt(e,t){let n;return t.length&&(n=(e,n)=>{for(let r=0;r<t.length;r++)n=t[r](e,n);return n},e=n(void 0,e)),st(e,n)}function ft(e,t){let n=ut({tag:e,props:{}},typeof t==`object`&&typeof t!=`function`?t:{[e===`script`||e===`noscript`||e===`style`?`innerHTML`:`textContent`]:t});if(n.key&&Ve.has(n.tag)&&(n.props[`data-hid`]=n._h=n.key),n.tag===`script`&&typeof n.innerHTML==`object`&&(n.innerHTML=JSON.stringify(n.innerHTML),n.props.type=n.props.type||`application/json`),Array.isArray(n.props.content)){let e=[];for(let t of n.props.content)e.push({...n,props:{...n.props,content:t}});return e}return n}function pt(e,t){if(Array.isArray(t))for(let n of t)e.push(n);else e.push(t)}function mt(e,t){if(!e)return[];typeof e==`function`&&(e=e()),e=dt(e,t);let n=[];for(let t in e){let r=e[t];if(r!==void 0){if(Array.isArray(r))for(let e of r)pt(n,ft(t,e));else pt(n,ft(t,r))}}return n}var ht=/</g,gt=/<\/script/g,_t=(e,t)=>e._w===t._w?e._p-t._p:e._w-t._w,vt=()=>100;function yt(e){for(let t in e)return!1;return!0}var bt=/^tags:|:render/;function xt(e,t){let n=(t[`entries:resolve`]?.length||0)+(t[`entries:normalize`]?.length||0);if(e._h!==n){e._h=n;for(let t of e.entries.values())delete t._tags}}function St(e){for(let t=0;t<e.length;t++){let n=e[t],r={...n.props};r.class instanceof Set&&(r.class=new Set(r.class)),r.style instanceof Map&&(r.style=new Map(r.style)),e[t]={...n,props:r}}}function Ct(e,t){let n=e.tags,r=0;for(let t of e.tagMap.values())if(Array.isArray(t))for(let e of t)n[r++]=e;else n[r++]=t;n.length=r,t&&n.sort(_t)}function wt(e){let t=!1;for(let n of e.tags.sort(_t)){let r=n._d||ot(n);if(!r)continue;let i=e.tagMap.get(r);if(!i){e.tagMap.set(r,n);continue}if((n.tagDuplicateStrategy||(qe.has(n.tag)?`merge`:null)||(n.key&&n.key===i.key?`merge`:null))===`merge`){let t={...i.props};for(let e in n.props)t[e]=e===`style`?new Map([...i.props.style||new Map,...n.props[e]]):e===`class`?new Set([...i.props.class||[],...n.props[e]]):n.props[e];e.tagMap.set(r,{...n,props:t})}else n._p>>10==i._p>>10&&n.tag===`meta`&&it(r)?(e.tagMap.set(r,Object.assign([...Array.isArray(i)?i:[i],n],n)),t=!0):(n._w===i._w?n._p>i._p:n._w<i._w)&&e.tagMap.set(r,n)}return t}function Tt(e,t){let n=e.tagMap.get(`title`),r=e.tagMap.get(`titleTemplate`);if(t._title=n?.textContent,!r)return;let i=r.textContent;if(t._titleTemplate=i,!i)return;let a=typeof i==`function`?i(n?.textContent):i;typeof a==`string`&&!t.plugins.has(`template-params`)&&(a=a.replace(`%s`,n?.textContent||``)),n?a===null?e.tagMap.delete(`title`):e.tagMap.set(`title`,{...n,textContent:a}):e.tagMap.set(`titleTemplate`,{...r,tag:`title`,textContent:a})}function Et(e){let t=0;for(let n of e){let{innerHTML:r,tag:i,props:a}=n;if(!(!We.has(i)||yt(a)&&!Xe(r)&&!Xe(n.textContent))&&!(i===`meta`&&!Xe(a.content)&&!a[`http-equiv`]&&!a.charset)){if(i===`script`&&(r||n.textContent)){let e=String(a.type),t=e.endsWith(`json`)||e===`importmap`||e===`speculationrules`,i=e=>t?(typeof e==`string`?e:JSON.stringify(e)).replace(ht,`\\u003C`):typeof e==`string`?e.replace(gt,`<\\/script`):e;n={...n},r&&(n.innerHTML=i(r)),n.textContent&&(n.textContent=i(n.textContent)),n._d=at(n)}e[t++]=n}}return e.length=t,e}function Dt(e,t){let n=t?.tagWeight??e.resolvedOptions._tagWeight??vt,r={tagMap:new Map,tags:[]},i=e.hooks?._hooks||{};xt(e,i);for(let t of e.entries.values())t._pending!==void 0&&(t.input=t._pending,delete t._pending,delete t._tags,delete t._precomputedTags);let a;(i[`entries:resolve`]?.length||i[`entries:normalize`]?.length)&&(a=[...e.entries.values()],i[`entries:resolve`]?.length&&tt(e,`entries:resolve`,{entries:a,...r})),xt(e,i);for(let t of a||e.entries.values()){let a=t._tags;if(!a){if(t._precomputedTags&&n===e.resolvedOptions._tagWeight&&!i[`entries:normalize`]?.length&&!i[`entries:resolve`]?.length&&(!t.options||yt(t.options)))a=t._precomputedTags;else{if(a=mt(t.input,e.resolvedOptions.propResolvers||[]),t.options&&!yt(t.options))for(let e of a)Object.assign(e,t.options);if(i[`entries:normalize`]?.length){let n={tags:a,entry:t};tt(e,`entries:normalize`,n),a=n.tags}for(let e=0;e<a.length;e++){let r=a[e];r._w=n(r),r._p=(t._i<<10)+e,r._d=at(r),r._d||(r._h=ot(r))}t._tags=a}}r.tags.push(...a)}for(let e in i)if(i[e]?.length&&bt.test(e)){St(r.tags);break}let o=wt(r);return Tt(r,e),Ct(r,o),tt(e,`tags:beforeResolve`,r),tt(e,`tags:resolve`,r),tt(e,`tags:afterResolve`,r),Et(r.tags)}var Ot=`usehead`;function kt(){if(g()){let e=t(Ot);if(e)return e}throw Error(`useHead() was called without provide context, ensure you call it through the setup() function.`)}function At(e){return{install(t){t.config.globalProperties.$unhead=e,t.config.globalProperties.$head=e,t.provide(Ot,e)}}.install}var jt=Object.assign((e,t)=>b(t)?C(t):t,{_static:!0});function Mt(e,t={}){let n=t.head||kt();return n.ssr?n.push(e||{},t):Nt(n,e,t)}function Nt(e,t,n={}){let r=h();if(r&&!r.active)return{patch(){},dispose(){},_i:-1};let l=p(!1);if(n.onRendered&&r){let e=n.onRendered;n={...n,onRendered:t=>r.run(()=>e(t))}}let u;return c(()=>{let r=l.value?{}:st(t,jt);u?u.patch(r):u=e.push(r,n)}),i()&&(o(()=>{u.dispose()}),s(()=>{l.value=!0}),a(()=>{l.value=!1})),u}function Pt(e,t){if(typeof t==`function`&&t.key&&e.plugins.has(t.key))return;let n=typeof t==`function`?t(e):t,r=n.key||String(e.plugins.size+1);if(!e.plugins.get(r)){e.plugins.set(r,n);for(let t in n.hooks||{})e.hooks?.hook(t,n.hooks[t])}}function Ft(e,t={}){let n=!t.document,r=new Map,i={_entryCount:1,_h:0,plugins:new Map,resolvedOptions:t,ssr:n,entries:r,hooks:void 0,render:()=>e(i),use:e=>Pt(i,e),push(e,t){let a=t?._index??i._entryCount++,o=t?{...t}:{};delete o.head,delete o.onRendered,delete o._index;let s={_i:a,input:e,options:o};return r.set(a,s),{_i:a,dispose(){r.delete(a)},patch(e){n?(s.input=e,delete s._tags):s._pending=e,r.has(a)||r.set(a,s)}}}};return t.init?.forEach(e=>e&&i.push(e)),i}var It=Object.assign({}),Lt=Object.assign({}),Rt=Object.assign({}),zt=[Object.values(It)[0],Object.values(Lt)[0],Object.values(Rt)[0]].filter(Boolean),Bt=we(),Vt=be(`slidev-color-schema`,`auto`),Ht=m(()=>M.colorSchema!==`auto`),Ut=m({get(){return Ht.value?M.colorSchema===`dark`:Vt.value===`auto`?Bt.value:Vt.value===`dark`},set(e){Ht.value||(Vt.value=e===Bt.value?`auto`:e?`dark`:`light`)}}),Wt=me(Ut);Se&&d(Ut,e=>{let t=window.document.createElement(`style`);t.appendChild(document.createTextNode(`*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}`)),window.document.head.appendChild(t);let n=document.querySelector(`html`);n.classList.toggle(`dark`,e),n.classList.toggle(`light`,!e),window.getComputedStyle(t).opacity,document.head.removeChild(t)},{immediate:!0});function Gt(){let{isPrintMode:e}=ue();ge(m(()=>e.value?`
3
+ @page {
4
+ size: ${D.value}px ${ae.value}px;
5
+ margin: 0px;
6
+ }
7
+
8
+ * {
9
+ transition: none !important;
10
+ transition-duration: 0s !important;
11
+ }`:``))}var Kt=Symbol.for(`yaml.alias`),qt=Symbol.for(`yaml.document`),Jt=Symbol.for(`yaml.map`),Yt=Symbol.for(`yaml.pair`),Xt=Symbol.for(`yaml.scalar`),Zt=Symbol.for(`yaml.seq`),P=Symbol.for(`yaml.node.type`),Qt=e=>!!e&&typeof e==`object`&&e[P]===Kt,$t=e=>!!e&&typeof e==`object`&&e[P]===qt,en=e=>!!e&&typeof e==`object`&&e[P]===Jt,F=e=>!!e&&typeof e==`object`&&e[P]===Yt,I=e=>!!e&&typeof e==`object`&&e[P]===Xt,tn=e=>!!e&&typeof e==`object`&&e[P]===Zt;function L(e){if(e&&typeof e==`object`)switch(e[P]){case Jt:case Zt:return!0}return!1}function R(e){if(e&&typeof e==`object`)switch(e[P]){case Kt:case Jt:case Xt:case Zt:return!0}return!1}var nn=e=>(I(e)||L(e))&&!!e.anchor,z=Symbol(`break visit`),rn=Symbol(`skip children`),an=Symbol(`remove node`);function on(e,t){let n=cn(t);$t(e)?sn(null,e.contents,n,Object.freeze([e]))===an&&(e.contents=null):sn(null,e,n,Object.freeze([]))}on.BREAK=z,on.SKIP=rn,on.REMOVE=an;function sn(e,t,n,r){let i=ln(e,t,n,r);if(R(i)||F(i))return un(e,r,i),sn(e,i,n,r);if(typeof i!=`symbol`){if(L(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=sn(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===z)return z;else i===an&&(t.items.splice(e,1),--e)}}else if(F(t)){r=Object.freeze(r.concat(t));let e=sn(`key`,t.key,n,r);if(e===z)return z;e===an&&(t.key=null);let i=sn(`value`,t.value,n,r);if(i===z)return z;i===an&&(t.value=null)}}return i}function cn(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function ln(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(en(t))return n.Map?.(e,t,r);if(tn(t))return n.Seq?.(e,t,r);if(F(t))return n.Pair?.(e,t,r);if(I(t))return n.Scalar?.(e,t,r);if(Qt(t))return n.Alias?.(e,t,r)}function un(e,t,n){let r=t[t.length-1];if(L(r))r.items[e]=n;else if(F(r))e===`key`?r.key=n:r.value=n;else if($t(r))r.contents=n;else{let e=Qt(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}function dn(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function fn(e,t,n,r){if(r&&typeof r==`object`){if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=fn(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=fn(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=fn(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=fn(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function B(e,t,n){if(Array.isArray(e))return e.map((e,t)=>B(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!nn(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!n?.keep?Number(e):e}var pn=class{constructor(e){Object.defineProperty(this,P,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!$t(e))throw TypeError(`A document argument is required`);let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=B(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?fn(i,{"":o},``,o):o}},mn=class extends pn{constructor(e){super(Kt),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError(`Alias resolution is disabled`);let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],on(e,{Node:(e,t)=>{(Qt(t)||nn(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}return r}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:r,maxAliasCount:i}=t,a=this.resolve(r,t);if(!a){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}let o=n.get(a);if(o||=(B(a,null,t),n.get(a)),o?.res===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=hn(r,a,n)),o.count*o.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`);return o.res}toString(e,t,n){let r=`*${this.source}`;if(e){if(dn(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function hn(e,t,n){if(Qt(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(L(t)){let r=0;for(let i of t.items){let t=hn(e,i,n);t>r&&(r=t)}return r}if(F(t)){let r=hn(e,t.key,n),i=hn(e,t.value,n);return Math.max(r,i)}return 1}var gn=e=>!e||typeof e!=`function`&&typeof e!=`object`,V=class extends pn{constructor(e){super(Xt),this.value=e}toJSON(e,t){return t?.keep?this.value:B(this.value,e,t)}toString(){return String(this.value)}};V.BLOCK_FOLDED=`BLOCK_FOLDED`,V.BLOCK_LITERAL=`BLOCK_LITERAL`,V.PLAIN=`PLAIN`,V.QUOTE_DOUBLE=`QUOTE_DOUBLE`,V.QUOTE_SINGLE=`QUOTE_SINGLE`;var _n=`tag:yaml.org,2002:`;function vn(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}function yn(e,t,n){if($t(e)&&(e=e.contents),R(e))return e;if(F(e)){let t=n.schema[Jt].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e==`object`){if(c=s.get(e),c)return c.anchor??(c.anchor=i(e)),new mn(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=_n+t.slice(2));let l=vn(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new V(e);return c&&(c.node=t),t}l=e instanceof Map?o[Jt]:Symbol.iterator in Object(e)?o[Zt]:o[Jt]}a&&(a(l),delete n.onTagObj);let u=l?.createNode?l.createNode(n.schema,e,n):typeof l?.nodeClass?.from==`function`?l.nodeClass.from(n.schema,e,n):new V(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}function bn(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(typeof n==`number`&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=new Map([[n,r]])}return yn(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:new Map})}var xn=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done,Sn=class extends pn{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>R(t)||F(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(xn(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(L(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,bn(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(L(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return r.length===0?!t&&I(i)?i.value:i:L(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!F(t))return!1;let n=t.value;return n==null||e&&I(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let r=this.get(t,!0);return L(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let e=this.get(n,!0);if(L(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,bn(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}},Cn=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function wn(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var Tn=(e,t,n)=>e.endsWith(`
12
+ `)?wn(n,t):n.includes(`
13
+ `)?`
14
+ `+wn(n,t):(e.endsWith(` `)?``:` `)+n,En=`flow`,Dn=`block`,On=`quoted`;function kn(e,t,n=`flow`,{indentAtStart:r,lineWidth:i=80,minContentWidth:a=20,onFold:o,onOverflow:s}={}){if(!i||i<0)return e;i<a&&(a=0);let c=Math.max(1+a,1+i-t.length);if(e.length<=c)return e;let l=[],u={},d=i-t.length;typeof r==`number`&&(r>i-Math.max(2,a)?l.push(0):d=i-r);let f,p,m=!1,h=-1,g=-1,_=-1;n===`block`&&(h=An(e,h,t.length),h!==-1&&(d=h+c));for(let r;r=e[h+=1];){if(n===`quoted`&&r===`\\`){switch(g=h,e[h+1]){case`x`:h+=3;break;case`u`:h+=5;break;case`U`:h+=9;break;default:h+=1}_=h}if(r===`
15
+ `)n===`block`&&(h=An(e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r===` `&&p&&p!==` `&&p!==`
16
+ `&&p!==` `){let t=e[h+1];t&&t!==` `&&t!==`
17
+ `&&t!==` `&&(f=h)}if(h>=d){if(f)l.push(f),d=f+c,f=void 0;else if(n===`quoted`){for(;p===` `||p===` `;)p=r,r=e[h+=1],m=!0;let t=h>_+1?h-2:g-1;if(u[t])return e;l.push(t),u[t]=!0,d=t+c,f=void 0}else m=!0}}p=r}if(m&&s&&s(),l.length===0)return e;o&&o();let v=e.slice(0,l[0]);for(let r=0;r<l.length;++r){let i=l[r],a=l[r+1]||e.length;i===0?v=`\n${t}${e.slice(0,a)}`:(n===`quoted`&&u[i]&&(v+=`${e[i]}\\`),v+=`\n${t}${e.slice(i+1,a)}`)}return v}function An(e,t,n){let r=t,i=t+1,a=e[i];for(;a===` `||a===` `;)if(t<i+n)a=e[++t];else{do a=e[++t];while(a&&a!==`
18
+ `);r=t,i=t+1,a=e[i]}return r}var jn=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Mn=e=>/^(%|---|\.\.\.)/m.test(e);function Nn(e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let t=0,n=0;t<i;++t)if(e[t]===`
19
+ `){if(t-n>r)return!0;if(n=t+1,i-n<=r)return!1}return!0}function Pn(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(Mn(e)?` `:``),o=``,s=0;for(let e=0,t=n[e];t;t=n[++e])if(t===` `&&n[e+1]===`\\`&&n[e+2]===`n`&&(o+=n.slice(s,e)+`\\ `,e+=1,s=e,t=`\\`),t===`\\`)switch(n[e+1]){case`u`:{o+=n.slice(s,e);let t=n.substr(e+2,4);switch(t){case`0000`:o+=`\\0`;break;case`0007`:o+=`\\a`;break;case`000b`:o+=`\\v`;break;case`001b`:o+=`\\e`;break;case`0085`:o+=`\\N`;break;case`00a0`:o+=`\\_`;break;case`2028`:o+=`\\L`;break;case`2029`:o+=`\\P`;break;default:t.substr(0,2)===`00`?o+=`\\x`+t.substr(2):o+=n.substr(e,6)}e+=5,s=e+1}break;case`n`:if(r||n[e+2]===`"`||n.length<i)e+=1;else{for(o+=n.slice(s,e)+`
20
+
21
+ `;n[e+2]===`\\`&&n[e+3]===`n`&&n[e+4]!==`"`;)o+=`
22
+ `,e+=2;o+=a,n[e+2]===` `&&(o+=`\\`),e+=1,s=e+1}break;default:e+=1}return o=s?o+n.slice(s):n,r?o:kn(o,a,On,jn(t,!1))}function Fn(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
23
+ `)||/[ \t]\n|\n[ \t]/.test(e))return Pn(e,t);let n=t.indent||(Mn(e)?` `:``),r=`'`+e.replace(/'/g,`''`).replace(/\n+/g,`$&\n${n}`)+`'`;return t.implicitKey?r:kn(r,n,En,jn(t,!1))}function In(e,t){let{singleQuote:n}=t.options,r;if(n===!1)r=Pn;else{let t=e.includes(`"`),i=e.includes(`'`);r=t&&!i?Fn:i&&!t?Pn:n?Fn:Pn}return r(e,t)}var Ln;try{Ln=RegExp(`(^|(?<!
24
+ ))
25
+ +(?!
26
+ |$)`,`g`)}catch{Ln=/\n+(?!\n|$)/g}function Rn({comment:e,type:t,value:n},r,i,a){let{blockQuote:o,commentString:s,lineWidth:c}=r.options;if(!o||/\n[\t ]+$/.test(n))return In(n,r);let l=r.indent||(r.forceBlockIndent||Mn(n)?` `:``),u=o===`literal`?!0:o===`folded`||t===V.BLOCK_FOLDED?!1:t===V.BLOCK_LITERAL||!Nn(n,c,l.length);if(!n)return u?`|
27
+ `:`>
28
+ `;let d,f;for(f=n.length;f>0;--f){let e=n[f-1];if(e!==`
29
+ `&&e!==` `&&e!==` `)break}let p=n.substring(f),m=p.indexOf(`
30
+ `);m===-1?d=`-`:n===p||m!==p.length-1?(d=`+`,a&&a()):d=``,p&&=(n=n.slice(0,-p.length),p[p.length-1]===`
31
+ `&&(p=p.slice(0,-1)),p.replace(Ln,`$&${l}`));let h=!1,g,_=-1;for(g=0;g<n.length;++g){let e=n[g];if(e===` `)h=!0;else if(e===`
32
+ `)_=g;else break}let v=n.substring(0,_<g?_+1:g);v&&=(n=n.substring(v.length),v.replace(/\n+/g,`$&${l}`));let y=(h?l?`2`:`1`:``)+d;if(e&&(y+=` `+s(e.replace(/ ?[\r\n]+/g,` `)),i&&i()),!u){let e=n.replace(/\n+/g,`
33
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\n+/g,`$&${l}`),i=!1,a=jn(r,!0);o!==`folded`&&t!==V.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=kn(`${v}${e}${p}`,l,Dn,a);if(!i)return`>${y}\n${l}${s}`}return n=n.replace(/\n+/g,`$&${l}`),`|${y}\n${l}${v}${n}${p}`}function zn(e,t,n,r){let{type:i,value:a}=e,{actualString:o,implicitKey:s,indent:c,indentStep:l,inFlow:u}=t;if(s&&a.includes(`
34
+ `)||u&&/[[\]{},]/.test(a))return In(a,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return s||u||!a.includes(`
35
+ `)?In(a,t):Rn(e,t,n,r);if(!s&&!u&&i!==V.PLAIN&&a.includes(`
36
+ `))return Rn(e,t,n,r);if(Mn(a)){if(c===``)return t.forceBlockIndent=!0,Rn(e,t,n,r);if(s&&c===l)return In(a,t)}let d=a.replace(/\n+/g,`$&\n${c}`);if(o){let e=e=>e.default&&e.tag!==`tag:yaml.org,2002:str`&&e.test?.test(d),{compat:n,tags:r}=t.doc.schema;if(r.some(e)||n?.some(e))return In(a,t)}return s?d:kn(d,c,En,jn(t,!1))}function Bn(e,t,n,r){let{implicitKey:i,inFlow:a}=t,o=typeof e.value==`string`?e:Object.assign({},e,{value:String(e.value)}),{type:s}=e;s!==V.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(s=V.QUOTE_DOUBLE);let c=e=>{switch(e){case V.BLOCK_FOLDED:case V.BLOCK_LITERAL:return i||a?In(o.value,t):Rn(o,t,n,r);case V.QUOTE_DOUBLE:return Pn(o.value,t);case V.QUOTE_SINGLE:return Fn(o.value,t);case V.PLAIN:return zn(o,t,n,r);default:return null}},l=c(s);if(l===null){let{defaultKeyType:e,defaultStringType:n}=t.options,r=i&&e||n;if(l=c(r),l===null)throw Error(`Unsupported default string type ${r}`)}return l}function Vn(e,t){let n=Object.assign({blockQuote:!0,commentString:Cn,defaultKeyType:null,defaultStringType:`PLAIN`,directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:`false`,flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:`null`,simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:`true`,verifyAliasOrder:!0},e.schema.toStringOptions,t),r;switch(n.collectionStyle){case`block`:r=!1;break;case`flow`:r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?` `:``,indent:``,indentStep:typeof n.indent==`number`?` `.repeat(n.indent):` `,inFlow:r,options:n}}function Hn(e,t){if(t.tag){let n=e.filter(e=>e.tag===t.tag);if(n.length>0)return n.find(e=>e.format===t.format)??n[0]}let n,r;if(I(t)){r=t.value;let i=e.filter(e=>e.identify?.(r));if(i.length>1){let e=i.filter(e=>e.test);e.length>0&&(i=e)}n=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else r=t,n=e.find(e=>e.nodeClass&&r instanceof e.nodeClass);if(!n){let e=r?.constructor?.name??(r===null?`null`:typeof r);throw Error(`Tag not resolved for ${e} value`)}return n}function Un(e,t,{anchors:n,doc:r}){if(!r.directives)return``;let i=[],a=(I(e)||L(e))&&e.anchor;a&&dn(a)&&(n.add(a),i.push(`&${a}`));let o=e.tag??(t.default?null:t.tag);return o&&i.push(r.directives.tagString(o)),i.join(` `)}function Wn(e,t,n,r){if(F(e))return e.toString(t,n,r);if(Qt(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError(`Cannot stringify circular structure without alias nodes`);t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i,a=R(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??=Hn(t.doc.schema.tags,a);let o=Un(a,i,t);o.length>0&&(t.indentAtStart=(t.indentAtStart??0)+o.length+1);let s=typeof i.stringify==`function`?i.stringify(a,t,n,r):I(a)?Bn(a,t,n,r):a.toString(t,n,r);return o?I(a)||s[0]===`{`||s[0]===`[`?`${o} ${s}`:`${o}\n${t.indent}${s}`:s}function Gn({key:e,value:t},n,r,i){let{allNullValues:a,doc:o,indent:s,indentStep:c,options:{commentString:l,indentSeq:u,simpleKeys:d}}=n,f=R(e)&&e.comment||null;if(d){if(f)throw Error(`With simple keys, key nodes cannot have comments`);if(L(e)||!R(e)&&typeof e==`object`)throw Error(`With simple keys, collection cannot be used as a key value`)}let p=!d&&(!e||f&&t==null&&!n.inFlow||L(e)||(I(e)?e.type===V.BLOCK_FOLDED||e.type===V.BLOCK_LITERAL:typeof e==`object`));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=Wn(e,n,()=>m=!0,()=>h=!0);if(!p&&!n.inFlow&&g.length>1024){if(d)throw Error(`With simple keys, single line scalar must not span more than 1024 characters`);p=!0}if(n.inFlow){if(a||t==null)return m&&r&&r(),g===``?`?`:p?`? ${g}`:g}else if(a&&!d||t==null&&p)return g=`? ${g}`,f&&!m?g+=Tn(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=Tn(g,n.indent,l(f))),g=`? ${g}\n${s}:`):(g=`${g}:`,f&&(g+=Tn(g,n.indent,l(f))));let _,v,y;R(t)?(_=!!t.spaceBefore,v=t.commentBefore,y=t.comment):(_=!1,v=null,y=null,t&&typeof t==`object`&&(t=o.createNode(t))),n.implicitKey=!1,!p&&!f&&I(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&tn(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=Wn(t,n,()=>b=!0,()=>h=!0),S=` `;if(f||_||v){if(S=_?`
37
+ `:``,v){let e=l(v);S+=`\n${wn(e,n.indent)}`}x===``&&!n.inFlow?S===`
38
+ `&&y&&(S=`
39
+
40
+ `):S+=`\n${n.indent}`}else if(!p&&L(t)){let e=x[0],r=x.indexOf(`
41
+ `),i=r!==-1,a=n.inFlow??t.flow??t.items.length===0;if(i||!a){let t=!1;if(i&&(e===`&`||e===`!`)){let n=x.indexOf(` `);e===`&`&&n!==-1&&n<r&&x[n+1]===`!`&&(n=x.indexOf(` `,n+1)),(n===-1||r<n)&&(t=!0)}t||(S=`\n${n.indent}`)}}else(x===``||x[0]===`
42
+ `)&&(S=``);return g+=S+x,n.inFlow?b&&r&&r():y&&!b?g+=Tn(g,n.indent,l(y)):h&&i&&i(),g}function Kn(e,t){(e===`debug`||e===`warn`)&&console.warn(t)}var qn=`<<`,Jn={identify:e=>e===qn||typeof e==`symbol`&&e.description===qn,default:`key`,tag:`tag:yaml.org,2002:merge`,test:/^<<$/,resolve:()=>Object.assign(new V(Symbol(qn)),{addToJSMap:Xn}),stringify:()=>qn},Yn=(e,t)=>(Jn.identify(t)||I(t)&&(!t.type||t.type===V.PLAIN)&&Jn.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===Jn.tag&&e.default);function Xn(e,t,n){let r=Qn(e,n);if(tn(r))for(let n of r.items)Zn(e,t,n);else if(Array.isArray(r))for(let n of r)Zn(e,t,n);else Zn(e,t,r)}function Zn(e,t,n){let r=Qn(e,n);if(!en(r))throw Error(`Merge sources must be maps or map aliases`);let i=r.toJSON(null,e,Map);for(let[e,n]of i)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}function Qn(e,t){return e&&Qt(t)?t.resolve(e.doc,e):t}function $n(e,t,{key:n,value:r}){if(R(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(Yn(e,n))Xn(e,t,r);else{let i=B(n,``,e);if(t instanceof Map)t.set(i,B(r,i,e));else if(t instanceof Set)t.add(i);else{let a=er(n,i,e),o=B(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function er(e,t,n){if(t===null)return``;if(typeof t!=`object`)return String(t);if(R(e)&&n?.doc){let t=Vn(n.doc,{});t.anchors=new Set;for(let e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;let r=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(r);e.length>40&&(e=e.substring(0,36)+`..."`),Kn(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}function tr(e,t,n){return new H(yn(e,void 0,n),yn(t,void 0,n))}var H=class e{constructor(e,t=null){Object.defineProperty(this,P,{value:Yt}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return R(n)&&(n=n.clone(t)),R(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return $n(t,t?.mapAsMap?new Map:{},this)}toString(e,t,n){return e?.doc?Gn(this,e,t,n):JSON.stringify(this)}};function nr(e,t,n){return(t.inFlow??e.flow?ir:rr)(e,t,n)}function rr({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:a,onChompKeep:o,onComment:s}){let{indent:c,options:{commentString:l}}=n,u=Object.assign({},n,{indent:a,type:null}),d=!1,f=[];for(let e=0;e<t.length;++e){let i=t[e],o=null;if(R(i))!d&&i.spaceBefore&&f.push(``),ar(n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(F(i)){let e=R(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push(``),ar(n,f,e.commentBefore,d))}d=!1;let s=Wn(i,u,()=>o=null,()=>d=!0);o&&(s+=Tn(s,a,l(o))),d&&o&&(d=!1),f.push(r+s)}let p;if(f.length===0)p=i.start+i.end;else{p=f[0];for(let e=1;e<f.length;++e){let t=f[e];p+=t?`\n${c}${t}`:`
43
+ `}}return e?(p+=`
44
+ `+wn(l(e),c),s&&s()):d&&o&&o(),p}function ir({items:e},t,{flowChars:n,itemIndent:r}){let{indent:i,indentStep:a,flowCollectionPadding:o,options:{commentString:s}}=t;r+=a;let c=Object.assign({},t,{indent:r,inFlow:!0,type:null}),l=!1,u=0,d=[];for(let n=0;n<e.length;++n){let i=e[n],a=null;if(R(i))i.spaceBefore&&d.push(``),ar(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(F(i)){let e=R(i.key)?i.key:null;e&&(e.spaceBefore&&d.push(``),ar(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=R(i.value)?i.value:null;n?(n.comment&&(a=n.comment),n.commentBefore&&(l=!0)):i.value==null&&e?.comment&&(a=e.comment)}a&&(l=!0);let o=Wn(i,c,()=>a=null);l||=d.length>u||o.includes(`
45
+ `),n<e.length-1?o+=`,`:t.options.trailingComma&&(t.options.lineWidth>0&&(l||=d.reduce((e,t)=>e+t.length+2,2)+(o.length+2)>t.options.lineWidth),l&&(o+=`,`)),a&&(o+=Tn(o,r,s(a))),d.push(o),u=d.length}let{start:f,end:p}=n;if(d.length===0)return f+p;if(!l){let e=d.reduce((e,t)=>e+t.length+2,2);l=t.options.lineWidth>0&&e>t.options.lineWidth}if(l){let e=f;for(let t of d)e+=t?`\n${a}${i}${t}`:`
46
+ `;return`${e}\n${i}${p}`}return`${f}${o}${d.join(` `)}${o}${p}`}function ar({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,``)),r){let i=wn(t(r),e);n.push(i.trimStart())}}function U(e,t){let n=I(t)?t.value:t;for(let r of e)if(F(r)&&(r.key===t||r.key===n||I(r.key)&&r.key.value===n))return r}var W=class extends Sn{static get tagName(){return`tag:yaml.org,2002:map`}constructor(e){super(Jt,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:i}=n,a=new this(e),o=(e,o)=>{if(typeof i==`function`)o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;(o!==void 0||r)&&a.items.push(tr(e,o,n))};if(t instanceof Map)for(let[e,n]of t)o(e,n);else if(t&&typeof t==`object`)for(let e of Object.keys(t))o(e,t[e]);return typeof e.sortMapEntries==`function`&&a.items.sort(e.sortMapEntries),a}add(e,t){let n;n=F(e)?e:!e||typeof e!=`object`||!(`key`in e)?new H(e,e?.value):new H(e.key,e.value);let r=U(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error(`Key ${n.key} already set`);I(r.value)&&gn(n.value)?r.value.value=n.value:r.value=n.value}else if(i){let e=this.items.findIndex(e=>i(n,e)<0);e===-1?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){let t=U(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=U(this.items,e)?.value;return(!t&&I(n)?n.value:n)??void 0}has(e){return!!U(this.items,e)}set(e,t){this.add(new H(e,t),!0)}toJSON(e,t,n){let r=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(r);for(let e of this.items)$n(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!F(e))throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),nr(this,e,{blockItemPrefix:``,flowChars:{start:`{`,end:`}`},itemIndent:e.indent||``,onChompKeep:n,onComment:t})}},or={collection:`map`,default:!0,nodeClass:W,tag:`tag:yaml.org,2002:map`,resolve(e,t){return en(e)||t(`Expected a mapping for this tag`),e},createNode:(e,t,n)=>W.from(e,t,n)},sr=class extends Sn{static get tagName(){return`tag:yaml.org,2002:seq`}constructor(e){super(Zt,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=cr(e);return typeof t==`number`&&this.items.splice(t,1).length>0}get(e,t){let n=cr(e);if(typeof n!=`number`)return;let r=this.items[n];return!t&&I(r)?r.value:r}has(e){let t=cr(e);return typeof t==`number`&&t<this.items.length}set(e,t){let n=cr(e);if(typeof n!=`number`)throw Error(`Expected a valid index, not ${e}.`);let r=this.items[n];I(r)&&gn(t)?r.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let r=0;for(let e of this.items)n.push(B(e,String(r++),t));return n}toString(e,t,n){return e?nr(this,e,{blockItemPrefix:`- `,flowChars:{start:`[`,end:`]`},itemIndent:(e.indent||``)+` `,onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let a of t){if(typeof r==`function`){let n=t instanceof Set?a:String(e++);a=r.call(t,n,a)}i.items.push(yn(a,void 0,n))}}return i}};function cr(e){let t=I(e)?e.value:e;return t&&typeof t==`string`&&(t=Number(t)),typeof t==`number`&&Number.isInteger(t)&&t>=0?t:null}var lr={collection:`seq`,default:!0,nodeClass:sr,tag:`tag:yaml.org,2002:seq`,resolve(e,t){return tn(e)||t(`Expected a sequence for this tag`),e},createNode:(e,t,n)=>sr.from(e,t,n)};function ur(e){return typeof e==`bigint`||Number.isInteger(e)}var dr=({value:e})=>JSON.stringify(e),fr=[{identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify:dr},{identify:e=>e==null,createNode:()=>new V(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^null$/,resolve:()=>null,stringify:dr},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^true$|^false$/,resolve:e=>e===`true`,stringify:dr},{identify:ur,default:!0,tag:`tag:yaml.org,2002:int`,test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>ur(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:dr}];[or,lr].concat(fr,{default:!0,tag:``,test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}});function pr(e,t,n){let{replacer:r}=n,i=new sr(e);i.tag=`tag:yaml.org,2002:pairs`;let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){typeof r==`function`&&(e=r.call(t,String(a++),e));let o,s;if(Array.isArray(e)){if(e.length===2)o=e[0],s=e[1];else throw TypeError(`Expected [key, value] tuple: ${e}`)}else if(e&&e instanceof Object){let t=Object.keys(e);if(t.length===1)o=t[0],s=e[o];else throw TypeError(`Expected tuple with one key, not ${t.length} keys`)}else o=e;i.items.push(tr(o,s,n))}return i}var mr=class e extends sr{constructor(){super(),this.add=W.prototype.add.bind(this),this.delete=W.prototype.delete.bind(this),this.get=W.prototype.get.bind(this),this.has=W.prototype.has.bind(this),this.set=W.prototype.set.bind(this),this.tag=e.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t?.onCreate&&t.onCreate(n);for(let e of this.items){let r,i;if(F(e)?(r=B(e.key,``,t),i=B(e.value,r,t)):r=B(e,``,t),n.has(r))throw Error(`Ordered maps must not include duplicate keys`);n.set(r,i)}return n}static from(e,t,n){let r=pr(e,t,n),i=new this;return i.items=r.items,i}};mr.tag=`tag:yaml.org,2002:omap`;var hr=class e extends W{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=F(e)?e:e&&typeof e==`object`&&`key`in e&&`value`in e&&e.value===null?new H(e.key,null):new H(e,null),U(this.items,t.key)||this.items.push(t)}get(e,t){let n=U(this.items,e);return!t&&F(n)?I(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!=`boolean`)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=U(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new H(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw Error(`Set items must all have null values`)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)typeof r==`function`&&(e=r.call(t,e,e)),i.items.push(tr(e,null,n));return i}};hr.tag=`tag:yaml.org,2002:set`;var gr=Symbol(`break visit`),_r=Symbol(`skip children`),vr=Symbol(`remove item`);function yr(e,t){`type`in e&&e.type===`document`&&(e={start:e.start,value:e.value}),br(Object.freeze([]),e,t)}yr.BREAK=gr,yr.SKIP=_r,yr.REMOVE=vr,yr.itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n?.[e];if(t&&`items`in t)n=t.items[r];else return}return n},yr.parentCollection=(e,t)=>{let n=yr.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&&`items`in i)return i;throw Error(`Parent collection not found`)};function br(e,t,n){let r=n(t,e);if(typeof r==`symbol`)return r;for(let i of[`key`,`value`]){let a=t[i];if(a&&`items`in a){for(let t=0;t<a.items.length;++t){let r=br(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r==`number`)t=r-1;else if(r===gr)return gr;else r===vr&&(a.items.splice(t,1),--t)}typeof r==`function`&&i===`key`&&(r=r(t,e))}}return typeof r==`function`?r(t,e):r}function xr(e=5){let t=[];for(let n=0;n<e;n++)t.push(`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`.charAt(Math.floor(Math.random()*52)));return t.join(``)}function Sr(e,t,n,r){let i=re(t+n-1,e);for(let e=0;e<t;e++){let t=r(e),a=i.includes(e+n);for(let e of t)e.classList.toggle(`slidev-code-highlighted`,a),e.classList.toggle(`slidev-code-dishonored`,!a),e.classList.toggle(`highlighted`,a),e.classList.toggle(`dishonored`,!a)}}var G=_({}),Cr=[],wr=[];N(G,`$syncUp`,!0),N(G,`$syncDown`,!0),N(G,`$paused`,!1),N(G,`$onSet`,e=>Cr.push(e)),N(G,`$onPatch`,e=>wr.push(e)),ze(),N(G,`$patch`,async()=>!1);var{init:Tr,onPatch:Er,onUpdate:Dr,patch:Or,state:kr}=Be(G,G,!1),K=_({page:0,clicks:0,timer:{status:`stopped`,slides:{},startedAt:0,pausedAt:0}}),Ar=[],jr=[];N(K,`$syncUp`,!0),N(K,`$syncDown`,!0),N(K,`$paused`,!1),N(K,`$onSet`,e=>Ar.push(e)),N(K,`$onPatch`,e=>jr.push(e)),ze(),N(K,`$patch`,async()=>!1);var{init:Mr,onPatch:Nr,onUpdate:Pr,patch:Fr,state:Ir}=Be(K,{page:1,clicks:0,clicksTotal:0,timer:{status:`stopped`,slides:{},startedAt:0,pausedAt:0}});function Lr(){let e=i().appContext.app,t=_({nav:ue(),configs:M,themeConfigs:m(()=>M.themeConfig)});e.provide(Me,p(`none`)),e.provide(Re,t),e.provide(ke,m(()=>t.nav.currentSlideNo)),e.provide(Oe,y(ne()));for(let e of zt)e();let{clicksContext:n,currentSlideNo:r,hasPrimarySlide:a,isNotesViewer:o,isPresenter:s,isPrintMode:c}=ue();Mt({title:E,htmlAttrs:M.htmlAttrs}),Gt(),Mr(`${E} - shared`),Tr(`${E} - drawings`);let l=`${location.origin}_${xr()}`,u=m(()=>s.value?`presenter`:`viewer`);function f(){(s.value?k.value.presenterSend:k.value.viewerSend)&&(o.value||c.value||!s.value&&!Le.includes(location.host.split(`:`)[0])||(Fr(`page`,+r.value),Fr(`clicks`,n.value.current),Fr(`clicksTotal`,n.value.total),Fr(`lastUpdate`,{id:l,type:u.value,time:Date.now()})))}let h=ve();h.afterEach(f),d(n,f),Nr(e=>{(s.value?k.value.presenterReceive:k.value.viewerReceive)&&(!a.value||c.value||e.lastUpdate?.type!==u.value&&(+e.page!=+r.value||+n.value.current!=+e.clicks)&&(A.value=!1,h.replace({path:te(e.page,s.value),query:{...h.currentRoute.value.query,clicks:e.clicks||0}})))})}var Rr=l({__name:`App`,setup(e){return Lr(),c(()=>{for(let[e,t]of Object.entries(O.value))document.body.style.setProperty(e,t.toString())}),(e,t)=>{let i=u(`RouterView`);return n(),f(v,null,[r(i),w(`v-if`,!0)],64)}}});function zr(e,t,n){let r=e.push,i=e;return i.ssr=!1,i.hooks=t,i.dirty=!!i.dirty,i.use=e=>Pt(i,e),i.render=()=>n(i),i.invalidate=()=>{for(let e of i.entries.values())delete e._tags;i.dirty=!0,t.callHook(`entries:updated`,i)},i.push=(n,a)=>{let o=a?.onRendered?t.hook(`dom:rendered`,a.onRendered):void 0,s=r(n,a),c=e.entries.get(s._i);return c&&(c._o=n),i.dirty=!0,t.callHook(`entries:updated`,i),{_i:s._i,patch(e){s.patch(e),i.dirty=!0,t.callHook(`entries:updated`,i)},dispose(){o?.(),e.entries.has(s._i)&&(s.dispose(),i.invalidate())}}},t.hook(`entries:updated`,()=>{i.render()}),i}var Br=/\s+/;function Vr(e={}){return t=>Wr(t,e)}function Hr(e){for(let t of e.entries.values())if(t._pending!==void 0)return!0;return!1}function Ur(e,t){let n={_d:t,_t:t.title,_e:new Map([[`htmlAttrs`,t.documentElement],[`bodyAttrs`,t.body]]),_p:{},_s:{},_l:new Map};for(let e of[...t.body.children,...t.head.children]){let t=e.tagName.toLowerCase();if(!Ue.has(t))continue;let r={innerHTML:e.innerHTML};for(let t of e.getAttributeNames())r[t]=e.getAttribute(t);let i=ut({tag:t,props:{}},r);i.key=e.getAttribute(`data-hid`)||void 0;let a=at(i)||ot(i),o=a,s=1;for(;n._e.has(o);)o=`${a}:${s++}`;n._e.set(o,e)}for(let t of e.entries.values())if(t._o!==void 0){let e=t._o;for(let t of[`bodyAttrs`,`htmlAttrs`]){let r=e[t]?.class;if(typeof r==`string`){let e=n._e.get(t);for(let i of r.split(Br))i&&(n._p[`${t}:attr:class:${i}`]=()=>e.classList.remove(i))}}}return n}function Wr(e,t={}){let n=t.document||e.resolvedOptions.document,r=e._dom,i=!!r&&r._d!==n;if(!n||r&&!i&&!e.dirty&&!Hr(e)||e._du)return!1;let a=n.defaultView;e._du=!0;let o=!1;try{let i=function(e,t,n){d._s[e]=!n&&f[e]||t,delete f[e]},s=function(e,t,n,r,a,o){let s=`${e}:event:${t}`,c=d._l.get(s);if(c&&c[0]===o&&c[1]===n&&c[2]===r){i(s,c[4]);return}c?.[4]();let l=`data-${t}`,u=(e=>r.call(a,e)),f=()=>{o.removeEventListener(n,u),a.getAttribute(l)===``&&a.removeAttribute(l),d._l.get(s)?.[3]===u&&d._l.delete(s)};o.addEventListener(n,u),d._l.set(s,[o,n,r,u,f]),a.setAttribute(l,``),i(s,f,!0)},c=function({id:e,$el:t,tag:n}){let r=n.tag.endsWith(`Attrs`);if(d._e.set(e,t),!r){let r=n.textContent;r!=null&&r!==``&&(r!==t.textContent&&(t.textContent=r),i(`${e}:text`,()=>{t.textContent===r&&(t.textContent=``)},!0));let a=n.innerHTML;a!=null&&a!==``&&(a!==t.innerHTML&&(t.innerHTML=a),i(`${e}:html`,()=>{t.innerHTML===a&&(t.innerHTML=``)},!0));let o=`${e}:el`;i(o,f[o]||(()=>{t?.remove(),d._e.delete(e)}))}for(let r in n.props){let o=n.props[r];if(r[0]===`o`&&r[1]===`n`&&typeof o==`function`){let i=r.slice(2);t?.dataset?.[`${r}fired`]&&o.call(t,new((a?.Event)||Event)(i)),s(e,r,i,o,t,n.tag===`bodyAttrs`&&a?a:t);continue}let c=`${e}:attr:${r}`;if(r===`class`&&o)for(let e of o){let n=`${c}:${e}`;i(n,f[n]||(()=>t.classList.remove(e))),t.classList.contains(e)||t.classList.add(e)}else if(r===`style`&&o)for(let[e,n]of o){let r=`${c}:${e}`;i(r,f[r]||(()=>t.style.removeProperty(e))),t.style.setProperty(e,n)}else o!==!1&&o!==null&&(t.getAttribute(r)!==o&&t.setAttribute(r,o===!0?``:String(o)),i(c,f[c]||(()=>t.removeAttribute(r))))}},l={shouldRender:!0,tags:[]};if(tt(e,`dom:beforeRender`,l),!l.shouldRender)return!1;let u=r;if(u?._d!==n){if(u){for(let e in u._s)u._s[e]();for(let e in u._p)u._p[e]();u._s=u._p={},u._e.clear(),u._l.clear()}u=void 0}u?u._p=u._s:u=Ur(e,n),u._s={};let d=u,f=d._p,p=[],m={};e.dirty=!1;let h=Dt(e,t.tagWeight?{tagWeight:t.tagWeight}:void 0),g=[],_={};for(let e of h){let t=_[e._d]||0,r=(t?`${e._d}:${t}`:e._d)||e._h,a={tag:e,id:r,shouldRender:!0};if(e.tag===`meta`&&e._d&&it(e._d)&&(_[e._d]=t+1),g.push(a),e.tag===`title`){n.title=e.textContent,i(`title:`,()=>n.title=d._t);continue}a.$el=d._e.get(r),a.$el?c(a):Ue.has(e.tag)&&p.push(a)}for(let e of p)e.$el=n.createElement(e.tag.tag),c(e),(m[e.tag.tagPosition||`head`]??=n.createDocumentFragment()).appendChild(e.$el);m.head&&n.head.appendChild(m.head),m.bodyOpen&&n.body.insertBefore(m.bodyOpen,n.body.firstChild),m.bodyClose&&n.body.appendChild(m.bodyClose);for(let e in f)f[e]();e._dom=d,o=!0,tt(e,`dom:rendered`,{renders:g})}catch(t){throw e.dirty=!0,t}finally{e._du=!1}return o&&(e.dirty||Hr(e))&&Wr(e,t),o}var Gr=e=>typeof e.tagPriority==`number`?e.tagPriority:100+(Ye[e.tagPriority]||0);function Kr(e={}){e.document=e.document||(typeof window<`u`?document:void 0);let t=e.render||Vr({document:e.document}),n=zr(Ft(t,{document:e.document,propResolvers:e.propResolvers,_tagWeight:Gr,init:[]}),et(e.hooks),t);return e.plugins?.forEach(e=>n.use(e)),e.init?.forEach(e=>e&&n.push(e)),n}function qr(e={}){let t=Vr(),n,r=0;return n=Kr({render:()=>{let e=++r;setTimeout(()=>{e===r&&t(n)},0)},...e}),n.install=At(n),n}var Jr=Object.assign({}),Yr=Object.assign({}),Xr=Object.assign({}),Zr=[Object.values(Jr)[0],Object.values(Yr)[0],Object.values(Xr)[0]].filter(Boolean);function Qr(e,t=``){let n=[`slidev-page`,t],r=e?.meta?.slide?.no;return r!=null&&n.push(`slidev-page-${r}`),n.filter(Boolean).join(` `)}async function $r(){let{saveAs:t}=await j(async()=>{let{saveAs:t}=await import(`./modules/file-saver-BpWusTEB.js`).then(t=>e(t.t(),1));return{saveAs:t}},__vite__mapDeps([0,1]),import.meta.url);t(typeof M.download==`string`?M.download:M.exportFilename?`${M.exportFilename}.pdf`:`./slidev-exported.pdf`,`${M.title}.pdf`)}function ei(e,t,n){return(e.instance?.$).provides[t]??n}var ti=/[\s,]+/;function ni(e,t){let n=t.map(e=>`${Fe}${e}`);e.classList.forEach(t=>{t.startsWith(`slidev-vclick-anim-`)&&!n.includes(t)&&e.classList.remove(t)}),n.forEach(t=>e.classList.add(t))}function ri(){return{install(e){e.directive(`click`,{name:`v-click`,mounted(e,t){let n=ai(e,t,t.value);n!=null&&(e.classList.toggle(De,!0),e.dataset.slidevClicksStart=String(n.start),Number.isFinite(n.end)&&(e.dataset.slidevClicksEnd=String(n.end)),e.watchStopHandle=c(()=>{let t=n.isActive.value,r=n.isCurrent.value,i=t&&!r;n.flagHide?(e.classList.toggle(Ee,t),e.classList.toggle(Ne,t)):e.classList.toggle(Ee,!t),ni(e,n.flagAnimations.value),e.classList.toggle(je,r),e.classList.toggle(Ie,i)}))},unmounted:oi}),e.directive(`after`,{name:`v-after`,mounted(e,t){let n=ai(e,t,`+0`);n!=null&&(e.classList.toggle(De,!0),e.watchStopHandle=c(()=>{let t=n.isActive.value,r=n.isCurrent.value,i=t&&!r;n.flagHide?(e.classList.toggle(Ee,t),e.classList.toggle(Ne,t)):e.classList.toggle(Ee,!t),ni(e,n.flagAnimations.value),e.classList.toggle(je,r),e.classList.toggle(Ie,i)}))},unmounted:oi}),e.directive(`click-hide`,{name:`v-click-hide`,mounted(e,t){let n=ai(e,t,t.value,!0);n!=null&&(e.classList.toggle(De,!0),e.watchStopHandle=c(()=>{let t=n.isActive.value,r=n.isCurrent.value,i=t&&!r;e.classList.toggle(Ee,t),e.classList.toggle(Ne,t),ni(e,n.flagAnimations.value),e.classList.toggle(je,r),e.classList.toggle(Ie,i)}))},unmounted:oi})}}}var ii=new Map;function ai(e,t,n,r=!1){let i=ei(t,Oe)?.value,a=ei(t,Pe);if(!e||!i)return null;let o=r||t.modifiers.hide!==!1&&t.modifiers.hide!=null,s=Object.keys({...t.modifiers}).filter(e=>e!==`hide`),c=m(()=>{if(s.length>0)return s;let e=a?.clickAnimation||M.clickAnimation;return e?e.split(ti).filter(Boolean):[]}),l=i.calculate(n);if(!l)return null;i.register(e,l);let u=m(()=>o?!l.isActive.value:l.isActive.value),d=m(()=>u.value?`shown`:Number.isFinite(l.end)?i.current<l.start?`before`:`after`:o?`after`:`before`),f={...l,isShown:u,visibilityState:d,flagHide:o,flagAnimations:c};return ii.set(e,f),f}function oi(e,t){e.classList.toggle(De,!1),(ei(t,Oe)?.value)?.unregister(e),e.watchStopHandle?.()}function si(e=t(Ae,p())){let n=ye(e),r=d([de,se,ce,oe,ee,ie.width,ie.height],()=>{setTimeout(n.update,300)},{flush:`post`,immediate:!0});return{...n,stop:r}}function ci(e){return{info:p(fe(e)?.meta.slide??null),update:async()=>{}}}var li={};function ui(e){function t(e){return li[e]??=ci(e)}return{info:m({get(){return t(T(e)).info.value},set(n){t(T(e)).info.value=n}}),update:async(n,r)=>{let i=t(r??T(e)),a=await i.update(n);return a&&(i.info.value=a),a}}}function di(e){return()=>{}}function fi(e,t,n,r=!1){function i(t){return e?ei(e,t):pe(t)}let a=i(Me),o=i(`$$slidev-fontmatter`)??{},s=i(ke),c=m(()=>di(s.value)),l=i(`$$slidev-slide-scale`)??p(1),u=i(`$$slidev-slide-zoom`)??p(1),{left:f,top:h,stop:g}=si(i(`$$slidev-slide-element`)??p()),{isPrintMode:_}=ue(),v=[`slide`,`presenter`].includes(a.value)&&!_.value,y=e?`directive`:`prop`,b=xr(),x;if(Array.isArray(t)?x=t:typeof t==`string`&&t.includes(`,`)?x=t.split(`,`).map(Number):t!=null&&(y=`frontmatter`,b=`${t}`,t=o?.dragPos?.[b],x=t?.split(`,`).map(Number)),y!==`frontmatter`&&!n)throw Error("[Slidev] Can not identify the source position of the v-drag element, please provide an explicit `id` prop.");let S=[g],C=!r&&t!=null&&!Number.isFinite(x?.[3]);x??=[NaN,NaN,0];let w=p(x[2]),T=p(x[0]+x[2]/2),E=p(r?0:x[4]??0),ee=m(()=>E.value*Math.PI/180),te=m(()=>Math.sin(ee.value)),ne=m(()=>Math.cos(ee.value)),re=p(),D=p({left:0,top:0,width:0,height:0}),ie=p(0);function ae(){if(!re.value)return;let e=re.value.getBoundingClientRect();D.value={left:e.left/u.value,top:e.top/u.value,width:e.width/u.value,height:e.height/u.value},ie.value=(D.value.width+D.value.height)/l.value/(Math.abs(te.value)+Math.abs(ne.value))-w.value}S.push(d(w,ae,{flush:`post`}));let oe=p(x[3]??0),O=C?m({get:()=>(C?ie.value:oe.value)||0,set:e=>!C&&(oe.value=e)}):oe,se=p(C?x[1]:x[1]+x[3]/2),k=C?m({get:()=>se.value+O.value/2,set:e=>se.value=e-O.value/2}):se,ce=m(()=>Number.isFinite(T.value)?{position:`absolute`,zIndex:100,left:`${T.value-w.value/2}px`,top:`${k.value-O.value/2}px`,width:`${w.value}px`,height:C?void 0:`${O.value}px`,transformOrigin:`center center`,transform:`rotate(${E.value}deg)`}:{position:`absolute`,zIndex:100});S.push(d([T,k,w,O,E],([e,t,r,i,a])=>{let o=[e-r/2,t-i/2,r].map(Math.round).join();o+=C?y===`directive`?`,NaN`:`,_`:`,${Math.round(i)}`,Math.round(a)!==0&&(o+=`,${Math.round(a)}`),y===`directive`&&(o=`[${o}]`),c.value(b,o,y,n)}));let A={dragId:b,dataSource:y,markdownSource:n,isArrow:r,zoom:u,autoHeight:C,x0:T,y0:k,width:w,height:O,rotate:E,container:re,containerStyle:ce,watchStopHandles:S,dragging:m(()=>le.value===A),mounted(){v&&(ae(),t||setTimeout(()=>{ae(),T.value=(D.value.left+D.value.width/2-f.value)/l.value,k.value=(D.value.top-h.value)/l.value,w.value=D.value.width/l.value,O.value=D.value.height/l.value},100))},unmounted(){v&&A.stopDragging()},startDragging(){v&&(ae(),le.value=A)},stopDragging(){v&&le.value===A&&(le.value=null)}};return S.push(Ce(re,e=>{let t=document.querySelector(`#drag-control-container`);t&&e.target&&t.contains(e.target)||A.stopDragging()}),d(_e(),e=>{e||A.stopDragging()})),A}function pi(){return{install(e){e.directive(`drag`,{name:`v-drag`,created(e,t,n){let r=fi(t,t.value,n.props?.markdownSource);n.props&&(n.props={...n.props},delete n.props.markdownSource),r.container.value=e,e.draggingState=r,e.dataset.dragId=r.dragId,r.watchStopHandles.push(d(r.containerStyle,t=>{for(let[n,r]of Object.entries(t))r&&(e.style[n]=r)},{immediate:!0})),e.addEventListener(`dblclick`,r.startDragging)},mounted(e){e.draggingState.mounted()},unmounted(e){let t=e.draggingState;t.unmounted(),e.removeEventListener(`dblclick`,t.startDragging),t.watchStopHandles.forEach(e=>e())}})}}}function mi(){return Math.floor(Math.random()*2**31)}var hi=class{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}};function gi(e,t,n){if(e&&e.length){let[r,i]=t,a=Math.PI/180*n,o=Math.cos(a),s=Math.sin(a);for(let t of e){let[e,n]=t;t[0]=(e-r)*o-(n-i)*s+r,t[1]=(e-r)*s+(n-i)*o+i}}}function _i(e,t,n){let r=[];e.forEach(e=>r.push(...e)),gi(r,t,n)}function vi(e,t){return e[0]===t[0]&&e[1]===t[1]}function yi(e,t,n,r=1){let i=n,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]==`number`?[e]:e,s=[0,0];if(i)for(let e of o)gi(e,s,i);let c=bi(o,a,r);if(i){for(let e of o)gi(e,s,-i);_i(c,s,-i)}return c}function bi(e,t,n){let r=[];for(let t of e){let e=[...t];vi(e[0],e[e.length-1])||e.push([e[0][0],e[0][1]]),e.length>2&&r.push(e)}let i=[];t=Math.max(t,.1);let a=[];for(let e of r)for(let t=0;t<e.length-1;t++){let n=e[t],r=e[t+1];if(n[1]!==r[1]){let e=Math.min(n[1],r[1]);a.push({ymin:e,ymax:Math.max(n[1],r[1]),x:e===n[1]?n[0]:r[0],islope:(r[0]-n[0])/(r[1]-n[1])})}}if(a.sort((e,t)=>e.ymin<t.ymin?-1:e.ymin>t.ymin?1:e.x<t.x?-1:e.x>t.x?1:e.ymax===t.ymax?0:(e.ymax-t.ymax)/Math.abs(e.ymax-t.ymax)),!a.length)return i;let o=[],s=a[0].ymin,c=0;for(;o.length||a.length;){if(a.length){let e=-1;for(let t=0;t<a.length&&!(a[t].ymin>s);t++)e=t;a.splice(0,e+1).forEach(e=>{o.push({s,edge:e})})}if(o=o.filter(e=>!(e.edge.ymax<=s)),o.sort((e,t)=>e.edge.x===t.edge.x?0:(e.edge.x-t.edge.x)/Math.abs(e.edge.x-t.edge.x)),(n!==1||c%t===0)&&o.length>1)for(let e=0;e<o.length;e+=2){let t=e+1;if(t>=o.length)break;let n=o[e].edge,r=o[t].edge;i.push([[Math.round(n.x),s],[Math.round(r.x),s]])}s+=n,o.forEach(e=>{e.edge.x=e.edge.x+n*e.edge.islope}),c++}return i}function xi(e,t){let n=t.hachureAngle+90,r=t.hachureGap;r<0&&(r=t.strokeWidth*4),r=Math.round(Math.max(r,.1));let i=1;return t.roughness>=1&&(t.randomizer?.next()||Math.random())>.7&&(i=r),yi(e,r,n,i||1)}var Si=class{constructor(e){this.helper=e}fillPolygons(e,t){return this._fillPolygons(e,t)}_fillPolygons(e,t){let n=xi(e,t);return{type:`fillSketch`,ops:this.renderLines(n,t)}}renderLines(e,t){let n=[];for(let r of e)n.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],t));return n}};function Ci(e){let t=e[0],n=e[1];return Math.sqrt((t[0]-n[0])**2+(t[1]-n[1])**2)}var wi=class extends Si{fillPolygons(e,t){let n=t.hachureGap;n<0&&(n=t.strokeWidth*4),n=Math.max(n,.1);let r=xi(e,Object.assign({},t,{hachureGap:n})),i=Math.PI/180*t.hachureAngle,a=[],o=n*.5*Math.cos(i),s=n*.5*Math.sin(i);for(let[e,t]of r)Ci([e,t])&&a.push([[e[0]-o,e[1]+s],[...t]],[[e[0]+o,e[1]-s],[...t]]);return{type:`fillSketch`,ops:this.renderLines(a,t)}}},Ti=class extends Si{fillPolygons(e,t){let n=this._fillPolygons(e,t),r=Object.assign({},t,{hachureAngle:t.hachureAngle+90}),i=this._fillPolygons(e,r);return n.ops=n.ops.concat(i.ops),n}},Ei=class{constructor(e){this.helper=e}fillPolygons(e,t){t=Object.assign({},t,{hachureAngle:0});let n=xi(e,t);return this.dotsOnLines(n,t)}dotsOnLines(e,t){let n=[],r=t.hachureGap;r<0&&(r=t.strokeWidth*4),r=Math.max(r,.1);let i=t.fillWeight;i<0&&(i=t.strokeWidth/2);let a=r/4;for(let o of e){let e=Ci(o),s=e/r,c=Math.ceil(s)-1,l=e-c*r,u=(o[0][0]+o[1][0])/2-r/4,d=Math.min(o[0][1],o[1][1]);for(let e=0;e<c;e++){let o=d+l+e*r,s=u-a+Math.random()*2*a,c=o-a+Math.random()*2*a,f=this.helper.ellipse(s,c,i,i,t);n.push(...f.ops)}}return{type:`fillSketch`,ops:n}}},Di=class{constructor(e){this.helper=e}fillPolygons(e,t){let n=xi(e,t);return{type:`fillSketch`,ops:this.dashedLine(n,t)}}dashedLine(e,t){let n=t.dashOffset<0?t.hachureGap<0?t.strokeWidth*4:t.hachureGap:t.dashOffset,r=t.dashGap<0?t.hachureGap<0?t.strokeWidth*4:t.hachureGap:t.dashGap,i=[];return e.forEach(e=>{let a=Ci(e),o=Math.floor(a/(n+r)),s=(a+r-o*(n+r))/2,c=e[0],l=e[1];c[0]>l[0]&&(c=e[1],l=e[0]);let u=Math.atan((l[1]-c[1])/(l[0]-c[0]));for(let e=0;e<o;e++){let a=e*(n+r),o=a+n,l=[c[0]+a*Math.cos(u)+s*Math.cos(u),c[1]+a*Math.sin(u)+s*Math.sin(u)],d=[c[0]+o*Math.cos(u)+s*Math.cos(u),c[1]+o*Math.sin(u)+s*Math.sin(u)];i.push(...this.helper.doubleLineOps(l[0],l[1],d[0],d[1],t))}}),i}},Oi=class{constructor(e){this.helper=e}fillPolygons(e,t){let n=t.hachureGap<0?t.strokeWidth*4:t.hachureGap,r=t.zigzagOffset<0?n:t.zigzagOffset;t=Object.assign({},t,{hachureGap:n+r});let i=xi(e,t);return{type:`fillSketch`,ops:this.zigzagLines(i,r,t)}}zigzagLines(e,t,n){let r=[];return e.forEach(e=>{let i=Ci(e),a=Math.round(i/(2*t)),o=e[0],s=e[1];o[0]>s[0]&&(o=e[1],s=e[0]);let c=Math.atan((s[1]-o[1])/(s[0]-o[0]));for(let e=0;e<a;e++){let i=e*2*t,a=(e+1)*2*t,s=Math.sqrt(2*t**2),l=[o[0]+i*Math.cos(c),o[1]+i*Math.sin(c)],u=[o[0]+a*Math.cos(c),o[1]+a*Math.sin(c)],d=[l[0]+s*Math.cos(c+Math.PI/4),l[1]+s*Math.sin(c+Math.PI/4)];r.push(...this.helper.doubleLineOps(l[0],l[1],d[0],d[1],n),...this.helper.doubleLineOps(d[0],d[1],u[0],u[1],n))}}),r}},q={};function ki(e,t){let n=e.fillStyle||`hachure`;if(!q[n])switch(n){case`zigzag`:q[n]||(q[n]=new wi(t));break;case`cross-hatch`:q[n]||(q[n]=new Ti(t));break;case`dots`:q[n]||(q[n]=new Ei(t));break;case`dashed`:q[n]||(q[n]=new Di(t));break;case`zigzag-line`:q[n]||(q[n]=new Oi(t));break;default:n=`hachure`,q[n]||(q[n]=new Si(t))}return q[n]}var Ai=0,ji=1,Mi=2,Ni={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function Pi(e){let t=[];for(;e!==``;)if(e.match(/^([ \t\r\n,]+)/))e=e.substr(RegExp.$1.length);else if(e.match(/^([aAcChHlLmMqQsStTvVzZ])/))t[t.length]={type:Ai,text:RegExp.$1},e=e.substr(RegExp.$1.length);else if(e.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))t[t.length]={type:ji,text:`${parseFloat(RegExp.$1)}`},e=e.substr(RegExp.$1.length);else return[];return t[t.length]={type:Mi,text:``},t}function Fi(e,t){return e.type===t}function Ii(e){let t=[],n=Pi(e),r=`BOD`,i=0,a=n[i];for(;!Fi(a,Mi);){let o=0,s=[];if(r===`BOD`){if(a.text===`M`||a.text===`m`)i++,o=Ni[a.text],r=a.text;else return Ii(`M0,0`+e)}else Fi(a,ji)?o=Ni[r]:(i++,o=Ni[a.text],r=a.text);if(i+o<n.length){for(let e=i;e<i+o;e++){let t=n[e];if(Fi(t,ji))s[s.length]=+t.text;else throw Error(`Param not a number: `+r+`,`+t.text)}if(typeof Ni[r]==`number`){let e={key:r,data:s};t.push(e),i+=o,a=n[i],r===`M`&&(r=`L`),r===`m`&&(r=`l`)}else throw Error(`Bad segment: `+r)}else throw Error(`Path data ended short`)}return t}function Li(e){let t=0,n=0,r=0,i=0,a=[];for(let{key:o,data:s}of e)switch(o){case`M`:a.push({key:`M`,data:[...s]}),[t,n]=s,[r,i]=s;break;case`m`:t+=s[0],n+=s[1],a.push({key:`M`,data:[t,n]}),r=t,i=n;break;case`L`:a.push({key:`L`,data:[...s]}),[t,n]=s;break;case`l`:t+=s[0],n+=s[1],a.push({key:`L`,data:[t,n]});break;case`C`:a.push({key:`C`,data:[...s]}),t=s[4],n=s[5];break;case`c`:{let e=s.map((e,r)=>r%2?e+n:e+t);a.push({key:`C`,data:e}),t=e[4],n=e[5];break}case`Q`:a.push({key:`Q`,data:[...s]}),t=s[2],n=s[3];break;case`q`:{let e=s.map((e,r)=>r%2?e+n:e+t);a.push({key:`Q`,data:e}),t=e[2],n=e[3];break}case`A`:a.push({key:`A`,data:[...s]}),t=s[5],n=s[6];break;case`a`:t+=s[5],n+=s[6],a.push({key:`A`,data:[s[0],s[1],s[2],s[3],s[4],t,n]});break;case`H`:a.push({key:`H`,data:[...s]}),t=s[0];break;case`h`:t+=s[0],a.push({key:`H`,data:[t]});break;case`V`:a.push({key:`V`,data:[...s]}),n=s[0];break;case`v`:n+=s[0],a.push({key:`V`,data:[n]});break;case`S`:a.push({key:`S`,data:[...s]}),t=s[2],n=s[3];break;case`s`:{let e=s.map((e,r)=>r%2?e+n:e+t);a.push({key:`S`,data:e}),t=e[2],n=e[3];break}case`T`:a.push({key:`T`,data:[...s]}),t=s[0],n=s[1];break;case`t`:t+=s[0],n+=s[1],a.push({key:`T`,data:[t,n]});break;case`Z`:case`z`:a.push({key:`Z`,data:[]}),t=r,n=i}return a}function Ri(e){let t=[],n=``,r=0,i=0,a=0,o=0,s=0,c=0;for(let{key:l,data:u}of e){switch(l){case`M`:t.push({key:`M`,data:[...u]}),[r,i]=u,[a,o]=u;break;case`C`:t.push({key:`C`,data:[...u]}),r=u[4],i=u[5],s=u[2],c=u[3];break;case`L`:t.push({key:`L`,data:[...u]}),[r,i]=u;break;case`H`:r=u[0],t.push({key:`L`,data:[r,i]});break;case`V`:i=u[0],t.push({key:`L`,data:[r,i]});break;case`S`:{let e=0,a=0;n===`C`||n===`S`?(e=r+(r-s),a=i+(i-c)):(e=r,a=i),t.push({key:`C`,data:[e,a,...u]}),s=u[0],c=u[1],r=u[2],i=u[3];break}case`T`:{let[e,a]=u,o=0,l=0;n===`Q`||n===`T`?(o=r+(r-s),l=i+(i-c)):(o=r,l=i);let d=r+2*(o-r)/3,f=i+2*(l-i)/3,p=e+2*(o-e)/3,m=a+2*(l-a)/3;t.push({key:`C`,data:[d,f,p,m,e,a]}),s=o,c=l,r=e,i=a;break}case`Q`:{let[e,n,a,o]=u,l=r+2*(e-r)/3,d=i+2*(n-i)/3,f=a+2*(e-a)/3,p=o+2*(n-o)/3;t.push({key:`C`,data:[l,d,f,p,a,o]}),s=e,c=n,r=a,i=o;break}case`A`:{let e=Math.abs(u[0]),n=Math.abs(u[1]),a=u[2],o=u[3],s=u[4],c=u[5],l=u[6];e===0||n===0?(t.push({key:`C`,data:[r,i,c,l,c,l]}),r=c,i=l):(r!==c||i!==l)&&(Vi(r,i,c,l,e,n,a,o,s).forEach(function(e){t.push({key:`C`,data:e})}),r=c,i=l);break}case`Z`:t.push({key:`Z`,data:[]}),r=a,i=o}n=l}return t}function zi(e){return Math.PI*e/180}function Bi(e,t,n){return[e*Math.cos(n)-t*Math.sin(n),e*Math.sin(n)+t*Math.cos(n)]}function Vi(e,t,n,r,i,a,o,s,c,l){let u=zi(o),d=[],f=0,p=0,m=0,h=0;if(l)[f,p,m,h]=l;else{[e,t]=Bi(e,t,-u),[n,r]=Bi(n,r,-u);let o=(e-n)/2,l=(t-r)/2,d=o*o/(i*i)+l*l/(a*a);d>1&&(d=Math.sqrt(d),i=d*i,a=d*a);let g=s===c?-1:1,_=i*i,v=a*a,y=_*v-_*l*l-v*o*o,b=_*l*l+v*o*o,x=g*Math.sqrt(Math.abs(y/b));m=x*i*l/a+(e+n)/2,h=x*-a*o/i+(t+r)/2,f=Math.asin(parseFloat(((t-h)/a).toFixed(9))),p=Math.asin(parseFloat(((r-h)/a).toFixed(9))),e<m&&(f=Math.PI-f),n<m&&(p=Math.PI-p),f<0&&(f=Math.PI*2+f),p<0&&(p=Math.PI*2+p),c&&f>p&&(f-=Math.PI*2),!c&&p>f&&(p-=Math.PI*2)}let g=p-f;if(Math.abs(g)>Math.PI*120/180){let e=p,t=n,s=r;p=c&&p>f?f+Math.PI*120/180*1:f+Math.PI*120/180*-1,n=m+i*Math.cos(p),r=h+a*Math.sin(p),d=Vi(n,r,t,s,i,a,o,0,c,[p,e,m,h])}g=p-f;let _=Math.cos(f),v=Math.sin(f),y=Math.cos(p),b=Math.sin(p),x=Math.tan(g/4),S=4/3*i*x,C=4/3*a*x,w=[e,t],T=[e+S*v,t-C*_],E=[n+S*b,r-C*y],ee=[n,r];if(T[0]=2*w[0]-T[0],T[1]=2*w[1]-T[1],l)return[T,E,ee].concat(d);{d=[T,E,ee].concat(d);let e=[];for(let t=0;t<d.length;t+=3){let n=Bi(d[t][0],d[t][1],u),r=Bi(d[t+1][0],d[t+1][1],u),i=Bi(d[t+2][0],d[t+2][1],u);e.push([n[0],n[1],r[0],r[1],i[0],i[1]])}return e}}var Hi={randOffset:ta,randOffsetWithRange:na,ellipse:qi,doubleLineOps:ra};function J(e,t,n,r,i){return{type:`path`,ops:X(e,t,n,r,i)}}function Ui(e,t,n){let r=(e||[]).length;if(r>2){let i=[];for(let t=0;t<r-1;t++)i.push(...X(e[t][0],e[t][1],e[t+1][0],e[t+1][1],n));return t&&i.push(...X(e[r-1][0],e[r-1][1],e[0][0],e[0][1],n)),{type:`path`,ops:i}}return r===2?J(e[0][0],e[0][1],e[1][0],e[1][1],n):{type:`path`,ops:[]}}function Wi(e,t){return Ui(e,!0,t)}function Gi(e,t,n,r,i){return Wi([[e,t],[e+n,t],[e+n,t+r],[e,t+r]],i)}function Ki(e,t){if(e.length){let n=typeof e[0][0]==`number`?[e]:e,r=ca(n[0],1*(1+t.roughness*.2),t),i=t.disableMultiStroke?[]:ca(n[0],1.5*(1+t.roughness*.22),ia(t));for(let e=1;e<n.length;e++){let a=n[e];if(a.length){let e=ca(a,1*(1+t.roughness*.2),t),n=t.disableMultiStroke?[]:ca(a,1.5*(1+t.roughness*.22),ia(t));for(let t of e)t.op!==`move`&&r.push(t);for(let e of n)e.op!==`move`&&i.push(e)}}return{type:`path`,ops:r.concat(i)}}return{type:`path`,ops:[]}}function qi(e,t,n,r,i){return Yi(e,t,i,Ji(n,r,i)).opset}function Ji(e,t,n){let r=Math.sqrt(Math.PI*2*Math.sqrt(((e/2)**2+(t/2)**2)/2)),i=Math.ceil(Math.max(n.curveStepCount,n.curveStepCount/Math.sqrt(200)*r)),a=Math.PI*2/i,o=Math.abs(e/2),s=Math.abs(t/2),c=1-n.curveFitting;return o+=Y(o*c,n),s+=Y(s*c,n),{increment:a,rx:o,ry:s}}function Yi(e,t,n,r){let[i,a]=ua(r.increment,e,t,r.rx,r.ry,1,r.increment*oa(.1,oa(.4,1,n),n),n),o=la(i,null,n);if(!n.disableMultiStroke&&n.roughness!==0){let[i]=ua(r.increment,e,t,r.rx,r.ry,1.5,0,n),a=la(i,null,n);o=o.concat(a)}return{estimatedPoints:a,opset:{type:`path`,ops:o}}}function Xi(e,t,n,r,i,a,o,s,c){let l=e,u=t,d=Math.abs(n/2),f=Math.abs(r/2);d+=Y(d*.01,c),f+=Y(f*.01,c);let p=i,m=a;for(;p<0;)p+=Math.PI*2,m+=Math.PI*2;m-p>Math.PI*2&&(p=0,m=Math.PI*2);let h=Math.PI*2/c.curveStepCount,g=Math.min(h/2,(m-p)/2),_=da(g,l,u,d,f,p,m,1,c);if(!c.disableMultiStroke){let e=da(g,l,u,d,f,p,m,1.5,c);_.push(...e)}return o&&(s?_.push(...X(l,u,l+d*Math.cos(p),u+f*Math.sin(p),c),...X(l,u,l+d*Math.cos(m),u+f*Math.sin(m),c)):_.push({op:`lineTo`,data:[l,u]},{op:`lineTo`,data:[l+d*Math.cos(p),u+f*Math.sin(p)]})),{type:`path`,ops:_}}function Zi(e,t){let n=Ri(Li(Ii(e))),r=[],i=[0,0],a=[0,0];for(let{key:e,data:o}of n)switch(e){case`M`:a=[o[0],o[1]],i=[o[0],o[1]];break;case`L`:r.push(...X(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case`C`:{let[e,n,i,s,c,l]=o;r.push(...fa(e,n,i,s,c,l,a,t)),a=[c,l];break}case`Z`:r.push(...X(a[0],a[1],i[0],i[1],t)),a=[i[0],i[1]]}return{type:`path`,ops:r}}function Qi(e,t){let n=[];for(let r of e)if(r.length){let e=t.maxRandomnessOffset||0,i=r.length;if(i>2){n.push({op:`move`,data:[r[0][0]+Y(e,t),r[0][1]+Y(e,t)]});for(let a=1;a<i;a++)n.push({op:`lineTo`,data:[r[a][0]+Y(e,t),r[a][1]+Y(e,t)]})}}return{type:`fillPath`,ops:n}}function $i(e,t){return ki(t,Hi).fillPolygons(e,t)}function ea(e,t,n,r,i,a,o){let s=e,c=t,l=Math.abs(n/2),u=Math.abs(r/2);l+=Y(l*.01,o),u+=Y(u*.01,o);let d=i,f=a;for(;d<0;)d+=Math.PI*2,f+=Math.PI*2;f-d>Math.PI*2&&(d=0,f=Math.PI*2);let p=(f-d)/o.curveStepCount,m=[];for(let e=d;e<=f;e+=p)m.push([s+l*Math.cos(e),c+u*Math.sin(e)]);return m.push([s+l*Math.cos(f),c+u*Math.sin(f)]),m.push([s,c]),$i([m],o)}function ta(e,t){return Y(e,t)}function na(e,t,n){return oa(e,t,n)}function ra(e,t,n,r,i){return X(e,t,n,r,i,!0)}function ia(e){let t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function aa(e){return e.randomizer||=new hi(e.seed||0),e.randomizer.next()}function oa(e,t,n,r=1){return n.roughness*r*(aa(n)*(t-e)+e)}function Y(e,t,n=1){return oa(-e,e,t,n)}function X(e,t,n,r,i,a=!1){let o=a?i.disableMultiStrokeFill:i.disableMultiStroke,s=sa(e,t,n,r,i,!0,!1);if(o)return s;let c=sa(e,t,n,r,i,!0,!0);return s.concat(c)}function sa(e,t,n,r,i,a,o){let s=(e-n)**2+(t-r)**2,c=Math.sqrt(s),l=1;l=c<200?1:c>500?.4:-.0016668*c+1.233334;let u=i.maxRandomnessOffset||0;u*u*100>s&&(u=c/10);let d=u/2,f=.2+aa(i)*.2,p=i.bowing*i.maxRandomnessOffset*(r-t)/200,m=i.bowing*i.maxRandomnessOffset*(e-n)/200;p=Y(p,i,l),m=Y(m,i,l);let h=[],g=()=>Y(d,i,l),_=()=>Y(u,i,l),v=i.preserveVertices;return a&&(o?h.push({op:`move`,data:[e+(v?0:g()),t+(v?0:g())]}):h.push({op:`move`,data:[e+(v?0:Y(u,i,l)),t+(v?0:Y(u,i,l))]})),o?h.push({op:`bcurveTo`,data:[p+e+(n-e)*f+g(),m+t+(r-t)*f+g(),p+e+2*(n-e)*f+g(),m+t+2*(r-t)*f+g(),n+(v?0:g()),r+(v?0:g())]}):h.push({op:`bcurveTo`,data:[p+e+(n-e)*f+_(),m+t+(r-t)*f+_(),p+e+2*(n-e)*f+_(),m+t+2*(r-t)*f+_(),n+(v?0:_()),r+(v?0:_())]}),h}function ca(e,t,n){if(!e.length)return[];let r=[];r.push([e[0][0]+Y(t,n),e[0][1]+Y(t,n)]),r.push([e[0][0]+Y(t,n),e[0][1]+Y(t,n)]);for(let i=1;i<e.length;i++)r.push([e[i][0]+Y(t,n),e[i][1]+Y(t,n)]),i===e.length-1&&r.push([e[i][0]+Y(t,n),e[i][1]+Y(t,n)]);return la(r,null,n)}function la(e,t,n){let r=e.length,i=[];if(r>3){let a=[],o=1-n.curveTightness;i.push({op:`move`,data:[e[1][0],e[1][1]]});for(let t=1;t+2<r;t++){let n=e[t];a[0]=[n[0],n[1]],a[1]=[n[0]+(o*e[t+1][0]-o*e[t-1][0])/6,n[1]+(o*e[t+1][1]-o*e[t-1][1])/6],a[2]=[e[t+1][0]+(o*e[t][0]-o*e[t+2][0])/6,e[t+1][1]+(o*e[t][1]-o*e[t+2][1])/6],a[3]=[e[t+1][0],e[t+1][1]],i.push({op:`bcurveTo`,data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(t&&t.length===2){let e=n.maxRandomnessOffset;i.push({op:`lineTo`,data:[t[0]+Y(e,n),t[1]+Y(e,n)]})}}else r===3?(i.push({op:`move`,data:[e[1][0],e[1][1]]}),i.push({op:`bcurveTo`,data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):r===2&&i.push(...sa(e[0][0],e[0][1],e[1][0],e[1][1],n,!0,!0));return i}function ua(e,t,n,r,i,a,o,s){let c=s.roughness===0,l=[],u=[];if(c){e/=4,u.push([t+r*Math.cos(-e),n+i*Math.sin(-e)]);for(let a=0;a<=Math.PI*2;a+=e){let e=[t+r*Math.cos(a),n+i*Math.sin(a)];l.push(e),u.push(e)}u.push([t+r*Math.cos(0),n+i*Math.sin(0)]),u.push([t+r*Math.cos(e),n+i*Math.sin(e)])}else{let c=Y(.5,s)-Math.PI/2;u.push([Y(a,s)+t+.9*r*Math.cos(c-e),Y(a,s)+n+.9*i*Math.sin(c-e)]);let d=Math.PI*2+c-.01;for(let o=c;o<d;o+=e){let e=[Y(a,s)+t+r*Math.cos(o),Y(a,s)+n+i*Math.sin(o)];l.push(e),u.push(e)}u.push([Y(a,s)+t+r*Math.cos(c+Math.PI*2+o*.5),Y(a,s)+n+i*Math.sin(c+Math.PI*2+o*.5)]),u.push([Y(a,s)+t+.98*r*Math.cos(c+o),Y(a,s)+n+.98*i*Math.sin(c+o)]),u.push([Y(a,s)+t+.9*r*Math.cos(c+o*.5),Y(a,s)+n+.9*i*Math.sin(c+o*.5)])}return[u,l]}function da(e,t,n,r,i,a,o,s,c){let l=a+Y(.1,c),u=[];u.push([Y(s,c)+t+.9*r*Math.cos(l-e),Y(s,c)+n+.9*i*Math.sin(l-e)]);for(let a=l;a<=o;a+=e)u.push([Y(s,c)+t+r*Math.cos(a),Y(s,c)+n+i*Math.sin(a)]);return u.push([t+r*Math.cos(o),n+i*Math.sin(o)]),u.push([t+r*Math.cos(o),n+i*Math.sin(o)]),la(u,null,c)}function fa(e,t,n,r,i,a,o,s){let c=[],l=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3],u=[0,0],d=s.disableMultiStroke?1:2,f=s.preserveVertices;for(let p=0;p<d;p++)p===0?c.push({op:`move`,data:[o[0],o[1]]}):c.push({op:`move`,data:[o[0]+(f?0:Y(l[0],s)),o[1]+(f?0:Y(l[0],s))]}),u=f?[i,a]:[i+Y(l[p],s),a+Y(l[p],s)],c.push({op:`bcurveTo`,data:[e+Y(l[p],s),t+Y(l[p],s),n+Y(l[p],s),r+Y(l[p],s),u[0],u[1]]});return c}function pa(e){return[...e]}function ma(e,t=0){let n=e.length;if(n<3)throw Error(`A curve must have at least three points.`);let r=[];if(n===3)r.push(pa(e[0]),pa(e[1]),pa(e[2]),pa(e[2]));else{let n=[];n.push(e[0],e[0]);for(let t=1;t<e.length;t++)n.push(e[t]),t===e.length-1&&n.push(e[t]);let i=[],a=1-t;r.push(pa(n[0]));for(let e=1;e+2<n.length;e++){let t=n[e];i[0]=[t[0],t[1]],i[1]=[t[0]+(a*n[e+1][0]-a*n[e-1][0])/6,t[1]+(a*n[e+1][1]-a*n[e-1][1])/6],i[2]=[n[e+1][0]+(a*n[e][0]-a*n[e+2][0])/6,n[e+1][1]+(a*n[e][1]-a*n[e+2][1])/6],i[3]=[n[e+1][0],n[e+1][1]],r.push(i[1],i[2],i[3])}}return r}function ha(e,t){return Math.sqrt(ga(e,t))}function ga(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2}function _a(e,t,n){let r=ga(t,n);if(r===0)return ga(e,t);let i=((e[0]-t[0])*(n[0]-t[0])+(e[1]-t[1])*(n[1]-t[1]))/r;return i=Math.max(0,Math.min(1,i)),ga(e,va(t,n,i))}function va(e,t,n){return[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n]}function ya(e,t){let n=e[t+0],r=e[t+1],i=e[t+2],a=e[t+3],o=3*r[0]-2*n[0]-a[0];o*=o;let s=3*r[1]-2*n[1]-a[1];s*=s;let c=3*i[0]-2*a[0]-n[0];c*=c;let l=3*i[1]-2*a[1]-n[1];return l*=l,o<c&&(o=c),s<l&&(s=l),o+s}function ba(e,t,n,r){let i=r||[];if(ya(e,t)<n){let n=e[t+0];i.length?ha(i[i.length-1],n)>1&&i.push(n):i.push(n),i.push(e[t+3])}else{let r=.5,a=e[t+0],o=e[t+1],s=e[t+2],c=e[t+3],l=va(a,o,r),u=va(o,s,r),d=va(s,c,r),f=va(l,u,r),p=va(u,d,r),m=va(f,p,r);ba([a,l,f,m],0,n,i),ba([m,p,d,c],0,n,i)}return i}function xa(e,t){return Sa(e,0,e.length,t)}function Sa(e,t,n,r,i){let a=i||[],o=e[t],s=e[n-1],c=0,l=1;for(let r=t+1;r<n-1;++r){let t=_a(e[r],o,s);t>c&&(c=t,l=r)}return Math.sqrt(c)>r?(Sa(e,t,l+1,r,a),Sa(e,l,n,r,a)):(a.length||a.push(o),a.push(s)),a}function Ca(e,t=.15,n){let r=[],i=(e.length-1)/3;for(let n=0;n<i;n++)ba(e,n*3,t,r);return n&&n>0?Sa(r,0,r.length,n):r}function wa(e,t,n){let r=Ri(Li(Ii(e))),i=[],a=[],o=[0,0],s=[],c=()=>{s.length>=4&&a.push(...Ca(s,t)),s=[]},l=()=>{c(),a.length&&(i.push(a),a=[])};for(let{key:e,data:t}of r)switch(e){case`M`:l(),o=[t[0],t[1]],a.push(o);break;case`L`:c(),a.push([t[0],t[1]]);break;case`C`:if(!s.length){let e=a.length?a[a.length-1]:o;s.push([e[0],e[1]])}s.push([t[0],t[1]]),s.push([t[2],t[3]]),s.push([t[4],t[5]]);break;case`Z`:c(),a.push([o[0],o[1]])}if(l(),!n)return i;let u=[];for(let e of i){let t=xa(e,n);t.length&&u.push(t)}return u}var Z=`none`,Ta=class{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:`#000`,strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:`hachure`,fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return mi()}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,t,n){return{shape:e,sets:t||[],options:n||this.defaultOptions}}line(e,t,n,r,i){let a=this._o(i);return this._d(`line`,[J(e,t,n,r,a)],a)}rectangle(e,t,n,r,i){let a=this._o(i),o=[],s=Gi(e,t,n,r,a);if(a.fill){let i=[[e,t],[e+n,t],[e+n,t+r],[e,t+r]];a.fillStyle===`solid`?o.push(Qi([i],a)):o.push($i([i],a))}return a.stroke!==Z&&o.push(s),this._d(`rectangle`,o,a)}ellipse(e,t,n,r,i){let a=this._o(i),o=[],s=Ji(n,r,a),c=Yi(e,t,a,s);if(a.fill){if(a.fillStyle===`solid`){let n=Yi(e,t,a,s).opset;n.type=`fillPath`,o.push(n)}else o.push($i([c.estimatedPoints],a))}return a.stroke!==Z&&o.push(c.opset),this._d(`ellipse`,o,a)}circle(e,t,n,r){let i=this.ellipse(e,t,n,n,r);return i.shape=`circle`,i}linearPath(e,t){let n=this._o(t);return this._d(`linearPath`,[Ui(e,!1,n)],n)}arc(e,t,n,r,i,a,o=!1,s){let c=this._o(s),l=[],u=Xi(e,t,n,r,i,a,o,!0,c);if(o&&c.fill){if(c.fillStyle===`solid`){let o=Object.assign({},c);o.disableMultiStroke=!0;let s=Xi(e,t,n,r,i,a,!0,!1,o);s.type=`fillPath`,l.push(s)}else l.push(ea(e,t,n,r,i,a,c))}return c.stroke!==Z&&l.push(u),this._d(`arc`,l,c)}curve(e,t){let n=this._o(t),r=[],i=Ki(e,n);if(n.fill&&n.fill!==Z){if(n.fillStyle===`solid`){let t=Ki(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:`fillPath`,ops:this._mergedShape(t.ops)})}else{let t=[],i=e;if(i.length){let e=typeof i[0][0]==`number`?[i]:i;for(let r of e)r.length<3?t.push(...r):r.length===3?t.push(...Ca(ma([r[0],r[0],r[1],r[2]]),10,(1+n.roughness)/2)):t.push(...Ca(ma(r),10,(1+n.roughness)/2))}t.length&&r.push($i([t],n))}}return n.stroke!==Z&&r.push(i),this._d(`curve`,r,n)}polygon(e,t){let n=this._o(t),r=[],i=Ui(e,!0,n);return n.fill&&(n.fillStyle===`solid`?r.push(Qi([e],n)):r.push($i([e],n))),n.stroke!==Z&&r.push(i),this._d(`polygon`,r,n)}path(e,t){let n=this._o(t),r=[];if(!e)return this._d(`path`,r,n);e=(e||``).replace(/\n/g,` `).replace(/(-\s)/g,`-`).replace(`/(ss)/g`,` `);let i=n.fill&&n.fill!==`transparent`&&n.fill!==Z,a=n.stroke!==Z,o=!!(n.simplification&&n.simplification<1),s=o?4-4*(n.simplification||1):(1+n.roughness)/2,c=wa(e,1,s),l=Zi(e,n);if(i){if(n.fillStyle===`solid`){if(c.length===1){let t=Zi(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:`fillPath`,ops:this._mergedShape(t.ops)})}else r.push(Qi(c,n))}else r.push($i(c,n))}return a&&(o?c.forEach(e=>{r.push(Ui(e,!1,n))}):r.push(l)),this._d(`path`,r,n)}opsToPath(e,t){let n=``;for(let r of e.ops){let e=typeof t==`number`&&t>=0?r.data.map(e=>+e.toFixed(t)):r.data;switch(r.op){case`move`:n+=`M${e[0]} ${e[1]} `;break;case`bcurveTo`:n+=`C${e[0]} ${e[1]}, ${e[2]} ${e[3]}, ${e[4]} ${e[5]} `;break;case`lineTo`:n+=`L${e[0]} ${e[1]} `}}return n.trim()}toPaths(e){let t=e.sets||[],n=e.options||this.defaultOptions,r=[];for(let e of t){let t=null;switch(e.type){case`path`:t={d:this.opsToPath(e),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:Z};break;case`fillPath`:t={d:this.opsToPath(e),stroke:Z,strokeWidth:0,fill:n.fill||Z};break;case`fillSketch`:t=this.fillSketch(e,n)}t&&r.push(t)}return r}fillSketch(e,t){let n=t.fillWeight;return n<0&&(n=t.strokeWidth/2),{d:this.opsToPath(e),stroke:t.fill||Z,strokeWidth:n,fill:Z}}_mergedShape(e){return e.filter((e,t)=>t===0||e.op!==`move`)}},Ea=`http://www.w3.org/2000/svg`,Da=800,Oa=null;function ka(){return Oa||=new Ta().defaultOptions,Oa}function Aa(e,t,n){return{...ka(),maxRandomnessOffset:2,roughness:e===`highlight`?3:1.5,bowing:1,stroke:`#000`,strokeWidth:1.5,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:`hachure`,fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,disableMultiStroke:e!==`double`,disableMultiStrokeFill:!1,seed:t,...n}}function ja(e){let t=e.padding;if(t||t===0){if(typeof t==`number`)return[t,t,t,t];if(Array.isArray(t)){let e=t;if(e.length)switch(e.length){case 4:return[...e];case 1:return[e[0],e[0],e[0],e[0]];case 2:return[...e,...e];case 3:return[...e,e[1]];default:return[e[0],e[1],e[2],e[3]]}}}return[5,5,5,5]}function Ma(e,t,n,r,i,a){let o=[],s=n.strokeWidth||2,c=ja(n),l=n.animate===void 0||!!n.animate,u=n.iterations||2,d=+!!n.rtl,f=Aa(`single`,a,n);switch(n.type){case`underline`:{let e=t.y+t.h+c[2];for(let n=d;n<u+d;n++)n%2?o.push(J(t.x+t.w,e,t.x,e,f)):o.push(J(t.x,e,t.x+t.w,e,f));break}case`strike-through`:{let e=t.y+t.h/2;for(let n=d;n<u+d;n++)n%2?o.push(J(t.x+t.w,e,t.x,e,f)):o.push(J(t.x,e,t.x+t.w,e,f));break}case`box`:{let e=t.x-c[3],n=t.y-c[0],r=t.w+(c[1]+c[3]),i=t.h+(c[0]+c[2]);for(let t=0;t<u;t++)o.push(Gi(e,n,r,i,f));break}case`bracket`:{let e=Array.isArray(n.brackets)?n.brackets:n.brackets?[n.brackets]:[`right`],r=t.x-c[3]*2,i=t.x+t.w+c[1]*2,a=t.y-c[0]*2,s=t.y+t.h+c[2]*2;for(let n of e){let e;switch(n){case`bottom`:e=[[r,t.y+t.h],[r,s],[i,s],[i,t.y+t.h]];break;case`top`:e=[[r,t.y],[r,a],[i,a],[i,t.y]];break;case`left`:e=[[t.x,a],[r,a],[r,s],[t.x,s]];break;case`right`:e=[[t.x+t.w,a],[i,a],[i,s],[t.x+t.w,s]]}e&&o.push(Ui(e,!1,f))}break}case`crossed-off`:{let e=t.x,n=t.y,r=e+t.w,i=n+t.h;for(let t=d;t<u+d;t++)t%2?o.push(J(r,i,e,n,f)):o.push(J(e,n,r,i,f));for(let t=d;t<u+d;t++)t%2?o.push(J(e,i,r,n,f)):o.push(J(r,n,e,i,f));break}case`circle`:{let e=Aa(`double`,a,n),r=t.w+(c[1]+c[3]),i=t.h+(c[0]+c[2]),s=t.x-c[3]+r/2,l=t.y-c[0]+i/2,d=Math.floor(u/2),p=u-d*2;for(let t=0;t<d;t++)o.push(qi(s,l,r,i,e));for(let e=0;e<p;e++)o.push(qi(s,l,r,i,f));break}case`highlight`:{let e=Aa(`highlight`,a,n);s=t.h*.95;let r=t.y+t.h/2;for(let n=d;n<u+d;n++)n%2?o.push(J(t.x+t.w,r,t.x,r,e)):o.push(J(t.x,r,t.x+t.w,r,e));break}}if(o.length){let t=Pa(o),a=[],c=[],u=0,d=(e,t,n)=>e.setAttribute(t,n);for(let r of t){let t=document.createElementNS(Ea,`path`);if(d(t,`d`,r),d(t,`fill`,`none`),d(t,`stroke`,n.color||`currentColor`),d(t,`stroke-width`,`${s}`),n.opacity!==void 0&&d(t,`style`,`opacity:${n.opacity}`),l){let e=t.getTotalLength();a.push(e),u+=e}e.appendChild(t),c.push(t)}if(l){let e=0;for(let t=0;t<c.length;t++){let n=c[t],o=a[t],s=u?o/u*i:0,l=r+e,d=n.style;d.strokeDashoffset=`${o}`,d.strokeDasharray=`${o}`,d.animation=`rough-notation-dash ${s}ms ease-out ${l}ms forwards`,e+=s}return Na(i+r)}}return Na(0)}function Na(e){return new Promise(t=>setTimeout(t,e))}function Pa(e){let t=[];for(let n of e){let e=``;for(let r of n.ops){let n=r.data;switch(r.op){case`move`:e.trim()&&t.push(e.trim()),e=`M${n[0]} ${n[1]} `;break;case`bcurveTo`:e+=`C${n[0]} ${n[1]}, ${n[2]} ${n[3]}, ${n[4]} ${n[5]} `;break;case`lineTo`:e+=`L${n[0]} ${n[1]} `}}e.trim()&&t.push(e.trim())}return t}function Fa(){if(!window.__rno_kf_s){let e=window.__rno_kf_s=document.createElement(`style`);e.textContent=`@keyframes rough-notation-dash { to { stroke-dashoffset: 0; } }`,document.head.appendChild(e)}}var Ia=Object.defineProperty,La=(e,t,n)=>t in e?Ia(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Q=(e,t,n)=>(La(e,typeof t==`symbol`?t:t+``,n),n),Ra=class{constructor(e,t){Q(this,`_state`,`unattached`),Q(this,`_config`),Q(this,`_resizing`,!1),Q(this,`_ro`),Q(this,`_seed`,mi()),Q(this,`_e`),Q(this,`_svg`),Q(this,`_lastSizes`,[]),Q(this,`_animationDelay`,0),Q(this,`_resizeListener`,()=>{this._resizing||(this._resizing=!0,setTimeout(()=>{this._resizing=!1,this._state===`showing`&&this.haveRectsChanged()&&this.show()},400))}),Q(this,`pendingRefresh`),this._e=e,this._config=JSON.parse(JSON.stringify(t)),this.attach()}getConfig(e){return this._config[e]}setConfig(e,t){this._config[e]!==t&&(this._config[e]=t,this.refresh())}get animate(){return this._config.animate}set animate(e){this._config.animate=e}get animationDuration(){return this._config.animationDuration}set animationDuration(e){this._config.animationDuration=e}get iterations(){return this._config.iterations}set iterations(e){this._config.iterations=e}get color(){return this._config.color}set color(e){this._config.color!==e&&(this._config.color=e,this.refresh())}get class(){return this._config.class}set class(e){this._config.class!==e&&(this._config.class=e,this._svg&&this._svg.setAttribute(`class`,[`rough-annotation`,this._config.class||``].filter(Boolean).join(` `)))}get strokeWidth(){return this._config.strokeWidth}set strokeWidth(e){this._config.strokeWidth!==e&&(this._config.strokeWidth=e,this.refresh())}get padding(){return this._config.padding}set padding(e){this._config.padding!==e&&(this._config.padding=e,this.refresh())}attach(){if(this._state===`unattached`&&this._e.parentElement){Fa();let e=this._svg=document.createElementNS(Ea,`svg`);e.setAttribute(`class`,[`rough-annotation`,this._config.class||``].filter(Boolean).join(` `));let t=e.style;t.position=`absolute`,t.top=`0`,t.left=`0`,t.overflow=`visible`,t.pointerEvents=`none`,t.width=`100px`,t.height=`100px`;let n=this._config.type===`highlight`;if(this._e.insertAdjacentElement(n?`beforebegin`:`afterend`,e),this._state=`not-showing`,n){let e=window.getComputedStyle(this._e).position;(!e||e===`static`)&&(this._e.style.position=`relative`)}this.attachListeners()}}detachListeners(){window.removeEventListener(`resize`,this._resizeListener),this._ro&&this._ro.unobserve(this._e)}attachListeners(){this.detachListeners(),window.addEventListener(`resize`,this._resizeListener,{passive:!0}),!this._ro&&`ResizeObserver`in window&&(this._ro=new window.ResizeObserver(e=>{for(let t of e)t.contentRect&&this._resizeListener()})),this._ro&&this._ro.observe(this._e)}haveRectsChanged(){if(this._lastSizes.length){let e=this.rects();if(e.length===this._lastSizes.length){for(let t=0;t<e.length;t++)if(!this.isSameRect(e[t],this._lastSizes[t]))return!0}else return!0}return!1}isSameRect(e,t){let n=(e,t)=>Math.round(e)===Math.round(t);return n(e.x,t.x)&&n(e.y,t.y)&&n(e.w,t.w)&&n(e.h,t.h)}isShowing(){return this._state!==`not-showing`}refresh(){this.isShowing()&&!this.pendingRefresh&&(this.pendingRefresh=Promise.resolve().then(()=>{this.isShowing()&&this.show(),delete this.pendingRefresh}))}async show(){switch(this._state){case`unattached`:break;case`showing`:this.hide(),this._svg&&await this.render(this._svg,!0);break;case`not-showing`:this.attach(),this._svg&&await this.render(this._svg,!1)}}hide(){if(this._svg)for(;this._svg.lastChild;)this._svg.removeChild(this._svg.lastChild);this._state=`not-showing`}remove(){this._svg&&this._svg.parentElement&&this._svg.parentElement.removeChild(this._svg),this._svg=void 0,this._state=`unattached`,this.detachListeners()}async render(e,t){let n=this._config;t&&(n=JSON.parse(JSON.stringify(this._config)),n.animate=!1);let r=this.rects(),i=0;r.forEach(e=>i+=e.w);let a=n.animationDuration||Da,o=0,s=[];for(let t=0;t<r.length;t++){let c=a*(r[t].w/i);s.push(Ma(e,r[t],n,o+this._animationDelay+(this._config.delay||0),c,this._seed)),o+=c}return this._lastSizes=r,this._state=`showing`,await Promise.all(s)}rects(){let e=[];if(this._svg){if(this._config.multiline){let t=this._e.getClientRects();for(let n=0;n<t.length;n++)e.push(this.svgRect(this._svg,t[n]))}else e.push(this.svgRect(this._svg,this._e.getBoundingClientRect()))}return e}svgRect(e,t){let n=e.getBoundingClientRect(),r=t;return{x:(r.x||r.left)-(n.x||n.left),y:(r.y||r.top)-(n.y||n.top),w:r.width,h:r.height}}};function za(e,t){return new Ra(e,t)}function $(e,t){return e.class=[e.class,t].filter(Boolean).join(` `),e}var Ba={box:e=>Object.assign(e,{type:`box`}),circle:e=>Object.assign(e,{type:`circle`}),underline:e=>Object.assign(e,{type:`underline`}),highlight:e=>Object.assign(e,{type:`highlight`}),"strike-through":e=>Object.assign(e,{type:`strike-through`}),"crossed-off":e=>Object.assign(e,{type:`crossed-off`}),bracket:e=>Object.assign(e,{type:`bracket`}),strike:e=>Object.assign(e,{type:`strike-through`}),cross:e=>Object.assign(e,{type:`crossed-off`}),crossed:e=>Object.assign(e,{type:`crossed-off`}),linethrough:e=>Object.assign(e,{type:`strike-through`}),"line-through":e=>Object.assign(e,{type:`strike-through`}),black:e=>$(e,`text-black`),blue:e=>$(e,`text-blue`),cyan:e=>$(e,`text-cyan`),gray:e=>$(e,`text-gray`),green:e=>$(e,`text-green`),indigo:e=>$(e,`text-indigo`),lime:e=>$(e,`text-lime`),orange:e=>$(e,`text-orange`),pink:e=>$(e,`text-pink`),purple:e=>$(e,`text-purple`),red:e=>$(e,`text-red`),teal:e=>$(e,`text-teal`),white:e=>$(e,`text-white`),yellow:e=>$(e,`text-yellow`)},Va=[[/^delay-?(\d+)?$/,(e,t,n)=>(t.delay=(e[1]?Number.parseInt(e[1]):n)||300,t)],[/^(?:op|opacity)-?(\d+)?$/,(e,t,n)=>(t.opacity=((e[1]?Number.parseInt(e[1]):n)||100)/100,t)]];function Ha(){return{install(e){e.directive(`mark`,{name:`v-mark`,mounted:(e,t)=>{let{isPrintMode:n}=ue(),r=m(()=>{let e=typeof t.value==`object`&&!Array.isArray(t.value)?{...t.value}:{at:t.value},r={at:e.at},i=Object.entries(t.modifiers).filter(([e,t])=>{if(Ba[e])return r=Ba[e](r,t),!1;for(let[n,i]of Va){let a=e.match(n);if(a)return r=i(a,r,t),!1}return!0});i.length&&console.warn(`[Slidev] Invalid modifiers for v-mark:`,i);let a={...r,...e};return a.type||=`underline`,n.value&&(a.animationDuration=1),a}),i=za(e,r.value),a=ai(e,t,r.value.at);if(!a){i.show();return}e.watchStopHandle=c(()=>{let e;r.value.class&&(i.class=r.value.class),r.value.color&&(i.color=r.value.color);let t=r.value.at;e=t===!0||t!==!1&&a.isActive.value,e!=null&&(e?i.show():i.hide())})},unmounted:e=>{e.watchStopHandle?.()}})}}}function Ua(){return{install(e){let t=xe();e.directive(`motion`,{name:`v-motion`,mounted(e,n,r,i){let a=ei(n,Oe),o=ei(n,ke),s=ei(n,Me),{currentPage:c,clicks:l,isPrintMode:u}=ue(),f=r.props={...r.props},p={...f.initial,...f.variants?.[`slidev-initial`]},m={...f.enter,...f.variants?.[`slidev-enter`]},h={...f.leave,...f.variants?.[`slidev-leave`]};delete f.initial,delete f.enter,delete f.leave;let g=`${xr()}-`,_=[];for(let e of Object.keys(f))if(e.startsWith(`click-`)){let t=e.slice(6),n=t.includes(`-`)?t.split(`-`).map(Number):+t,r=g+t;_.push({id:r,at:n,variant:{...f[e]},info:a?.value.calculate(n)}),delete f[e]}_.sort((e,t)=>(Array.isArray(e.at)?e.at[0]:e.at)-(Array.isArray(t.at)?t.at[0]:t.at)),t.created(e,n,r,i),t.mounted(e,n,r,i);let v=e.motionInstance;v.clickIds=_.map(e=>e.id),v.set(p),v.watchStopHandle=d([o,c,l].filter(Boolean),()=>{let t=ii.get(e)?.visibilityState.value??`shown`;if(!a?.value||![`slide`,`presenter`].includes(s?.value??``)){let e={...p,...m};for(let{variant:t}of _)Object.assign(e,t);v.set(e)}else if(u.value||o?.value===c.value){if(t===`shown`){let e={...p,...m};for(let{variant:t,info:n}of _)(!n||n.isActive.value)&&Object.assign(e,t);u.value?v.set(e):v.apply(e)}else v.apply(t===`before`?p:h)}else v.apply((o?.value??-1)>c.value?p:h)},{immediate:!0})},unmounted(e){e.motionInstance.watchStopHandle()}})}}}var Wa=Object.assign({}),Ga=Object.assign({}),Ka=Object.assign({}),qa=[Object.values(Wa)[0],Object.values(Ga)[0],Object.values(Ka)[0]].filter(Boolean);function Ja(){let e=[];function t(e){if(!M.remote||M.remote===e.query.password)return!0;if(M.remote&&e.query.password===void 0){let e=prompt(`Enter password`);if(M.remote===e)return!0}return e.params.no?{path:`/${e.params.no}`}:{path:``}}return e.push({name:`entry`,path:`/entry`,component:()=>j(()=>import(`./slidev/entry-BM9MjO68.js`),__vite__mapDeps([2,3,1,4,5,6]),import.meta.url),beforeEnter:t},{name:`overview`,path:`/overview`,component:()=>j(()=>import(`./slidev/overview-v0VPTUGO.js`),__vite__mapDeps([7,3,1,4,8,5,9,10,11,12,13,14,15,16,17,18,19,20]),import.meta.url),beforeEnter:t},{name:`notes`,path:`/notes`,component:()=>j(()=>import(`./slidev/notes-CnMlvFmG.js`),__vite__mapDeps([21,3,1,4,8,5,9,10,12,22,13,14,23]),import.meta.url),beforeEnter:t},{name:`notes-edit`,path:`/notes-edit`,component:()=>j(()=>import(`./slidev/notes-edit-BkT-GYNi.js`),__vite__mapDeps([24,3,1,4,8,5,9,10,12,22]),import.meta.url),beforeEnter:t},{name:`presenter`,path:`/presenter/:no`,component:()=>j(()=>import(`./slidev/presenter-DVUYqPtJ.js`),__vite__mapDeps([25,3,1,4,8,5,9,10,17,26,12,27,28,13,14,23,15,16,18,19,29,30,31]),import.meta.url),beforeEnter:t},{path:`/presenter`,redirect:{path:`/presenter/1`}}),e.push({name:`play`,path:`/:no`,component:()=>j(()=>import(`./slidev/play-Mg5_I3MA.js`),__vite__mapDeps([32,3,1,4,8,5,9,10,17,11,22,15,16,18,29,12,27,30,33]),import.meta.url)},{path:``,redirect:{path:`/1`}},{path:`/:pathMatch(.*)*`,name:`NotFound`,component:()=>j(()=>import(`./slidev/404-CWdjs5kx.js`),__vite__mapDeps([34,3,1,4,8,5,9,10,35]),import.meta.url)}),qa.reduce((e,t)=>t(e),e)}async function Ya(e){function t(){document.documentElement.style.setProperty(`--vh`,`${window.innerHeight*.01}px`)}t(),window.addEventListener(`resize`,t);let n=he({history:Te(`./`),routes:Ja()});e.use(n),e.use(qr()),e.use(ri()),e.use(Ha()),e.use(pi()),e.use(Ua()),e.use(S,{container:`#twoslash-container`});let r={app:e,router:n};for(let e of Zr)await e(r)}async function Xa(){let e=x(Rr);await Ya(e),e.mount(`#app`)}Xa();export{Qr as a,Er as c,Sr as d,Ht as f,Mt as h,$r as i,Or as l,Wt as m,ci as n,Ir as o,Ut as p,si as r,kr as s,ui as t,xr as u};
lecture-02/assets/index-Bc3H5Jm0.css ADDED
The diff for this file is too large to render. See raw diff
 
lecture-02/assets/interactive-B3FqelG7.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,C as t,Ct as n,St as r,T as i,U as a,_ as o,b as s,bt as c,y as l}from"./modules/shiki-CRDHBXw7.js";import{t as u}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as d}from"./slidev/context-Dpnqq1ol.js";import{t as f}from"./DeckFooter-JTMZpkwe.js";var p={class:`slidev-layout dl-interactive`},m={key:0,class:`dl-interactive__title`},h={class:`dl-interactive__stage`},g=u(i({__name:`interactive`,props:{title:{},asideWidth:{},asideLeft:{type:Boolean}},setup(i){let{$slidev:u,$nav:g,$clicksContext:_,$clicks:v,$page:y,$renderContext:b,$frontmatter:x}=d(),S=i;return(i,u)=>{let d=f;return e(),s(`div`,p,[S.title?(e(),s(`h1`,m,n(S.title),1)):l(`v-if`,!0),o(`div`,{class:c([`dl-interactive__grid`,{"is-aside-left":S.asideLeft}])},[o(`div`,h,[a(i.$slots,`default`,{},void 0,!0)]),o(`div`,{class:`dl-interactive__aside`,style:r({flexBasis:S.asideWidth??`17rem`})},[a(i.$slots,`aside`,{},void 0,!0)],4)],2),t(d)])}}}),[[`__scopeId`,`data-v-cefd36d3`]]);export{g as t};
lecture-02/assets/md-BEyfrkX32.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,C as t,Ct as n,D as r,S as i,T as a,_ as o,b as s,dt as c,et as l,g as u,v as d,xt as f,y as p,yt as m}from"./modules/shiki-CRDHBXw7.js";import{t as h}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as g,t as _}from"./slidev/context-Dpnqq1ol.js";import{t as v}from"./slidev/KaTexBlockWrapper-M48-zhMq.js";import{t as y}from"./WidgetFrame-i_n0SXJC.js";import{t as b}from"./StepButton-BfWgSKte.js";import{n as x,t as S}from"./PlotPoints-DFeqey9j.js";import{t as C}from"./useRandom-D_d9WpzZ.js";import{t as w}from"./interactive-B3FqelG7.js";import{t as T}from"./PlotCurve-Cwb1YEav.js";var E={class:`dl-sgd__legend`},D={key:0,class:`dl-sgd__note`},O=h(a({__name:`SGDvsBatch`,props:{optimum:{default:2},eta:{default:.22},start:{default:5.6},n:{default:500},noise:{default:1.1}},setup(r){let{$slidev:a,$nav:f,$clicksContext:m,$clicks:h,$page:_,$renderContext:v,$frontmatter:w}=g(),O=r,k=[-2.4,6.4],A=[0,9],j=e=>.5*(e-O.optimum)**2+.4,M=e=>e-O.optimum,N=c(0),P=u(()=>{let e=C(90210),t=[O.start],n=[O.start];for(let r=0;r<N.value;r++)t.push(t[r]-O.eta*M(t[r])),n.push(n[r]-O.eta*(M(n[r])+e()*O.noise));return{batch:t,sgd:n}}),F=e=>e.filter(e=>e>=k[0]&&e<=k[1]).map(e=>({x:e,y:j(e)})),I=u(()=>N.value*O.n),L=u(()=>N.value);return(r,a)=>{let c=T,u=S,f=x,m=b,h=y;return e(),d(h,{"max-width":`44rem`},{controls:l(()=>[t(m,{label:`Step`,glyph:`▶`,onClick:a[0]||=e=>N.value++}),t(m,{label:`Run 20`,variant:`ghost`,onClick:a[1]||=e=>N.value+=20}),t(m,{label:`Reset`,variant:`ghost`,onClick:a[2]||=e=>N.value=0})]),readout:l(()=>[o(`div`,E,[o(`span`,null,[a[3]||=o(`i`,{class:`dot is-batch`},null,-1),i(` full batch — smooth, `+n(O.n)+` gradients per step`,1)]),a[4]||=o(`span`,null,[o(`i`,{class:`dot is-sgd`}),i(` stochastic — noisy, 1 gradient per step`)],-1)]),o(`div`,null,[i(n(N.value)+` step`+n(N.value===1?``:`s`)+` · gradients evaluated: `,1),o(`strong`,null,n(I.value.toLocaleString()),1),a[5]||=i(` vs `,-1),o(`strong`,null,n(L.value.toLocaleString()),1),N.value>0?(e(),s(`span`,D,` — that ratio is the whole argument for SGD on a large dataset. `)):p(`v-if`,!0)])]),default:l(()=>[t(f,{"x-domain":k,"y-domain":A,width:500,height:290,"x-label":`w`,"y-label":`L(w)`},{default:l(()=>[t(c,{fn:j,color:`var(--dl-border)`,width:3}),t(u,{points:F(P.value.batch),radius:4,color:`var(--dl-accent)`,opacity:.85},null,8,[`points`]),t(u,{points:F(P.value.sgd),radius:4,color:`var(--dl-danger)`,opacity:.85},null,8,[`points`])]),_:1})]),_:1})}}}),[[`__scopeId`,`data-v-75aa51a6`]]),k={class:`dl-math-xs`},A={__name:`slides.md__slidev_25`,setup(n){let{$slidev:a,$nav:s,$clicksContext:c,$clicks:u,$page:p,$renderContext:h,$frontmatter:y}=g();return c.setup(),(n,a)=>{let s=O,c=v;return e(),d(w,f(r(m(_)(m(y),24))),{aside:l(e=>[a[1]||=o(`p`,null,[i(`Full-batch descent needs `),o(`strong`,null,`every`),i(` example for one step. On a large dataset that is unaffordable.`)],-1),a[2]||=o(`p`,null,[o(`strong`,null,`Stochastic gradient descent`),i(` uses one example — or a mini-batch — per step. Noisier, far cheaper, and it supports `),o(`strong`,null,`online learning`),i(`.`)],-1),a[3]||=o(`p`,null,`With SGD we normally use an adaptive learning rate, e.g.`,-1),o(`div`,k,[t(c,{ranges:[]},{default:l(()=>[...a[0]||=[o(`p`,null,[o(`span`,{class:`katex-display`},[o(`span`,{class:`katex`},[o(`span`,{class:`katex-mathml`},[o(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[o(`semantics`,null,[o(`mrow`,null,[o(`mi`,null,`η`),o(`mo`,null,`=`),o(`mfrac`,null,[o(`msub`,null,[o(`mi`,null,`c`),o(`mn`,null,`1`)]),o(`mrow`,null,[o(`mo`,{stretchy:`false`},`[`),o(`mtext`,null,`number\xA0of\xA0iterations`),o(`mo`,{stretchy:`false`},`]`),o(`mo`,null,`+`),o(`msub`,null,[o(`mi`,null,`c`),o(`mn`,null,`2`)])])])]),o(`annotation`,{encoding:`application/x-tex`},`\\eta = \\frac{c_1}{[\\text{number of iterations}] + c_2}`)])])]),o(`span`,{class:`katex-html`,"aria-hidden":`true`},[o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),o(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`η`),o(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),o(`span`,{class:`mrel`},`=`),o(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`2.0436em`,"vertical-align":`-0.936em`}}),o(`span`,{class:`mord`},[o(`span`,{class:`mopen nulldelimiter`}),o(`span`,{class:`mfrac`},[o(`span`,{class:`vlist-t vlist-t2`},[o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`1.1076em`}},[o(`span`,{style:{top:`-2.314em`}},[o(`span`,{class:`pstrut`,style:{height:`3em`}}),o(`span`,{class:`mord`},[o(`span`,{class:`mopen`},`[`),o(`span`,{class:`mord text`},[o(`span`,{class:`mord`},`number\xA0of\xA0iterations`)]),o(`span`,{class:`mclose`},`]`),o(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),o(`span`,{class:`mbin`},`+`),o(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),o(`span`,{class:`mord`},[o(`span`,{class:`mord mathnormal`},`c`),o(`span`,{class:`msupsub`},[o(`span`,{class:`vlist-t vlist-t2`},[o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.3011em`}},[o(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[o(`span`,{class:`pstrut`,style:{height:`2.7em`}}),o(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[o(`span`,{class:`mord mtight`},`2`)])])]),o(`span`,{class:`vlist-s`},`​`)]),o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.15em`}},[o(`span`)])])])])])])]),o(`span`,{style:{top:`-3.23em`}},[o(`span`,{class:`pstrut`,style:{height:`3em`}}),o(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),o(`span`,{style:{top:`-3.677em`}},[o(`span`,{class:`pstrut`,style:{height:`3em`}}),o(`span`,{class:`mord`},[o(`span`,{class:`mord`},[o(`span`,{class:`mord mathnormal`},`c`),o(`span`,{class:`msupsub`},[o(`span`,{class:`vlist-t vlist-t2`},[o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.3011em`}},[o(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[o(`span`,{class:`pstrut`,style:{height:`2.7em`}}),o(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[o(`span`,{class:`mord mtight`},`1`)])])]),o(`span`,{class:`vlist-s`},`​`)]),o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.15em`}},[o(`span`)])])])])])])])]),o(`span`,{class:`vlist-s`},`​`)]),o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.936em`}},[o(`span`)])])])]),o(`span`,{class:`mclose nulldelimiter`})])])])])])],-1)]]),_:1})])]),default:l(()=>[t(s)]),_:1},16)}}};export{A as default};
lecture-02/assets/md-BNpOqr5d.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,C as t,D as n,S as r,_ as i,et as a,v as o,xt as s,yt as c}from"./modules/shiki-CRDHBXw7.js";import{n as l,t as u}from"./slidev/context-Dpnqq1ol.js";import{t as d}from"./PerceptronPlayground-DauUBgxr.js";import{t as f}from"./interactive-B3FqelG7.js";var p={__name:`slides.md__slidev_14`,setup(p){let{$slidev:m,$nav:h,$clicksContext:g,$clicks:_,$page:v,$renderContext:y,$frontmatter:b}=l();return g.setup(),(l,p)=>{let m=d;return e(),o(f,s(n(c(u)(c(b),13))),{aside:a(e=>[...p[0]||=[i(`p`,null,`Every step applies the rule to one example. Watch the boundary rotate towards the misclassified point.`,-1),i(`p`,null,[i(`strong`,null,`Convergence`),r(` is only guaranteed if the two classes are linearly separable — turn the toggle off and run a few epochs.`)],-1)]]),default:a(()=>[t(m)]),_:1},16)}}};export{p as default};
lecture-02/assets/md-BWa-9V8C2.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,C as t,Ct as n,D as r,H as i,S as a,T as o,_ as s,b as c,bt as l,dt as u,et as d,g as f,m as p,v as m,xt as h,y as g,yt as _}from"./modules/shiki-CRDHBXw7.js";import{t as v}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as y,t as b}from"./slidev/context-Dpnqq1ol.js";import{t as x}from"./WidgetFrame-i_n0SXJC.js";import{t as S}from"./interactive-B3FqelG7.js";var C={viewBox:`0 0 560 210`,class:`dl-neuron`,role:`img`,"aria-label":`Biological neuron beside an artificial neuron`},w={class:`bio`},T={class:`art`},E={class:`dl-neuron__tabs`},D=[`onClick`],O=v(o({__name:`NeuronAnatomy`,setup(t){let{$slidev:r,$nav:o,$clicksContext:h,$clicks:_,$page:v,$renderContext:b,$frontmatter:S}=y(),O=[{key:`in`,bio:`Dendrites`,art:`Inputs xⱼ`,note:`Signals arriving from other cells become the feature values.`},{key:`w`,bio:`Synapses`,art:`Weights wⱼ`,note:`A synapse’s strength decides how much a signal counts. That strength is what training changes.`},{key:`sum`,bio:`Cell body (soma)`,art:`Net input z = wᵀx + b`,note:`The cell accumulates incoming signal; the neuron sums the weighted inputs.`},{key:`out`,bio:`Axon`,art:`Output σ(z)`,note:`The cell fires — or does not. The unit step is the crudest possible model of that.`}],k=u(`in`),A=f(()=>O.find(e=>e.key===k.value)),j=e=>k.value===e;return(t,r)=>{let o=x;return e(),m(o,{"max-width":`46rem`},{controls:d(()=>[s(`div`,E,[(e(),c(p,null,i(O,e=>s(`button`,{key:e.key,type:`button`,class:l({"is-active":e.key===k.value}),onClick:t=>k.value=e.key},n(e.bio),11,D)),64))])]),readout:d(()=>[s(`strong`,null,n(A.value.bio),1),r[19]||=a(` ↔ `,-1),s(`strong`,null,n(A.value.art),1),a(` — `+n(A.value.note),1)]),default:d(()=>[(e(),c(`svg`,C,[g(` Biological `),r[16]||=s(`text`,{x:`130`,y:`16`,class:`head`},`Biological neuron`,-1),s(`g`,w,[s(`g`,{class:l({"is-on":j(`in`)}),onClick:r[0]||=e=>k.value=`in`},[...r[8]||=[s(`path`,{d:`M28,60 L74,92 M28,105 L74,100 M28,150 L74,110`,class:`dendrite`},null,-1)]],2),s(`g`,{class:l({"is-on":j(`w`)}),onClick:r[1]||=e=>k.value=`w`},[...r[9]||=[s(`circle`,{cx:`30`,cy:`60`,r:`6`,class:`synapse`},null,-1),s(`circle`,{cx:`30`,cy:`105`,r:`6`,class:`synapse`},null,-1),s(`circle`,{cx:`30`,cy:`150`,r:`6`,class:`synapse`},null,-1)]],2),s(`g`,{class:l({"is-on":j(`sum`)}),onClick:r[2]||=e=>k.value=`sum`},[...r[10]||=[s(`ellipse`,{cx:`102`,cy:`102`,rx:`30`,ry:`24`,class:`soma`},null,-1)]],2),s(`g`,{class:l({"is-on":j(`out`)}),onClick:r[3]||=e=>k.value=`out`},[...r[11]||=[s(`path`,{d:`M132,102 L228,102`,class:`axon`},null,-1),s(`path`,{d:`M228,102 l-8,-6 M228,102 l-8,6`,class:`axon`},null,-1)]],2)]),r[17]||=s(`line`,{x1:`270`,y1:`24`,x2:`270`,y2:`186`,class:`divider`},null,-1),g(` Artificial `),r[18]||=s(`text`,{x:`418`,y:`16`,class:`head`},`Artificial neuron`,-1),s(`g`,T,[s(`g`,{class:l({"is-on":j(`in`)}),onClick:r[4]||=e=>k.value=`in`},[...r[12]||=[s(`circle`,{cx:`318`,cy:`62`,r:`13`,class:`unit`},null,-1),s(`text`,{x:`318`,y:`66`,class:`lbl`},`x₁`,-1),s(`circle`,{cx:`318`,cy:`102`,r:`13`,class:`unit`},null,-1),s(`text`,{x:`318`,y:`106`,class:`lbl`},`x₂`,-1),s(`circle`,{cx:`318`,cy:`142`,r:`13`,class:`unit`},null,-1),s(`text`,{x:`318`,y:`146`,class:`lbl`},`x₃`,-1)]],2),s(`g`,{class:l({"is-on":j(`w`)}),onClick:r[5]||=e=>k.value=`w`},[...r[13]||=[s(`line`,{x1:`332`,y1:`64`,x2:`392`,y2:`96`,class:`wire`},null,-1),s(`line`,{x1:`332`,y1:`102`,x2:`392`,y2:`102`,class:`wire`},null,-1),s(`line`,{x1:`332`,y1:`140`,x2:`392`,y2:`108`,class:`wire`},null,-1),s(`text`,{x:`356`,y:`72`,class:`wlbl`},`w₁`,-1),s(`text`,{x:`356`,y:`96`,class:`wlbl`},`w₂`,-1),s(`text`,{x:`356`,y:`136`,class:`wlbl`},`w₃`,-1)]],2),s(`g`,{class:l({"is-on":j(`sum`)}),onClick:r[6]||=e=>k.value=`sum`},[...r[14]||=[s(`circle`,{cx:`412`,cy:`102`,r:`20`,class:`unit is-op`},null,-1),s(`text`,{x:`412`,y:`109`,class:`lbl big`},`Σ`,-1)]],2),s(`g`,{class:l({"is-on":j(`out`)}),onClick:r[7]||=e=>k.value=`out`},[...r[15]||=[s(`line`,{x1:`432`,y1:`102`,x2:`470`,y2:`102`,class:`wire`},null,-1),s(`circle`,{cx:`492`,cy:`102`,r:`20`,class:`unit is-op`},null,-1),s(`text`,{x:`492`,y:`108`,class:`lbl big`},`σ`,-1)]],2)])]))]),_:1})}}}),[[`__scopeId`,`data-v-23ec6437`]]),k={__name:`slides.md__slidev_4`,setup(n){let{$slidev:i,$nav:a,$clicksContext:o,$clicks:c,$page:l,$renderContext:u,$frontmatter:f}=y();return o.setup(),(n,i)=>{let a=O;return e(),m(S,h(r(_(b)(_(f),3))),{aside:d(e=>[...i[0]||=[s(`p`,null,`Interconnected nerve cells in the brain.`,-1),s(`p`,null,`Click a part to see what it maps onto. The analogy is loose — but it is where the vocabulary comes from.`,-1)]]),default:d(()=>[t(a)]),_:1},16)}}};export{k as default};
lecture-02/assets/md-Bja0-0_W.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,C as t,D as n,G as r,S as i,_ as a,b as o,et as s,tt as c,v as l,xt as u,yt as d}from"./modules/shiki-CRDHBXw7.js";import{n as f,t as p}from"./slidev/context-Dpnqq1ol.js";import{t as m}from"./default-A5OOL8XO.js";import{t as h}from"./PerceptronVsAdaline-Bwdgu3ts.js";import{t as g}from"./slidev/VClicks-buBFUjdS.js";var _={class:`grid grid-cols-2 gap-10 mt-2`},v={__name:`slides.md__slidev_15`,setup(v){let{$slidev:y,$nav:b,$clicksContext:x,$clicks:S,$page:C,$renderContext:w,$frontmatter:T}=f();return x.setup(),(f,v)=>{let y=g,b=h,x=r(`click`);return e(),l(m,u(n(d(p)(d(T),14))),{default:s(()=>[v[1]||=a(`h1`,null,`The big picture`,-1),a(`div`,_,[a(`div`,null,[t(y,null,{default:s(()=>[...v[0]||=[a(`ul`,null,[a(`li`,null,[i(`Inputs `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`bold`},`x`)]),a(`annotation`,{encoding:`application/x-tex`},`\\mathbf{x}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4444em`}}),a(`span`,{class:`mord mathbf`},`x`)])])]),i(`, scaled by weights `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`bold`},`w`)]),a(`annotation`,{encoding:`application/x-tex`},`\\mathbf{w}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4444em`}}),a(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`)])])])]),a(`li`,null,[i(`Summed into the net input `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`z`),a(`mo`,null,`=`),a(`msup`,null,[a(`mi`,{mathvariant:`bold`},`w`),a(`mi`,{mathvariant:`normal`},`⊤`)]),a(`mi`,{mathvariant:`bold`},`x`),a(`mo`,null,`+`),a(`mi`,null,`b`)]),a(`annotation`,{encoding:`application/x-tex`},`z = \\mathbf{w}^\\top\\mathbf{x} + b`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.9324em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.8491em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},`⊤`)])])])])])])]),a(`span`,{class:`mord mathbf`},`x`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6944em`}}),a(`span`,{class:`mord mathnormal`},`b`)])])])]),a(`li`,null,[i(`Thresholded into a class label `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mover`,{accent:`true`},[a(`mi`,null,`y`),a(`mo`,null,`^`)]),a(`mo`,null,`=`),a(`mi`,null,`σ`),a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`z`),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`\\hat{y} = \\sigma(z)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8889em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord katex-accent`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.6944em`}},[a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`)]),a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`accent-body`,style:{left:`-0.1944em`}},[a(`span`,{class:`mord`},`^`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.1944em`}},[a(`span`)])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`σ`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),a(`span`,{class:`mclose`},`)`)])])])]),a(`li`,null,[i(`Compared against the true label `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`y`)]),a(`annotation`,{encoding:`application/x-tex`},`y`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`)])])])]),a(`li`,null,[i(`The error drives `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`Δ`),a(`mi`,{mathvariant:`bold`},`w`)]),a(`annotation`,{encoding:`application/x-tex`},`\\Delta\\mathbf{w}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6833em`}}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`)])])]),i(` and `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`Δ`),a(`mi`,null,`b`)]),a(`annotation`,{encoding:`application/x-tex`},`\\Delta b`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6944em`}}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord mathnormal`},`b`)])])])])],-1)]]),_:1})]),c((e(),o(`div`,null,[t(b)])),[[x]])])]),_:1},16)}}};export{v as default};
lecture-02/assets/md-BogGe-l_.js ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import{B as e,C as t,D as n,N as r,S as i,_ as a,et as o,v as s,xt as c,yt as l}from"./modules/shiki-CRDHBXw7.js";import{n as u,t as d}from"./slidev/context-Dpnqq1ol.js";import{t as f}from"./default-A5OOL8XO.js";import{t as p}from"./Citation-B3hI67ru.js";import{t as m}from"./slidev/CodeBlockWrapper-ClYx9M-I.js";var h={class:`absolute bottom-12 right-12`},g={__name:`slides.md__slidev_26`,setup(g){let{$slidev:_,$nav:v,$clicksContext:y,$clicks:b,$page:x,$renderContext:S,$frontmatter:C}=u();return y.setup(),(u,g)=>{let _=m,v=p;return e(),s(f,c(n(l(d)(l(C),25))),{default:o(()=>[g[1]||=a(`h1`,null,`The perceptron, in code`,-1),t(_,r({lines:!0},{title:``,ranges:[`all`,`3-5`,`7-9`,`11-16`,`all`]}),{default:o(()=>[...g[0]||=[a(`pre`,{class:`shiki shiki-themes vitesse-dark vitesse-light slidev-code`,style:{"--shiki-dark":`#dbd7caee`,"--shiki-light":`#393a34`,"--shiki-dark-bg":`#121212`,"--shiki-light-bg":`#ffffff`}},[a(`code`,{class:`language-python`},[a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},`import`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` numpy `),a(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},`as`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` np`)]),i(`
2
+ `),a(`span`,{class:`line`}),i(`
3
+ `),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},`def`),a(`span`,{style:{"--shiki-dark":`#80A665`,"--shiki-light":`#59873A`}},` net_input`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`X`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` w`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` b`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`):`)]),i(`
4
+ `),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#C98A7D77`,"--shiki-light":`#B5695977`}},` """`),a(`span`,{style:{"--shiki-dark":`#C98A7D`,"--shiki-light":`#B56959`}},`z = Xw + b, for every example at once.`),a(`span`,{style:{"--shiki-dark":`#C98A7D77`,"--shiki-light":`#B5695977`}},`"""`)]),i(`
5
+ `),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},` return`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` X `),a(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},`@`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` w `),a(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},`+`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` b`)]),i(`
6
+ `),a(`span`,{class:`line`}),i(`
7
+ `),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},`def`),a(`span`,{style:{"--shiki-dark":`#80A665`,"--shiki-light":`#59873A`}},` predict`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`X`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` w`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` b`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`):`)]),i(`
8
+ `),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#C98A7D77`,"--shiki-light":`#B5695977`}},` """`),a(`span`,{style:{"--shiki-dark":`#C98A7D`,"--shiki-light":`#B56959`}},`The unit step function.`),a(`span`,{style:{"--shiki-dark":`#C98A7D77`,"--shiki-light":`#B5695977`}},`"""`)]),i(`
9
+ `),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},` return`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` np`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`where`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`net_input`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`X`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` w`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` b`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`)`),a(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},` >=`),a(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},` 0.0`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},` 1`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},` 0`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`)`)]),i(`
10
+ `),a(`span`,{class:`line`}),i(`
11
+ `),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},`def`),a(`span`,{style:{"--shiki-dark":`#80A665`,"--shiki-light":`#59873A`}},` fit`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`X`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` y`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` eta`),a(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},`=`),a(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},`0.01`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` epochs`),a(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},`=`),a(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},`50`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`):`)]),i(`
12
+ `),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` w`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` b `),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`=`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` np`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`zeros`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`X`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`shape`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`[`),a(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},`1`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`]),`),a(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},` 0.0`)]),i(`
13
+ `),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},` for`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` _ `),a(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},`in`),a(`span`,{style:{"--shiki-dark":`#B8A965`,"--shiki-light":`#998418`}},` range`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`epochs`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`):`)]),i(`
14
+ `),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},` for`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` xi`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` target `),a(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},`in`),a(`span`,{style:{"--shiki-dark":`#B8A965`,"--shiki-light":`#998418`}},` zip`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`X`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` y`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`):`)]),i(`
15
+ `),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` error `),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`=`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` target `),a(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},`-`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` predict`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`xi`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` w`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` b`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`)`)]),i(`
16
+ `),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` w `),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`+=`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` eta `),a(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},`*`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` error `),a(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},`*`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` xi `),a(`span`,{style:{"--shiki-dark":`#758575DD`,"--shiki-light":`#A0ADA0`}},`# no x on the bias update`)]),i(`
17
+ `),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` b `),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`+=`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` eta `),a(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},`*`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` error`)]),i(`
18
+ `),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},` return`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` w`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` b`)])])],-1)]]),_:1},16),a(`div`,h,[t(v,{source:`Runnable version in the course notebook`})])]),_:1},16)}}};export{g as default};
lecture-02/assets/md-C2mYSVdr.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,C as t,D as n,G as r,S as i,_ as a,b as o,et as s,tt as c,v as l,xt as u,yt as d}from"./modules/shiki-CRDHBXw7.js";import{n as f,t as p}from"./slidev/context-Dpnqq1ol.js";import{t as m}from"./slidev/KaTexBlockWrapper-M48-zhMq.js";import{t as h}from"./default-A5OOL8XO.js";var g={class:`mt-3 dl-math-sm`},_={class:`mt-8 dl-callout`},v={__name:`slides.md__slidev_12`,setup(v){let{$slidev:y,$nav:b,$clicksContext:x,$clicks:S,$page:C,$renderContext:w,$frontmatter:T}=f();return x.setup(),(f,v)=>{let y=m,b=r(`click`);return e(),l(h,u(n(d(p)(d(T),11))),{default:s(()=>[v[2]||=a(`h1`,null,`Example (2/2)`,-1),v[3]||=a(`p`,null,[i(`In the case of `),a(`span`,{class:`dl-wrong`},`wrong`),i(` predictions:`)],-1),c((e(),o(`div`,g,[t(y,{ranges:[]},{default:s(()=>[...v[0]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mtable`,{rowspacing:`0.25em`,columnalign:`right left`,columnspacing:`0em`},[a(`mtr`,null,[a(`mtd`,null,[a(`mstyle`,{scriptlevel:`0`,displaystyle:`true`},[a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mn`,null,`3`),a(`mo`,{stretchy:`false`},`)`),a(`mspace`,{width:`1em`})])])]),a(`mtd`,null,[a(`mstyle`,{scriptlevel:`0`,displaystyle:`true`},[a(`mrow`,null,[a(`mrow`),a(`msup`,null,[a(`mi`,null,`y`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`=`),a(`mn`,null,`1`),a(`mo`,{separator:`true`},`,`),a(`mtext`,null,`  `),a(`msup`,null,[a(`mover`,{accent:`true`},[a(`mi`,null,`y`),a(`mo`,null,`^`)]),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`=`),a(`mn`,null,`0`)])])])]),a(`mtr`,null,[a(`mtd`,null,[a(`mstyle`,{scriptlevel:`0`,displaystyle:`true`},[a(`mrow`)])]),a(`mtd`,null,[a(`mstyle`,{scriptlevel:`0`,displaystyle:`true`},[a(`mrow`,null,[a(`mrow`),a(`mi`,{mathvariant:`normal`},`Δ`),a(`msub`,null,[a(`mi`,null,`w`),a(`mi`,null,`j`)]),a(`mo`,null,`=`),a(`mi`,null,`η`),a(`mo`,{stretchy:`false`},`(`),a(`mn`,null,`1`),a(`mo`,null,`−`),a(`mn`,null,`0`),a(`mo`,{stretchy:`false`},`)`),a(`mtext`,null,` `),a(`msubsup`,null,[a(`mi`,null,`x`),a(`mi`,null,`j`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`=`),a(`mi`,null,`η`),a(`mtext`,null,` `),a(`msubsup`,null,[a(`mi`,null,`x`),a(`mi`,null,`j`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,{separator:`true`},`,`),a(`mspace`,{width:`1em`}),a(`mi`,{mathvariant:`normal`},`Δ`),a(`mi`,null,`b`),a(`mo`,null,`=`),a(`mi`,null,`η`)])])])]),a(`mtr`,null,[a(`mtd`,null,[a(`mstyle`,{scriptlevel:`0`,displaystyle:`true`},[a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mn`,null,`4`),a(`mo`,{stretchy:`false`},`)`),a(`mspace`,{width:`1em`})])])]),a(`mtd`,null,[a(`mstyle`,{scriptlevel:`0`,displaystyle:`true`},[a(`mrow`,null,[a(`mrow`),a(`msup`,null,[a(`mi`,null,`y`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`=`),a(`mn`,null,`0`),a(`mo`,{separator:`true`},`,`),a(`mtext`,null,`  `),a(`msup`,null,[a(`mover`,{accent:`true`},[a(`mi`,null,`y`),a(`mo`,null,`^`)]),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`=`),a(`mn`,null,`1`)])])])]),a(`mtr`,null,[a(`mtd`,null,[a(`mstyle`,{scriptlevel:`0`,displaystyle:`true`},[a(`mrow`)])]),a(`mtd`,null,[a(`mstyle`,{scriptlevel:`0`,displaystyle:`true`},[a(`mrow`,null,[a(`mrow`),a(`mi`,{mathvariant:`normal`},`Δ`),a(`msub`,null,[a(`mi`,null,`w`),a(`mi`,null,`j`)]),a(`mo`,null,`=`),a(`mi`,null,`η`),a(`mo`,{stretchy:`false`},`(`),a(`mn`,null,`0`),a(`mo`,null,`−`),a(`mn`,null,`1`),a(`mo`,{stretchy:`false`},`)`),a(`mtext`,null,` `),a(`msubsup`,null,[a(`mi`,null,`x`),a(`mi`,null,`j`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`=`),a(`mo`,null,`−`),a(`mi`,null,`η`),a(`mtext`,null,` `),a(`msubsup`,null,[a(`mi`,null,`x`),a(`mi`,null,`j`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,{separator:`true`},`,`),a(`mspace`,{width:`1em`}),a(`mi`,{mathvariant:`normal`},`Δ`),a(`mi`,null,`b`),a(`mo`,null,`=`),a(`mo`,null,`−`),a(`mi`,null,`η`)])])])])]),a(`annotation`,{encoding:`application/x-tex`},`\\begin{aligned} (3)\\quad & y^{(i)} = 1,\\; \\hat{y}^{(i)} = 0 \\\\ & \\Delta w_j = \\eta(1-0)\\,x_j^{(i)} = \\eta\\,x_j^{(i)}, \\quad \\Delta b = \\eta \\\\[8pt] (4)\\quad & y^{(i)} = 0,\\; \\hat{y}^{(i)} = 1 \\\\ & \\Delta w_j = \\eta(0-1)\\,x_j^{(i)} = -\\eta\\,x_j^{(i)}, \\quad \\Delta b = -\\eta \\end{aligned} `)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`7.1586em`,"vertical-align":`-3.3293em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mtable`},[a(`span`,{class:`col-align-r`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`3.8293em`}},[a(`span`,{style:{top:`-5.9361em`}},[a(`span`,{class:`pstrut`,style:{height:`3.0448em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},`3`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`1em`}})])]),a(`span`,{style:{top:`-4.2313em`}},[a(`span`,{class:`pstrut`,style:{height:`3.0448em`}}),a(`span`,{class:`mord`})]),a(`span`,{style:{top:`-1.8333em`}},[a(`span`,{class:`pstrut`,style:{height:`3.0448em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},`4`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`1em`}})])]),a(`span`,{style:{top:`-0.1285em`}},[a(`span`,{class:`pstrut`,style:{height:`3.0448em`}}),a(`span`,{class:`mord`})])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`3.3293em`}},[a(`span`)])])])]),a(`span`,{class:`col-align-l`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`3.8293em`}},[a(`span`,{style:{top:`-5.9361em`}},[a(`span`,{class:`pstrut`,style:{height:`3.0448em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord katex-accent`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.6944em`}},[a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`)]),a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`accent-body`,style:{left:`-0.1944em`}},[a(`span`,{class:`mord`},`^`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.1944em`}},[a(`span`)])])])]),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mord`},`0`)])]),a(`span`,{style:{top:`-4.2313em`}},[a(`span`,{class:`pstrut`,style:{height:`3.0448em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`η`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mord`},`0`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`x`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.0448em`}},[a(`span`,{style:{top:`-2.4231em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])]),a(`span`,{style:{top:`-3.2198em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.413em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`η`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`x`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.0448em`}},[a(`span`,{style:{top:`-2.4231em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])]),a(`span`,{style:{top:`-3.2198em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.413em`}},[a(`span`)])])])])]),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`1em`}}),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord mathnormal`},`b`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`η`)])]),a(`span`,{style:{top:`-1.8333em`}},[a(`span`,{class:`pstrut`,style:{height:`3.0448em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mord`},`0`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord katex-accent`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.6944em`}},[a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`)]),a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`accent-body`,style:{left:`-0.1944em`}},[a(`span`,{class:`mord`},`^`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.1944em`}},[a(`span`)])])])]),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mord`},`1`)])]),a(`span`,{style:{top:`-0.1285em`}},[a(`span`,{class:`pstrut`,style:{height:`3.0448em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`η`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},`0`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`x`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.0448em`}},[a(`span`,{style:{top:`-2.4231em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])]),a(`span`,{style:{top:`-3.2198em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.413em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`η`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`x`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.0448em`}},[a(`span`,{style:{top:`-2.4231em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])]),a(`span`,{style:{top:`-3.2198em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.413em`}},[a(`span`)])])])])]),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`1em`}}),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord mathnormal`},`b`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`η`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`3.3293em`}},[a(`span`)])])])])])])])])])])],-1)]]),_:1})])),[[b]]),c((e(),o(`div`,_,[...v[1]||=[i(` Both updates point the boundary the right way. How `,-1),a(`em`,null,`far`,-1),i(` it moves is set by the feature value. `,-1)]])),[[b]])]),_:1},16)}}};export{v as default};
lecture-02/assets/md-CSL0Sr8I.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,C as t,D as n,S as r,_ as i,et as a,v as o,xt as s,yt as c}from"./modules/shiki-CRDHBXw7.js";import{n as l,t as u}from"./slidev/context-Dpnqq1ol.js";import{t as d}from"./default-A5OOL8XO.js";import{t as f}from"./slidev/VClicks-buBFUjdS.js";var p={__name:`slides.md__slidev_17`,setup(p){let{$slidev:m,$nav:h,$clicksContext:g,$clicks:_,$page:v,$renderContext:y,$frontmatter:b}=l();return g.setup(),(l,p)=>{let m=f;return e(),o(d,s(n(c(u)(c(b),16))),{default:a(()=>[p[1]||=i(`h1`,null,[r(`ADALINE `),i(`span`,{class:`dl-secondary`},`(the Widrow–Hoff rule)`)],-1),t(m,null,{default:a(()=>[...p[0]||=[i(`ul`,null,[i(`li`,null,[r(`Published by `),i(`strong`,null,`Bernard Widrow`),r(` and his doctoral student `),i(`strong`,null,`Tedd Hoff`),r(`, only a few years after Rosenblatt’s perceptron.`)]),i(`li`,null,[r(`It is the natural next step: it illustrates how to define and `),i(`strong`,null,`minimise a continuous loss function`),r(`.`)]),i(`li`,null,[r(`The key change: weights are updated from a `),i(`strong`,null,`linear`),r(` activation, rather than from a unit step.`)])],-1)]]),_:1})]),_:1},16)}}};export{p as default};
lecture-02/assets/md-CiMC_C1d2.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,C as t,D as n,S as r,_ as i,et as a,v as o,xt as s,yt as c}from"./modules/shiki-CRDHBXw7.js";import{n as l,t as u}from"./slidev/context-Dpnqq1ol.js";import{t as d}from"./PerceptronPlayground-DauUBgxr.js";import{t as f}from"./interactive-B3FqelG7.js";var p={__name:`slides.md__slidev_9`,setup(p){let{$slidev:m,$nav:h,$clicksContext:g,$clicks:_,$page:v,$renderContext:y,$frontmatter:b}=l();return g.setup(),(l,p)=>{let m=d;return e(),o(f,s(n(c(u)(c(b),8))),{aside:a(e=>[...p[0]||=[i(`p`,null,[i(`span`,{class:`katex`},[i(`span`,{class:`katex-mathml`},[i(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[i(`semantics`,null,[i(`mrow`,null,[i(`mi`,null,`σ`),i(`mo`,{stretchy:`false`},`(`),i(`msup`,null,[i(`mi`,{mathvariant:`bold`},`w`),i(`mi`,{mathvariant:`normal`},`⊤`)]),i(`mi`,{mathvariant:`bold`},`x`),i(`mo`,null,`+`),i(`mi`,null,`b`),i(`mo`,{stretchy:`false`},`)`)]),i(`annotation`,{encoding:`application/x-tex`},`\\sigma(\\mathbf{w}^\\top\\mathbf{x} + b)`)])])]),i(`span`,{class:`katex-html`,"aria-hidden":`true`},[i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`1.0991em`,"vertical-align":`-0.25em`}}),i(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`σ`),i(`span`,{class:`mopen`},`(`),i(`span`,{class:`mord`},[i(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.8491em`}},[i(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mtight`},`⊤`)])])])])])])]),i(`span`,{class:`mord mathbf`},`x`),i(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),i(`span`,{class:`mbin`},`+`),i(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),i(`span`,{class:`mord mathnormal`},`b`),i(`span`,{class:`mclose`},`)`)])])]),r(` splits the plane with a `),i(`strong`,null,`linear decision boundary`),r(`.`)],-1),i(`p`,null,[r(`The boundary is the set of points where `),i(`span`,{class:`katex`},[i(`span`,{class:`katex-mathml`},[i(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[i(`semantics`,null,[i(`mrow`,null,[i(`mi`,null,`z`),i(`mo`,null,`=`),i(`mn`,null,`0`)]),i(`annotation`,{encoding:`application/x-tex`},`z = 0`)])])]),i(`span`,{class:`katex-html`,"aria-hidden":`true`},[i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),i(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),i(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),i(`span`,{class:`mrel`},`=`),i(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),i(`span`,{class:`mord`},`0`)])])]),r(`; everything on one side fires, everything on the other does not.`)],-1)]]),default:a(()=>[t(m,{mode:`boundary`})]),_:1},16)}}};export{p as default};
lecture-02/assets/md-CmjeJDum.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,C as t,D as n,G as r,_ as i,b as a,et as o,tt as s,v as c,xt as l,yt as u}from"./modules/shiki-CRDHBXw7.js";import{n as d,t as f}from"./slidev/context-Dpnqq1ol.js";import{t as p}from"./default-A5OOL8XO.js";import{t as m}from"./slidev/VClicks-buBFUjdS.js";import{t as h}from"./Citation-B3hI67ru.js";var g={class:`mt-8`},_={__name:`slides.md__slidev_2`,setup(_){let{$slidev:v,$nav:y,$clicksContext:b,$clicks:x,$page:S,$renderContext:C,$frontmatter:w}=d();return b.setup(),(d,_)=>{let v=m,y=h,b=r(`click`);return e(),c(p,l(n(u(f)(u(w),1))),{default:o(()=>[_[1]||=i(`h1`,null,`Outline`,-1),t(v,null,{default:o(()=>[..._[0]||=[i(`ul`,null,[i(`li`,null,`Artificial neurons and neural networks`),i(`li`,null,`Implementing and training a multilayer neural network from scratch`)],-1)]]),_:1}),s((e(),a(`div`,g,[t(y,{source:`Based throughout on Raschka, Liu & Mirjalili — Machine Learning with PyTorch and Scikit-Learn`})])),[[b]])]),_:1},16)}}};export{_ as default};
lecture-02/assets/md-CskVyE9c2.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,C as t,Ct as n,D as r,H as i,S as a,T as o,_ as s,b as c,bt as l,c as u,dt as d,et as f,g as p,m,tt as h,v as g,xt as _,y as v,yt as y}from"./modules/shiki-CRDHBXw7.js";import{t as b}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as x,t as S}from"./slidev/context-Dpnqq1ol.js";import{t as C}from"./WidgetFrame-i_n0SXJC.js";import{t as w}from"./Katex-BuUbKNzG.js";import{n as T,t as E}from"./PlotLine-C3bT02q3.js";import{n as D,t as O}from"./PlotPoints-DFeqey9j.js";import{t as k}from"./interactive-B3FqelG7.js";import{t as A}from"./PlotCurve-Cwb1YEav.js";var j={class:`dl-act__tabs`,role:`tablist`},M=[`aria-selected`,`onClick`],N={class:`dl-act__toggle`},P={class:`dl-act__formula`},F={class:`dl-act__numbers`},I={key:0,class:`dl-act__warn`},L={class:`dl-act__note`},R=b(o({__name:`ActivationExplorer`,setup(r){let{$slidev:o,$nav:_,$clicksContext:y,$clicks:b,$page:S,$renderContext:k,$frontmatter:R}=x(),z=[{key:`sigmoid`,name:`Sigmoid`,latex:`\\sigma(z) = \\dfrac{1}{1 + e^{-z}}`,fn:e=>1/(1+Math.exp(-e)),d:e=>{let t=1/(1+Math.exp(-e));return t*(1-t)},yDomain:[-.3,1.3],note:`Squashes to (0, 1). The derivative peaks at just 0.25 and vanishes either side — the origin of the vanishing-gradient problem in deep stacks.`},{key:`tanh`,name:`Tanh`,latex:`\\tanh(z) = \\dfrac{e^{z} - e^{-z}}{e^{z} + e^{-z}}`,fn:e=>Math.tanh(e),d:e=>1-Math.tanh(e)**2,yDomain:[-1.4,1.4],note:`Zero-centred, so gradients do not all share a sign. Still saturates, but its derivative reaches 1 rather than 0.25.`},{key:`relu`,name:`ReLU`,latex:`f(z) = \\max(0,\\ z)`,fn:e=>Math.max(0,e),d:e=>+(e>0),yDomain:[-1,4],note:`No saturation for positive input, so the gradient survives depth. Units with permanently negative input never update — the "dying ReLU".`},{key:`leaky`,name:`Leaky ReLU`,latex:`f(z) = \\begin{cases} z & z > 0 \\\\ 0.01z & z \\le 0 \\end{cases}`,fn:e=>e>0?e:.01*e,d:e=>e>0?1:.01,yDomain:[-1,4],note:`Keeps a small slope below zero so a unit can recover.`},{key:`step`,name:`Unit step`,latex:`\\phi(z) = \\begin{cases} 1 & z \\ge 0 \\\\ 0 & z < 0 \\end{cases}`,fn:e=>+(e>=0),d:()=>0,yDomain:[-.3,1.3],note:`What the perceptron uses. Its derivative is zero everywhere it exists, which is exactly why gradient descent cannot train it — and why Adaline switches to a linear activation.`},{key:`linear`,name:`Linear`,latex:`f(z) = z`,fn:e=>e,d:()=>1,yDomain:[-4,4],note:`Adaline's activation. Differentiable and convex under MSE, so gradient descent applies — but stacking linear layers still only gives you a linear model.`}],B=d(z[0].key),V=d(!0),H=d(1.5),U=p(()=>z.find(e=>e.key===B.value)),W=p(()=>U.value.fn(H.value)),G=p(()=>U.value.d(H.value));return(r,o)=>{let d=A,p=E,_=O,y=D,b=T,x=w,S=C;return e(),g(S,{"max-width":`46rem`},{controls:f(()=>[s(`div`,j,[(e(),c(m,null,i(z,e=>s(`button`,{key:e.key,type:`button`,role:`tab`,"aria-selected":e.key===B.value,class:l({"is-active":e.key===B.value}),onClick:t=>B.value=e.key},n(e.name),11,M)),64))]),t(b,{modelValue:H.value,"onUpdate:modelValue":o[0]||=e=>H.value=e,label:`z`,min:-6,max:6,step:.1,precision:1,class:`dl-act__probe`},null,8,[`modelValue`]),s(`label`,N,[h(s(`input`,{"onUpdate:modelValue":o[1]||=e=>V.value=e,type:`checkbox`},null,512),[[u,V.value]]),o[2]||=a(` show derivative `,-1)])]),readout:f(()=>[s(`div`,P,[t(x,{expr:U.value.latex},null,8,[`expr`])]),s(`div`,F,[a(` f(`+n(H.value.toFixed(1))+`) = `,1),s(`strong`,null,n(W.value.toFixed(3)),1),a(` \xA0·\xA0 f′(`+n(H.value.toFixed(1))+`) = `,1),s(`strong`,{class:l({"is-dead":Math.abs(G.value)<.02})},n(G.value.toFixed(3)),3),Math.abs(G.value)<.02?(e(),c(`span`,I,`gradient is effectively dead here`)):v(`v-if`,!0)]),s(`p`,L,n(U.value.note),1)]),default:f(()=>[t(y,{"x-domain":[-6,6],"y-domain":U.value.yDomain,width:560,height:300,"x-label":`z (net input)`,"origin-axes":``},{default:f(()=>[V.value?(e(),g(d,{key:`d-${U.value.key}`,fn:U.value.d,color:`var(--dl-muted)`,width:2,dashed:``},null,8,[`fn`])):v(`v-if`,!0),(e(),g(d,{key:U.value.key,fn:U.value.fn,color:`var(--dl-accent)`,width:3},null,8,[`fn`])),t(p,{from:[H.value,U.value.yDomain[0]],to:[H.value,W.value],color:`var(--dl-border)`,width:1.5,dashed:``},null,8,[`from`,`to`]),t(_,{points:[{x:H.value,y:W.value}],radius:6,color:`var(--dl-accent)`},null,8,[`points`])]),_:1},8,[`y-domain`])]),_:1})}}}),[[`__scopeId`,`data-v-5bf26593`]]),z={__name:`slides.md__slidev_33`,setup(n){let{$slidev:i,$nav:o,$clicksContext:c,$clicks:l,$page:u,$renderContext:d,$frontmatter:p}=x();return c.setup(),(n,i)=>{let o=R;return e(),g(k,_(r(y(S)(y(p),32))),{aside:f(e=>[...i[0]||=[s(`p`,null,[s(`strong`,null,`Why backpropagation?`),a(` To compute the partial derivatives of a complex, non-convex function without doing the algebra by hand for every weight.`)],-1),s(`p`,null,[a(`Select `),s(`strong`,null,`Unit step`),a(`: the derivative is flat zero, which is exactly why the perceptron could never be trained this way — and why the choice of activation is the first thing that matters in a deep network.`)],-1)]]),default:f(()=>[t(o)]),_:1},16)}}};export{z as default};
lecture-02/assets/md-DE5q4xMj.js ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ import{B as e,C as t,D as n,G as r,N as i,S as a,_ as o,b as s,et as c,tt as l,v as u,xt as d,yt as f}from"./modules/shiki-CRDHBXw7.js";import{n as p,t as m}from"./slidev/context-Dpnqq1ol.js";import{t as h}from"./default-A5OOL8XO.js";import{t as g}from"./slidev/CodeBlockWrapper-ClYx9M-I.js";var _={class:`mt-4 dl-callout`},v={__name:`slides.md__slidev_27`,setup(v){let{$slidev:y,$nav:b,$clicksContext:x,$clicks:S,$page:C,$renderContext:w,$frontmatter:T}=p();return x.setup(),(p,v)=>{let y=g,b=r(`click`);return e(),u(h,d(n(f(m)(f(T),26))),{default:c(()=>[v[2]||=o(`h1`,null,`Adaline, in code`,-1),v[3]||=o(`p`,null,[a(`The only change is `),o(`strong`,null,`where the error comes from`),a(` — the continuous activation rather than the thresholded label.`)],-1),t(y,i({lines:!0},{title:``,ranges:[`all`,`4-5`,`7-9`,`all`]}),{default:c(()=>[...v[0]||=[o(`pre`,{class:`shiki shiki-themes vitesse-dark vitesse-light slidev-code`,style:{"--shiki-dark":`#dbd7caee`,"--shiki-light":`#393a34`,"--shiki-dark-bg":`#121212`,"--shiki-light-bg":`#ffffff`}},[o(`code`,{class:`language-python`},[o(`span`,{class:`line`},[o(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},`def`),o(`span`,{style:{"--shiki-dark":`#80A665`,"--shiki-light":`#59873A`}},` fit_adaline`),o(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),o(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`X`),o(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),o(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` y`),o(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),o(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` eta`),o(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},`=`),o(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},`0.01`),o(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),o(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` epochs`),o(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},`=`),o(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},`50`),o(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`):`)]),a(`
2
+ `),o(`span`,{class:`line`},[o(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` w`),o(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),o(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` b `),o(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`=`),o(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` np`),o(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),o(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`zeros`),o(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),o(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`X`),o(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),o(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`shape`),o(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`[`),o(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},`1`),o(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`]),`),o(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},` 0.0`)]),a(`
3
+ `),o(`span`,{class:`line`},[o(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},` for`),o(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` _ `),o(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},`in`),o(`span`,{style:{"--shiki-dark":`#B8A965`,"--shiki-light":`#998418`}},` range`),o(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),o(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`epochs`),o(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`):`)]),a(`
4
+ `),o(`span`,{class:`line`},[o(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` output `),o(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`=`),o(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` net_input`),o(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),o(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`X`),o(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),o(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` w`),o(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),o(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` b`),o(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`)`),o(`span`,{style:{"--shiki-dark":`#758575DD`,"--shiki-light":`#A0ADA0`}},` # linear activation, not a step`)]),a(`
5
+ `),o(`span`,{class:`line`},[o(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` errors `),o(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`=`),o(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` y `),o(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},`-`),o(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` output`)]),a(`
6
+ `),o(`span`,{class:`line`}),a(`
7
+ `),o(`span`,{class:`line`},[o(`span`,{style:{"--shiki-dark":`#758575DD`,"--shiki-light":`#A0ADA0`}},` # dL/dw = -(1/n) sum (y - sigma(z)) x`)]),a(`
8
+ `),o(`span`,{class:`line`},[o(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` w `),o(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`+=`),o(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` eta `),o(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},`*`),o(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},` (`),o(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`X`),o(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),o(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`T `),o(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},`@`),o(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` errors`),o(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`)`),o(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},` /`),o(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` X`),o(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),o(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`shape`),o(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`[`),o(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},`0`),o(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`]`)]),a(`
9
+ `),o(`span`,{class:`line`},[o(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` b `),o(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`+=`),o(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` eta `),o(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},`*`),o(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` errors`),o(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),o(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`mean`),o(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`()`)]),a(`
10
+ `),o(`span`,{class:`line`},[o(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},` return`),o(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` w`),o(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),o(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` b`)])])],-1)]]),_:1},16),l((e(),s(`div`,_,[...v[1]||=[a(` One indentation level fewer, too: the whole dataset updates at once instead of one example at a time. `,-1)]])),[[b]])]),_:1},16)}}};export{v as default};
lecture-02/assets/md-DMN_0eSx.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,C as t,Ct as n,D as r,H as i,S as a,T as o,U as s,Z as c,_ as l,b as u,dt as d,et as f,g as p,m,v as h,xt as g,y as _,yt as v}from"./modules/shiki-CRDHBXw7.js";import{t as y}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as b,t as x}from"./slidev/context-Dpnqq1ol.js";import{t as S}from"./WidgetFrame-i_n0SXJC.js";import{t as C}from"./Katex-BuUbKNzG.js";import{n as w,t as T}from"./PlotLine-C3bT02q3.js";import{t as E}from"./StepButton-BfWgSKte.js";import{n as D,r as O,t as k}from"./PlotPoints-DFeqey9j.js";import{t as A}from"./interactive-B3FqelG7.js";import{t as j}from"./PlotCurve-Cwb1YEav.js";var M={class:`dl-plot-label`},N=[`x1`,`y1`,`x2`,`y2`,`stroke`],P=[`x`,`y`,`text-anchor`,`fill`,`font-size`,`font-weight`],F=o({__name:`PlotLabel`,props:{at:{},text:{},dx:{default:8},dy:{default:-8},anchor:{default:`start`},color:{},size:{default:12},leader:{type:Boolean,default:!1},bold:{type:Boolean,default:!1}},setup(t){let{$slidev:r,$nav:i,$clicksContext:o,$clicks:c,$page:d,$renderContext:f,$frontmatter:m}=b(),h=t,g=O(),v=p(()=>({x:g.sx(h.at[0]),y:g.sy(h.at[1])})),y=p(()=>({x:v.value.x+h.dx,y:v.value.y+h.dy}));return(t,r)=>(e(),u(`g`,M,[h.leader?(e(),u(`line`,{key:0,x1:v.value.x,y1:v.value.y,x2:y.value.x-(h.anchor===`end`?-4:4),y2:y.value.y+3,stroke:h.color??`var(--dl-muted)`,"stroke-width":`1`},null,8,N)):_(`v-if`,!0),l(`text`,{x:y.value.x,y:y.value.y,"text-anchor":h.anchor,fill:h.color??`var(--dl-body)`,"font-size":h.size,"font-weight":h.bold?600:400},[s(t.$slots,`default`,{},()=>[a(n(h.text),1)])],8,P)]))}}),I={class:`dl-gd__math`},L={key:0,class:`dl-gd__bad`},R={key:1,class:`dl-gd__ok`},z={key:2,class:`dl-gd__slow`},B=y(o({__name:`GradientDescent1D`,props:{optimum:{default:2},floor:{default:.4},start:{default:5.2},eta:{default:.35},maxSteps:{default:40}},setup(r){let{$slidev:o,$nav:s,$clicksContext:g,$clicks:v,$page:y,$renderContext:x,$frontmatter:O}=b(),A=r,M=[-2.4,6.4],N=[0,9],P=d(A.eta),B=d(A.start),V=d([A.start]),H=e=>.5*(e-A.optimum)**2+A.floor,U=e=>e-A.optimum,W=p(()=>V.value[V.value.length-1]),G=p(()=>U(W.value)),K=p(()=>V.value.length-1),q=p(()=>Math.abs(W.value)>1e3||Math.abs(W.value-A.optimum)>40),J=p(()=>Math.abs(G.value)<.001);function Y(){V.value=[B.value]}c(B,Y),c(P,Y);function X(){if(V.value.length>A.maxSteps||q.value||J.value)return;let e=W.value;V.value=[...V.value,e-P.value*U(e)]}function Z(){for(let e=0;e<25;e++)X()}let Q=p(()=>{let e=[],[t,n]=M;for(let r=1;r<V.value.length;r++){let i=V.value[r-1],a=V.value[r];i<t||i>n||a<t||a>n||e.push({from:[i,H(i)],to:[a,H(a)]})}return e}),$=p(()=>{let e=W.value;if(!Number.isFinite(e))return null;let t=1.1,n=t=>H(e)+G.value*(t-e);return{from:[e-t,n(e-t)],to:[e+t,n(e+t)]}}),ee=p(()=>V.value.filter(e=>e>=M[0]&&e<=M[1]).map(e=>({x:e,y:H(e)})));return(r,o)=>{let s=j,c=T,d=k,p=F,g=D,v=E,y=w,b=C,x=S;return e(),h(x,{"max-width":`44rem`},{controls:f(()=>[t(v,{label:`Step`,glyph:`▶`,disabled:q.value||J.value,onClick:X},null,8,[`disabled`]),t(v,{label:`Run`,variant:`ghost`,disabled:q.value||J.value,onClick:Z},null,8,[`disabled`]),t(v,{label:`Reset`,variant:`ghost`,onClick:Y}),t(y,{modelValue:P.value,"onUpdate:modelValue":o[0]||=e=>P.value=e,label:`learning rate η`,min:.05,max:2.4,step:.05,class:`dl-gd__ctl`},null,8,[`modelValue`]),t(y,{modelValue:B.value,"onUpdate:modelValue":o[1]||=e=>B.value=e,label:`starting w`,min:-2,max:6,step:.1,precision:1,class:`dl-gd__ctl`},null,8,[`modelValue`])]),readout:f(()=>[l(`div`,I,[t(b,{expr:`w := w - \\eta \\frac{\\partial L}{\\partial w} = ${W.value.toFixed(3)} - ${P.value.toFixed(2)} \\times (${G.value.toFixed(3)})`},null,8,[`expr`])]),l(`div`,null,[a(` step `+n(K.value)+` · L(w) = `,1),l(`strong`,null,n(Number.isFinite(H(W.value))?H(W.value).toFixed(4):`∞`),1),q.value?(e(),u(`span`,L,`η is too large — the update overshoots and the loss climbs away`)):J.value?(e(),u(`span`,R,`gradient is zero: nothing left to update`)):P.value<.12?(e(),u(`span`,z,`η is small — correct direction, but it will take many steps`)):_(`v-if`,!0)])]),default:f(()=>[t(g,{"x-domain":M,"y-domain":N,width:500,height:310,"x-label":`w`,"y-label":`L(w)`},{default:f(()=>[t(s,{fn:H,color:`var(--dl-accent)`,width:3}),$.value&&!q.value?(e(),h(c,{key:0,from:$.value.from,to:$.value.to,color:`var(--dl-muted)`,width:1.5,dashed:``},null,8,[`from`,`to`])):_(`v-if`,!0),(e(!0),u(m,null,i(Q.value,(t,n)=>(e(),h(c,{key:n,from:t.from,to:t.to,color:`var(--dl-heading)`,width:1.8,arrow:``,opacity:.35+.65*(n+1)/Q.value.length},null,8,[`from`,`to`,`opacity`]))),128)),t(d,{points:ee.value,radius:4,color:`var(--dl-heading)`,opacity:.55},null,8,[`points`]),q.value?_(`v-if`,!0):(e(),h(d,{key:1,points:[{x:W.value,y:H(W.value)}],radius:7,color:`var(--dl-accent-strong)`},null,8,[`points`])),t(p,{at:[A.optimum,A.floor],dy:26,anchor:`middle`,dx:0,text:`global minimum`,leader:``},null,8,[`at`])]),_:1})]),_:1})}}}),[[`__scopeId`,`data-v-e869bdbe`]]),V={__name:`slides.md__slidev_20`,setup(n){let{$slidev:i,$nav:o,$clicksContext:s,$clicks:c,$page:u,$renderContext:d,$frontmatter:p}=b();return s.setup(),(n,i)=>{let o=B;return e(),h(A,g(r(v(x)(v(p),19))),{aside:f(e=>[...i[0]||=[l(`p`,null,[a(`Where the gradient is positive, step in the `),l(`strong`,null,`opposite`),a(` direction. How far is the learning rate `),l(`span`,{class:`katex`},[l(`span`,{class:`katex-mathml`},[l(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[l(`semantics`,null,[l(`mrow`,null,[l(`mi`,null,`η`)]),l(`annotation`,{encoding:`application/x-tex`},`\\eta`)])])]),l(`span`,{class:`katex-html`,"aria-hidden":`true`},[l(`span`,{class:`katex-base`},[l(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),l(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`η`)])])]),a(`.`)],-1),l(`p`,null,[a(`Push `),l(`span`,{class:`katex`},[l(`span`,{class:`katex-mathml`},[l(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[l(`semantics`,null,[l(`mrow`,null,[l(`mi`,null,`η`)]),l(`annotation`,{encoding:`application/x-tex`},`\\eta`)])])]),l(`span`,{class:`katex-html`,"aria-hidden":`true`},[l(`span`,{class:`katex-base`},[l(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),l(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`η`)])])]),a(` past `),l(`strong`,null,`2.0`),a(` and the loss climbs instead of falling — slide 21 of the old deck, answered by doing it.`)],-1)]]),default:f(()=>[t(o)]),_:1},16)}}};export{V as default};
lecture-02/assets/md-DN1adK8J.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,C as t,Ct as n,D as r,St as i,T as a,U as o,_ as s,b as c,et as l,v as u,xt as d,y as f,yt as p}from"./modules/shiki-CRDHBXw7.js";import{t as m}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as h,t as g}from"./slidev/context-Dpnqq1ol.js";import{t as _}from"./DeckFooter-JTMZpkwe.js";import{t as v}from"./Citation-B3hI67ru.js";``+new URL(`mnist-digits-DACj7hHT.jpeg`,import.meta.url).href;var y={class:`slidev-layout dl-figure`},b={key:0,class:`dl-figure__title`},x={class:`dl-figure__footer`},S={class:`dl-figure__caption`},C={class:`dl-figure__citation`},w=m(a({__name:`figure`,props:{title:{},maxHeight:{}},setup(r){let{$slidev:a,$nav:l,$clicksContext:u,$clicks:d,$page:p,$renderContext:m,$frontmatter:g}=h(),v=r;return(r,a)=>{let l=_;return e(),c(`div`,y,[v.title?(e(),c(`h1`,b,n(v.title),1)):f(`v-if`,!0),s(`div`,{class:`dl-figure__canvas`,style:i({maxHeight:v.maxHeight})},[o(r.$slots,`default`,{},void 0,!0)],4),s(`div`,x,[s(`div`,S,[o(r.$slots,`caption`,{},void 0,!0)]),s(`div`,C,[o(r.$slots,`citation`,{},void 0,!0)])]),t(l)])}}}),[[`__scopeId`,`data-v-98201e7e`]]),T={__name:`slides.md__slidev_32`,setup(n){let{$slidev:i,$nav:a,$clicksContext:o,$clicks:c,$page:f,$renderContext:m,$frontmatter:_}=h();return o.setup(),(n,i)=>{let a=v;return e(),u(w,d(r(p(g)(p(_),31))),{caption:l(e=>[...i[0]||=[s(`p`,null,`The exercise for this week: an MLP on MNIST, written from scratch.`,-1)]]),citation:l(e=>[t(a,{source:`Raschka, Liu & Mirjalili, ch. 11`})]),default:l(()=>[i[1]||=s(`img`,{src:``+new URL(`mnist-digits-DACj7hHT.jpeg`,import.meta.url).href,alt:`Grid of handwritten digits from the MNIST dataset`},null,-1)]),_:1},16)}}};export{T as default};
lecture-02/assets/md-DQNDl3y5.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,C as t,D as n,S as r,_ as i,et as a,v as o,xt as s,yt as c}from"./modules/shiki-CRDHBXw7.js";import{n as l,t as u}from"./slidev/context-Dpnqq1ol.js";import{t as d}from"./interactive-B3FqelG7.js";import{t as f}from"./PerceptronVsAdaline-Bwdgu3ts.js";var p={__name:`slides.md__slidev_18`,setup(p){let{$slidev:m,$nav:h,$clicksContext:g,$clicks:_,$page:v,$renderContext:y,$frontmatter:b}=l();return g.setup(),(l,p)=>{let m=f;return e(),o(d,s(n(c(u)(c(b),17))),{aside:a(e=>[...p[0]||=[i(`p`,null,`One edge differs, and it decides everything.`,-1),i(`p`,null,[r(`Adaline compares the true label against the `),i(`strong`,null,`continuous`),r(` output of the linear activation. The perceptron compares it against the `),i(`strong`,null,`thresholded`),r(` prediction.`)],-1)]]),default:a(()=>[t(m)]),_:1},16)}}};export{p as default};
lecture-02/assets/md-DQQXWQyl.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,C as t,D as n,S as r,_ as i,et as a,v as o,xt as s,yt as c}from"./modules/shiki-CRDHBXw7.js";import{n as l,t as u}from"./slidev/context-Dpnqq1ol.js";import{t as d}from"./interactive-B3FqelG7.js";import{t as f}from"./MLPDiagram-PPnBM4ON.js";var p={__name:`slides.md__slidev_29`,setup(p){let{$slidev:m,$nav:h,$clicksContext:g,$clicks:_,$page:v,$renderContext:y,$frontmatter:b}=l();return g.setup(),(l,p)=>{let m=f;return e(),o(d,s(n(c(u)(c(b),28))),{aside:a(e=>[...p[0]||=[i(`p`,null,[r(`Connect single neurons into a `),i(`strong`,null,`multilayer feedforward`),r(` network.`)],-1),i(`p`,null,[r(`More than one hidden layer makes it a `),i(`strong`,null,`deep`),r(` neural network — and training those needs special algorithms, which is where the term `),i(`em`,null,`deep learning`),r(` comes from.`)],-1)]]),default:a(()=>[t(m,{mode:`static`,layers:[4,6,5,3]})]),_:1},16)}}};export{p as default};
lecture-02/assets/md-DTjbijE-2.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,C as t,Ct as n,D as r,S as i,T as a,_ as o,b as s,dt as c,et as l,g as u,v as d,xt as f,yt as p}from"./modules/shiki-CRDHBXw7.js";import{t as m}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as h,t as g}from"./slidev/context-Dpnqq1ol.js";import{t as _}from"./slidev/KaTexBlockWrapper-M48-zhMq.js";import{t as v}from"./WidgetFrame-i_n0SXJC.js";import{t as y}from"./Katex-BuUbKNzG.js";import{t as b}from"./StepButton-BfWgSKte.js";import{n as x,t as S}from"./PlotPoints-DFeqey9j.js";import{t as C}from"./useRandom-D_d9WpzZ.js";import{t as w}from"./interactive-B3FqelG7.js";var T={class:`dl-fs__formula`},E={key:0},D={key:1},O={class:`dl-fs__warn`},k=m(a({__name:`FeatureScaling`,props:{points:{default:40},seed:{default:20260202}},setup(r){let{$slidev:a,$nav:f,$clicksContext:p,$clicks:m,$page:g,$renderContext:_,$frontmatter:w}=h(),k=r,A=c(!1),j=u(()=>{let e=C(k.seed);return Array.from({length:k.points},()=>({x:4.6+e()*.8,y:138+e()*26}))});function M(e){let t=e.reduce((e,t)=>e+t,0)/e.length,n=e.reduce((e,n)=>e+(n-t)**2,0)/e.length;return{mean:t,sd:Math.sqrt(n)||1}}let N=u(()=>M(j.value.map(e=>e.x))),P=u(()=>M(j.value.map(e=>e.y))),F=u(()=>A.value?j.value.map(e=>({x:(e.x-N.value.mean)/N.value.sd,y:(e.y-P.value.mean)/P.value.sd})):j.value),I=u(()=>A.value?[-3,3]:[2,7]),L=u(()=>A.value?[-3,3]:[60,220]);return(r,a)=>{let c=S,u=x,f=b,p=y,m=v;return e(),d(m,{"max-width":`40rem`},{controls:l(()=>[t(f,{label:A.value?`Show raw features`:`Standardise`,variant:A.value?`ghost`:`primary`,onClick:a[0]||=e=>A.value=!A.value},null,8,[`label`,`variant`])]),readout:l(()=>[o(`div`,T,[t(p,{expr:`x_j' = \\dfrac{x_j - \\mu_j}{\\sigma_j}`})]),A.value?(e(),s(`div`,E,` Both features now have mean 0 and standard deviation 1 — one shared step size fits both. `)):(e(),s(`div`,D,[i(` μ₁ = `+n(N.value.mean.toFixed(2))+`, σ₁ = `+n(N.value.sd.toFixed(2))+` · μ₂ = `+n(P.value.mean.toFixed(1))+`, σ₂ = `+n(P.value.sd.toFixed(1))+` — `,1),o(`span`,O,`x₂ varies ~`+n(Math.round(P.value.sd/N.value.sd))+`× more, so it dominates every gradient step.`,1)]))]),default:l(()=>[t(u,{"x-domain":I.value,"y-domain":L.value,width:440,height:300,"x-label":A.value?`x₁ (standardised)`:`x₁ — petal length (cm)`,"y-label":A.value?`x₂ (standardised)`:`x₂ (mm)`},{default:l(()=>[t(c,{points:F.value,radius:5,color:`var(--dl-accent)`,opacity:.85},null,8,[`points`])]),_:1},8,[`x-domain`,`y-domain`,`x-label`,`y-label`])]),_:1})}}}),[[`__scopeId`,`data-v-6e8ef72c`]]),A={__name:`slides.md__slidev_24`,setup(n){let{$slidev:a,$nav:s,$clicksContext:c,$clicks:u,$page:m,$renderContext:v,$frontmatter:y}=h();return c.setup(),(n,a)=>{let s=k,c=_;return e(),d(w,f(r(p(g)(p(y),23))),{aside:l(e=>[t(c,{ranges:[]},{default:l(()=>[...a[0]||=[o(`p`,null,[o(`span`,{class:`katex-display`},[o(`span`,{class:`katex`},[o(`span`,{class:`katex-mathml`},[o(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[o(`semantics`,null,[o(`mrow`,null,[o(`msubsup`,null,[o(`mi`,null,`x`),o(`mi`,null,`j`),o(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),o(`mo`,null,`=`),o(`mfrac`,null,[o(`mrow`,null,[o(`msub`,null,[o(`mi`,null,`x`),o(`mi`,null,`j`)]),o(`mo`,null,`−`),o(`msub`,null,[o(`mi`,null,`μ`),o(`mi`,null,`j`)])]),o(`msub`,null,[o(`mi`,null,`σ`),o(`mi`,null,`j`)])])]),o(`annotation`,{encoding:`application/x-tex`},`x_j' = \\frac{x_j - \\mu_j}{\\sigma_j}`)])])]),o(`span`,{class:`katex-html`,"aria-hidden":`true`},[o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`1.185em`,"vertical-align":`-0.3831em`}}),o(`span`,{class:`mord`},[o(`span`,{class:`mord mathnormal`},`x`),o(`span`,{class:`msupsub`},[o(`span`,{class:`vlist-t vlist-t2`},[o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.8019em`}},[o(`span`,{style:{top:`-2.453em`,"margin-left":`0em`,"margin-right":`0.05em`}},[o(`span`,{class:`pstrut`,style:{height:`2.7em`}}),o(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[o(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])]),o(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[o(`span`,{class:`pstrut`,style:{height:`2.7em`}}),o(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[o(`span`,{class:`mord mtight`},[o(`span`,{class:`mord mtight`},`′`)])])])]),o(`span`,{class:`vlist-s`},`​`)]),o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.3831em`}},[o(`span`)])])])])]),o(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),o(`span`,{class:`mrel`},`=`),o(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`2.2324em`,"vertical-align":`-0.9721em`}}),o(`span`,{class:`mord`},[o(`span`,{class:`mopen nulldelimiter`}),o(`span`,{class:`mfrac`},[o(`span`,{class:`vlist-t vlist-t2`},[o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`1.2603em`}},[o(`span`,{style:{top:`-2.314em`}},[o(`span`,{class:`pstrut`,style:{height:`3em`}}),o(`span`,{class:`mord`},[o(`span`,{class:`mord`},[o(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`σ`),o(`span`,{class:`msupsub`},[o(`span`,{class:`vlist-t vlist-t2`},[o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.3117em`}},[o(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0359em`,"margin-right":`0.05em`}},[o(`span`,{class:`pstrut`,style:{height:`2.7em`}}),o(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[o(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),o(`span`,{class:`vlist-s`},`​`)]),o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.2861em`}},[o(`span`)])])])])])])]),o(`span`,{style:{top:`-3.23em`}},[o(`span`,{class:`pstrut`,style:{height:`3em`}}),o(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),o(`span`,{style:{top:`-3.677em`}},[o(`span`,{class:`pstrut`,style:{height:`3em`}}),o(`span`,{class:`mord`},[o(`span`,{class:`mord`},[o(`span`,{class:`mord mathnormal`},`x`),o(`span`,{class:`msupsub`},[o(`span`,{class:`vlist-t vlist-t2`},[o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.3117em`}},[o(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[o(`span`,{class:`pstrut`,style:{height:`2.7em`}}),o(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[o(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),o(`span`,{class:`vlist-s`},`​`)]),o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.2861em`}},[o(`span`)])])])])]),o(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),o(`span`,{class:`mbin`},`−`),o(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),o(`span`,{class:`mord`},[o(`span`,{class:`mord mathnormal`},`μ`),o(`span`,{class:`msupsub`},[o(`span`,{class:`vlist-t vlist-t2`},[o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.3117em`}},[o(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[o(`span`,{class:`pstrut`,style:{height:`2.7em`}}),o(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[o(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),o(`span`,{class:`vlist-s`},`​`)]),o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.2861em`}},[o(`span`)])])])])])])])]),o(`span`,{class:`vlist-s`},`​`)]),o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.9721em`}},[o(`span`)])])])]),o(`span`,{class:`mclose nulldelimiter`})])])])])])],-1)]]),_:1}),a[1]||=o(`p`,null,[i(`Each feature gets mean `),o(`span`,{class:`katex`},[o(`span`,{class:`katex-mathml`},[o(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[o(`semantics`,null,[o(`mrow`,null,[o(`mn`,null,`0`)]),o(`annotation`,{encoding:`application/x-tex`},`0`)])])]),o(`span`,{class:`katex-html`,"aria-hidden":`true`},[o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),o(`span`,{class:`mord`},`0`)])])]),i(` and standard deviation `),o(`span`,{class:`katex`},[o(`span`,{class:`katex-mathml`},[o(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[o(`semantics`,null,[o(`mrow`,null,[o(`mn`,null,`1`)]),o(`annotation`,{encoding:`application/x-tex`},`1`)])])]),o(`span`,{class:`katex-html`,"aria-hidden":`true`},[o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),o(`span`,{class:`mord`},`1`)])])]),i(`, so a single learning rate suits every weight.`)],-1)]),default:l(()=>[t(s)]),_:1},16)}}};export{A as default};
lecture-02/assets/md-DX2Ec6q82.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,C as t,D as n,G as r,S as i,_ as a,b as o,et as s,tt as c,v as l,xt as u,yt as d}from"./modules/shiki-CRDHBXw7.js";import{n as f,t as p}from"./slidev/context-Dpnqq1ol.js";import{t as m}from"./default-A5OOL8XO.js";import{t as h}from"./Citation-B3hI67ru.js";var g={class:`grid grid-cols-2 gap-8 mt-2`},_={class:`mt-8 dl-callout`},v={class:`absolute bottom-12 left-12`},y={__name:`slides.md__slidev_5`,setup(y){let{$slidev:b,$nav:x,$clicksContext:S,$clicks:C,$page:w,$renderContext:T,$frontmatter:E}=f();return S.setup(),(f,y)=>{let b=h,x=r(`click`);return e(),l(m,u(n(d(p)(d(E),4))),{default:s(()=>[y[3]||=a(`h1`,null,`History of the artificial neuron`,-1),a(`div`,g,[c((e(),o(`div`,null,[...y[0]||=[a(`h3`,null,`1943 — the MCP neuron`,-1),a(`p`,null,[a(`strong`,null,`McCulloch & Pitts`),i(` publish `),a(`em`,null,`A Logical Calculus of the Ideas Immanent in Nervous Activity`),i(`: a nerve cell as a simple logic gate.`)],-1)]])),[[x]]),c((e(),o(`div`,null,[...y[1]||=[a(`h3`,null,`1957 — the perceptron`,-1),a(`p`,null,[a(`strong`,null,`Frank Rosenblatt`),i(`, at the Cornell Aeronautical Laboratory, publishes the first perceptron `),a(`strong`,null,`learning rule`),i(` on top of the MCP model.`)],-1)]])),[[x]])]),c((e(),o(`div`,_,[...y[2]||=[i(` Rosenblatt's algorithm learns the weight coefficients that get multiplied with the input features, in order to decide whether the neuron fires. `,-1)]])),[[x]]),a(`div`,v,[t(b,{source:`historyofinformation.com`,url:`https://www.historyofinformation.com/`})])]),_:1},16)}}};export{y as default};
lecture-02/assets/md-Dc2hhIb1.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,C as t,D as n,G as r,S as i,_ as a,b as o,et as s,tt as c,v as l,xt as u,yt as d}from"./modules/shiki-CRDHBXw7.js";import{n as f,t as p}from"./slidev/context-Dpnqq1ol.js";import{t as m}from"./interactive-B3FqelG7.js";import{t as h}from"./slidev/VClicks-buBFUjdS.js";import{t as g}from"./MLPDiagram-PPnBM4ON.js";var _={class:`mt-3 dl-secondary`},v={__name:`slides.md__slidev_31`,setup(v){let{$slidev:y,$nav:b,$clicksContext:x,$clicks:S,$page:C,$renderContext:w,$frontmatter:T}=f();return x.setup(),(f,v)=>{let y=g,b=h,x=r(`click`);return e(),l(m,u(n(d(p)(d(T),30))),{aside:s(n=>[t(b,null,{default:s(()=>[...v[0]||=[a(`ol`,null,[a(`li`,null,[a(`strong`,null,`Forward-propagate`),i(` the training patterns`)]),a(`li`,null,[a(`strong`,null,`Calculate the loss`)]),a(`li`,null,[a(`strong`,null,`Backpropagate`),i(` it, finding the derivative with respect to every weight and bias`)]),a(`li`,null,[a(`strong`,null,`Update`),i(` them`)])],-1)]]),_:1}),c((e(),o(`div`,_,[...v[1]||=[i(` And this only works if the activations are `,-1),a(`strong`,null,`non-linear`,-1),i(` — stack linear layers and you still have a linear model. `,-1)]])),[[x]])]),default:s(()=>[t(y)]),_:1},16)}}};export{v as default};
lecture-02/assets/md-DfR_9CeO.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,C as t,D as n,G as r,S as i,_ as a,b as o,et as s,tt as c,v as l,xt as u,yt as d}from"./modules/shiki-CRDHBXw7.js";import{n as f,t as p}from"./slidev/context-Dpnqq1ol.js";import{t as m}from"./slidev/KaTexBlockWrapper-M48-zhMq.js";import{t as h}from"./default-A5OOL8XO.js";var g={class:`mt-3 dl-math-sm`},_={class:`mt-4 dl-callout`},v={__name:`slides.md__slidev_11`,setup(v){let{$slidev:y,$nav:b,$clicksContext:x,$clicks:S,$page:C,$renderContext:w,$frontmatter:T}=f();return x.setup(),(f,v)=>{let y=m,b=r(`click`);return e(),l(h,u(n(d(p)(d(T),10))),{default:s(()=>[v[2]||=a(`h1`,null,`Example (1/2)`,-1),v[3]||=a(`p`,null,`With two input features, all weights and the bias update simultaneously.`,-1),v[4]||=a(`div`,{class:`mt-4`},[a(`p`,null,[a(`strong`,null,`What happens when the prediction is already correct?`)])],-1),c((e(),o(`div`,g,[t(y,{ranges:[]},{default:s(()=>[...v[0]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mtable`,{rowspacing:`0.25em`,columnalign:`right left`,columnspacing:`0em`},[a(`mtr`,null,[a(`mtd`,null,[a(`mstyle`,{scriptlevel:`0`,displaystyle:`true`},[a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mn`,null,`1`),a(`mo`,{stretchy:`false`},`)`),a(`mspace`,{width:`1em`})])])]),a(`mtd`,null,[a(`mstyle`,{scriptlevel:`0`,displaystyle:`true`},[a(`mrow`,null,[a(`mrow`),a(`msup`,null,[a(`mi`,null,`y`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`=`),a(`mn`,null,`0`),a(`mo`,{separator:`true`},`,`),a(`mtext`,null,`  `),a(`msup`,null,[a(`mover`,{accent:`true`},[a(`mi`,null,`y`),a(`mo`,null,`^`)]),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`=`),a(`mn`,null,`0`)])])])]),a(`mtr`,null,[a(`mtd`,null,[a(`mstyle`,{scriptlevel:`0`,displaystyle:`true`},[a(`mrow`)])]),a(`mtd`,null,[a(`mstyle`,{scriptlevel:`0`,displaystyle:`true`},[a(`mrow`,null,[a(`mrow`),a(`mi`,{mathvariant:`normal`},`Δ`),a(`msub`,null,[a(`mi`,null,`w`),a(`mi`,null,`j`)]),a(`mo`,null,`=`),a(`mi`,null,`η`),a(`mo`,{stretchy:`false`},`(`),a(`mn`,null,`0`),a(`mo`,null,`−`),a(`mn`,null,`0`),a(`mo`,{stretchy:`false`},`)`),a(`mtext`,null,` `),a(`msubsup`,null,[a(`mi`,null,`x`),a(`mi`,null,`j`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`=`),a(`mn`,null,`0`),a(`mo`,{separator:`true`},`,`),a(`mspace`,{width:`2em`}),a(`mi`,{mathvariant:`normal`},`Δ`),a(`mi`,null,`b`),a(`mo`,null,`=`),a(`mn`,null,`0`)])])])]),a(`mtr`,null,[a(`mtd`,null,[a(`mstyle`,{scriptlevel:`0`,displaystyle:`true`},[a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mn`,null,`2`),a(`mo`,{stretchy:`false`},`)`),a(`mspace`,{width:`1em`})])])]),a(`mtd`,null,[a(`mstyle`,{scriptlevel:`0`,displaystyle:`true`},[a(`mrow`,null,[a(`mrow`),a(`msup`,null,[a(`mi`,null,`y`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`=`),a(`mn`,null,`1`),a(`mo`,{separator:`true`},`,`),a(`mtext`,null,`  `),a(`msup`,null,[a(`mover`,{accent:`true`},[a(`mi`,null,`y`),a(`mo`,null,`^`)]),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`=`),a(`mn`,null,`1`)])])])]),a(`mtr`,null,[a(`mtd`,null,[a(`mstyle`,{scriptlevel:`0`,displaystyle:`true`},[a(`mrow`)])]),a(`mtd`,null,[a(`mstyle`,{scriptlevel:`0`,displaystyle:`true`},[a(`mrow`,null,[a(`mrow`),a(`mi`,{mathvariant:`normal`},`Δ`),a(`msub`,null,[a(`mi`,null,`w`),a(`mi`,null,`j`)]),a(`mo`,null,`=`),a(`mi`,null,`η`),a(`mo`,{stretchy:`false`},`(`),a(`mn`,null,`1`),a(`mo`,null,`−`),a(`mn`,null,`1`),a(`mo`,{stretchy:`false`},`)`),a(`mtext`,null,` `),a(`msubsup`,null,[a(`mi`,null,`x`),a(`mi`,null,`j`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`=`),a(`mn`,null,`0`),a(`mo`,{separator:`true`},`,`),a(`mspace`,{width:`2em`}),a(`mi`,{mathvariant:`normal`},`Δ`),a(`mi`,null,`b`),a(`mo`,null,`=`),a(`mn`,null,`0`)])])])])]),a(`annotation`,{encoding:`application/x-tex`},`\\begin{aligned} (1)\\quad & y^{(i)} = 0,\\; \\hat{y}^{(i)} = 0 \\\\ & \\Delta w_j = \\eta(0 - 0)\\,x_j^{(i)} = 0, \\qquad \\Delta b = 0 \\\\[8pt] (2)\\quad & y^{(i)} = 1,\\; \\hat{y}^{(i)} = 1 \\\\ & \\Delta w_j = \\eta(1 - 1)\\,x_j^{(i)} = 0, \\qquad \\Delta b = 0 \\end{aligned} `)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`7.1586em`,"vertical-align":`-3.3293em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mtable`},[a(`span`,{class:`col-align-r`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`3.8293em`}},[a(`span`,{style:{top:`-5.9361em`}},[a(`span`,{class:`pstrut`,style:{height:`3.0448em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`1em`}})])]),a(`span`,{style:{top:`-4.2313em`}},[a(`span`,{class:`pstrut`,style:{height:`3.0448em`}}),a(`span`,{class:`mord`})]),a(`span`,{style:{top:`-1.8333em`}},[a(`span`,{class:`pstrut`,style:{height:`3.0448em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},`2`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`1em`}})])]),a(`span`,{style:{top:`-0.1285em`}},[a(`span`,{class:`pstrut`,style:{height:`3.0448em`}}),a(`span`,{class:`mord`})])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`3.3293em`}},[a(`span`)])])])]),a(`span`,{class:`col-align-l`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`3.8293em`}},[a(`span`,{style:{top:`-5.9361em`}},[a(`span`,{class:`pstrut`,style:{height:`3.0448em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mord`},`0`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord katex-accent`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.6944em`}},[a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`)]),a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`accent-body`,style:{left:`-0.1944em`}},[a(`span`,{class:`mord`},`^`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.1944em`}},[a(`span`)])])])]),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mord`},`0`)])]),a(`span`,{style:{top:`-4.2313em`}},[a(`span`,{class:`pstrut`,style:{height:`3.0448em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`η`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},`0`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mord`},`0`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`x`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.0448em`}},[a(`span`,{style:{top:`-2.4231em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])]),a(`span`,{style:{top:`-3.2198em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.413em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mord`},`0`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`2em`}}),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord mathnormal`},`b`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mord`},`0`)])]),a(`span`,{style:{top:`-1.8333em`}},[a(`span`,{class:`pstrut`,style:{height:`3.0448em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord katex-accent`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.6944em`}},[a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`)]),a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`accent-body`,style:{left:`-0.1944em`}},[a(`span`,{class:`mord`},`^`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.1944em`}},[a(`span`)])])])]),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mord`},`1`)])]),a(`span`,{style:{top:`-0.1285em`}},[a(`span`,{class:`pstrut`,style:{height:`3.0448em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`η`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`x`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.0448em`}},[a(`span`,{style:{top:`-2.4231em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])]),a(`span`,{style:{top:`-3.2198em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.413em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mord`},`0`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`2em`}}),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord mathnormal`},`b`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mord`},`0`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`3.3293em`}},[a(`span`)])])])])])])])])])])],-1)]]),_:1})])),[[b]]),c((e(),o(`div`,_,[...v[1]||=[i(` Nothing moves. The rule only ever learns from its mistakes — which is also why it stops the moment the data is separated. `,-1)]])),[[b]])]),_:1},16)}}};export{v as default};
lecture-02/assets/md-DfiJa7pa.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,C as t,D as n,G as r,S as i,_ as a,b as o,et as s,tt as c,v as l,xt as u,yt as d}from"./modules/shiki-CRDHBXw7.js";import{n as f,t as p}from"./slidev/context-Dpnqq1ol.js";import{t as m}from"./slidev/KaTexBlockWrapper-M48-zhMq.js";import{t as h}from"./default-A5OOL8XO.js";var g={class:`grid grid-cols-2 gap-8 mt-6 dl-math-sm`},_={class:`dl-compare`},v={class:`dl-compare`},y={class:`mt-6 dl-callout`},b={__name:`slides.md__slidev_13`,setup(b){let{$slidev:x,$nav:S,$clicksContext:C,$clicks:w,$page:T,$renderContext:E,$frontmatter:D}=f();return C.setup(),(f,b)=>{let x=m,S=r(`click`);return e(),l(h,u(n(d(p)(d(D),12))),{default:s(()=>[b[7]||=a(`h1`,null,`The size of the correction`,-1),b[8]||=a(`p`,null,[i(`Compare `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`x`),a(`mi`,null,`j`)]),a(`mo`,null,`=`),a(`mn`,null,`1.5`)]),a(`annotation`,{encoding:`application/x-tex`},`x_j = 1.5`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7167em`,"vertical-align":`-0.2861em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`x`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`1.5`)])])]),i(` against `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`x`),a(`mi`,null,`j`)]),a(`mo`,null,`=`),a(`mn`,null,`2`)]),a(`annotation`,{encoding:`application/x-tex`},`x_j = 2`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7167em`,"vertical-align":`-0.2861em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`x`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`2`)])])]),i(`, taking `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`η`),a(`mo`,null,`=`),a(`mn`,null,`1`)]),a(`annotation`,{encoding:`application/x-tex`},`\\eta = 1`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`η`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`1`)])])]),i(` and case (3):`)],-1),a(`div`,g,[a(`div`,_,[b[2]||=a(`div`,{class:`dl-secondary mb-1`},[a(`p`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`x`),a(`mi`,null,`j`)]),a(`mo`,null,`=`),a(`mn`,null,`1.5`)]),a(`annotation`,{encoding:`application/x-tex`},`x_j = 1.5`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7167em`,"vertical-align":`-0.2861em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`x`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`1.5`)])])])])],-1),t(x,{ranges:[]},{default:s(()=>[...b[0]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`Δ`),a(`msub`,null,[a(`mi`,null,`w`),a(`mi`,null,`j`)]),a(`mo`,null,`=`),a(`mo`,{stretchy:`false`},`(`),a(`mn`,null,`1`),a(`mo`,null,`−`),a(`mn`,null,`0`),a(`mo`,{stretchy:`false`},`)`),a(`mtext`,null,` `),a(`mn`,null,`1.5`),a(`mo`,null,`=`),a(`mn`,null,`1.5`)]),a(`annotation`,{encoding:`application/x-tex`},`\\Delta w_j = (1-0)\\,1.5 = 1.5`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.9694em`,"vertical-align":`-0.2861em`}}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord`},`0`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`1.5`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`1.5`)])])])])],-1)]]),_:1}),t(x,{ranges:[]},{default:s(()=>[...b[1]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`Δ`),a(`mi`,null,`b`),a(`mo`,null,`=`),a(`mo`,{stretchy:`false`},`(`),a(`mn`,null,`1`),a(`mo`,null,`−`),a(`mn`,null,`0`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,null,`=`),a(`mn`,null,`1`)]),a(`annotation`,{encoding:`application/x-tex`},`\\Delta b = (1-0) = 1`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6944em`}}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord mathnormal`},`b`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord`},`0`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`1`)])])])])],-1)]]),_:1})]),a(`div`,v,[b[5]||=a(`div`,{class:`dl-secondary mb-1`},[a(`p`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`x`),a(`mi`,null,`j`)]),a(`mo`,null,`=`),a(`mn`,null,`2`)]),a(`annotation`,{encoding:`application/x-tex`},`x_j = 2`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7167em`,"vertical-align":`-0.2861em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`x`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`2`)])])])])],-1),t(x,{ranges:[]},{default:s(()=>[...b[3]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`Δ`),a(`msub`,null,[a(`mi`,null,`w`),a(`mi`,null,`j`)]),a(`mo`,null,`=`),a(`mo`,{stretchy:`false`},`(`),a(`mn`,null,`1`),a(`mo`,null,`−`),a(`mn`,null,`0`),a(`mo`,{stretchy:`false`},`)`),a(`mtext`,null,` `),a(`mn`,null,`2`),a(`mo`,null,`=`),a(`mn`,null,`2`)]),a(`annotation`,{encoding:`application/x-tex`},`\\Delta w_j = (1-0)\\,2 = 2`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.9694em`,"vertical-align":`-0.2861em`}}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord`},`0`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`2`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`2`)])])])])],-1)]]),_:1}),t(x,{ranges:[]},{default:s(()=>[...b[4]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`Δ`),a(`mi`,null,`b`),a(`mo`,null,`=`),a(`mo`,{stretchy:`false`},`(`),a(`mn`,null,`1`),a(`mo`,null,`−`),a(`mn`,null,`0`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,null,`=`),a(`mn`,null,`1`)]),a(`annotation`,{encoding:`application/x-tex`},`\\Delta b = (1-0) = 1`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6944em`}}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord mathnormal`},`b`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord`},`0`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`1`)])])])])],-1)]]),_:1})])]),c((e(),o(`div`,y,[...b[6]||=[i(` The weight update scales with the feature; the bias update does not. So a feature measured on a larger scale drags the weights harder — which is exactly why `,-1),a(`strong`,null,`feature scaling`,-1),i(` matters, and we come back to it shortly. `,-1)]])),[[S]])]),_:1},16)}}};export{b as default};
lecture-02/assets/md-Dfk2xxNa.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,C as t,D as n,G as r,S as i,_ as a,b as o,et as s,tt as c,v as l,xt as u,yt as d}from"./modules/shiki-CRDHBXw7.js";import{n as f,t as p}from"./slidev/context-Dpnqq1ol.js";import{t as m}from"./slidev/KaTexBlockWrapper-M48-zhMq.js";import{t as h}from"./default-A5OOL8XO.js";var g={class:`grid grid-cols-2 gap-6 mt-2 dl-math-xs`},_={class:`mt-6`},v={class:`mt-4 dl-secondary`},y={class:`mt-6`},b={__name:`slides.md__slidev_21`,setup(b){let{$slidev:x,$nav:S,$clicksContext:C,$clicks:w,$page:T,$renderContext:E,$frontmatter:D}=f();return C.setup(),(f,b)=>{let x=m,S=r(`click`);return e(),l(h,u(n(d(p)(d(D),20))),{default:s(()=>[b[8]||=a(`h1`,null,`The update, written out`,-1),a(`div`,g,[a(`div`,null,[t(x,{ranges:[]},{default:s(()=>[...b[0]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`bold`},`w`),a(`mo`,null,`:`),a(`mo`,null,`=`),a(`mi`,{mathvariant:`bold`},`w`),a(`mo`,null,`+`),a(`mi`,{mathvariant:`normal`},`Δ`),a(`mi`,{mathvariant:`bold`},`w`),a(`mo`,{separator:`true`},`,`),a(`mspace`,{width:`2em`}),a(`mi`,null,`b`),a(`mo`,null,`:`),a(`mo`,null,`=`),a(`mi`,null,`b`),a(`mo`,null,`+`),a(`mi`,{mathvariant:`normal`},`Δ`),a(`mi`,null,`b`)]),a(`annotation`,{encoding:`application/x-tex`},`\\mathbf{w} := \\mathbf{w} + \\Delta\\mathbf{w}, \\qquad b := b + \\Delta b`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4444em`}}),a(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`:=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6667em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8889em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`2em`}}),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`},`b`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`:=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7778em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord mathnormal`},`b`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6944em`}}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord mathnormal`},`b`)])])])])],-1)]]),_:1}),c((e(),o(`div`,_,[t(x,{ranges:[]},{default:s(()=>[...b[1]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`Δ`),a(`mi`,{mathvariant:`bold`},`w`),a(`mo`,null,`=`),a(`mo`,null,`−`),a(`mi`,null,`η`),a(`mtext`,null,` `),a(`msub`,null,[a(`mi`,{mathvariant:`normal`},`∇`),a(`mi`,{mathvariant:`bold`},`w`)]),a(`mi`,null,`L`),a(`mo`,{stretchy:`false`},`(`),a(`mi`,{mathvariant:`bold`},`w`),a(`mo`,{separator:`true`},`,`),a(`mi`,null,`b`),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`\\Delta\\mathbf{w} = -\\eta\\,\\nabla_{\\mathbf{w}} L(\\mathbf{w}, b)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6833em`}}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`η`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},`∇`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.1611em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mathbf mtight`,style:{"margin-right":`0.016em`}},`w`)])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mord mathnormal`},`L`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`},`b`),a(`span`,{class:`mclose`},`)`)])])])])],-1)]]),_:1}),t(x,{ranges:[]},{default:s(()=>[...b[2]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`Δ`),a(`mi`,null,`b`),a(`mo`,null,`=`),a(`mo`,null,`−`),a(`mi`,null,`η`),a(`mtext`,null,` `),a(`msub`,null,[a(`mi`,{mathvariant:`normal`},`∇`),a(`mi`,null,`b`)]),a(`mi`,null,`L`),a(`mo`,{stretchy:`false`},`(`),a(`mi`,{mathvariant:`bold`},`w`),a(`mo`,{separator:`true`},`,`),a(`mi`,null,`b`),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`\\Delta b = -\\eta\\,\\nabla_{b} L(\\mathbf{w}, b)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6944em`}}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord mathnormal`},`b`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`η`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},`∇`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3361em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mathnormal mtight`},`b`)])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mord mathnormal`},`L`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`},`b`),a(`span`,{class:`mclose`},`)`)])])])])],-1)]]),_:1})])),[[S]]),c((e(),o(`div`,v,[...b[3]||=[i(` The gradient of the loss. But how do we actually calculate it? `,-1)]])),[[S]])]),c((e(),o(`div`,null,[t(x,{ranges:[]},{default:s(()=>[...b[4]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mfrac`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`∂`),a(`mi`,null,`L`)]),a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`∂`),a(`msub`,null,[a(`mi`,null,`w`),a(`mi`,null,`j`)])])]),a(`mo`,null,`=`),a(`mo`,null,`−`),a(`mfrac`,null,[a(`mn`,null,`1`),a(`mi`,null,`n`)]),a(`munder`,null,[a(`mo`,null,`∑`),a(`mi`,null,`i`)]),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`(`),a(`msup`,null,[a(`mi`,null,`y`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`−`),a(`mi`,null,`σ`),a(`mo`,{stretchy:`false`},`(`),a(`msup`,null,[a(`mi`,null,`z`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,{stretchy:`false`},`)`),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`)`),a(`mtext`,null,` `),a(`msubsup`,null,[a(`mi`,null,`x`),a(`mi`,null,`j`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])])]),a(`annotation`,{encoding:`application/x-tex`},`\\frac{\\partial L}{\\partial w_j} = -\\frac{1}{n} \\sum_i \\bigl(y^{(i)} - \\sigma(z^{(i)})\\bigr)\\, x_j^{(i)}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.3435em`,"vertical-align":`-0.9721em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.3714em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`,style:{"margin-right":`0.0556em`}},`∂`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])])])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`,style:{"margin-right":`0.0556em`}},`∂`),a(`span`,{class:`mord mathnormal`},`L`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.9721em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.5991em`,"vertical-align":`-1.2777em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.3214em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`n`)])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},`1`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.686em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})]),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mop op-limits`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.05em`}},[a(`span`,{style:{top:`-1.8723em`,"margin-left":`0em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`i`)])]),a(`span`,{style:{top:`-3.05em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,null,[a(`span`,{class:`mop op-symbol large-op`},`∑`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.2777em`}},[a(`span`)])])])]),a(`span`,{class:`mopen`},[a(`span`,{class:`delimsizing size1`},`(`)]),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.4578em`,"vertical-align":`-0.413em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`σ`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mclose`},[a(`span`,{class:`delimsizing size1`},`)`)]),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`x`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.0448em`}},[a(`span`,{style:{top:`-2.4231em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])]),a(`span`,{style:{top:`-3.2198em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.413em`}},[a(`span`)])])])])])])])])])],-1)]]),_:1}),t(x,{ranges:[]},{default:s(()=>[...b[5]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mfrac`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`∂`),a(`mi`,null,`L`)]),a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`∂`),a(`mi`,null,`b`)])]),a(`mo`,null,`=`),a(`mo`,null,`−`),a(`mfrac`,null,[a(`mn`,null,`1`),a(`mi`,null,`n`)]),a(`munder`,null,[a(`mo`,null,`∑`),a(`mi`,null,`i`)]),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`(`),a(`msup`,null,[a(`mi`,null,`y`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`−`),a(`mi`,null,`σ`),a(`mo`,{stretchy:`false`},`(`),a(`msup`,null,[a(`mi`,null,`z`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,{stretchy:`false`},`)`),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`\\frac{\\partial L}{\\partial b} = -\\frac{1}{n} \\sum_i \\bigl(y^{(i)} - \\sigma(z^{(i)})\\bigr)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.0574em`,"vertical-align":`-0.686em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.3714em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`,style:{"margin-right":`0.0556em`}},`∂`),a(`span`,{class:`mord mathnormal`},`b`)])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`,style:{"margin-right":`0.0556em`}},`∂`),a(`span`,{class:`mord mathnormal`},`L`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.686em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.5991em`,"vertical-align":`-1.2777em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.3214em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`n`)])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},`1`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.686em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})]),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mop op-limits`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.05em`}},[a(`span`,{style:{top:`-1.8723em`,"margin-left":`0em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`i`)])]),a(`span`,{style:{top:`-3.05em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,null,[a(`span`,{class:`mop op-symbol large-op`},`∑`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.2777em`}},[a(`span`)])])])]),a(`span`,{class:`mopen`},[a(`span`,{class:`delimsizing size1`},`(`)]),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.288em`,"vertical-align":`-0.35em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`σ`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mclose`},[a(`span`,{class:`delimsizing size1`},`)`)])])])])])],-1)]]),_:1}),a(`div`,y,[t(x,{ranges:[]},{default:s(()=>[...b[6]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`Δ`),a(`msub`,null,[a(`mi`,null,`w`),a(`mi`,null,`j`)]),a(`mo`,null,`=`),a(`mo`,null,`−`),a(`mi`,null,`η`),a(`mtext`,null,` `),a(`mfrac`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`∂`),a(`mi`,null,`L`)]),a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`∂`),a(`msub`,null,[a(`mi`,null,`w`),a(`mi`,null,`j`)])])])]),a(`annotation`,{encoding:`application/x-tex`},`\\Delta w_j = -\\eta\\,\\frac{\\partial L}{\\partial w_j}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.9694em`,"vertical-align":`-0.2861em`}}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.3435em`,"vertical-align":`-0.9721em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`η`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.3714em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`,style:{"margin-right":`0.0556em`}},`∂`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])])])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`,style:{"margin-right":`0.0556em`}},`∂`),a(`span`,{class:`mord mathnormal`},`L`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.9721em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})])])])])])],-1)]]),_:1}),t(x,{ranges:[]},{default:s(()=>[...b[7]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`Δ`),a(`mi`,null,`b`),a(`mo`,null,`=`),a(`mo`,null,`−`),a(`mi`,null,`η`),a(`mtext`,null,` `),a(`mfrac`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`∂`),a(`mi`,null,`L`)]),a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`∂`),a(`mi`,null,`b`)])])]),a(`annotation`,{encoding:`application/x-tex`},`\\Delta b = -\\eta\\,\\frac{\\partial L}{\\partial b}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6944em`}}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord mathnormal`},`b`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.0574em`,"vertical-align":`-0.686em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`η`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.3714em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`,style:{"margin-right":`0.0556em`}},`∂`),a(`span`,{class:`mord mathnormal`},`b`)])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`,style:{"margin-right":`0.0556em`}},`∂`),a(`span`,{class:`mord mathnormal`},`L`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.686em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})])])])])])],-1)]]),_:1})])])),[[S]])])]),_:1},16)}}};export{b as default};
lecture-02/assets/md-DkOhBsH72.js ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ import{B as e,C as t,D as n,S as r,_ as i,et as a,v as o,xt as s,yt as c}from"./modules/shiki-CRDHBXw7.js";import{n as l,t as u}from"./slidev/context-Dpnqq1ol.js";import{t as d}from"./slidev/KaTexBlockWrapper-M48-zhMq.js";import{t as f}from"./default-A5OOL8XO.js";import{t as p}from"./slidev/VClicks-buBFUjdS.js";var m={class:`grid grid-cols-2 gap-6 mt-2`},h={class:`dl-math-xs`},g={__name:`slides.md__slidev_6`,setup(g){let{$slidev:_,$nav:v,$clicksContext:y,$clicks:b,$page:x,$renderContext:S,$frontmatter:C}=l();return y.setup(),(l,g)=>{let _=d,v=p;return e(),o(f,s(n(c(u)(c(C),5))),{default:a(()=>[g[3]||=i(`h1`,null,`A sample dataset`,-1),i(`div`,m,[i(`div`,null,[g[1]||=i(`p`,null,[r(`The `),i(`strong`,null,`Iris`),r(` dataset: 150 examples, 4 measured features each.`)],-1),i(`div`,h,[t(_,{ranges:[]},{default:a(()=>[...g[0]||=[i(`p`,null,[i(`span`,{class:`katex-display`},[i(`span`,{class:`katex`},[i(`span`,{class:`katex-mathml`},[i(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[i(`semantics`,null,[i(`mrow`,null,[i(`mi`,null,`X`),i(`mo`,null,`=`),i(`mrow`,null,[i(`mo`,{fence:`true`},`[`),i(`mtable`,{rowspacing:`0.16em`,columnalign:`center center center`,columnspacing:`1em`},[i(`mtr`,null,[i(`mtd`,null,[i(`mstyle`,{scriptlevel:`0`,displaystyle:`false`},[i(`msubsup`,null,[i(`mi`,null,`x`),i(`mn`,null,`1`),i(`mrow`,null,[i(`mo`,{stretchy:`false`},`(`),i(`mn`,null,`1`),i(`mo`,{stretchy:`false`},`)`)])])])]),i(`mtd`,null,[i(`mstyle`,{scriptlevel:`0`,displaystyle:`false`},[i(`mo`,{lspace:`0em`,rspace:`0em`},`⋯`)])]),i(`mtd`,null,[i(`mstyle`,{scriptlevel:`0`,displaystyle:`false`},[i(`msubsup`,null,[i(`mi`,null,`x`),i(`mn`,null,`4`),i(`mrow`,null,[i(`mo`,{stretchy:`false`},`(`),i(`mn`,null,`1`),i(`mo`,{stretchy:`false`},`)`)])])])])]),i(`mtr`,null,[i(`mtd`,null,[i(`mstyle`,{scriptlevel:`0`,displaystyle:`false`},[i(`msubsup`,null,[i(`mi`,null,`x`),i(`mn`,null,`1`),i(`mrow`,null,[i(`mo`,{stretchy:`false`},`(`),i(`mn`,null,`2`),i(`mo`,{stretchy:`false`},`)`)])])])]),i(`mtd`,null,[i(`mstyle`,{scriptlevel:`0`,displaystyle:`false`},[i(`mo`,{lspace:`0em`,rspace:`0em`},`⋯`)])]),i(`mtd`,null,[i(`mstyle`,{scriptlevel:`0`,displaystyle:`false`},[i(`msubsup`,null,[i(`mi`,null,`x`),i(`mn`,null,`4`),i(`mrow`,null,[i(`mo`,{stretchy:`false`},`(`),i(`mn`,null,`2`),i(`mo`,{stretchy:`false`},`)`)])])])])]),i(`mtr`,null,[i(`mtd`,null,[i(`mstyle`,{scriptlevel:`0`,displaystyle:`false`},[i(`mrow`,null,[i(`mi`,{mathvariant:`normal`},`⋮`),i(`mpadded`,{height:`0em`,voffset:`0em`},[i(`mspace`,{mathbackground:`black`,width:`0em`,height:`1.5em`})])])])]),i(`mtd`,null,[i(`mstyle`,{scriptlevel:`0`,displaystyle:`false`},[i(`mo`,{lspace:`0em`,rspace:`0em`},`⋱`)])]),i(`mtd`,null,[i(`mstyle`,{scriptlevel:`0`,displaystyle:`false`},[i(`mrow`,null,[i(`mi`,{mathvariant:`normal`},`⋮`),i(`mpadded`,{height:`0em`,voffset:`0em`},[i(`mspace`,{mathbackground:`black`,width:`0em`,height:`1.5em`})])])])])]),i(`mtr`,null,[i(`mtd`,null,[i(`mstyle`,{scriptlevel:`0`,displaystyle:`false`},[i(`msubsup`,null,[i(`mi`,null,`x`),i(`mn`,null,`1`),i(`mrow`,null,[i(`mo`,{stretchy:`false`},`(`),i(`mn`,null,`150`),i(`mo`,{stretchy:`false`},`)`)])])])]),i(`mtd`,null,[i(`mstyle`,{scriptlevel:`0`,displaystyle:`false`},[i(`mo`,{lspace:`0em`,rspace:`0em`},`⋯`)])]),i(`mtd`,null,[i(`mstyle`,{scriptlevel:`0`,displaystyle:`false`},[i(`msubsup`,null,[i(`mi`,null,`x`),i(`mn`,null,`4`),i(`mrow`,null,[i(`mo`,{stretchy:`false`},`(`),i(`mn`,null,`150`),i(`mo`,{stretchy:`false`},`)`)])])])])])]),i(`mo`,{fence:`true`},`]`)])]),i(`annotation`,{encoding:`application/x-tex`},`X = \\begin{bmatrix} x_1^{(1)} & \\cdots & x_4^{(1)} \\\\ x_1^{(2)} & \\cdots & x_4^{(2)} \\\\ \\vdots & \\ddots & \\vdots \\\\ x_1^{(150)} & \\cdots & x_4^{(150)} \\end{bmatrix} `)])])]),i(`span`,{class:`katex-html`,"aria-hidden":`true`},[i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.6833em`}}),i(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0785em`}},`X`),i(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),i(`span`,{class:`mrel`},`=`),i(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`6.0744em`,"vertical-align":`-2.7872em`}}),i(`span`,{class:`minner`},[i(`span`,{class:`mopen`},[i(`span`,{class:`delimsizing mult`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`3.25em`}},[i(`span`,{style:{top:`-5.25em`}},[i(`span`,{class:`pstrut`,style:{height:`8em`}}),i(`span`,{style:{width:`0.667em`,height:`6em`}},[i(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`0.667em`,height:`6em`,viewBox:`0 0 667 6000`},[i(`path`,{d:`M403 1759 V84 H666 V0 H319 V1759 v2400 v1759 v84 h347 v-84
2
+ H403z M403 1759 V0 H319 V1759 v2400 v1759 v84 h84z`})])])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`2.75em`}},[i(`span`)])])])])]),i(`span`,{class:`mord`},[i(`span`,{class:`mtable`},[i(`span`,{class:`col-align-c`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`3.2872em`}},[i(`span`,{style:{top:`-5.9299em`}},[i(`span`,{class:`pstrut`,style:{height:`3.6875em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord`},[i(`span`,{class:`mord mathnormal`},`x`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`1.0448em`}},[i(`span`,{style:{top:`-2.4337em`,"margin-left":`0em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mtight`},`1`)])]),i(`span`,{style:{top:`-3.2198em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mtight`},[i(`span`,{class:`mopen mtight`},`(`),i(`span`,{class:`mord mtight`},`1`),i(`span`,{class:`mclose mtight`},`)`)])])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.2663em`}},[i(`span`)])])])])])])]),i(`span`,{style:{top:`-4.5251em`}},[i(`span`,{class:`pstrut`,style:{height:`3.6875em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord`},[i(`span`,{class:`mord mathnormal`},`x`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`1.0448em`}},[i(`span`,{style:{top:`-2.4337em`,"margin-left":`0em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mtight`},`1`)])]),i(`span`,{style:{top:`-3.2198em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mtight`},[i(`span`,{class:`mopen mtight`},`(`),i(`span`,{class:`mord mtight`},`2`),i(`span`,{class:`mclose mtight`},`)`)])])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.2663em`}},[i(`span`)])])])])])])]),i(`span`,{style:{top:`-2.6651em`}},[i(`span`,{class:`pstrut`,style:{height:`3.6875em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord`},[i(`span`,{class:`mord`},`⋮`),i(`span`,{class:`mord katex-rule`,style:{"border-right-width":`0em`,"border-top-width":`1.5em`,bottom:`0em`}})])])]),i(`span`,{style:{top:`-1.2603em`}},[i(`span`,{class:`pstrut`,style:{height:`3.6875em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord`},[i(`span`,{class:`mord mathnormal`},`x`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`1.0448em`}},[i(`span`,{style:{top:`-2.4337em`,"margin-left":`0em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mtight`},`1`)])]),i(`span`,{style:{top:`-3.2198em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mtight`},[i(`span`,{class:`mopen mtight`},`(`),i(`span`,{class:`mord mtight`},`150`),i(`span`,{class:`mclose mtight`},`)`)])])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.2663em`}},[i(`span`)])])])])])])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`2.7872em`}},[i(`span`)])])])]),i(`span`,{class:`arraycolsep`,style:{width:`0.5em`}}),i(`span`,{class:`arraycolsep`,style:{width:`0.5em`}}),i(`span`,{class:`col-align-c`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`3.2872em`}},[i(`span`,{style:{top:`-5.7424em`}},[i(`span`,{class:`pstrut`,style:{height:`3.5em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`minner`},`⋯`)])]),i(`span`,{style:{top:`-4.3376em`}},[i(`span`,{class:`pstrut`,style:{height:`3.5em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`minner`},`⋯`)])]),i(`span`,{style:{top:`-2.4776em`}},[i(`span`,{class:`pstrut`,style:{height:`3.5em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`minner`},`⋱`)])]),i(`span`,{style:{top:`-1.0728em`}},[i(`span`,{class:`pstrut`,style:{height:`3.5em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`minner`},`⋯`)])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`2.7872em`}},[i(`span`)])])])]),i(`span`,{class:`arraycolsep`,style:{width:`0.5em`}}),i(`span`,{class:`arraycolsep`,style:{width:`0.5em`}}),i(`span`,{class:`col-align-c`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`3.2872em`}},[i(`span`,{style:{top:`-5.9299em`}},[i(`span`,{class:`pstrut`,style:{height:`3.6875em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord`},[i(`span`,{class:`mord mathnormal`},`x`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`1.0448em`}},[i(`span`,{style:{top:`-2.4337em`,"margin-left":`0em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mtight`},`4`)])]),i(`span`,{style:{top:`-3.2198em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mtight`},[i(`span`,{class:`mopen mtight`},`(`),i(`span`,{class:`mord mtight`},`1`),i(`span`,{class:`mclose mtight`},`)`)])])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.2663em`}},[i(`span`)])])])])])])]),i(`span`,{style:{top:`-4.5251em`}},[i(`span`,{class:`pstrut`,style:{height:`3.6875em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord`},[i(`span`,{class:`mord mathnormal`},`x`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`1.0448em`}},[i(`span`,{style:{top:`-2.4337em`,"margin-left":`0em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mtight`},`4`)])]),i(`span`,{style:{top:`-3.2198em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mtight`},[i(`span`,{class:`mopen mtight`},`(`),i(`span`,{class:`mord mtight`},`2`),i(`span`,{class:`mclose mtight`},`)`)])])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.2663em`}},[i(`span`)])])])])])])]),i(`span`,{style:{top:`-2.6651em`}},[i(`span`,{class:`pstrut`,style:{height:`3.6875em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord`},[i(`span`,{class:`mord`},`⋮`),i(`span`,{class:`mord katex-rule`,style:{"border-right-width":`0em`,"border-top-width":`1.5em`,bottom:`0em`}})])])]),i(`span`,{style:{top:`-1.2603em`}},[i(`span`,{class:`pstrut`,style:{height:`3.6875em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord`},[i(`span`,{class:`mord mathnormal`},`x`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`1.0448em`}},[i(`span`,{style:{top:`-2.4337em`,"margin-left":`0em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mtight`},`4`)])]),i(`span`,{style:{top:`-3.2198em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mtight`},[i(`span`,{class:`mopen mtight`},`(`),i(`span`,{class:`mord mtight`},`150`),i(`span`,{class:`mclose mtight`},`)`)])])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.2663em`}},[i(`span`)])])])])])])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`2.7872em`}},[i(`span`)])])])])])]),i(`span`,{class:`mclose`},[i(`span`,{class:`delimsizing mult`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`3.25em`}},[i(`span`,{style:{top:`-5.25em`}},[i(`span`,{class:`pstrut`,style:{height:`8em`}}),i(`span`,{style:{width:`0.667em`,height:`6em`}},[i(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`0.667em`,height:`6em`,viewBox:`0 0 667 6000`},[i(`path`,{d:`M347 1759 V0 H0 V84 H263 V1759 v2400 v1759 H0 v84 H347z
3
+ M347 1759 V0 H263 V1759 v2400 v1759 h84z`})])])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`2.75em`}},[i(`span`)])])])])])])])])])])],-1)]]),_:1})])]),i(`div`,null,[t(v,null,{default:a(()=>[...g[2]||=[i(`ul`,null,[i(`li`,null,[r(`A `),i(`strong`,null,`row`),r(` of `),i(`span`,{class:`katex`},[i(`span`,{class:`katex-mathml`},[i(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[i(`semantics`,null,[i(`mrow`,null,[i(`mi`,null,`X`)]),i(`annotation`,{encoding:`application/x-tex`},`X`)])])]),i(`span`,{class:`katex-html`,"aria-hidden":`true`},[i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.6833em`}}),i(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0785em`}},`X`)])])]),r(` is one flower — one training example, written `),i(`span`,{class:`katex`},[i(`span`,{class:`katex-mathml`},[i(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[i(`semantics`,null,[i(`mrow`,null,[i(`msup`,null,[i(`mi`,{mathvariant:`bold`},`x`),i(`mrow`,null,[i(`mo`,{stretchy:`false`},`(`),i(`mi`,null,`i`),i(`mo`,{stretchy:`false`},`)`)])])]),i(`annotation`,{encoding:`application/x-tex`},`\\mathbf{x}^{(i)}`)])])]),i(`span`,{class:`katex-html`,"aria-hidden":`true`},[i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.888em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord mathbf`},`x`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.888em`}},[i(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mtight`},[i(`span`,{class:`mopen mtight`},`(`),i(`span`,{class:`mord mathnormal mtight`},`i`),i(`span`,{class:`mclose mtight`},`)`)])])])])])])])])])])]),r(`.`)]),i(`li`,null,[r(`A `),i(`strong`,null,`column`),r(` is one feature across all 150 examples.`)]),i(`li`,null,[r(`The superscript `),i(`span`,{class:`katex`},[i(`span`,{class:`katex-mathml`},[i(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[i(`semantics`,null,[i(`mrow`,null,[i(`mo`,{stretchy:`false`},`(`),i(`mi`,null,`i`),i(`mo`,{stretchy:`false`},`)`)]),i(`annotation`,{encoding:`application/x-tex`},`(i)`)])])]),i(`span`,{class:`katex-html`,"aria-hidden":`true`},[i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),i(`span`,{class:`mopen`},`(`),i(`span`,{class:`mord mathnormal`},`i`),i(`span`,{class:`mclose`},`)`)])])]),r(` indexes the example; the subscript `),i(`span`,{class:`katex`},[i(`span`,{class:`katex-mathml`},[i(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[i(`semantics`,null,[i(`mrow`,null,[i(`mi`,null,`j`)]),i(`annotation`,{encoding:`application/x-tex`},`j`)])])]),i(`span`,{class:`katex-html`,"aria-hidden":`true`},[i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.854em`,"vertical-align":`-0.1944em`}}),i(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0572em`}},`j`)])])]),r(` indexes the feature.`)]),i(`li`,null,[r(`Target variables: `),i(`span`,{class:`katex`},[i(`span`,{class:`katex-mathml`},[i(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[i(`semantics`,null,[i(`mrow`,null,[i(`mi`,{mathvariant:`bold`},`y`),i(`mo`,null,`=`),i(`mo`,{stretchy:`false`},`[`),i(`mtext`,null,` `),i(`msup`,null,[i(`mi`,null,`y`),i(`mrow`,null,[i(`mo`,{stretchy:`false`},`(`),i(`mn`,null,`1`),i(`mo`,{stretchy:`false`},`)`)])]),i(`mo`,{separator:`true`},`,`),i(`mo`,null,`…`),i(`mo`,{separator:`true`},`,`),i(`msup`,null,[i(`mi`,null,`y`),i(`mrow`,null,[i(`mo`,{stretchy:`false`},`(`),i(`mn`,null,`150`),i(`mo`,{stretchy:`false`},`)`)])]),i(`mtext`,null,` `),i(`msup`,null,[i(`mo`,{stretchy:`false`},`]`),i(`mi`,{mathvariant:`normal`},`⊤`)])]),i(`annotation`,{encoding:`application/x-tex`},`\\mathbf{y} = [\\,y^{(1)}, \\ldots, y^{(150)}\\,]^\\top`)])])]),i(`span`,{class:`katex-html`,"aria-hidden":`true`},[i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.6389em`,"vertical-align":`-0.1944em`}}),i(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`y`),i(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),i(`span`,{class:`mrel`},`=`),i(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`1.138em`,"vertical-align":`-0.25em`}}),i(`span`,{class:`mopen`},`[`),i(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.888em`}},[i(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mtight`},[i(`span`,{class:`mopen mtight`},`(`),i(`span`,{class:`mord mtight`},`1`),i(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),i(`span`,{class:`mpunct`},`,`),i(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),i(`span`,{class:`minner`},`…`),i(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),i(`span`,{class:`mpunct`},`,`),i(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.888em`}},[i(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mtight`},[i(`span`,{class:`mopen mtight`},`(`),i(`span`,{class:`mord mtight`},`150`),i(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),i(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),i(`span`,{class:`mclose`},[i(`span`,{class:`mclose`},`]`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.8491em`}},[i(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mtight`},`⊤`)])])])])])])])])])])])],-1)]]),_:1})])])]),_:1},16)}}};export{g as default};
lecture-02/assets/md-Dr4FkHvo2.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,C as t,D as n,G as r,S as i,_ as a,b as o,et as s,tt as c,v as l,xt as u,yt as d}from"./modules/shiki-CRDHBXw7.js";import{n as f,t as p}from"./slidev/context-Dpnqq1ol.js";import{t as m}from"./default-A5OOL8XO.js";import{t as h}from"./slidev/VClicks-buBFUjdS.js";var g={class:`mt-8 dl-callout`},_={__name:`slides.md__slidev_23`,setup(_){let{$slidev:v,$nav:y,$clicksContext:b,$clicks:x,$page:S,$renderContext:C,$frontmatter:w}=f();return b.setup(),(f,_)=>{let v=h,y=r(`click`);return e(),l(m,u(n(d(p)(d(w),22))),{default:s(()=>[_[2]||=a(`h1`,null,`Why Adaline`,-1),t(v,null,{default:s(()=>[..._[0]||=[a(`ul`,null,[a(`li`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`σ`),a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`z`),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`\\sigma(z)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`σ`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),a(`span`,{class:`mclose`},`)`)])])]),i(` produces a `),a(`strong`,null,`real number`),i(`, not an integer class label. There is a gradient to follow.`)]),a(`li`,null,[i(`The weight update is computed from `),a(`strong`,null,`all`),i(` examples at once — full-batch gradient descent — rather than one at a time.`)])],-1)]]),_:1}),c((e(),o(`div`,g,[..._[1]||=[i(` Both of those become problems at scale. The first two fixes are on the next two slides. `,-1)]])),[[y]])]),_:1},16)}}};export{_ as default};
lecture-02/assets/md-DuoqZThg.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,C as t,D as n,G as r,S as i,_ as a,b as o,et as s,tt as c,v as l,xt as u,yt as d}from"./modules/shiki-CRDHBXw7.js";import{n as f,t as p}from"./slidev/context-Dpnqq1ol.js";import{t as m}from"./slidev/KaTexBlockWrapper-M48-zhMq.js";import{t as h}from"./default-A5OOL8XO.js";var g={class:`grid grid-cols-2 gap-10 mt-2`},_={class:`mt-4 dl-callout`},v={__name:`slides.md__slidev_10`,setup(v){let{$slidev:y,$nav:b,$clicksContext:x,$clicks:S,$page:C,$renderContext:w,$frontmatter:T}=f();return x.setup(),(f,v)=>{let y=m,b=r(`click`);return e(),l(h,u(n(d(p)(d(T),9))),{default:s(()=>[v[4]||=a(`h1`,null,`The perceptron learning rule`,-1),a(`div`,g,[v[3]||=a(`div`,null,[a(`ol`,null,[a(`li`,null,[i(`Initialise `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`bold`},`w`)]),a(`annotation`,{encoding:`application/x-tex`},`\\mathbf{w}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4444em`}}),a(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`)])])]),i(` and `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`b`)]),a(`annotation`,{encoding:`application/x-tex`},`b`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6944em`}}),a(`span`,{class:`mord mathnormal`},`b`)])])]),i(` to `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`0`)]),a(`annotation`,{encoding:`application/x-tex`},`0`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`0`)])])]),i(` or small random numbers.`)]),a(`li`,null,[i(`For each training example `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msup`,null,[a(`mi`,{mathvariant:`bold`},`x`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])])]),a(`annotation`,{encoding:`application/x-tex`},`\\mathbf{x}^{(i)}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.888em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathbf`},`x`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.888em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])])])])]),i(`: `),a(`ul`,null,[a(`li`,null,[i(`compute the output `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msup`,null,[a(`mover`,{accent:`true`},[a(`mi`,null,`y`),a(`mo`,null,`^`)]),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])])]),a(`annotation`,{encoding:`application/x-tex`},`\\hat{y}^{(i)}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.0824em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord katex-accent`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.6944em`}},[a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`)]),a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`accent-body`,style:{left:`-0.1944em`}},[a(`span`,{class:`mord`},`^`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.1944em`}},[a(`span`)])])])]),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.888em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])])])])])]),a(`li`,null,[i(`update `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`bold`},`w`)]),a(`annotation`,{encoding:`application/x-tex`},`\\mathbf{w}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4444em`}}),a(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`)])])]),i(` and `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`b`)]),a(`annotation`,{encoding:`application/x-tex`},`b`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6944em`}}),a(`span`,{class:`mord mathnormal`},`b`)])])])])])])])],-1),a(`div`,null,[t(y,{ranges:[]},{default:s(()=>[...v[0]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`Δ`),a(`msub`,null,[a(`mi`,null,`w`),a(`mi`,null,`j`)]),a(`mo`,null,`=`),a(`mi`,null,`η`),a(`mtext`,null,` `),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`(`),a(`msup`,null,[a(`mi`,null,`y`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`−`),a(`msup`,null,[a(`mover`,{accent:`true`},[a(`mi`,null,`y`),a(`mo`,null,`^`)]),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`)`),a(`mtext`,null,` `),a(`msubsup`,null,[a(`mi`,null,`x`),a(`mi`,null,`j`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])])]),a(`annotation`,{encoding:`application/x-tex`},`\\Delta w_j = \\eta\\,\\bigl(y^{(i)} - \\hat{y}^{(i)}\\bigr)\\,x_j^{(i)}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.9694em`,"vertical-align":`-0.2861em`}}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.288em`,"vertical-align":`-0.35em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`η`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mopen`},[a(`span`,{class:`delimsizing size1`},`(`)]),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.4578em`,"vertical-align":`-0.413em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord katex-accent`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.6944em`}},[a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`)]),a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`accent-body`,style:{left:`-0.1944em`}},[a(`span`,{class:`mord`},`^`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.1944em`}},[a(`span`)])])])]),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mclose`},[a(`span`,{class:`delimsizing size1`},`)`)]),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`x`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.0448em`}},[a(`span`,{style:{top:`-2.4231em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])]),a(`span`,{style:{top:`-3.2198em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.413em`}},[a(`span`)])])])])])])])])])],-1)]]),_:1}),t(y,{ranges:[]},{default:s(()=>[...v[1]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`Δ`),a(`mi`,null,`b`),a(`mo`,null,`=`),a(`mi`,null,`η`),a(`mtext`,null,` `),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`(`),a(`msup`,null,[a(`mi`,null,`y`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`−`),a(`msup`,null,[a(`mover`,{accent:`true`},[a(`mi`,null,`y`),a(`mo`,null,`^`)]),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`\\Delta b = \\eta\\,\\bigl(y^{(i)} - \\hat{y}^{(i)}\\bigr)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6944em`}}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord mathnormal`},`b`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.288em`,"vertical-align":`-0.35em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`η`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mopen`},[a(`span`,{class:`delimsizing size1`},`(`)]),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.288em`,"vertical-align":`-0.35em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord katex-accent`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.6944em`}},[a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`)]),a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`accent-body`,style:{left:`-0.1944em`}},[a(`span`,{class:`mord`},`^`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.1944em`}},[a(`span`)])])])]),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mclose`},[a(`span`,{class:`delimsizing size1`},`)`)])])])])])],-1)]]),_:1}),c((e(),o(`div`,_,[...v[2]||=[a(`p`,null,[i(`Note there is `),a(`strong`,null,`no`),i(),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`x`)]),a(`annotation`,{encoding:`application/x-tex`},`x`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`},`x`)])])]),i(` in the bias update — the bias has no input to scale it.`)],-1)]])),[[b]])])])]),_:1},16)}}};export{v as default};
lecture-02/assets/md-Pa5cvCqg2.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ import{B as e,C as t,D as n,G as r,_ as i,b as a,et as o,tt as s,v as c,xt as l,yt as u}from"./modules/shiki-CRDHBXw7.js";import{n as d,t as f}from"./slidev/context-Dpnqq1ol.js";import{t as p}from"./slidev/KaTexBlockWrapper-M48-zhMq.js";import{t as m}from"./default-A5OOL8XO.js";var h={class:`grid grid-cols-2 gap-10 mt-2 dl-math-xs`},g={class:`mt-4`},_={__name:`slides.md__slidev_7`,setup(_){let{$slidev:v,$nav:y,$clicksContext:b,$clicks:x,$page:S,$renderContext:C,$frontmatter:w}=d();return b.setup(),(d,_)=>{let v=p,y=r(`click`);return e(),c(m,l(n(u(f)(u(w),6))),{default:o(()=>[_[6]||=i(`h1`,null,`The formal definition of an artificial neuron`,-1),i(`div`,h,[i(`div`,null,[_[3]||=i(`p`,null,[i(`strong`,null,`Weight vector and input values`)],-1),t(v,{ranges:[]},{default:o(()=>[..._[0]||=[i(`p`,null,[i(`span`,{class:`katex-display`},[i(`span`,{class:`katex`},[i(`span`,{class:`katex-mathml`},[i(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[i(`semantics`,null,[i(`mrow`,null,[i(`mi`,{mathvariant:`bold`},`w`),i(`mo`,null,`=`),i(`mrow`,null,[i(`mo`,{fence:`true`},`[`),i(`mtable`,{rowspacing:`0.16em`,columnalign:`center`,columnspacing:`1em`},[i(`mtr`,null,[i(`mtd`,null,[i(`mstyle`,{scriptlevel:`0`,displaystyle:`false`},[i(`msub`,null,[i(`mi`,null,`w`),i(`mn`,null,`1`)])])])]),i(`mtr`,null,[i(`mtd`,null,[i(`mstyle`,{scriptlevel:`0`,displaystyle:`false`},[i(`mrow`,null,[i(`mi`,{mathvariant:`normal`},`⋮`),i(`mpadded`,{height:`0em`,voffset:`0em`},[i(`mspace`,{mathbackground:`black`,width:`0em`,height:`1.5em`})])])])])]),i(`mtr`,null,[i(`mtd`,null,[i(`mstyle`,{scriptlevel:`0`,displaystyle:`false`},[i(`msub`,null,[i(`mi`,null,`w`),i(`mi`,null,`m`)])])])])]),i(`mo`,{fence:`true`},`]`)]),i(`mo`,{separator:`true`},`,`),i(`mspace`,{width:`2em`}),i(`mi`,{mathvariant:`bold`},`x`),i(`mo`,null,`=`),i(`mrow`,null,[i(`mo`,{fence:`true`},`[`),i(`mtable`,{rowspacing:`0.16em`,columnalign:`center`,columnspacing:`1em`},[i(`mtr`,null,[i(`mtd`,null,[i(`mstyle`,{scriptlevel:`0`,displaystyle:`false`},[i(`msub`,null,[i(`mi`,null,`x`),i(`mn`,null,`1`)])])])]),i(`mtr`,null,[i(`mtd`,null,[i(`mstyle`,{scriptlevel:`0`,displaystyle:`false`},[i(`mrow`,null,[i(`mi`,{mathvariant:`normal`},`⋮`),i(`mpadded`,{height:`0em`,voffset:`0em`},[i(`mspace`,{mathbackground:`black`,width:`0em`,height:`1.5em`})])])])])]),i(`mtr`,null,[i(`mtd`,null,[i(`mstyle`,{scriptlevel:`0`,displaystyle:`false`},[i(`msub`,null,[i(`mi`,null,`x`),i(`mi`,null,`m`)])])])])]),i(`mo`,{fence:`true`},`]`)])]),i(`annotation`,{encoding:`application/x-tex`},`\\mathbf{w} = \\begin{bmatrix} w_1 \\\\ \\vdots \\\\ w_m \\end{bmatrix}, \\qquad \\mathbf{x} = \\begin{bmatrix} x_1 \\\\ \\vdots \\\\ x_m \\end{bmatrix} `)])])]),i(`span`,{class:`katex-html`,"aria-hidden":`true`},[i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.4444em`}}),i(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`),i(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),i(`span`,{class:`mrel`},`=`),i(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`4.26em`,"vertical-align":`-1.88em`}}),i(`span`,{class:`minner`},[i(`span`,{class:`mopen`},[i(`span`,{class:`delimsizing mult`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`2.35em`}},[i(`span`,{style:{top:`-4.35em`}},[i(`span`,{class:`pstrut`,style:{height:`6.2em`}}),i(`span`,{style:{width:`0.667em`,height:`4.2em`}},[i(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`0.667em`,height:`4.2em`,viewBox:`0 0 667 4200`},[i(`path`,{d:`M403 1759 V84 H666 V0 H319 V1759 v600 v1759 v84 h347 v-84
2
+ H403z M403 1759 V0 H319 V1759 v600 v1759 v84 h84z`})])])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`1.85em`}},[i(`span`)])])])])]),i(`span`,{class:`mord`},[i(`span`,{class:`mtable`},[i(`span`,{class:`col-align-c`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`2.38em`}},[i(`span`,{style:{top:`-5.2275em`}},[i(`span`,{class:`pstrut`,style:{height:`3.6875em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord`},[i(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.3011em`}},[i(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mtight`},`1`)])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.15em`}},[i(`span`)])])])])])])]),i(`span`,{style:{top:`-3.3675em`}},[i(`span`,{class:`pstrut`,style:{height:`3.6875em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord`},[i(`span`,{class:`mord`},`⋮`),i(`span`,{class:`mord katex-rule`,style:{"border-right-width":`0em`,"border-top-width":`1.5em`,bottom:`0em`}})])])]),i(`span`,{style:{top:`-2.1675em`}},[i(`span`,{class:`pstrut`,style:{height:`3.6875em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord`},[i(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.1514em`}},[i(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mathnormal mtight`},`m`)])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.15em`}},[i(`span`)])])])])])])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`1.88em`}},[i(`span`)])])])])])]),i(`span`,{class:`mclose`},[i(`span`,{class:`delimsizing mult`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`2.35em`}},[i(`span`,{style:{top:`-4.35em`}},[i(`span`,{class:`pstrut`,style:{height:`6.2em`}}),i(`span`,{style:{width:`0.667em`,height:`4.2em`}},[i(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`0.667em`,height:`4.2em`,viewBox:`0 0 667 4200`},[i(`path`,{d:`M347 1759 V0 H0 V84 H263 V1759 v600 v1759 H0 v84 H347z
3
+ M347 1759 V0 H263 V1759 v600 v1759 h84z`})])])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`1.85em`}},[i(`span`)])])])])])]),i(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),i(`span`,{class:`mpunct`},`,`),i(`span`,{class:`mspace`,style:{"margin-right":`2em`}}),i(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),i(`span`,{class:`mord mathbf`},`x`),i(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),i(`span`,{class:`mrel`},`=`),i(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`4.26em`,"vertical-align":`-1.88em`}}),i(`span`,{class:`minner`},[i(`span`,{class:`mopen`},[i(`span`,{class:`delimsizing mult`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`2.35em`}},[i(`span`,{style:{top:`-4.35em`}},[i(`span`,{class:`pstrut`,style:{height:`6.2em`}}),i(`span`,{style:{width:`0.667em`,height:`4.2em`}},[i(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`0.667em`,height:`4.2em`,viewBox:`0 0 667 4200`},[i(`path`,{d:`M403 1759 V84 H666 V0 H319 V1759 v600 v1759 v84 h347 v-84
4
+ H403z M403 1759 V0 H319 V1759 v600 v1759 v84 h84z`})])])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`1.85em`}},[i(`span`)])])])])]),i(`span`,{class:`mord`},[i(`span`,{class:`mtable`},[i(`span`,{class:`col-align-c`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`2.38em`}},[i(`span`,{style:{top:`-5.2275em`}},[i(`span`,{class:`pstrut`,style:{height:`3.6875em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord`},[i(`span`,{class:`mord mathnormal`},`x`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.3011em`}},[i(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mtight`},`1`)])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.15em`}},[i(`span`)])])])])])])]),i(`span`,{style:{top:`-3.3675em`}},[i(`span`,{class:`pstrut`,style:{height:`3.6875em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord`},[i(`span`,{class:`mord`},`⋮`),i(`span`,{class:`mord katex-rule`,style:{"border-right-width":`0em`,"border-top-width":`1.5em`,bottom:`0em`}})])])]),i(`span`,{style:{top:`-2.1675em`}},[i(`span`,{class:`pstrut`,style:{height:`3.6875em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord`},[i(`span`,{class:`mord mathnormal`},`x`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.1514em`}},[i(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mathnormal mtight`},`m`)])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.15em`}},[i(`span`)])])])])])])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`1.88em`}},[i(`span`)])])])])])]),i(`span`,{class:`mclose`},[i(`span`,{class:`delimsizing mult`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`2.35em`}},[i(`span`,{style:{top:`-4.35em`}},[i(`span`,{class:`pstrut`,style:{height:`6.2em`}}),i(`span`,{style:{width:`0.667em`,height:`4.2em`}},[i(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`0.667em`,height:`4.2em`,viewBox:`0 0 667 4200`},[i(`path`,{d:`M347 1759 V0 H0 V84 H263 V1759 v600 v1759 H0 v84 H347z
5
+ M347 1759 V0 H263 V1759 v600 v1759 h84z`})])])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`1.85em`}},[i(`span`)])])])])])])])])])])],-1)]]),_:1}),s((e(),a(`div`,g,[_[2]||=i(`p`,null,[i(`strong`,null,`Net input`)],-1),t(v,{ranges:[]},{default:o(()=>[..._[1]||=[i(`p`,null,[i(`span`,{class:`katex-display`},[i(`span`,{class:`katex`},[i(`span`,{class:`katex-mathml`},[i(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[i(`semantics`,null,[i(`mrow`,null,[i(`mi`,null,`z`),i(`mo`,null,`=`),i(`msub`,null,[i(`mi`,null,`w`),i(`mn`,null,`1`)]),i(`msub`,null,[i(`mi`,null,`x`),i(`mn`,null,`1`)]),i(`mo`,null,`+`),i(`msub`,null,[i(`mi`,null,`w`),i(`mn`,null,`2`)]),i(`msub`,null,[i(`mi`,null,`x`),i(`mn`,null,`2`)]),i(`mo`,null,`+`),i(`mo`,null,`⋯`),i(`mo`,null,`+`),i(`msub`,null,[i(`mi`,null,`w`),i(`mi`,null,`m`)]),i(`msub`,null,[i(`mi`,null,`x`),i(`mi`,null,`m`)])]),i(`annotation`,{encoding:`application/x-tex`},`z = w_1 x_1 + w_2 x_2 + \\cdots + w_m x_m`)])])]),i(`span`,{class:`katex-html`,"aria-hidden":`true`},[i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),i(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),i(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),i(`span`,{class:`mrel`},`=`),i(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.7333em`,"vertical-align":`-0.15em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.3011em`}},[i(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mtight`},`1`)])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.15em`}},[i(`span`)])])])])]),i(`span`,{class:`mord`},[i(`span`,{class:`mord mathnormal`},`x`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.3011em`}},[i(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mtight`},`1`)])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.15em`}},[i(`span`)])])])])]),i(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),i(`span`,{class:`mbin`},`+`),i(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.7333em`,"vertical-align":`-0.15em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.3011em`}},[i(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mtight`},`2`)])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.15em`}},[i(`span`)])])])])]),i(`span`,{class:`mord`},[i(`span`,{class:`mord mathnormal`},`x`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.3011em`}},[i(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mtight`},`2`)])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.15em`}},[i(`span`)])])])])]),i(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),i(`span`,{class:`mbin`},`+`),i(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.6667em`,"vertical-align":`-0.0833em`}}),i(`span`,{class:`minner`},`⋯`),i(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),i(`span`,{class:`mbin`},`+`),i(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.5806em`,"vertical-align":`-0.15em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.1514em`}},[i(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mathnormal mtight`},`m`)])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.15em`}},[i(`span`)])])])])]),i(`span`,{class:`mord`},[i(`span`,{class:`mord mathnormal`},`x`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.1514em`}},[i(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mathnormal mtight`},`m`)])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.15em`}},[i(`span`)])])])])])])])])])],-1)]]),_:1})])),[[y]])]),i(`div`,null,[s((e(),a(`div`,null,[_[5]||=i(`p`,null,[i(`strong`,null,`Unit step function`)],-1),t(v,{ranges:[]},{default:o(()=>[..._[4]||=[i(`p`,null,[i(`span`,{class:`katex-display`},[i(`span`,{class:`katex`},[i(`span`,{class:`katex-mathml`},[i(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[i(`semantics`,null,[i(`mrow`,null,[i(`mi`,null,`σ`),i(`mo`,{stretchy:`false`},`(`),i(`mi`,null,`z`),i(`mo`,{stretchy:`false`},`)`),i(`mo`,null,`=`),i(`mrow`,null,[i(`mo`,{fence:`true`},`{`),i(`mtable`,{rowspacing:`0.36em`,columnalign:`left left`,columnspacing:`1em`},[i(`mtr`,null,[i(`mtd`,null,[i(`mstyle`,{scriptlevel:`0`,displaystyle:`false`},[i(`mn`,null,`1`)])]),i(`mtd`,null,[i(`mstyle`,{scriptlevel:`0`,displaystyle:`false`},[i(`mrow`,null,[i(`mtext`,null,`if\xA0`),i(`mi`,null,`z`),i(`mo`,null,`≥`),i(`mi`,null,`θ`)])])])]),i(`mtr`,null,[i(`mtd`,null,[i(`mstyle`,{scriptlevel:`0`,displaystyle:`false`},[i(`mn`,null,`0`)])]),i(`mtd`,null,[i(`mstyle`,{scriptlevel:`0`,displaystyle:`false`},[i(`mtext`,null,`otherwise`)])])])])])]),i(`annotation`,{encoding:`application/x-tex`},`\\sigma(z) = \\begin{cases} 1 & \\text{if } z \\ge \\theta \\\\ 0 & \\text{otherwise} \\end{cases} `)])])]),i(`span`,{class:`katex-html`,"aria-hidden":`true`},[i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),i(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`σ`),i(`span`,{class:`mopen`},`(`),i(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),i(`span`,{class:`mclose`},`)`),i(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),i(`span`,{class:`mrel`},`=`),i(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`3em`,"vertical-align":`-1.25em`}}),i(`span`,{class:`minner`},[i(`span`,{class:`mopen delimcenter`,style:{top:`0em`}},[i(`span`,{class:`delimsizing size4`},`{`)]),i(`span`,{class:`mord`},[i(`span`,{class:`mtable`},[i(`span`,{class:`col-align-l`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`1.69em`}},[i(`span`,{style:{top:`-3.69em`}},[i(`span`,{class:`pstrut`,style:{height:`3.008em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord`},`1`)])]),i(`span`,{style:{top:`-2.25em`}},[i(`span`,{class:`pstrut`,style:{height:`3.008em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord`},`0`)])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`1.19em`}},[i(`span`)])])])]),i(`span`,{class:`arraycolsep`,style:{width:`1em`}}),i(`span`,{class:`col-align-l`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`1.69em`}},[i(`span`,{style:{top:`-3.69em`}},[i(`span`,{class:`pstrut`,style:{height:`3.008em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord text`},[i(`span`,{class:`mord`},`if\xA0`)]),i(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),i(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),i(`span`,{class:`mrel`},`≥`),i(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),i(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`θ`)])]),i(`span`,{style:{top:`-2.25em`}},[i(`span`,{class:`pstrut`,style:{height:`3.008em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord text`},[i(`span`,{class:`mord`},`otherwise`)])])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`1.19em`}},[i(`span`)])])])])])]),i(`span`,{class:`mclose nulldelimiter`})])])])])])],-1)]]),_:1})])),[[y]])])])]),_:1},16)}}};export{_ as default};
lecture-02/assets/md-SRfUxs1P2.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,C as t,D as n,G as r,S as i,_ as a,b as o,et as s,tt as c,v as l,xt as u,yt as d}from"./modules/shiki-CRDHBXw7.js";import{n as f,t as p}from"./slidev/context-Dpnqq1ol.js";import{t as m}from"./slidev/KaTexBlockWrapper-M48-zhMq.js";import{t as h}from"./default-A5OOL8XO.js";var g={class:`dl-derivation dl-math-sm`},_={class:`mt-4 dl-secondary`},v={__name:`slides.md__slidev_22`,setup(v){let{$slidev:y,$nav:b,$clicksContext:x,$clicks:S,$page:C,$renderContext:w,$frontmatter:T}=f();return x.setup(),(f,v)=>{let y=m,b=r(`click`);return e(),l(h,u(n(d(p)(d(T),21))),{default:s(()=>[v[5]||=a(`h1`,null,`How do we calculate the MSE derivative?`,-1),a(`div`,g,[a(`div`,null,[t(y,{ranges:[]},{default:s(()=>[...v[0]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mfrac`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`∂`),a(`mi`,null,`L`)]),a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`∂`),a(`msub`,null,[a(`mi`,null,`w`),a(`mi`,null,`j`)])])]),a(`mo`,null,`=`),a(`mfrac`,null,[a(`mi`,{mathvariant:`normal`},`∂`),a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`∂`),a(`msub`,null,[a(`mi`,null,`w`),a(`mi`,null,`j`)])])]),a(`mfrac`,null,[a(`mn`,null,`1`),a(`mrow`,null,[a(`mn`,null,`2`),a(`mi`,null,`n`)])]),a(`munder`,null,[a(`mo`,null,`∑`),a(`mi`,null,`i`)]),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.8em`,maxsize:`1.8em`},`(`),a(`msup`,null,[a(`mi`,null,`y`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`−`),a(`mi`,null,`σ`),a(`mo`,{stretchy:`false`},`(`),a(`msup`,null,[a(`mi`,null,`z`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,{stretchy:`false`},`)`),a(`msup`,null,[a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.8em`,maxsize:`1.8em`},`)`),a(`mn`,null,`2`)])]),a(`annotation`,{encoding:`application/x-tex`},`\\frac{\\partial L}{\\partial w_j} = \\frac{\\partial}{\\partial w_j} \\frac{1}{2n} \\sum_i \\Bigl(y^{(i)} - \\sigma(z^{(i)})\\Bigr)^2`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.3435em`,"vertical-align":`-0.9721em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.3714em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`,style:{"margin-right":`0.0556em`}},`∂`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])])])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`,style:{"margin-right":`0.0556em`}},`∂`),a(`span`,{class:`mord mathnormal`},`L`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.9721em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.6491em`,"vertical-align":`-1.2777em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.3714em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`,style:{"margin-right":`0.0556em`}},`∂`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])])])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`,style:{"margin-right":`0.0556em`}},`∂`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.9721em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})]),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.3214em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},`2`),a(`span`,{class:`mord mathnormal`},`n`)])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},`1`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.686em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})]),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mop op-limits`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.05em`}},[a(`span`,{style:{top:`-1.8723em`,"margin-left":`0em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`i`)])]),a(`span`,{style:{top:`-3.05em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,null,[a(`span`,{class:`mop op-symbol large-op`},`∑`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.2777em`}},[a(`span`)])])])]),a(`span`,{class:`mopen`},[a(`span`,{class:`delimsizing size2`},`(`)]),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.004em`,"vertical-align":`-0.65em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`σ`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mclose`},[a(`span`,{class:`mclose`},[a(`span`,{class:`delimsizing size2`},`)`)]),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.354em`}},[a(`span`,{style:{top:`-3.6029em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},`2`)])])])])])])])])])])])],-1)]]),_:1})]),c((e(),o(`div`,null,[t(y,{ranges:[]},{default:s(()=>[...v[1]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mo`,null,`=`),a(`mfrac`,null,[a(`mn`,null,`1`),a(`mi`,null,`n`)]),a(`munder`,null,[a(`mo`,null,`∑`),a(`mi`,null,`i`)]),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.8em`,maxsize:`1.8em`},`(`),a(`msup`,null,[a(`mi`,null,`y`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`−`),a(`mi`,null,`σ`),a(`mo`,{stretchy:`false`},`(`),a(`msup`,null,[a(`mi`,null,`z`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,{stretchy:`false`},`)`),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.8em`,maxsize:`1.8em`},`)`),a(`mfrac`,null,[a(`mi`,{mathvariant:`normal`},`∂`),a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`∂`),a(`msub`,null,[a(`mi`,null,`w`),a(`mi`,null,`j`)])])]),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.8em`,maxsize:`1.8em`},`(`),a(`msup`,null,[a(`mi`,null,`y`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`−`),a(`mi`,null,`σ`),a(`mo`,{stretchy:`false`},`(`),a(`msup`,null,[a(`mi`,null,`z`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,{stretchy:`false`},`)`),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.8em`,maxsize:`1.8em`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`= \\frac{1}{n} \\sum_i \\Bigl(y^{(i)} - \\sigma(z^{(i)})\\Bigr) \\frac{\\partial}{\\partial w_j}\\Bigl(y^{(i)} - \\sigma(z^{(i)})\\Bigr)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.3669em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.5991em`,"vertical-align":`-1.2777em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.3214em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`n`)])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},`1`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.686em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})]),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mop op-limits`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.05em`}},[a(`span`,{style:{top:`-1.8723em`,"margin-left":`0em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`i`)])]),a(`span`,{style:{top:`-3.05em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,null,[a(`span`,{class:`mop op-symbol large-op`},`∑`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.2777em`}},[a(`span`)])])])]),a(`span`,{class:`mopen`},[a(`span`,{class:`delimsizing size2`},`(`)]),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.3435em`,"vertical-align":`-0.9721em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`σ`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mclose`},[a(`span`,{class:`delimsizing size2`},`)`)]),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.3714em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`,style:{"margin-right":`0.0556em`}},`∂`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])])])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`,style:{"margin-right":`0.0556em`}},`∂`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.9721em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})]),a(`span`,{class:`mopen`},[a(`span`,{class:`delimsizing size2`},`(`)]),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.8em`,"vertical-align":`-0.65em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`σ`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mclose`},[a(`span`,{class:`delimsizing size2`},`)`)])])])])])],-1)]]),_:1})])),[[b]]),c((e(),o(`div`,null,[t(y,{ranges:[]},{default:s(()=>[...v[2]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mo`,null,`=`),a(`mfrac`,null,[a(`mn`,null,`1`),a(`mi`,null,`n`)]),a(`munder`,null,[a(`mo`,null,`∑`),a(`mi`,null,`i`)]),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.8em`,maxsize:`1.8em`},`(`),a(`msup`,null,[a(`mi`,null,`y`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`−`),a(`mi`,null,`σ`),a(`mo`,{stretchy:`false`},`(`),a(`msup`,null,[a(`mi`,null,`z`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,{stretchy:`false`},`)`),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.8em`,maxsize:`1.8em`},`)`),a(`mfrac`,null,[a(`mi`,{mathvariant:`normal`},`∂`),a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`∂`),a(`msub`,null,[a(`mi`,null,`w`),a(`mi`,null,`j`)])])]),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.8em`,maxsize:`1.8em`},`(`),a(`msup`,null,[a(`mi`,null,`y`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`−`),a(`munder`,null,[a(`mo`,null,`∑`),a(`mi`,null,`j`)]),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`(`),a(`msub`,null,[a(`mi`,null,`w`),a(`mi`,null,`j`)]),a(`msubsup`,null,[a(`mi`,null,`x`),a(`mi`,null,`j`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`+`),a(`mi`,null,`b`),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`)`),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.8em`,maxsize:`1.8em`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`= \\frac{1}{n} \\sum_i \\Bigl(y^{(i)} - \\sigma(z^{(i)})\\Bigr) \\frac{\\partial}{\\partial w_j}\\Bigl(y^{(i)} - \\sum_j \\bigl(w_j x_j^{(i)} + b\\bigr)\\Bigr)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.3669em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.5991em`,"vertical-align":`-1.2777em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.3214em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`n`)])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},`1`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.686em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})]),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mop op-limits`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.05em`}},[a(`span`,{style:{top:`-1.8723em`,"margin-left":`0em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`i`)])]),a(`span`,{style:{top:`-3.05em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,null,[a(`span`,{class:`mop op-symbol large-op`},`∑`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.2777em`}},[a(`span`)])])])]),a(`span`,{class:`mopen`},[a(`span`,{class:`delimsizing size2`},`(`)]),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.3435em`,"vertical-align":`-0.9721em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`σ`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mclose`},[a(`span`,{class:`delimsizing size2`},`)`)]),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.3714em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`,style:{"margin-right":`0.0556em`}},`∂`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])])])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`,style:{"margin-right":`0.0556em`}},`∂`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.9721em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})]),a(`span`,{class:`mopen`},[a(`span`,{class:`delimsizing size2`},`(`)]),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.4638em`,"vertical-align":`-1.4138em`}}),a(`span`,{class:`mop op-limits`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.05em`}},[a(`span`,{style:{top:`-1.8723em`,"margin-left":`0em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])]),a(`span`,{style:{top:`-3.05em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,null,[a(`span`,{class:`mop op-symbol large-op`},`∑`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.4138em`}},[a(`span`)])])])]),a(`span`,{class:`mopen`},[a(`span`,{class:`delimsizing size1`},`(`)]),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])]),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`x`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.0448em`}},[a(`span`,{style:{top:`-2.4231em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])]),a(`span`,{style:{top:`-3.2198em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.413em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.8em`,"vertical-align":`-0.65em`}}),a(`span`,{class:`mord mathnormal`},`b`),a(`span`,{class:`mclose`},[a(`span`,{class:`delimsizing size1`},`)`)]),a(`span`,{class:`mclose`},[a(`span`,{class:`delimsizing size2`},`)`)])])])])])],-1)]]),_:1})])),[[b]]),c((e(),o(`div`,null,[t(y,{ranges:[]},{default:s(()=>[...v[3]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mo`,null,`=`),a(`mfrac`,null,[a(`mn`,null,`1`),a(`mi`,null,`n`)]),a(`munder`,null,[a(`mo`,null,`∑`),a(`mi`,null,`i`)]),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.8em`,maxsize:`1.8em`},`(`),a(`msup`,null,[a(`mi`,null,`y`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`−`),a(`mi`,null,`σ`),a(`mo`,{stretchy:`false`},`(`),a(`msup`,null,[a(`mi`,null,`z`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,{stretchy:`false`},`)`),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.8em`,maxsize:`1.8em`},`)`),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`(`),a(`mo`,null,`−`),a(`msubsup`,null,[a(`mi`,null,`x`),a(`mi`,null,`j`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`)`),a(`mo`,null,`=`),a(`mo`,null,`−`),a(`mfrac`,null,[a(`mn`,null,`1`),a(`mi`,null,`n`)]),a(`munder`,null,[a(`mo`,null,`∑`),a(`mi`,null,`i`)]),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.8em`,maxsize:`1.8em`},`(`),a(`msup`,null,[a(`mi`,null,`y`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`−`),a(`mi`,null,`σ`),a(`mo`,{stretchy:`false`},`(`),a(`msup`,null,[a(`mi`,null,`z`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,{stretchy:`false`},`)`),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.8em`,maxsize:`1.8em`},`)`),a(`msubsup`,null,[a(`mi`,null,`x`),a(`mi`,null,`j`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])])]),a(`annotation`,{encoding:`application/x-tex`},`= \\frac{1}{n} \\sum_i \\Bigl(y^{(i)} - \\sigma(z^{(i)})\\Bigr)\\bigl(-x_j^{(i)}\\bigr) = -\\frac{1}{n} \\sum_i \\Bigl(y^{(i)} - \\sigma(z^{(i)})\\Bigr) x_j^{(i)}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.3669em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.5991em`,"vertical-align":`-1.2777em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.3214em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`n`)])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},`1`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.686em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})]),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mop op-limits`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.05em`}},[a(`span`,{style:{top:`-1.8723em`,"margin-left":`0em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`i`)])]),a(`span`,{style:{top:`-3.05em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,null,[a(`span`,{class:`mop op-symbol large-op`},`∑`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.2777em`}},[a(`span`)])])])]),a(`span`,{class:`mopen`},[a(`span`,{class:`delimsizing size2`},`(`)]),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.8em`,"vertical-align":`-0.65em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`σ`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mclose`},[a(`span`,{class:`delimsizing size2`},`)`)]),a(`span`,{class:`mopen`},[a(`span`,{class:`delimsizing size1`},`(`)]),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`x`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.0448em`}},[a(`span`,{style:{top:`-2.4231em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])]),a(`span`,{style:{top:`-3.2198em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.413em`}},[a(`span`)])])])])]),a(`span`,{class:`mclose`},[a(`span`,{class:`delimsizing size1`},`)`)]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.5991em`,"vertical-align":`-1.2777em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.3214em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`n`)])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},`1`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.686em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})]),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mop op-limits`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.05em`}},[a(`span`,{style:{top:`-1.8723em`,"margin-left":`0em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`i`)])]),a(`span`,{style:{top:`-3.05em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,null,[a(`span`,{class:`mop op-symbol large-op`},`∑`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.2777em`}},[a(`span`)])])])]),a(`span`,{class:`mopen`},[a(`span`,{class:`delimsizing size2`},`(`)]),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.8em`,"vertical-align":`-0.65em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`σ`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mclose`},[a(`span`,{class:`delimsizing size2`},`)`)]),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`x`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.0448em`}},[a(`span`,{style:{top:`-2.4231em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])]),a(`span`,{style:{top:`-3.2198em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.413em`}},[a(`span`)])])])])])])])])])],-1)]]),_:1})])),[[b]])]),c((e(),o(`div`,_,[...v[4]||=[a(`p`,null,[i(`The same approach gives `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`∂`),a(`mi`,null,`L`),a(`mi`,{mathvariant:`normal`},`/`),a(`mi`,{mathvariant:`normal`},`∂`),a(`mi`,null,`b`)]),a(`annotation`,{encoding:`application/x-tex`},`\\partial L / \\partial b`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord`,style:{"margin-right":`0.0556em`}},`∂`),a(`span`,{class:`mord mathnormal`},`L`),a(`span`,{class:`mord`},`/`),a(`span`,{class:`mord`,style:{"margin-right":`0.0556em`}},`∂`),a(`span`,{class:`mord mathnormal`},`b`)])])]),i(`, except that the inner derivative is `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mo`,null,`−`),a(`mn`,null,`1`)]),a(`annotation`,{encoding:`application/x-tex`},`-1`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord`},`1`)])])]),i(` rather than `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mo`,null,`−`),a(`msubsup`,null,[a(`mi`,null,`x`),a(`mi`,null,`j`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])])]),a(`annotation`,{encoding:`application/x-tex`},`-x_j^{(i)}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.4578em`,"vertical-align":`-0.413em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`x`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.0448em`}},[a(`span`,{style:{top:`-2.4231em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])]),a(`span`,{style:{top:`-3.2198em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.413em`}},[a(`span`)])])])])])])])]),i(`.`)],-1)]])),[[b]])]),_:1},16)}}};export{v as default};
lecture-02/assets/md-Udpkj3Y1.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,C as t,D as n,G as r,S as i,_ as a,b as o,et as s,tt as c,v as l,xt as u,yt as d}from"./modules/shiki-CRDHBXw7.js";import{n as f,t as p}from"./slidev/context-Dpnqq1ol.js";import{t as m}from"./slidev/KaTexBlockWrapper-M48-zhMq.js";import{t as h}from"./default-A5OOL8XO.js";var g={class:`grid grid-cols-2 gap-10 mt-4 dl-math-sm`},_={class:`mt-6`},v={__name:`slides.md__slidev_8`,setup(v){let{$slidev:y,$nav:b,$clicksContext:x,$clicks:S,$page:C,$renderContext:w,$frontmatter:T}=f();return x.setup(),(f,v)=>{let y=m,b=r(`click`);return e(),l(h,u(n(d(p)(d(T),7))),{default:s(()=>[v[7]||=a(`h1`,null,`From threshold to bias`,-1),a(`div`,g,[a(`div`,null,[v[3]||=a(`p`,null,`Bring the threshold to the left-hand side:`,-1),t(y,{ranges:[]},{default:s(()=>[...v[0]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`z`),a(`mo`,null,`≥`),a(`mi`,null,`θ`),a(`mspace`,{width:`1em`}),a(`mo`,null,`⟺`),a(`mspace`,{width:`1em`}),a(`mi`,null,`z`),a(`mo`,null,`−`),a(`mi`,null,`θ`),a(`mo`,null,`≥`),a(`mn`,null,`0`)]),a(`annotation`,{encoding:`application/x-tex`},`z \\ge \\theta \\quad\\Longleftrightarrow\\quad z - \\theta \\ge 0`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7719em`,"vertical-align":`-0.136em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`≥`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7184em`,"vertical-align":`-0.024em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`θ`),a(`span`,{class:`mspace`,style:{"margin-right":`1em`}}),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`⟺`),a(`span`,{class:`mspace`,style:{"margin-right":`1em`}}),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6667em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8304em`,"vertical-align":`-0.136em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`θ`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`≥`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`0`)])])])])],-1)]]),_:1}),c((e(),o(`div`,_,[v[2]||=a(`p`,null,[i(`Then rename `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mo`,null,`−`),a(`mi`,null,`θ`)]),a(`annotation`,{encoding:`application/x-tex`},`-\\theta`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7778em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`θ`)])])]),i(` as the `),a(`strong`,null,`bias`),i(),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`b`)]),a(`annotation`,{encoding:`application/x-tex`},`b`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6944em`}}),a(`span`,{class:`mord mathnormal`},`b`)])])]),i(`:`)],-1),t(y,{ranges:[]},{default:s(()=>[...v[1]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mtable`,{rowspacing:`0.25em`,columnalign:`right left`,columnspacing:`0em`},[a(`mtr`,null,[a(`mtd`,null,[a(`mstyle`,{scriptlevel:`0`,displaystyle:`true`},[a(`mi`,null,`z`)])]),a(`mtd`,null,[a(`mstyle`,{scriptlevel:`0`,displaystyle:`true`},[a(`mrow`,null,[a(`mrow`),a(`mo`,null,`=`),a(`msub`,null,[a(`mi`,null,`w`),a(`mn`,null,`1`)]),a(`msub`,null,[a(`mi`,null,`x`),a(`mn`,null,`1`)]),a(`mo`,null,`+`),a(`mo`,null,`⋯`),a(`mo`,null,`+`),a(`msub`,null,[a(`mi`,null,`w`),a(`mi`,null,`m`)]),a(`msub`,null,[a(`mi`,null,`x`),a(`mi`,null,`m`)]),a(`mo`,null,`+`),a(`mi`,null,`b`)])])])]),a(`mtr`,null,[a(`mtd`,null,[a(`mstyle`,{scriptlevel:`0`,displaystyle:`true`},[a(`mrow`)])]),a(`mtd`,null,[a(`mstyle`,{scriptlevel:`0`,displaystyle:`true`},[a(`mrow`,null,[a(`mrow`),a(`mo`,null,`=`),a(`msup`,null,[a(`mi`,{mathvariant:`bold`},`w`),a(`mi`,{mathvariant:`normal`},`⊤`)]),a(`mi`,{mathvariant:`bold`},`x`),a(`mo`,null,`+`),a(`mi`,null,`b`)])])])])]),a(`annotation`,{encoding:`application/x-tex`},`\\begin{aligned} z &= w_1x_1 + \\cdots + w_mx_m + b \\\\ &= \\mathbf{w}^\\top\\mathbf{x} + b \\end{aligned} `)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.7591em`,"vertical-align":`-1.1296em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mtable`},[a(`span`,{class:`col-align-r`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.6296em`}},[a(`span`,{style:{top:`-3.7896em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`)])]),a(`span`,{style:{top:`-2.2304em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`})])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.1296em`}},[a(`span`)])])])]),a(`span`,{class:`col-align-l`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.6296em`}},[a(`span`,{style:{top:`-3.7896em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`}),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3011em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},`1`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`x`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3011em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},`1`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`minner`},`⋯`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.1514em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`m`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`x`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.1514em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`m`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mord mathnormal`},`b`)])]),a(`span`,{style:{top:`-2.2304em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`}),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.8991em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},`⊤`)])])])])])])]),a(`span`,{class:`mord mathbf`},`x`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mord mathnormal`},`b`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.1296em`}},[a(`span`)])])])])])])])])])])],-1)]]),_:1})])),[[b]])]),c((e(),o(`div`,null,[v[5]||=a(`p`,null,`The step now compares against zero:`,-1),t(y,{ranges:[]},{default:s(()=>[...v[4]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`σ`),a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`z`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,null,`=`),a(`mrow`,null,[a(`mo`,{fence:`true`},`{`),a(`mtable`,{rowspacing:`0.36em`,columnalign:`left left`,columnspacing:`1em`},[a(`mtr`,null,[a(`mtd`,null,[a(`mstyle`,{scriptlevel:`0`,displaystyle:`false`},[a(`mn`,null,`1`)])]),a(`mtd`,null,[a(`mstyle`,{scriptlevel:`0`,displaystyle:`false`},[a(`mrow`,null,[a(`mtext`,null,`if\xA0`),a(`mi`,null,`z`),a(`mo`,null,`≥`),a(`mn`,null,`0`)])])])]),a(`mtr`,null,[a(`mtd`,null,[a(`mstyle`,{scriptlevel:`0`,displaystyle:`false`},[a(`mn`,null,`0`)])]),a(`mtd`,null,[a(`mstyle`,{scriptlevel:`0`,displaystyle:`false`},[a(`mtext`,null,`otherwise`)])])])])])]),a(`annotation`,{encoding:`application/x-tex`},`\\sigma(z) = \\begin{cases} 1 & \\text{if } z \\ge 0 \\\\ 0 & \\text{otherwise} \\end{cases} `)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`σ`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`3em`,"vertical-align":`-1.25em`}}),a(`span`,{class:`minner`},[a(`span`,{class:`mopen delimcenter`,style:{top:`0em`}},[a(`span`,{class:`delimsizing size4`},`{`)]),a(`span`,{class:`mord`},[a(`span`,{class:`mtable`},[a(`span`,{class:`col-align-l`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.69em`}},[a(`span`,{style:{top:`-3.69em`}},[a(`span`,{class:`pstrut`,style:{height:`3.008em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},`1`)])]),a(`span`,{style:{top:`-2.25em`}},[a(`span`,{class:`pstrut`,style:{height:`3.008em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},`0`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.19em`}},[a(`span`)])])])]),a(`span`,{class:`arraycolsep`,style:{width:`1em`}}),a(`span`,{class:`col-align-l`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.69em`}},[a(`span`,{style:{top:`-3.69em`}},[a(`span`,{class:`pstrut`,style:{height:`3.008em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord text`},[a(`span`,{class:`mord`},`if\xA0`)]),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`≥`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mord`},`0`)])]),a(`span`,{style:{top:`-2.25em`}},[a(`span`,{class:`pstrut`,style:{height:`3.008em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord text`},[a(`span`,{class:`mord`},`otherwise`)])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.19em`}},[a(`span`)])])])])])]),a(`span`,{class:`mclose nulldelimiter`})])])])])])],-1)]]),_:1}),v[6]||=a(`div`,{class:`mt-6 dl-callout`},[i(` The bias is not a new idea — it is the threshold, moved. Every framework from here on has a `),a(`code`,null,`bias=True`),i(` argument for exactly this. `)],-1)])),[[b]])])]),_:1},16)}}};export{v as default};
lecture-02/assets/md-eBbKSq5M2.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,C as t,Ct as n,D as r,H as i,S as a,T as o,_ as s,b as c,bt as l,dt as u,et as d,m as f,v as p,xt as m,yt as h}from"./modules/shiki-CRDHBXw7.js";import{t as g}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as _,t as v}from"./slidev/context-Dpnqq1ol.js";import{t as y}from"./WidgetFrame-i_n0SXJC.js";import{t as b}from"./interactive-B3FqelG7.js";var x={class:`dl-onehot`},S={class:`dl-onehot__choices`},C=[`onClick`],w={class:`dl-onehot__index`},T={class:`dl-onehot__name`},E={class:`dl-onehot__vector`},D=g(o({__name:`OneHotDemo`,props:{classes:{default:()=>[`setosa`,`versicolor`,`virginica`]}},setup(t){let{$slidev:r,$nav:o,$clicksContext:m,$clicks:h,$page:g,$renderContext:v,$frontmatter:b}=_(),D=t,O=u(0);return(t,r)=>{let o=y;return e(),p(o,{"max-width":`34rem`},{readout:d(()=>[...r[1]||=[a(` One output unit per class. The label is a position, not a magnitude — encoding the three classes as 0, 1, 2 would tell the network that virginica is "twice" versicolor. `,-1)]]),default:d(()=>[s(`div`,x,[s(`div`,S,[(e(!0),c(f,null,i(D.classes,(t,r)=>(e(),c(`button`,{key:t,type:`button`,class:l({"is-selected":r===O.value}),onClick:e=>O.value=r},[s(`span`,w,`y = `+n(r),1),s(`span`,T,n(t),1)],10,C))),128))]),r[0]||=s(`div`,{class:`dl-onehot__arrow`,"aria-hidden":`true`},`→`,-1),s(`div`,E,[(e(!0),c(f,null,i(D.classes,(t,r)=>(e(),c(`div`,{key:t,class:l([`dl-onehot__cell`,{"is-hot":r===O.value}])},n(+(r===O.value)),3))),128))])])]),_:1})}}}),[[`__scopeId`,`data-v-96f8ccf1`]]),O={__name:`slides.md__slidev_30`,setup(n){let{$slidev:i,$nav:a,$clicksContext:o,$clicks:c,$page:l,$renderContext:u,$frontmatter:f}=_();return o.setup(),(n,i)=>{let a=D;return e(),p(b,m(r(h(v)(h(f),29))),{aside:d(e=>[...i[0]||=[s(`p`,null,`One output unit per class, so the network never has to learn that class 2 is "twice" class 1.`,-1)]]),default:d(()=>[t(a)]),_:1},16)}}};export{O as default};
lecture-02/assets/md-xJci9bFZ.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,C as t,D as n,G as r,S as i,_ as a,b as o,et as s,tt as c,v as l,xt as u,yt as d}from"./modules/shiki-CRDHBXw7.js";import{n as f,t as p}from"./slidev/context-Dpnqq1ol.js";import{t as m}from"./slidev/KaTexBlockWrapper-M48-zhMq.js";import{t as h}from"./default-A5OOL8XO.js";import{t as g}from"./slidev/VClicks-buBFUjdS.js";var _={class:`dl-math-sm`},v={class:`mt-3 dl-secondary`},y={class:`mt-4`},b={__name:`slides.md__slidev_19`,setup(b){let{$slidev:x,$nav:S,$clicksContext:C,$clicks:w,$page:T,$renderContext:E,$frontmatter:D}=f();return C.setup(),(f,b)=>{let x=m,S=g,C=r(`click`);return e(),l(h,u(n(d(p)(d(D),18))),{default:s(()=>[b[4]||=a(`h1`,null,`Minimising the loss function`,-1),b[5]||=a(`p`,null,`Mean squared error, as the objective to minimise:`,-1),a(`div`,_,[t(x,{ranges:[]},{default:s(()=>[...b[0]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`L`),a(`mo`,{stretchy:`false`},`(`),a(`mi`,{mathvariant:`bold`},`w`),a(`mo`,{separator:`true`},`,`),a(`mi`,null,`b`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,null,`=`),a(`mfrac`,null,[a(`mn`,null,`1`),a(`mrow`,null,[a(`mn`,null,`2`),a(`mi`,null,`n`)])]),a(`munderover`,null,[a(`mo`,null,`∑`),a(`mrow`,null,[a(`mi`,null,`i`),a(`mo`,null,`=`),a(`mn`,null,`1`)]),a(`mi`,null,`n`)]),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.8em`,maxsize:`1.8em`},`(`),a(`msup`,null,[a(`mi`,null,`y`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`−`),a(`mi`,null,`σ`),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`(`),a(`msup`,null,[a(`mi`,null,`z`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`)`),a(`msup`,null,[a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.8em`,maxsize:`1.8em`},`)`),a(`mn`,null,`2`)])]),a(`annotation`,{encoding:`application/x-tex`},`L(\\mathbf{w}, b) = \\frac{1}{2n} \\sum_{i=1}^{n} \\Bigl(y^{(i)} - \\sigma\\bigl(z^{(i)}\\bigr)\\Bigr)^2`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`},`L`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`},`b`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.9291em`,"vertical-align":`-1.2777em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.3214em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},`2`),a(`span`,{class:`mord mathnormal`},`n`)])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},`1`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.686em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})]),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mop op-limits`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.6514em`}},[a(`span`,{style:{top:`-1.8723em`,"margin-left":`0em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mrel mtight`},`=`),a(`span`,{class:`mord mtight`},`1`)])])]),a(`span`,{style:{top:`-3.05em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,null,[a(`span`,{class:`mop op-symbol large-op`},`∑`)])]),a(`span`,{style:{top:`-4.3em`,"margin-left":`0em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mathnormal mtight`},`n`)])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.2777em`}},[a(`span`)])])])]),a(`span`,{class:`mopen`},[a(`span`,{class:`delimsizing size2`},`(`)]),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.004em`,"vertical-align":`-0.65em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`σ`),a(`span`,{class:`mopen`},[a(`span`,{class:`delimsizing size1`},`(`)]),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mclose`},[a(`span`,{class:`delimsizing size1`},`)`)]),a(`span`,{class:`mclose`},[a(`span`,{class:`mclose`},[a(`span`,{class:`delimsizing size2`},`)`)]),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.354em`}},[a(`span`,{style:{top:`-3.6029em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},`2`)])])])])])])])])])])])],-1)]]),_:1})]),c((e(),o(`div`,v,[...b[1]||=[a(`p`,null,[i(`The `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mstyle`,{scriptlevel:`0`,displaystyle:`false`},[a(`mfrac`,null,[a(`mn`,null,`1`),a(`mn`,null,`2`)])])]),a(`annotation`,{encoding:`application/x-tex`},`\\tfrac{1}{2}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.1901em`,"vertical-align":`-0.345em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.8451em`}},[a(`span`,{style:{top:`-2.655em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`2`)])])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.394em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`1`)])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.345em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})])])])]),i(` is there purely for convenience — it cancels the 2 that falls out when we differentiate.`)],-1)]])),[[C]]),c((e(),o(`div`,y,[b[3]||=a(`p`,null,[i(`Because the activation is `),a(`strong`,null,`linear`),i(`:`)],-1),t(S,null,{default:s(()=>[...b[2]||=[a(`ul`,null,[a(`li`,null,[i(`the loss is `),a(`strong`,null,`differentiable`)]),a(`li`,null,[i(`the loss is `),a(`strong`,null,`convex`),i(` — one minimum, no local traps`)]),a(`li`,null,[i(`so we can use `),a(`strong`,null,`gradient descent`),i(` to find it`)])],-1)]]),_:1})])),[[C]])]),_:1},16)}}};export{b as default};
lecture-02/assets/slidev/404-CWdjs5kx.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,Ct as t,S as n,T as r,W as i,_ as a,b as o,et as s,g as c,v as l,y as u,yt as d}from"../modules/shiki-CRDHBXw7.js";import{t as f}from"../useNav-0H1CZeft.js";import{t as p}from"../_plugin-vue_export-helper-BDNMzG2s.js";import{V as m}from"../modules/vue-jGGq3ahv.js";var h={class:`grid justify-center text-center pt-15% gap-5`},g={class:`text-2xl`},_={class:`op-60`},v={class:`mt-3 flex flex-col gap-2 max-w-xs mx-auto w-full`},y=p(r({__name:`404`,setup(r){let p=/\d+/,{currentRoute:y}=m(),{total:b}=f(),x=c(()=>{let e=y.value.path.match(p);if(e){let t=+e[0];if(t>0&&t<=b.value)return t}return null});return(r,c)=>{let f=i(`RouterLink`);return e(),o(`div`,h,[a(`div`,null,[c[2]||=a(`h1`,{class:`text-9xl font-light`},` 404 `,-1),a(`p`,g,[c[0]||=n(` Page `,-1),a(`code`,_,t(d(y).path),1),c[1]||=n(` not found `,-1)])]),a(`div`,v,[x.value===1?u(`v-if`,!0):(e(),l(f,{key:0,to:`/`,class:`page-link`},{default:s(()=>[...c[3]||=[n(` Go Home `,-1)]]),_:1})),x.value?(e(),l(f,{key:1,to:`/${x.value}`,class:`page-link`},{default:s(()=>[n(` Go to Slide `+t(x.value),1)]),_:1},8,[`to`])):u(`v-if`,!0)])])}}}),[[`__scopeId`,`data-v-b584852f`]]);export{y as default};
lecture-02/assets/slidev/CodeBlockWrapper-ClYx9M-I.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{A as e,B as t,C as n,Ct as r,Q as i,R as a,St as o,T as s,U as c,_ as l,b as u,bt as d,dt as f,g as p,v as m,y as h,yt as g,z as _}from"../modules/shiki-CRDHBXw7.js";import{tt as v}from"../useNav-0H1CZeft.js";import{u as y}from"../modules/vue-jGGq3ahv.js";import{a as b,l as x,n as S}from"./context-Dpnqq1ol.js";import{d as C,u as w}from"../index-BRVUm3_6.js";import{a as T,i as E}from"../modules/unplugin-icons-BOSF4mXp.js";var D=s({__name:`TitleIcon`,props:{title:{}},setup(e){let n={pnpm:`i-vscode-icons:file-type-light-pnpm`,npm:`i-vscode-icons:file-type-npm`,yarn:`i-vscode-icons:file-type-yarn`,bun:`i-vscode-icons:file-type-bun`,deno:`i-vscode-icons:file-type-deno`,vue:`i-vscode-icons:file-type-vue`,svelte:`i-vscode-icons:file-type-svelte`,angular:`i-vscode-icons:file-type-angular`,react:`i-vscode-icons:file-type-reactjs`,next:`i-vscode-icons:file-type-light-next`,nuxt:`i-vscode-icons:file-type-nuxt`,solid:`logos:solidjs-icon`,astro:`i-vscode-icons:file-type-light-astro`,rollup:`i-vscode-icons:file-type-rollup`,webpack:`i-vscode-icons:file-type-webpack`,vite:`i-vscode-icons:file-type-vite`,esbuild:`i-vscode-icons:file-type-esbuild`,"package.json":`i-vscode-icons:file-type-node`,"tsconfig.json":`i-vscode-icons:file-type-tsconfig`,".npmrc":`i-vscode-icons:file-type-npm`,".editorconfig":`i-vscode-icons:file-type-editorconfig`,".eslintrc":`i-vscode-icons:file-type-eslint`,".eslintignore":`i-vscode-icons:file-type-eslint`,"eslint.config":`i-vscode-icons:file-type-eslint`,".gitignore":`i-vscode-icons:file-type-git`,".gitattributes":`i-vscode-icons:file-type-git`,".env":`i-vscode-icons:file-type-dotenv`,".env.example":`i-vscode-icons:file-type-dotenv`,".vscode":`i-vscode-icons:file-type-vscode`,"tailwind.config":`vscode-icons:file-type-tailwind`,"uno.config":`i-vscode-icons:file-type-unocss`,"unocss.config":`i-vscode-icons:file-type-unocss`,".oxlintrc":`i-vscode-icons:file-type-oxlint`,"vue.config":`i-vscode-icons:file-type-vueconfig`,".mts":`i-vscode-icons:file-type-typescript`,".cts":`i-vscode-icons:file-type-typescript`,".ts":`i-vscode-icons:file-type-typescript`,".tsx":`i-vscode-icons:file-type-typescript`,".mjs":`i-vscode-icons:file-type-js`,".cjs":`i-vscode-icons:file-type-js`,".json":`i-vscode-icons:file-type-json`,".js":`i-vscode-icons:file-type-js`,".jsx":`i-vscode-icons:file-type-js`,".md":`i-vscode-icons:file-type-markdown`,".py":`i-vscode-icons:file-type-python`,".ico":`i-vscode-icons:file-type-favicon`,".html":`i-vscode-icons:file-type-html`,".css":`i-vscode-icons:file-type-css`,".scss":`i-vscode-icons:file-type-scss`,".yml":`i-vscode-icons:file-type-light-yaml`,".yaml":`i-vscode-icons:file-type-light-yaml`,".php":`i-vscode-icons:file-type-php`,".svg":`i-vscode-icons:file-type-svg`};function r(e){let t=e.match(/~([^~]+)~/g);if(t&&t.length>0)return t[0].slice(1,-1);let r=Object.keys(n).sort((e,t)=>t.length-e.length);for(let t of r)if(e.toLowerCase().includes(t.toLowerCase()))return n[t];return``}return(n,i)=>r(e.title)?(t(),u(`div`,{key:0,class:d([`w-3.5 h-3.5 relative`,r(e.title)])},null,2)):h(`v-if`,!0)}}),O=[`data-title`],k={key:0,class:`slidev-code-block-title`},A={class:`leading-1em`},j=[`title`],M=s({__name:`CodeBlockWrapper`,props:{ranges:{type:Array,default:()=>[]},finally:{type:[String,Number],default:`last`},startLine:{type:Number,default:1},lines:{type:Boolean,default:v.lineNumbers},at:{type:[String,Number],default:`+1`},maxHeight:{type:String,default:void 0},title:{type:String,default:``}},setup(s){let M=s,{$frontmatter:N,$clicksContext:P}=S(),F=p(()=>N?.codeCopy??v.codeCopy),I=f(),L=w();_(()=>{P.unregister(L)}),i(()=>{I.value?.classList.toggle(`slidev-code-line-numbers`,M.lines)}),a(()=>{if(!P||!M.ranges?.length)return;let e=P.calculateSince(M.at,M.ranges.length-1);P.register(L,e);let t=p(()=>e?Math.max(0,P.current-e.start+1):x),n=p(()=>M.finally===`last`?M.ranges.at(-1):M.finally.toString());i(()=>{if(!I.value)return;let e=M.ranges[t.value]??n.value,r=e===`hide`;I.value.classList.toggle(b,r),r&&(e=M.ranges[t.value+1]??n.value);let i=I.value.querySelector(`.shiki`),a=Array.from(i.querySelectorAll(`code > .line`)),o=a.length;if(C(e,o,M.startLine,e=>[a[e]]),M.maxHeight){let e=Array.from(i.querySelectorAll(`.line.highlighted`));e.reduce((e,t)=>t.offsetHeight+e,0)>I.value.offsetHeight?e[0].scrollIntoView({behavior:`smooth`,block:`start`}):e.length>0&&e[Math.round((e.length-1)/2)].scrollIntoView({behavior:`smooth`,block:`center`})}})});let{copied:R,copy:z}=y();function B(){let e=I.value?.querySelector(`.slidev-code`)?.textContent;e&&z(e)}let V=e(`activeTitle`,null),H=p(()=>V===null&&M.title);return(e,i)=>{let a=E,f=T;return t(),u(`div`,{ref_key:`el`,ref:I,class:d([`slidev-code-wrapper relative group`,{"slidev-code-line-numbers":M.lines,active:g(V)===s.title}]),style:o({"max-height":M.maxHeight,"overflow-y":M.maxHeight?`scroll`:void 0,"--start":M.startLine}),"data-title":s.title},[H.value?(t(),u(`div`,k,[n(D,{title:s.title},null,8,[`title`]),l(`div`,A,r(s.title.replace(/~([^~]+)~/g,``).trim()),1)])):h(`v-if`,!0),c(e.$slots,`default`),F.value?(t(),u(`button`,{key:1,class:d([`slidev-code-copy absolute right-0 transition opacity-0 group-hover:opacity-20 hover:!opacity-100`,H.value?`top-10`:`top-0`]),title:g(R)?`Copied`:`Copy`,onClick:i[0]||=e=>B()},[g(R)?(t(),m(a,{key:0,class:`p-2 w-8 h-8`})):(t(),m(f,{key:1,class:`p-2 w-8 h-8`}))],10,j)):h(`v-if`,!0)],14,O)}}});export{M as t};
lecture-02/assets/slidev/DrawingControls-1u13NB8P.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{n as e}from"../rolldown-runtime-hePW80VL.js";import{B as t,C as n,Ct as r,H as i,St as a,T as o,U as s,_ as c,b as l,bt as u,dt as d,et as f,l as p,m,r as h,tt as g,u as _,v,y,yt as b}from"../modules/shiki-CRDHBXw7.js";import{d as x,g as S}from"../modules/vue-jGGq3ahv.js";import{t as C}from"../useDrawings-B5C1Zlkn.js";import{t as w}from"./IconButton-BiAlWjlk.js";import{t as T}from"./VerticalDivider-BuDt2kNg.js";var E=o({__name:`Draggable`,props:{storageKey:{},initial:{}},setup(e){let n=e,r=d(null),i=n.initial??{x:0,y:0},o=n.storageKey?S(n.storageKey,i):d(i),{style:c}=x(r,{initialValue:o});return(e,n)=>(t(),l(`div`,{ref_key:`el`,ref:r,class:`fixed`,style:a(b(c))},[s(e.$slots,`default`)],4))}}),D={class:`flex bg-main p-2`},O={class:`inline-block w-7 text-center`},k={class:`pt-.5`},A={class:`i-carbon:pin-filled transform -rotate-45`},j={class:`i-carbon:pin`},M={class:`i-carbon:error`},N={class:`i-carbon:close-outline`},P=o({__name:`DrawingControls`,setup(e){let{brush:o,canClear:s,canRedo:x,canUndo:S,clear:P,drauu:F,drawingEnabled:I,drawingMode:L,drawingPinned:R,brushColors:z}=C(),B=d(!1);function V(e){e.preventDefault(),e.stopPropagation(),requestAnimationFrame(()=>{requestAnimationFrame(()=>{B.value=!0})})}function H(e){e.pointerType!==`mouse`&&V(e)}function U(){F.undo()}function W(){F.redo()}let G=`stylus`;function K(e){L.value=e,I.value=!0,e!==`eraseLine`&&(G=e)}function q(e){o.value.color=e,I.value=!0,L.value=G}return(e,d)=>b(I)||b(R)?(t(),v(E,{key:0,class:u([`flex flex-wrap text-xl p-2 gap-1 rounded-md bg-main shadow transition-opacity duration-200 z-nav border border-main`,!b(I)&&b(R)?`opacity-40 hover:opacity-90`:``]),"storage-key":`slidev-drawing-pos`,"initial-x":10,"initial-y":10},{default:f(()=>[n(w,{title:`Draw with stylus`,class:u({shallow:b(L)!==`stylus`}),onClick:d[0]||=e=>K(`stylus`)},{default:f(()=>[...d[14]||=[c(`div`,{class:`i-carbon:pen`},null,-1)]]),_:1},8,[`class`]),n(w,{title:`Draw a line`,class:u({shallow:b(L)!==`line`}),onClick:d[1]||=e=>K(`line`)},{default:f(()=>[...d[15]||=[c(`svg`,{width:`1em`,height:`1em`,class:`-mt-0.5`,preserveAspectRatio:`xMidYMid meet`,viewBox:`0 0 24 24`},[c(`path`,{d:`M21.71 3.29a1 1 0 0 0-1.42 0l-18 18a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l18-18a1 1 0 0 0 0-1.42z`,fill:`currentColor`})],-1)]]),_:1},8,[`class`]),n(w,{title:`Draw an arrow`,class:u({shallow:b(L)!==`arrow`}),onClick:d[2]||=e=>K(`arrow`)},{default:f(()=>[...d[16]||=[c(`div`,{class:`i-carbon:arrow-up-right`},null,-1)]]),_:1},8,[`class`]),n(w,{title:`Draw an ellipse`,class:u({shallow:b(L)!==`ellipse`}),onClick:d[3]||=e=>K(`ellipse`)},{default:f(()=>[...d[17]||=[c(`div`,{class:`i-carbon:radio-button`},null,-1)]]),_:1},8,[`class`]),n(w,{title:`Draw a rectangle`,class:u({shallow:b(L)!==`rectangle`}),onClick:d[4]||=e=>K(`rectangle`)},{default:f(()=>[...d[18]||=[c(`div`,{class:`i-carbon:checkbox`},null,-1)]]),_:1},8,[`class`]),n(w,{title:`Erase`,class:u({shallow:b(L)!==`eraseLine`}),onClick:d[5]||=e=>K(`eraseLine`)},{default:f(()=>[...d[19]||=[c(`div`,{class:`i-carbon:erase`},null,-1)]]),_:1},8,[`class`]),n(T),n(b(h),{shown:B.value,"onUpdate:shown":d[8]||=e=>B.value=e,triggers:[]},{popper:f(()=>[c(`div`,D,[c(`div`,O,r(b(o).size),1),c(`div`,k,[g(c(`input`,{"onUpdate:modelValue":d[6]||=e=>b(o).size=e,type:`range`,min:`1`,max:`15`,onChange:d[7]||=e=>L.value=b(G)},null,544),[[p,b(o).size]])])])]),default:f(()=>[n(w,{title:`Adjust stroke width`,class:u({shallow:b(L)===`eraseLine`}),onClick:V,onPointerdown:H,onPointerup:H,onTouchend:V},{default:f(()=>[...d[20]||=[c(`svg`,{viewBox:`0 0 32 32`,width:`1.2em`,height:`1.2em`},[c(`line`,{x1:`2`,y1:`15`,x2:`22`,y2:`4`,stroke:`currentColor`,"stroke-width":`1`,"stroke-linecap":`round`}),c(`line`,{x1:`2`,y1:`24`,x2:`28`,y2:`10`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`}),c(`line`,{x1:`7`,y1:`31`,x2:`29`,y2:`19`,stroke:`currentColor`,"stroke-width":`3`,"stroke-linecap":`round`})],-1)]]),_:1},8,[`class`])]),_:1},8,[`shown`]),(t(!0),l(m,null,i(b(z),e=>(t(),v(w,{key:e,title:`Set brush color`,class:u(b(o).color===e&&b(L)!==`eraseLine`?`active`:`shallow`),onClick:t=>q(e)},{default:f(()=>[c(`div`,{class:u([`w-6 h-6 transition-all transform border`,b(o).color===e?`rounded-md border-gray-300/50`:`rounded-1/2 scale-85 border-white`]),style:a(b(I)?{background:e}:{borderColor:e})},null,6)]),_:2},1032,[`class`,`onClick`]))),128)),n(T),n(w,{title:`Undo`,class:u({disabled:!b(S)}),onClick:d[9]||=e=>U()},{default:f(()=>[...d[21]||=[c(`div`,{class:`i-carbon:undo`},null,-1)]]),_:1},8,[`class`]),n(w,{title:`Redo`,class:u({disabled:!b(x)}),onClick:d[10]||=e=>W()},{default:f(()=>[...d[22]||=[c(`div`,{class:`i-carbon:redo`},null,-1)]]),_:1},8,[`class`]),n(w,{title:`Delete`,class:u({disabled:!b(s)}),onClick:d[11]||=e=>b(P)()},{default:f(()=>[...d[23]||=[c(`div`,{class:`i-carbon:trash-can`},null,-1)]]),_:1},8,[`class`]),n(T),n(w,{title:b(R)?`Unpin drawing`:`Pin drawing`,class:u({shallow:!b(R)}),onClick:d[12]||=e=>R.value=!b(R)},{default:f(()=>[g(c(`div`,A,null,512),[[_,b(R)]]),g(c(`div`,j,null,512),[[_,!b(R)]])]),_:1},8,[`title`,`class`]),b(I)?(t(),v(w,{key:0,title:b(R)?`Drawing pinned`:`Drawing unpinned`,class:u({shallow:!b(I)}),onClick:d[13]||=e=>I.value=!b(I)},{default:f(()=>[g(c(`div`,M,null,512),[[_,b(R)]]),g(c(`div`,N,null,512),[[_,!b(R)]])]),_:1},8,[`title`,`class`])):y(`v-if`,!0)]),_:1},8,[`class`])):y(`v-if`,!0)}}),F=e({default:()=>I}),I=P;export{F as n,I as t};
lecture-02/assets/slidev/DrawingLayer-B_4rAFGl.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,I as t,R as n,T as r,Z as i,b as a,bt as o,dt as s,yt as c}from"../modules/shiki-CRDHBXw7.js";import{n as l}from"./context-Dpnqq1ol.js";import{t as u}from"../useDrawings-B5C1Zlkn.js";var d=r({__name:`DrawingLayer`,setup(r){let{drauu:d,drawingEnabled:f,loadCanvas:p}=u(),m=l().$scale,h=s();return n(()=>{d.mount(h.value,h.value.parentElement),i(m,e=>d.options.coordinateScale=1/e,{immediate:!0}),p()}),t(()=>{d.unmount()}),(t,n)=>(e(),a(`svg`,{ref_key:`svg`,ref:h,class:o([`w-full h-full absolute top-0`,{"pointer-events-none":!c(f),"touch-none":c(f)}])},null,2))}});export{d as default};
lecture-02/assets/slidev/KaTexBlockWrapper-M48-zhMq.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,Q as t,R as n,T as r,U as i,b as a,dt as o,g as s,z as c}from"../modules/shiki-CRDHBXw7.js";import{H as l}from"../useNav-0H1CZeft.js";import{a as u,c as d,l as f,n as p}from"./context-Dpnqq1ol.js";import{u as m}from"../index-BRVUm3_6.js";var h=`.mtable > [class*=col-align]`,g=`:scope > .vlist-t > .vlist-r > .vlist > span > .mord`;function _(e){let t=Array.from(e.querySelectorAll(h)).filter(e=>!e.parentElement?.closest(h)),n=[];for(let e of t)Array.from(e.querySelectorAll(g)).forEach((e,t)=>{e&&(Array.isArray(n[t])?n[t].push(e):n[t]=[e])});return n}var v=r({__name:`KaTexBlockWrapper`,props:{ranges:{type:Array,default:()=>[]},finally:{type:[String,Number],default:`last`},startLine:{type:Number,default:1},at:{type:[String,Number],default:`+1`}},setup(r){let h=r,{$clicksContext:g}=p(),v=o(),y=m();return c(()=>{g.unregister(y)}),n(()=>{if(!g||!h.ranges?.length)return;let e=g.calculateSince(h.at,h.ranges.length-1);g.register(y,e);let n=s(()=>e?Math.max(0,g.current-e.start+1):f),r=s(()=>h.finally===`last`?h.ranges.at(-1):h.finally.toString());t(()=>{if(!v.value)return;let e=h.ranges[n.value]??r.value,t=e===`hide`;v.value.classList.toggle(u,t),t&&(e=h.ranges[n.value+1]??r.value);let i=_(v.value);if(!i.length)return;let a=h.startLine,o=l(i.length+a-1,e);i.forEach((e,t)=>{let n=o.includes(t+a);e.forEach(e=>{e.classList.toggle(d,!0),e.classList.toggle(`highlighted`,n),e.classList.toggle(`dishonored`,!n)})})})}),(t,n)=>(e(),a(`div`,{ref_key:`el`,ref:v,class:`slidev-katex-wrapper`},[i(t.$slots,`default`)],512))}});export{v as t};
lecture-02/assets/slidev/NoteDisplay-C3x6Bkvc.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,Ct as t,H as n,P as r,Q as i,R as a,St as o,T as s,Z as c,_ as l,b as u,bt as d,dt as f,g as p,m,ot as h,y as g,yt as _}from"../modules/shiki-CRDHBXw7.js";import{nt as v,rt as y}from"../useNav-0H1CZeft.js";import{l as b}from"./context-Dpnqq1ol.js";var x=[`title`],S={key:0,"flex-auto":``},C={"text-primary":``},w={op50:``,"text-sm":``},T={key:0,absolute:``,"inset-y-0":``,"right-0":``,"w-0.5":``,"bg-primary":``,"z-1":``},E=s({__name:`ClicksSlider`,props:{clicksContext:{},readonly:{type:Boolean},active:{type:Boolean,default:!0},resettable:{type:Boolean},compact:{type:Boolean},attached:{type:Boolean}},emits:[`activate`,`reset`],setup(r,{emit:i}){let a=r,s=i,c=p(()=>a.clicksContext.total),E=p(()=>v(0,a.clicksContext.clicksStart,c.value)),D=p(()=>c.value-E.value+1),O=p({get(){return a.resettable&&!a.active||a.clicksContext.current>c.value?-1:a.clicksContext.current},set(e){if(a.resettable&&e<0){s(`reset`),a.clicksContext.current=b;return}s(`activate`),a.clicksContext.current=e}}),k=p(()=>a.resettable&&O.value<0),A=p(()=>y(E.value,c.value+1)),j=f(),M;function N(e){let t=j.value.getBoundingClientRect();return(e.clientX-t.left)/Math.max(1,t.width)}function P(e,t){if(a.readonly||!j.value||!t&&!(e.buttons&1))return;let n=N(e);if(a.resettable&&n<0){O.value=-1;return}let r=v(0,n,t?.999999:1)*D.value,i=v(0,O.value-E.value,D.value-1),o=t?E.value+Math.floor(r):O.value;!t&&r>=i+1.5?o=E.value+Math.floor(r-.5):!t&&r<i-.5&&(o=E.value+Math.ceil(r-.5)),O.value=v(E.value,o,c.value)}function F(e){a.readonly||(j.value?.setPointerCapture(e.pointerId),M={id:e.pointerId,x:e.clientX,y:e.clientY},P(e,!0))}function I(e){if(M?.id===e.pointerId){if(Math.abs(e.clientX-M.x)<=3&&Math.abs(e.clientY-M.y)<=3)return;M=void 0}P(e,!1)}return(i,s)=>(e(),u(`div`,{class:d([`flex gap-1 select-none`,[r.attached?`items-end`:`items-center`,D.value&&a.clicksContext.isMounted?``:`op50`]]),title:`Clicks in this slide: ${D.value}`},[l(`div`,{class:d([`flex items-center font-mono`,[r.compact?`gap-1 min-w-0 mr0`:`gap-0.2 min-w-16 mr1`,r.attached?`h-[22px]`:``]])},[l(`div`,{class:d([`i-carbon:cursor-1 text-sm op50`,r.compact?`ml-1`:``])},null,2),O.value>=0&&O.value!==_(999999)&&r.active?(e(),u(m,{key:0},[r.compact?g(`v-if`,!0):(e(),u(`div`,S)),l(`span`,null,[l(`span`,C,t(O.value),1),s[2]||=l(`span`,{op25:``,"text-sm":``},`/`,-1),l(`span`,w,t(c.value),1)])],64)):(e(),u(`div`,{key:1,op50:``,class:d(r.compact?``:`flex-auto pl1`)},[l(`span`,{class:d(r.compact?`inline-block text-center`:``),style:o(r.compact?{width:`${String(c.value).length*2+1}ch`,marginLeft:`-0.25ch`}:void 0)},t(c.value),7)],2))],2),l(`div`,{ref_key:`sliderEl`,ref:j,relative:``,"flex-auto":``,"font-mono":``,flex:`~`,"touch-none":``,class:d([r.attached?`h-[22px]`:`h5`,k.value?`op80`:``]),onPointerdownCapture:F,onPointermove:I,onPointerup:s[0]||=e=>h(M)?M.value=void 0:M=void 0,onPointercancel:s[1]||=e=>h(M)?M.value=void 0:M=void 0},[(e(!0),u(m,null,n(A.value,n=>(e(),u(`div`,{key:n,border:`y main`,"of-hidden":``,relative:``,class:d([n===0?`border-l`:``,n===0?r.attached?`rounded-tl`:`rounded-l`:``,n===c.value?`border-r`:``,n===c.value&&+n!=+O.value?r.attached?`rounded-tr`:`rounded-r`:``,r.attached?`border-b-0`:``]),style:o({width:D.value>0?`${1/D.value*100}%`:`100%`})},[l(`div`,{absolute:``,"inset-0":``,class:d(n<=O.value&&r.active?`bg-primary op15`:``)},null,2),+n==+O.value&&r.active?(e(),u(`div`,T)):g(`v-if`,!0),l(`div`,{class:d([+n==+O.value&&r.active?`text-primary font-bold op100`:`op30`,n===c.value?``:`border-r-2 border-main`]),"w-full":``,"h-full":``,"text-xs":``,flex:``,"items-center":``,"justify-center":``,"z-1":``},t(n),3)],6))),128))],34)],10,x))}}),D=[`innerHTML`],O=[`textContent`],k=[`textContent`],A=`slidev-note-fade`,j=`slidev-note-click-mark`,M=s({__name:`NoteDisplay`,props:{class:{},noteHtml:{},note:{},highlight:{type:Boolean,default:!0},placeholder:{},clicksContext:{},autoScroll:{type:Boolean}},emits:[`markerDblclick`,`markerClick`],setup(n,{emit:o}){let s=n,m=o,h=p(()=>s.clicksContext!=null&&s.noteHtml?.includes(j)),g=f(null);function _(){if(!g.value||!h.value)return;let e=Array.from(g.value.querySelectorAll(`.${j}`)),t=new Map,n=new Map,r=0;for(let i of e){let e=Number(i.dataset.clicks);t.set(i,e);let a=i,o=i.parentElement;for(;o&&a!==g.value;)n.has(o)||n.set(o,[[null,r]]),n.get(o).push([a,e]),a=o,o=o.parentElement;r=e}let i=new Map;for(let[e,t]of n){let n=!1,r=0;for(let a of Array.from(e.childNodes)){let o=!1;for(;a===t[r+1]?.[0];)o=!0,r++;if(o)continue;let s=a;if(a.nodeType===3){if(!a.textContent?.trim())continue;s=document.createElement(`span`),s.textContent=a.textContent,e.insertBefore(s,a),a.remove()}n||=r===0,i.set(s,t[r][1])}n||(t[0][1]=-1)}return e=>{let r=s.highlight;for(let[t,i]of n)t.classList.toggle(A,r&&!i.some(([t,n])=>n===e));for(let[t,n]of i)t.classList.toggle(A,r&&n!==e);for(let[n,i]of t)n.classList.remove(A),n.classList.toggle(`${j}-past`,r&&i<e),n.classList.toggle(`${j}-active`,r&&i===e),n.classList.toggle(`${j}-next`,r&&i===e+1),n.classList.toggle(`${j}-future`,r&&i>e+1),n.ondblclick=e=>{r&&(m(`markerDblclick`,e,i),!e.defaultPrevented&&(s.clicksContext.current=i,e.stopPropagation(),e.stopImmediatePropagation()))},n.onclick=e=>{r&&m(`markerClick`,e,i)},r&&s.autoScroll&&i===e&&n.scrollIntoView({block:`center`,behavior:`smooth`})}}let v=f();return c(()=>[s.noteHtml,s.highlight],()=>{r(()=>{v.value=_()})},{immediate:!0}),a(()=>{_()}),i(()=>{let e=s.clicksContext?.current??999999;v.value?.(e)}),(r,i)=>n.noteHtml?(e(),u(`div`,{key:0,ref_key:`noteDisplay`,ref:g,class:d([`prose dark:prose-invert overflow-auto outline-none slidev-note`,[s.class,h.value?`slidev-note-with-clicks`:``]]),innerHTML:n.noteHtml},null,10,D)):n.note?(e(),u(`div`,{key:1,class:d([`prose dark:prose-invert overflow-auto outline-none slidev-note`,s.class])},[l(`p`,{textContent:t(n.note)},null,8,O)],2)):(e(),u(`div`,{key:2,class:d([`prose dark:prose-invert overflow-auto outline-none opacity-50 italic select-none slidev-note`,s.class])},[l(`p`,{textContent:t(s.placeholder||`No notes.`)},null,8,k)],2))}});export{E as n,M as t};
lecture-02/assets/slidev/NoteEditable-Bn2MFV6B.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,P as t,Q as n,St as r,T as i,Z as a,b as o,bt as s,d as c,dt as l,gt as u,l as d,tt as f,v as p,yt as m}from"../modules/shiki-CRDHBXw7.js";import{C as h,k as g,o as _}from"../modules/vue-jGGq3ahv.js";import{t as v}from"../index-BRVUm3_6.js";import{t as y}from"./NoteDisplay-C3x6Bkvc.js";var b=[`placeholder`],x=i({__name:`NoteEditable`,props:{no:{type:Number,required:!0},class:{default:``},editing:{default:!1},style:{default:()=>({})},placeholder:{default:`No notes for this slide`},clicksContext:{type:Object},highlight:{default:!0},autoHeight:{default:!1}},emits:[`update:editing`,`markerDblclick`,`markerClick`],setup(i,{emit:x}){let S=i,C=x,w=h(S,`editing`,C,{passive:!0}),{info:T,update:E}=v(u(S,`no`)),D=l(``),O,{ignoreUpdates:k}=g(D,e=>{if(!w.value)return;let t=S.no;clearTimeout(O),O=setTimeout(()=>{E({note:e},t)},500)});a(()=>T.value?.note,(e=``)=>{w.value||(clearTimeout(O),k(()=>{D.value=e}))},{immediate:!0,flush:`sync`});let A=l(),j=l();n(()=>{w.value&&A.value?.focus()}),_(A,()=>{w.value=!1});function M(){!S.autoHeight||!A.value||!w.value||A.value.scrollHeight>A.value.clientHeight&&(A.value.style.height=`${A.value.scrollHeight}px`)}function N(e){w.value&&e.metaKey&&e.key===`s`&&(e.preventDefault(),E({note:D.value},S.no))}return a([D,w],()=>{t(()=>{M()})},{flush:`post`,immediate:!0}),(t,n)=>m(w)?f((e(),o(`textarea`,{key:1,ref_key:`inputEl`,ref:A,"onUpdate:modelValue":n[2]||=e=>D.value=e,class:s([`prose dark:prose-invert resize-none overflow-auto outline-none bg-transparent block border-primary border-2 slidev-note placeholder:op25`,[S.class,D.value?``:`italic`]]),style:r([S.style,j.value==null?{}:{height:`${j.value}px`}]),placeholder:i.placeholder,onKeydown:[n[3]||=c(e=>w.value=!1,[`esc`]),N]},null,46,b)),[[d,D.value]]):(e(),p(y,{key:0,class:s([`border-transparent border-2`,[S.class,D.value?``:`opacity-25 italic select-none`]]),style:r(S.style),note:D.value||i.placeholder,"note-html":m(T)?.noteHTML,"clicks-context":i.clicksContext,"auto-scroll":!i.autoHeight,highlight:S.highlight,onMarkerClick:n[0]||=(e,t)=>C(`markerClick`,e,t),onMarkerDblclick:n[1]||=(e,t)=>C(`markerDblclick`,e,t)},null,8,[`class`,`style`,`note`,`note-html`,`clicks-context`,`auto-scroll`,`highlight`]))}});export{x as t};
lecture-02/assets/slidev/TimerBar-DXeFq3ot.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,C as t,H as n,St as r,T as i,a,b as o,bt as s,et as c,g as l,gt as u,lt as d,m as f,y as p,yt as m}from"../modules/shiki-CRDHBXw7.js";import{U as h,t as g,tt as _}from"../useNav-0H1CZeft.js";import{F as v}from"../modules/vue-jGGq3ahv.js";import{o as y}from"../index-BRVUm3_6.js";var b={class:`relative flex gap-px`},x=i({__name:`CurrentProgressBar`,props:{clicksContext:{},current:{}},setup(i){let u=i,d=g(),h=l(()=>u.clicksContext??d.clicksContext.value),_=l(()=>u.current??d.currentSlideNo.value),{total:v}=d;return(i,l)=>(e(),o(`div`,b,[(e(!0),o(f,null,n(m(v)-1,n=>(e(),o(`div`,{key:n,class:s([`border-x border-b border-main h-4px transition-all`,n<_.value?`bg-primary border-primary`:``]),style:r({width:`${1/(m(v)-1)*100}%`})},[t(a,{name:`fade`},{default:c(()=>[n===_.value?(e(),o(`div`,{key:0,class:`h-full bg-primary op75 transition-all`,style:r({width:`${h.value.total===0?0:h.value.current/(h.value.total+1)*100}%`})},null,4)):p(`v-if`,!0)]),_:2},1024)],6))),128))]))}});function S(){let e=l(()=>_.timer||`stopwatch`),t=l(()=>h(_.duration).seconds),n=v(100,{controls:!0}),r=u(y,`timer`),i=l(()=>r.value?.status),a=l(()=>(n.counter.value,r.value.status===`stopped`||!r.value.startedAt?0:r.value.status===`paused`?r.value.pausedAt-r.value.startedAt:Date.now()-r.value.startedAt)),o=l(()=>a.value/1e3),s=l(()=>o.value/t.value*100),c=l(()=>{if(e.value===`stopwatch`&&(r.value.status===`stopped`||!r.value.startedAt))return{h:``,m:`-`,s:`--`,ms:`-`};let n=e.value===`countdown`?t.value*1e3-a.value:a.value,i=Math.floor(n/1e3/60/60).toString();i===`0`&&(i=``);let o=Math.floor(n/1e3/60%60).toString();i&&(o=o.padStart(2,`0`));let s=Math.floor(n/1e3%60).toString().padStart(2,`0`),c=Math.floor(n%1e3/100).toString();return{h:i,m:o,s,ms:c}});function d(){n.pause(),r.value={status:`stopped`,slides:{},startedAt:0,pausedAt:0}}function f(){r.value&&(r.value?.status===`stopped`?(r.value.status=`running`,r.value.startedAt=Date.now()):r.value.status===`paused`&&(r.value.status=`running`,r.value.startedAt=Date.now()-(r.value.pausedAt-r.value.startedAt)),n.resume())}function p(){r.value.status=`paused`,r.value.pausedAt=Date.now(),n.pause()}function m(){r.value.status===`running`?p():f()}return{state:r,status:i,timer:c,reset:d,toggle:m,resume:f,pause:p,passed:o,percentage:s,duration:t,mode:e}}var C={class:`border-b mt-px border-main relative flex h-4px`},w=i({__name:`TimerBar`,setup(t){let n=d(S()),i=l(()=>n.status===`stopped`?`op50`:n.status===`paused`?`bg-blue`:n.percentage>100?`bg-red`:n.percentage>80?`bg-yellow`:`bg-green`);return(t,a)=>(e(),o(`div`,C,[n.status===`stopped`?p(`v-if`,!0):(e(),o(`div`,{key:0,class:s([`h-4px`,i.value]),style:r({width:`${n.percentage}%`})},null,6)),p(` {{ timesplits }} `)]))}});export{S as n,x as r,w as t};
lecture-02/assets/slidev/VClicks-buBFUjdS.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,C as t,G as n,O as r,R as i,T as a,j as o,m as s,p as c,tt as l,v as u,z as d}from"../modules/shiki-CRDHBXw7.js";import{K as f,it as p}from"../useNav-0H1CZeft.js";import{n as m}from"./context-Dpnqq1ol.js";import{u as h}from"../index-BRVUm3_6.js";var g=a({__name:`VClickGap`,props:{size:{type:[String,Number],default:1}},setup(t){let n=t,{$clicksContext:r}=m(),a=h(),o=+n.size;return Number.isNaN(o)&&(console.warn(`[slidev] Invalid size for VClickGap: ${n.size}`),o=1),i(()=>{let e=r.currentOffset+o-1;r.register(a,{max:e,delta:o})}),d(()=>{r.unregister(a)}),(t,n)=>(e(),u(s))}}),_=[`ul`,`ol`],v=/[\s,]+/,y=a({props:{depth:{type:[Number,String],default:1},every:{type:[Number,String],default:1},at:{type:[Number,String],default:`+1`},hide:{type:Boolean,default:!1},fade:{type:Boolean,default:!1},animation:{type:[String,Array],default:void 0},handleSpecialElements:{type:Boolean,default:!0}},render(){let e=+this.every,i=f(this.at),a=typeof i==`string`,s=this.$slots.default?.();if(i==null||!s)return s;let u=n(`click`),d=(e,t)=>{let n={hide:this.hide};return typeof this.animation==`string`?this.animation.split(v).forEach(e=>{e&&(n[e]=!0)}):Array.isArray(this.animation)&&this.animation.forEach(e=>n[e]=!0),this.fade&&(n.fade=!0),l(e,[[u,t,``,n]])},m=e=>e.flatMap(e=>o(e)&&typeof e.type==`symbol`&&Array.isArray(e.children)?m(e.children):[e]);s=m(p(s));let h=(e,t=1)=>m(e).map(e=>{if(!o(e))return e;if(_.includes(e.type)&&Array.isArray(e.children)){let n=x(e.children,t+1);return r(e,{},n)}return r(e)}),y=1,b=0,x=(t,n=1)=>m(t).map(t=>{if(!o(t)||t.type===c)return t;let s=+i+Math.ceil(y++/e)-1,l;l=n<+this.depth&&Array.isArray(t.children)?r(t,{},h(t.children,n)):r(t);let u=s-b;return b=s,d(l,a?u>=0?`+${u}`:`${u}`:s)}),S=()=>t(g,{size:+i+Math.ceil((y-1)/e)-1-b});if(this.handleSpecialElements){if(s.length===1&&_.includes(s[0].type)&&Array.isArray(s[0].children))return r(s[0],{},[...x(s[0].children),S()]);if(s.length===1&&s[0].type===`table`){let e=s[0];if(Array.isArray(e.children))return r(e,{},e.children.map(e=>o(e)?e.type===`tbody`&&Array.isArray(e.children)?r(e,{},[...x(e.children),S()]):r(e):e))}}return[...x(s),S()]}});export{y as t};
lecture-02/assets/slidev/notes-CnMlvFmG.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,C as t,Ct as n,S as r,St as i,T as a,Z as o,_ as s,b as c,dt as l,et as u,g as d,m as f,yt as p}from"../modules/shiki-CRDHBXw7.js";import{$ as m,W as h,t as g,u as _}from"../useNav-0H1CZeft.js";import{g as v}from"../modules/vue-jGGq3ahv.js";import{h as y,o as b}from"../index-BRVUm3_6.js";import{t as x}from"./IconButton-BiAlWjlk.js";import{t as S}from"./Modal-DRjfPn8c.js";import{n as C,t as w}from"./NoteDisplay-C3x6Bkvc.js";import{r as T,t as E}from"./TimerBar-DXeFq3ot.js";var D={class:`flex my-1`},O={class:`h-full flex flex-col`},k={class:`flex-none border-t border-main`,px3:``,py2:``},A={class:`flex-none border-t border-main`},j={class:`flex gap-1 items-center px-6 py-3`},M={key:0,class:`i-carbon:minimize`},N={key:1,class:`i-carbon:maximize`},P={class:`px2 my-auto`},F={class:`text-lg`},I={class:`opacity-50 text-sm`},L=a({__name:`notes`,setup(a){y({title:`Notes - ${m}`});let{slides:L,total:R}=g(),{isFullscreen:z,toggle:B}=_,V=l(),H=v(`slidev-notes-font-size`,18),U=d(()=>b.page),W=l(!1),G=d(()=>L.value.find(e=>e.no===U.value));o(U,()=>{V.value?.scrollTo({left:0,top:0,behavior:`smooth`}),window.scrollTo({left:0,top:0,behavior:`smooth`})});function K(){H.value+=1}function q(){--H.value}let J=d(()=>{let e=b.clicks,t=b.clicksTotal;return h(l(e),void 0,t)});return(a,o)=>(e(),c(f,null,[t(S,{modelValue:W.value,"onUpdate:modelValue":o[1]||=e=>W.value=e,class:`px-6 py-4 flex flex-col gap-2`},{default:u(()=>[o[3]||=s(`div`,{class:`flex gap-2 text-xl`},[s(`div`,{class:`i-carbon:information my-auto`}),r(` Help `)],-1),o[4]||=s(`div`,{class:`prose dark:prose-invert`},[s(`p`,null,`This is the hands-free live notes viewer.`),s(`p`,null,`It's designed to be used in a separate view or device. The progress is controlled by and auto synced with the main presenter or slide.`)],-1),s(`div`,D,[s(`button`,{class:`slidev-form-button`,onClick:o[0]||=e=>W.value=!1},` Close `)])]),_:1},8,[`modelValue`]),s(`div`,O,[t(T,{"clicks-context":J.value,current:U.value},null,8,[`clicks-context`,`current`]),t(E),s(`div`,{ref_key:`scroller`,ref:V,class:`px-5 py-3 flex-auto h-full overflow-auto`,style:i({fontSize:`${p(H)}px`})},[t(w,{note:G.value?.meta.slide.note,"note-html":G.value?.meta.slide.noteHTML,placeholder:`No notes for Slide ${U.value}.`,"clicks-context":J.value,"auto-scroll":!0},null,8,[`note`,`note-html`,`placeholder`,`clicks-context`])],4),s(`div`,k,[t(C,{"clicks-context":J.value,readonly:``},null,8,[`clicks-context`])]),s(`div`,A,[s(`div`,j,[t(x,{title:p(z)?`Close fullscreen`:`Enter fullscreen`,onClick:p(B)},{default:u(()=>[p(z)?(e(),c(`div`,M)):(e(),c(`div`,N))]),_:1},8,[`title`,`onClick`]),t(x,{title:`Increase font size`,onClick:K},{default:u(()=>[...o[5]||=[s(`div`,{class:`i-carbon:zoom-in`},null,-1)]]),_:1}),t(x,{title:`Decrease font size`,onClick:q},{default:u(()=>[...o[6]||=[s(`div`,{class:`i-carbon:zoom-out`},null,-1)]]),_:1}),t(x,{title:`Edit notes`,to:`/notes-edit`,target:`_blank`},{default:u(()=>[...o[7]||=[s(`div`,{class:`i-carbon:edit`},null,-1)]]),_:1}),t(x,{title:`Help`,class:`rounded-full`,onClick:o[2]||=e=>W.value=!0},{default:u(()=>[...o[8]||=[s(`div`,{class:`i-carbon:help`},null,-1)]]),_:1}),o[9]||=s(`div`,{class:`flex-auto`},null,-1),s(`div`,P,[s(`span`,F,n(U.value),1),s(`span`,I,` / `+n(p(R)),1)])])])])],64))}});export{L as default};
lecture-02/assets/slidev/notes-edit-BkT-GYNi.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ import{B as e,C as t,S as n,T as r,_ as i,b as a,dt as o,et as s,l as c,m as l,tt as u}from"../modules/shiki-CRDHBXw7.js";import{$ as d,t as f}from"../useNav-0H1CZeft.js";import{O as p}from"../modules/vue-jGGq3ahv.js";import{h as m,t as h}from"../index-BRVUm3_6.js";import{t as g}from"./IconButton-BiAlWjlk.js";import{t as _}from"./Modal-DRjfPn8c.js";var v={class:`flex my-1`},y={class:`h-full`},b={class:`slidev-glass-effect fixed bottom-5 right-5 rounded-full border border-main`},x=r({__name:`notes-edit`,setup(r){let x=/^---\s*#(\d+)\s*$/;m({title:`Notes Edit - ${d}`});let{slides:S}=f(),C=o(!1),w=o(T(S.value));function T(e){let t=[];for(let n of e)n.meta.slide.note?.trim()&&(t.push(`--- #${n.no}`),t.push(``),t.push(n.meta.slide.note),t.push(``));return t.join(`
2
+ `)}function E(e,t){let n=e.split(/^(---\s*#\d+\s*)$/gm);n.forEach((e,r)=>{let i=e.match(x);if(i){let e=Number.parseInt(i[1]),a=n[r+1].trim(),o=t.find(t=>t.no===e);o&&(o.meta.slide.note=a,h(e).update({note:a}))}})}return p(w,e=>{E(e,S.value)},{debounce:300}),(r,o)=>(e(),a(l,null,[t(_,{modelValue:C.value,"onUpdate:modelValue":o[1]||=e=>C.value=e,class:`px-6 py-4 flex flex-col gap-2`},{default:s(()=>[o[4]||=i(`div`,{class:`flex gap-2 text-xl`},[i(`div`,{class:`i-carbon:information my-auto`}),n(` Help `)],-1),o[5]||=i(`div`,{class:`prose dark:prose-invert`},[i(`p`,null,`This is the batch notes editor. You can edit the notes for all the slides at once here.`),i(`p`,null,[n(`The note for each slide are separated by `),i(`code`,null,`--- #[no]`),n(` lines, you might want to keep them while editing.`)])],-1),i(`div`,v,[i(`button`,{class:`slidev-form-button`,onClick:o[0]||=e=>C.value=!1},` Close `)])]),_:1},8,[`modelValue`]),i(`div`,y,[i(`div`,b,[t(g,{title:`Help`,class:`rounded-full`,onClick:o[2]||=e=>C.value=!0},{default:s(()=>[...o[6]||=[i(`div`,{class:`i-carbon:help text-2xl`},null,-1)]]),_:1})]),u(i(`textarea`,{"onUpdate:modelValue":o[3]||=e=>w.value=e,class:`prose dark:prose-invert resize-none p5 outline-none bg-transparent block h-full w-full! max-w-full! max-h-full! min-h-full! min-w-full!`},null,512),[[c,w.value]])])],64))}});export{x as default};
lecture-02/assets/slidev/overview-v0VPTUGO.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,C as t,Ct as n,H as r,P as i,R as a,St as o,T as s,_ as c,b as l,bt as u,dt as d,et as f,g as p,lt as m,m as h,mt as ee,v as g,y as _,yt as v,z as te}from"../modules/shiki-CRDHBXw7.js";import{$ as ne,B as y,G as re,R as b,X as ie,Y as x,t as ae}from"../useNav-0H1CZeft.js";import{t as S}from"../_plugin-vue_export-helper-BDNMzG2s.js";import{B as oe,V as se}from"../modules/vue-jGGq3ahv.js";import{l as C}from"./context-Dpnqq1ol.js";import{f as ce,h as le,m as ue,p as w}from"../index-BRVUm3_6.js";import{n as de,r as fe}from"../modules/unplugin-icons-BOSF4mXp.js";import{t as T}from"./IconButton-BiAlWjlk.js";import{n as E}from"./NoteDisplay-C3x6Bkvc.js";import{i as pe,o as me,t as he}from"../SlideWrapper-C34Y14yR.js";import{t as ge}from"./NoteEditable-Bn2MFV6B.js";var _e={class:`h-screen w-screen of-hidden flex`},ve={key:0,class:`grid grid-rows-[auto_max-content] border-r border-main select-none max-h-full h-full`},ye={class:`relative`},be={class:`absolute left-0 top-0 bottom-0 w-200 flex flex-col flex-auto items-end group p-6px md:p-10px gap-1 max-h-full of-x-visible of-y-auto`,style:{direction:`rtl`}},xe=[`onClick`],Se={p2:``,border:`t main`},Ce={class:`flex flex-col gap-1 mx-1 items-end`},we={key:0,class:`flex items-end gap-2`},Te=[`onClick`],Ee=[`onDblclick`],De={key:2,class:`select-none absolute bottom-0 right-0 bg-main rounded-tl p2 op35 text-xs`},Oe={key:1,class:`absolute z-2 top-0 right-0 px3 py1.5 border-b border-l rounded-lb bg-main/80 backdrop-blur border-main select-none`},ke={class:`text-xs op50`},D=450,O=S(s({__name:`overview`,setup(s){le({title:`Overview - ${ne}`});let S=oe(),O=se(),{openInEditor:Ae,slides:k,isEmbedded:A}=ae(),j=p(()=>S.query.mode===`preview`),M=p(()=>j.value&&A.value),N=p(()=>j.value?M.value?Math.max(0,b.width.value-16):Math.min(900,Math.max(320,b.width.value-160)):D),je=p(()=>N.value/ie.value),P=m(new Map),F=m(new Map),I=d([]),L=d(),R=d(null),z=0,B,V,H=p(()=>k.value.map(e=>Fe(e.meta?.slide?.note||``))),Me=p(()=>H.value.reduce((e,t)=>e+t,0)),Ne=p(()=>k.value.map(e=>K(e)).reduce((e,t)=>e+t,0)),Pe=p(()=>String(Math.max(1,k.value.length)).length),U=ee(),W=new WeakMap;function G(e){return W.has(e)||W.set(e,re(e,C)),W.get(e)}function K(e){return e.meta?.clicks||G(e)?.total}function q(e){U.value===e?U.value=void 0:U.value=e}function Fe(e){let t=e.match(/[\w`'\-\u0392-\u03C9\u00C0-\u00FF\u0600-\u06FF\u0400-\u04FF]+|[\u4E00-\u9FFF\u3400-\u4DBF\uF900-\uFAFF\u3040-\u309F\uAC00-\uD7AF]+/g),n=0;if(!t)return 0;for(let e=0;e<t.length;e++)t[e].charCodeAt(0)>=19968?n+=t[e].length:n+=1;return n}function J(){let e=window.innerHeight||document.documentElement.clientHeight,t,n=[];for(let[r,i]of P.entries()){let a=i.getBoundingClientRect(),o=Math.max(0,Math.min(a.bottom,e)-Math.max(a.top,0));o!==0&&(o>=a.height&&n.push(r),(!t||o>t.visibleHeight)&&(t={idx:r,visibleHeight:o}))}I.value=n.length?n:t?[t.idx]:[]}function Y(e){let t=document.createElement(`a`);t.target=`_blank`,t.href=x+e.slice(1),t.click()}function Ie(e){let t=new URL(x+e.slice(1),location.href).href;if(A.value){window.parent.postMessage({target:`slidev`,sender:`slidev`,type:`open-external`,url:t},`*`);return}Y(e)}function Le(e){let t=P.get(e);t&&t.scrollIntoView({behavior:`smooth`,block:`start`})}function X(e){let t=F.get(e)||P.get(e);if(!t||!L.value)return null;let n=L.value.getBoundingClientRect();return t.getBoundingClientRect().top-n.top+L.value.scrollTop}function Z(e){if(!L.value||k.value.length===0)return;let t=Math.min(Math.max(e,1),k.value.length),n=Math.floor(t)-1,r=t-(n+1),i=X(n),a=X(n+1);if(i==null)return;let o=i+(a==null?0:(a-i)*r)-L.value.clientHeight*.5;Math.abs(L.value.scrollTop-o)<1||L.value.scrollTo({top:o})}function Re(){let e=S.query.slideNo,t=Number(Array.isArray(e)?e[0]:e);return Number.isFinite(t)&&t>0?t:void 0}function Q(e){if(!M.value)return;let t=Number(e.toFixed(3)).toString();S.query.slideNo!==t&&O.replace({query:{...S.query,slideNo:t}})}function ze(){if(!L.value||k.value.length===0)return null;let e=L.value.scrollTop+L.value.clientHeight*.5,t=k.value.map((e,t)=>X(t)).filter(e=>e!=null);if(t.length===0)return null;if(t.length===1||e<=t[0])return 1;for(let n=1;n<t.length;n++)if(e<=t[n]){let r=Math.max(1,t[n]-t[n-1]);return n+(e-t[n-1])/r}return k.value.length}function Be(e){B=e,!V&&(V=setTimeout(()=>{V=void 0;let e=B;B=void 0,e!=null&&(Q(e),!(Date.now()<z)&&window.parent.postMessage({target:`slidev`,sender:`slidev`,type:`overview-scroll`,no:e},`*`))},50))}function Ve(){if(J(),!M.value||Date.now()<z)return;let e=ze();e!=null&&Be(e)}function $({data:e}){if(!M.value||e?.target!==`slidev`||e.sender!==`vscode`||e.type!==`overview-scroll`)return;let t=Number(e.no);t>0&&(z=Date.now()+300,B=void 0,Q(t),Z(t))}function He(e,t,n){let r=G(n);r.current=r.current===t?C:t,e.preventDefault()}function Ue(e,t){if(e.ctrlKey||e.metaKey){e.preventDefault(),Ie(y(t,!1));return}let n=t.meta?.slide;n&&window.parent.postMessage({target:`slidev`,type:`command`,command:`goto`,args:[n.filepath,n.sourceIndex]},`*`)}return a(()=>{window.addEventListener(`message`,$);let e=M.value?Re():void 0;e!=null&&(z=Date.now()+300,Z(e)),i(()=>{e!=null&&Z(e),J()})}),te(()=>{window.removeEventListener(`message`,$),V&&clearTimeout(V)}),(i,a)=>{let s=de,d=fe;return e(),l(`div`,_e,[v(A)?_(`v-if`,!0):(e(),l(`nav`,ve,[c(`div`,ye,[c(`div`,be,[(e(!0),l(h,null,r(v(k),(t,r)=>(e(),l(`div`,{key:t.no,class:`relative`,style:{direction:`ltr`}},[c(`button`,{class:u([`relative transition duration-300 w-8 h-8 rounded hover:bg-active hover:op100`,I.value.includes(r)?`op100 text-primary bg-gray:5`:`op20`]),onClick:e=>Le(r)},[c(`div`,null,n(r+1),1)],10,xe),t.meta?.slide?.title?(e(),l(`div`,{key:0,class:u([`pointer-events-none select-none absolute left-110% top-50% translate-y--50% ws-nowrap z-label px2 slidev-glass-effect transition duration-400 op0 group-hover:op100`,I.value.includes(r)?`text-primary`:`text-main important-text-op-50`])},n(t.meta?.slide?.title),3)):_(`v-if`,!0)]))),128))])]),c(`div`,Se,[v(ce)?(e(),g(T,{key:1,title:v(w)?`Dark mode`:`Light mode`,"pointer-events-none":``,op50:``},{default:f(()=>[v(w)?(e(),g(s,{key:0})):(e(),g(d,{key:1}))]),_:1},8,[`title`])):(e(),g(T,{key:0,title:v(w)?`Switch to light mode theme`:`Switch to dark mode theme`,onClick:a[0]||=e=>v(ue)()},{default:f(()=>[v(w)?(e(),g(s,{key:0})):(e(),g(d,{key:1}))]),_:1},8,[`title`]))])])),c(`main`,{ref_key:`scroller`,ref:L,class:`flex-1 h-full of-auto`,style:o(`grid-template-columns: repeat(auto-fit,minmax(${D}px,1fr))`),onScroll:Ve},[(e(!0),l(h,null,r(v(k),(r,i)=>(e(),l(`div`,{key:r.no,ref_for:!0,ref:e=>P.set(i,e),class:u([`overview-slide-block relative of-hidden flex gap-4 min-h-50`,[i===0&&!M.value?`pt2`:``,M.value?`justify-center`:`border-t border-main`]])},[M.value?_(`v-if`,!0):(e(),l(`div`,{key:0,class:u([`select-none text-right my5 flex flex-col justify-between items-end`,j.value?`w-9`:`w-13`]),style:o({height:`${je.value}px`})},[c(`div`,{class:`self-center text-3xl op20 mb2 text-center mr--14px tabular-nums`,style:o({width:`${Pe.value}ch`})},n(i+1),5),c(`div`,Ce,[t(T,{class:u([`overview-slide-action mr--4 op0`,j.value?`text-lg`:``]),title:`Play in new tab`,onClick:e=>Y(v(y)(r,!1))},{default:f(()=>[...a[4]||=[c(`div`,{class:`i-carbon:presentation-file`},null,-1)]]),_:1},8,[`class`,`onClick`]),_(`v-if`,!0)])],6)),c(`div`,{class:u([`flex flex-col`,M.value?`my1 gap-0`:`my5 gap-2`]),style:o({width:`${N.value}px`})},[M.value?(e(),l(`div`,we,[c(`button`,{type:`button`,class:`select-none pl-1 text-lg leading-tight op60 tabular-nums hover:op90 hover:underline underline-offset-2`,onClick:e=>Ue(e,r)},n(i+1),9,Te),K(r)?(e(),g(E,{key:0,active:U.value===r,"clicks-context":G(r),resettable:``,compact:``,attached:``,class:`ml-auto w-88 min-w-[70%] max-w-[calc(100%-3rem)]`,onDblclick:e=>q(r),onActivate:e=>U.value=r,onReset:a[1]||=e=>U.value=void 0},null,8,[`active`,`clicks-context`,`onDblclick`,`onActivate`])):_(`v-if`,!0)])):_(`v-if`,!0),c(`div`,{ref_for:!0,ref:e=>F.set(i,e),class:u([`border rounded border-main overflow-hidden bg-main h-max`,[M.value&&K(r)?`rounded-tr-0`:``,M.value?``:`select-none`]]),onDblclick:e=>!M.value&&Y(v(y)(r,!1))},[(e(),g(pe,{key:r.no,width:N.value,class:u(M.value?``:`pointer-events-none important:[&_*]:select-none`)},{default:f(()=>[t(he,{"clicks-context":G(r),route:r,"render-context":`overview`},null,8,[`clicks-context`,`route`]),t(me,{page:r.no},null,8,[`page`])]),_:2},1032,[`width`,`class`]))],42,Ee),K(r)&&!M.value?(e(),g(E,{key:1,active:U.value===r,"clicks-context":G(r),resettable:``,class:u([`ml-1 w-[calc(100%-0.25rem)]`,j.value?``:`mt-2`]),onDblclick:e=>q(r),onActivate:e=>U.value=r,onReset:a[2]||=e=>U.value=void 0},null,8,[`active`,`clicks-context`,`class`,`onDblclick`,`onActivate`])):_(`v-if`,!0)],6),j.value?_(`v-if`,!0):(e(),g(ge,{key:1,no:r.no,class:`relative z-1 max-w-250 w-250 text-lg rounded p3`,"auto-height":!0,highlight:U.value===r,editing:R.value===r.no,"clicks-context":G(r),onDblclick:e=>R.value===r.no?null:R.value=r.no,"onUpdate:editing":a[3]||=e=>R.value=null,onMarkerClick:(e,t)=>He(e,t,r)},null,8,[`no`,`highlight`,`editing`,`clicks-context`,`onDblclick`,`onMarkerClick`])),!j.value&&H.value[i]>0?(e(),l(`div`,De,n(H.value[i])+` words `,1)):_(`v-if`,!0)],2))),128))],36),v(A)?_(`v-if`,!0):(e(),l(`div`,Oe,[c(`div`,ke,n(v(k).length)+` slides · `+n(Ne.value+v(k).length-1)+` clicks · `+n(Me.value)+` words `,1)]))])}}}),[[`__scopeId`,`data-v-47f32601`]]);export{O as default};
lecture-02/assets/slidev/play-Mg5_I3MA.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DrawingControls-1u13NB8P.js","../rolldown-runtime-hePW80VL.js","../modules/shiki-CRDHBXw7.js","../modules/shiki-BrmBd2_v.css","../modules/vue-jGGq3ahv.js","../useDrawings-B5C1Zlkn.js","../useNav-0H1CZeft.js","../_plugin-vue_export-helper-BDNMzG2s.js","./context-Dpnqq1ol.js","../index-BRVUm3_6.js","../syncState-BY3YUPaY.js","../index-Bc3H5Jm0.css","./IconButton-BiAlWjlk.js","./VerticalDivider-BuDt2kNg.js","../DrawingControls-Dhbx0szf.css"])))=>i.map(i=>d[i]);
2
+ import{B as e,C as t,S as n,St as r,T as i,Z as a,_ as o,b as s,bt as c,ct as l,dt as u,et as d,g as f,m as p,mt as m,ot as h,v as g,y as _,yt as v}from"../modules/shiki-CRDHBXw7.js";import{E as y,F as b,I as x,f as S,h as C,k as w,q as T,t as E,tt as D,v as O,w as k}from"../useNav-0H1CZeft.js";import{C as A,m as j}from"../modules/vue-jGGq3ahv.js";import{o as M}from"../index-BRVUm3_6.js";import{t as N}from"../useDrawings-B5C1Zlkn.js";import{t as P}from"../modules/unplugin-icons-BOSF4mXp.js";import{t as F}from"./Modal-DRjfPn8c.js";import{i as I}from"../SlideWrapper-C34Y14yR.js";import{a as L,c as R,d as z,f as B,l as V,n as H,r as U,s as W,t as G,u as K}from"./shortcuts-ByMJT9fF.js";var q=2e3;function J(e){let t=f(()=>e.value&&S.value);function n(){document.body.style.cursor=`none`}function r(){document.body.style.cursor=``}let i=null;a(t,e=>{e||(r(),i&&clearTimeout(i),i=null)}),l(()=>{r(),i&&clearTimeout(i),i=null}),j(document.body,[`pointermove`,`pointerdown`],()=>{r(),i&&clearTimeout(i),i=t.value?setTimeout(n,q):null},{passive:!0})}``+new URL(`../logo-BYkHSa_O.png`,import.meta.url).href;var Y={class:`slidev-info-dialog slidev-layout flex flex-col gap-4 text-base`},X=[`innerHTML`],Z=i({__name:`InfoDialog`,props:{modelValue:{default:!1}},emits:[`update:modelValue`],setup(t,{emit:r}){let i=A(t,`modelValue`,r),a=f(()=>typeof D.info==`string`);return(t,r)=>(e(),g(F,{modelValue:v(i),"onUpdate:modelValue":r[0]||=e=>h(i)?i.value=e:null,class:`px-6 py-4`},{default:d(()=>[o(`div`,Y,[a.value?(e(),s(`div`,{key:0,class:`mb-4`,innerHTML:v(D).info},null,8,X)):_(`v-if`,!0),r[1]||=o(`a`,{href:`https://github.com/slidevjs/slidev`,target:`_blank`,class:`!opacity-100 !border-none !text-current`},[o(`div`,{class:`flex gap-1 children:my-auto`},[o(`div`,{class:`opacity-50 text-sm mr-2`},`Powered by`),o(`img`,{class:`w-5 h-5`,src:``+new URL(`../logo-BYkHSa_O.png`,import.meta.url).href,alt:`Slidev logo`}),o(`div`,{style:{color:`#2082A6`}},[o(`b`,null,`Sli`),n(`dev `)])])],-1)])]),_:1},8,[`modelValue`]))}}),Q=i({__name:`Controls`,setup(n){let{isEmbedded:r}=E(),i=!D.drawings.presenterOnly&&!r.value,a=m();i&&T(()=>import(`./DrawingControls-1u13NB8P.js`).then(e=>e.n).then(e=>a.value=e.default),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]),import.meta.url);let o=m(),c=m();return(n,r)=>(e(),s(p,null,[a.value?(e(),g(v(a),{key:0})):_(`v-if`,!0),t(W),t(R),o.value?(e(),g(v(o),{key:1})):_(`v-if`,!0),c.value?(e(),g(v(c),{key:2,modelValue:v(w),"onUpdate:modelValue":r[0]||=e=>h(w)?w.value=e:null},null,8,[`modelValue`])):_(`v-if`,!0),v(D).info?(e(),g(Z,{key:3,modelValue:v(y),"onUpdate:modelValue":r[1]||=e=>h(y)?y.value=e:null},null,8,[`modelValue`])):_(`v-if`,!0),t(V)],64))}}),$={key:0,class:`absolute top-0 left-0 right-0 bottom-0 pointer-events-none text-xl`},ee=i({__name:`PresenterMouse`,setup(n){return(n,i)=>{let a=P;return v(M).cursor?.style===`cursor`?(e(),s(`div`,$,[t(a,{class:`absolute stroke-white dark:stroke-black`,style:r({left:`${v(M).cursor.x}%`,top:`${v(M).cursor.y}%`,strokeWidth:16})},null,8,[`style`])])):_(`v-if`,!0)}}}),te=i({__name:`play`,setup(n){let{next:r,prev:i,isPrintMode:a,isPlaying:l,isEmbedded:h}=E(),{isDrawing:y}=N(),S=u();function w(e){k.value||e.button===0&&e.target?.id===`slide-container`&&(e.pageX/window.innerWidth>.5?r():i())}B(S),G(),z(),J(f(()=>l.value&&!h.value&&!k.value));let T=f(()=>O.value||k.value),D=m(),A=f(()=>{let e=``;return b.value.brightness!==x.brightness&&(e+=`brightness(${b.value.brightness}) `),b.value.contrast!==x.contrast&&(e+=`contrast(${b.value.contrast}) `),b.value.sepia!==x.sepia&&(e+=`sepia(${b.value.sepia}) `),b.value.hueRotate!==x.hueRotate&&(e+=`hue-rotate(${b.value.hueRotate}deg) `),b.value.invert&&(e+=`invert(1) `),{filter:e}});return(n,r)=>(e(),s(p,null,[o(`div`,{id:`page-root`,ref_key:`root`,ref:S,class:c([`grid`,v(C)?`grid-rows-[1fr_max-content]`:`grid-cols-[1fr_max-content]`])},[t(I,{style:{background:`var(--slidev-slide-container-background, black)`},"is-main":``,"content-style":A.value,onPointerdown:w,onContextmenu:v(K)},{default:d(()=>[t(H,{"render-context":`slide`}),t(ee),t(L)]),controls:d(()=>[v(a)?_(`v-if`,!0):(e(),s(`div`,{key:0,class:c([`absolute bottom-0 left-0 transition duration-300 opacity-0 hover:opacity-100 focus-within:opacity-100 focus-visible:opacity-100`,[T.value?`!opacity-100 right-0`:`opacity-0 p-2`,v(y)?`pointer-events-none`:``]])},[t(U,{persist:T.value},null,8,[`persist`])],2))]),_:1},8,[`content-style`,`onContextmenu`]),D.value&&v(k)?(e(),g(v(D),{key:0,resize:!0})):_(`v-if`,!0)],2),v(a)?_(`v-if`,!0):(e(),g(Q,{key:0})),r[0]||=o(`div`,{id:`twoslash-container`},null,-1)],64))}});export{te as default};
lecture-02/assets/slidev/presenter-DVUYqPtJ.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{B as e,C as t,Ct as n,Q as r,R as i,S as a,St as o,T as s,X as c,Z as l,_ as u,b as d,bt as f,dt as p,et as m,g as h,m as ee,mt as g,ot as te,tt as _,u as v,v as y,y as b,yt as x}from"../modules/shiki-CRDHBXw7.js";import{$ as ne,O as re,W as ie,a as ae,b as S,m as oe,o as se,t as ce,w as le,x as ue}from"../useNav-0H1CZeft.js";import{t as C}from"../_plugin-vue_export-helper-BDNMzG2s.js";import{T as w,g as T,m as E,v as D}from"../modules/vue-jGGq3ahv.js";import{h as de,n as O,o as k}from"../index-BRVUm3_6.js";import{t as fe}from"../useDrawings-B5C1Zlkn.js";import{t as pe}from"./DrawingControls-1u13NB8P.js";import{t as A}from"./IconButton-BiAlWjlk.js";import{n as me,t as j}from"./NoteDisplay-C3x6Bkvc.js";import{n as M,r as he,t as ge}from"./TimerBar-DXeFq3ot.js";import{i as N,t as _e}from"../SlideWrapper-C34Y14yR.js";import"./NoteEditable-Bn2MFV6B.js";import{a as ve,c as ye,d as be,f as xe,i as Se,l as Ce,n as we,o as Te,r as Ee,s as De,t as Oe,u as ke}from"./shortcuts-ByMJT9fF.js";var Ae=s({__name:`NoteStatic`,props:{no:{},class:{},clicksContext:{}},setup(t){let n=t,{info:r}=O(n.no);return(i,a)=>(e(),y(j,{class:f(n.class),note:x(r)?.note,"note-html":x(r)?.noteHTML,"clicks-context":t.clicksContext},null,8,[`class`,`note`,`note-html`,`clicks-context`]))}}),P={"h-full":``,"w-full":``},je={key:0,"w-full":``,"h-full":``,flex:`~ col gap-4 items-center justify-center`},Me=s({__name:`ScreenCaptureMirror`,setup(t){let n=c(`video`),r=g(null),i=g(!1);async function o(){r.value=await navigator.mediaDevices.getDisplayMedia({video:{cursor:`always`},audio:!1,selfBrowserSurface:`include`,preferCurrentTab:!1}),n.value.srcObject=r.value,n.value.play(),i.value=!0,r.value.addEventListener(`inactive`,()=>{n.value.srcObject=null,i.value=!1}),r.value.addEventListener(`ended`,()=>{n.value.srcObject=null,i.value=!1})}return(t,r)=>(e(),d(`div`,P,[_(u(`video`,{ref_key:`video`,ref:n,class:`w-full h-full object-contain`},null,512),[[v,i.value]]),i.value?b(`v-if`,!0):(e(),d(`div`,je,[r[0]||=u(`div`,{op50:``},[a(` Use screen capturing to mirror your main screen back to presenter view.`),u(`br`),a(` Click the button below and `),u(`b`,null,`select your other monitor or window`),a(`. `)],-1),u(`button`,{class:`slidev-form-button`,onClick:o},` Start Screen Mirroring `)]))]))}}),Ne={class:`w-22px cursor-pointer`},Pe={class:`group-not-hover:hidden flex flex-col items-center`},Fe={key:0,class:`i-carbon:pause text-lg`},Ie={key:1,class:`i-carbon:play`},Le={class:`text-3xl px-3 my-auto font-mono`},Re=s({__name:`TimerInlined`,setup(t){let{status:r,percentage:i,mode:a,timer:o,reset:s,toggle:c}=M(),l=h(()=>r.value===`stopped`?`op50`:r.value===`paused`?`text-blue6 dark:text-blue3`:i.value>100?`text-red6 dark:text-red3`:i.value>80?`text-yellow6 dark:text-yellow3`:`text-green6 dark:text-green3`);return(t,i)=>(e(),d(`div`,{class:f([`group flex items-center justify-center pl-4 select-none`,l.value])},[u(`div`,Ne,[u(`div`,{class:f([`group-hover:hidden text-2xl`,x(a)===`countdown`?`i-carbon:timer`:`i-carbon:time`])},null,2),u(`div`,Pe,[u(`div`,{class:`relative op-80 hover:op-100`,onClick:i[0]||=(...e)=>x(c)&&x(c)(...e)},[x(r)===`running`?(e(),d(`div`,Fe)):(e(),d(`div`,Ie))]),u(`div`,{class:`op-80 hover:op-100`,onClick:i[1]||=(...e)=>x(s)&&x(s)(...e)},[...i[2]||=[u(`div`,{class:`i-carbon:renew`},null,-1)]])])]),u(`div`,Le,[x(o).h?(e(),d(ee,{key:0},[u(`span`,null,n(x(o).h),1),i[3]||=u(`span`,{op50:``},`:`,-1)],64)):b(`v-if`,!0),u(`span`,null,n(x(o).m),1),i[4]||=u(`span`,{op50:``},`:`,-1),u(`span`,null,n(x(o).s),1)])],2))}}),ze={class:`bg-main h-full slidev-presenter grid grid-rows-[max-content_1fr] of-hidden`},Be={flex:`~ gap-4 items-center`,border:`b main`,p1:``},Ve={class:`relative grid-section next flex flex-col p-2 lg:p-4`},He={key:2,class:`h-full flex justify-center items-center`},Ue={key:3,class:`h-full grid grid-rows-[1fr_min-content]`},F=C(s({__name:`presenter`,setup(n){let a=w(),s=p(),c=p(),C=p(),O=p();Oe(),xe(s),be();let{clicksContext:j,currentSlideNo:M,currentSlideRoute:P,hasNext:je,nextRoute:Ne,slides:Pe,getPrimaryClicks:Fe}=ce(),{isDrawing:Ie}=fe();de({title:`Presenter - ${ne}`}),p(!1);let Le=h(()=>Pe.value.map(e=>{let t=p(0);return{context:ie(t,e?.meta.slide?.frontmatter.clicksStart??0,e?.meta.clicks),clicks:t}})),F=h(()=>j.value.current<j.value.total?[P.value,j.value.current+1]:je.value?[Ne.value,0]:null),I=h(()=>F.value&&Le.value[F.value[0].no-1]);l(F,()=>{I.value&&F.value&&(I.value.clicks.value=F.value[1])},{immediate:!0});let L=T(`slidev-presenter-main-slide-mode`,`slides`),R=T(`slidev-presenter-notes-width`,360),z=T(`slidev-presenter-notes-row-size`,280),B=p(0),V=p(!1),H=p(!1),U=p(0),W=p(360),We=p(0),G=p(280),K={minNotesWidth:240,maxNotesWidth:720,minNotesRowSize:160,maxNotesWidthRatio:.7,maxNotesRowHeightRatio:.75},Ge=D(`(min-aspect-ratio: 1/1)`),q=D(`(max-aspect-ratio: 3/5)`),J=h(()=>S.value===1&&Ge.value),Y=h(()=>!(S.value===1&&q.value)),X=h(()=>S.value===1&&!q.value||S.value===2||S.value===3),Z=h(()=>S.value===1&&!q.value);function Ke(e){return Number.isFinite(e)?Math.max(K.minNotesWidth,Math.min(K.maxNotesWidth,Math.round(e))):K.minNotesWidth}function qe(e){let t=c.value;if(!t)return;let n=t.getBoundingClientRect(),r=e-U.value,i=Ke(J.value?W.value-r:W.value+r),a=Math.round(n.width*K.maxNotesWidthRatio);R.value=Math.min(i,Math.max(K.minNotesWidth,a))}function Q(e){Y.value&&e.button===0&&(e.preventDefault(),U.value=e.clientX,W.value=R.value,V.value=!0)}function $(e){return Number.isFinite(e)?Math.max(K.minNotesRowSize,Math.round(e)):K.minNotesRowSize}function Je(e){let t=c.value;if(!t)return;let n=t.getBoundingClientRect(),r=e-We.value,i=Z.value?G.value-r:G.value+r,a=Math.round(n.height*K.maxNotesRowHeightRatio);z.value=Math.min($(i),Math.max(K.minNotesRowSize,a))}function Ye(e){if(!X.value||e.button!==0)return;e.preventDefault();let t=S.value===2?s.value?.getBoundingClientRect().height:C.value?.getBoundingClientRect().height;We.value=e.clientY,G.value=$(t??z.value),H.value=!0}function Xe(){let e=O.value;e&&(B.value=Math.round(e.getBoundingClientRect().height))}function Ze(){V.value=!1,H.value=!1}function Qe(){Xe(),$e()}E(window,`pointermove`,e=>{V.value&&qe(e.clientX),H.value&&Je(e.clientY)}),E(window,`pointerup`,Ze),E(window,`pointercancel`,Ze),i(()=>{Qe()}),E(window,`resize`,()=>{Qe()});function $e(){R.value=Ke(R.value),z.value=$(z.value);let e=c.value;if(!e)return;let t=e.getBoundingClientRect(),n=Math.round(t.width*K.maxNotesWidthRatio),r=Math.round(t.height*K.maxNotesRowHeightRatio);R.value=Math.min(R.value,Math.max(K.minNotesWidth,n)),z.value=Math.min(z.value,Math.max(K.minNotesRowSize,r))}let et=g();return i(()=>{let e=Te(),t=w();r(()=>{!e.value||!t.value||Ie.value||!re.value?k.cursor=void 0:k.cursor={...e.value,style:ae.value}})}),(n,r)=>(e(),d(ee,null,[u(`div`,ze,[u(`div`,null,[t(he),t(ge)]),u(`div`,{ref_key:`gridContainer`,ref:c,class:f([`grid-container`,`layout${x(S)}`]),style:o({"--slidev-presenter-notes-width":`${x(R)}px`,"--slidev-presenter-notes-row-size":`${x(z)}px`,"--slidev-presenter-bottom-height":`${B.value}px`})},[b(` Unified vertical resizer for wide layout `),Y.value&&J.value?(e(),d(`div`,{key:0,class:`notes-vertical-resizer`,role:`separator`,"aria-orientation":`vertical`,title:`Resize notes panel`,onPointerdown:Q},null,32)):b(`v-if`,!0),b(` Unified vertical resizer for layout 3 `),Y.value&&x(S)===3?(e(),d(`div`,{key:1,class:`notes-vertical-resizer-left`,role:`separator`,"aria-orientation":`vertical`,title:`Resize notes panel`,onPointerdown:Q},null,32)):b(`v-if`,!0),u(`div`,{ref_key:`main`,ref:s,class:`relative grid-section main flex flex-col`},[u(`div`,Be,[r[3]||=u(`span`,{op50:``,px2:``},`Current`,-1),r[4]||=u(`div`,{"flex-auto":``},null,-1),t(Se,{modelValue:x(L),"onUpdate:modelValue":r[0]||=e=>te(L)?L.value=e:null,options:[{label:`Slides`,value:`slides`},{label:`Screen Mirror`,value:`mirror`}]},null,8,[`modelValue`])]),x(L)===`mirror`?(e(),y(Me,{key:0})):b(`v-if`,!0),b(` We use v-show here to still infer the clicks context `),_(t(N,{key:`main`,class:`p-2 lg:p-4 flex-auto`,"is-main":``,onContextmenu:x(ke)},{default:m(()=>[t(we,{"render-context":`presenter`}),t(ve)]),_:1},8,[`onContextmenu`]),[[v,x(L)===`slides`]]),(e(),y(me,{key:x(P)?.no,"clicks-context":x(Fe)(x(P)),class:`w-full pb2 px4 flex-none`},null,8,[`clicks-context`]))],512),u(`div`,Ve,[X.value&&x(S)===2?(e(),d(`div`,{key:0,class:`notes-row-resizer top-[-6px]`,role:`separator`,"aria-orientation":`horizontal`,title:`Resize notes panel height`,onPointerdown:Ye},null,32)):b(`v-if`,!0),F.value&&I.value?(e(),y(N,{key:`next`},{default:m(()=>[(e(),y(_e,{key:F.value[0].no,"clicks-context":I.value.context,route:F.value[0],"render-context":`previewNext`},null,8,[`clicks-context`,`route`]))]),_:1})):(e(),d(`div`,He,[...r[5]||=[u(`div`,{class:`text-gray-500`},` End of the presentation `,-1)]])),r[6]||=u(`div`,{class:`absolute left-0 top-0 bg-main border-b border-r border-main px2 py1 op50 text-sm`},` Next `,-1)]),u(`div`,{ref_key:`noteSection`,ref:C,class:`relative grid-section note overflow-hidden`},[Y.value&&!J.value&&x(S)!==3?(e(),d(`div`,{key:0,class:`notes-resizer right-[-6px]`,role:`separator`,"aria-orientation":`vertical`,title:`Resize notes panel`,onPointerdown:Q},null,32)):b(`v-if`,!0),X.value&&x(S)!==2?(e(),d(`div`,{key:1,class:f([`notes-row-resizer`,Z.value?`top-[-6px]`:`bottom-[-6px]`]),role:`separator`,"aria-orientation":`horizontal`,title:`Resize notes panel height`,onPointerdown:Ye},null,34)):b(`v-if`,!0),et.value&&x(le)?(e(),y(x(et),{key:2,class:`h-full`})):(e(),d(`div`,Ue,[(e(),y(Ae,{key:`static-${x(M)}`,no:x(M),class:`w-full max-w-full h-full overflow-auto p-2 lg:p-4`,style:o({fontSize:`${x(ue)}em`}),"clicks-context":x(j)},null,8,[`no`,`style`,`clicks-context`])),r[10]||=u(`div`,{"border-t":``,"border-main":``},null,-1),u(`div`,{class:f([`py-1 px-2 text-sm transition`,x(a)?``:`op25`])},[t(A,{title:`Increase font size`,onClick:x(oe)},{default:m(()=>[...r[7]||=[u(`div`,{class:`i-carbon:zoom-in`},null,-1)]]),_:1},8,[`onClick`]),t(A,{title:`Decrease font size`,onClick:x(se)},{default:m(()=>[...r[8]||=[u(`div`,{class:`i-carbon:zoom-out`},null,-1)]]),_:1},8,[`onClick`]),b(`v-if`,!0)],2)]))],512),u(`div`,{ref_key:`bottomSection`,ref:O,class:`grid-section bottom flex`},[t(Ee,{persist:!0,class:f([`transition`,x(a)?``:`op25`])},null,8,[`class`]),r[11]||=u(`div`,{"flex-auto":``},null,-1),t(Re)],512),(e(),y(pe,{key:2}))],6)]),t(ye),t(De),t(Ce)],64))}}),[[`__scopeId`,`data-v-e7a794bf`]]);export{F as default};