[{"data":1,"prerenderedAt":802},["ShallowReactive",2],{"book-hierarchy":3,"content-query-f6R8laZ0Yy":199},[4,109],{"key":5,"slug":5,"title":6,"cleanTitle":6,"numberedTitle":6,"description":7,"path":7,"sourcePath":7,"aliases":8,"basePath":9,"filePath":7,"pageType":7,"hidden":10,"effectiveHidden":10,"order":-4,"depth":11,"number":7,"ownAudience":7,"audiences":12,"coverDeLight":7,"coverEnLight":7,"coverDeDark":7,"coverEnDark":7,"children":14},"_info","Info","",[],"/_info",false,1,[13],"Sek I",[15,31,45,59],{"key":16,"slug":17,"title":18,"cleanTitle":18,"numberedTitle":18,"description":19,"path":20,"sourcePath":21,"aliases":22,"basePath":24,"filePath":25,"pageType":26,"hidden":10,"effectiveHidden":10,"order":27,"depth":28,"number":7,"ownAudience":13,"audiences":29,"coverDeLight":7,"coverEnLight":7,"coverDeDark":7,"coverEnDark":7,"children":30},"_info/10_datenschutz","10_datenschutz","Privacy Policy","Information on data protection and the processing of personal data.","/_info/privacy-policy/en","/_info/10_datenschutz/en",["Reactive",23],[21],"/_info/10_datenschutz","content/_Info/10_Datenschutz/en.md","content",10,2,[13],[],{"key":32,"slug":33,"title":34,"cleanTitle":34,"numberedTitle":34,"description":35,"path":36,"sourcePath":37,"aliases":38,"basePath":40,"filePath":41,"pageType":26,"hidden":10,"effectiveHidden":10,"order":42,"depth":28,"number":7,"ownAudience":13,"audiences":43,"coverDeLight":7,"coverEnLight":7,"coverDeDark":7,"coverEnDark":7,"children":44},"_info/11_impressum","11_impressum","Legal Notice","Legal notice for the interactive book.","/_info/legal-notice/en","/_info/11_impressum/en",["Reactive",39],[37],"/_info/11_impressum","content/_Info/11_Impressum/en.md",11,[13],[],{"key":46,"slug":47,"title":48,"cleanTitle":48,"numberedTitle":48,"description":49,"path":50,"sourcePath":51,"aliases":52,"basePath":54,"filePath":55,"pageType":26,"hidden":10,"effectiveHidden":10,"order":56,"depth":28,"number":7,"ownAudience":13,"audiences":57,"coverDeLight":7,"coverEnLight":7,"coverDeDark":7,"coverEnDark":7,"children":58},"_info/12_lizenzenunddrittanbieter","12_lizenzenunddrittanbieter","Licenses & Third-Party Notices","Automatically updated overview of the open-source components, licenses, and third-party notices.","/_info/licenses-and-third-party-notices/en","/_info/12_lizenzenunddrittanbieter/en",["Reactive",53],[51],"/_info/12_lizenzenunddrittanbieter","content/_Info/12_LizenzenUndDrittanbieter/en.md",12,[13],[],{"key":60,"slug":61,"title":62,"cleanTitle":62,"numberedTitle":62,"description":63,"path":64,"sourcePath":65,"aliases":66,"basePath":68,"filePath":69,"pageType":70,"hidden":10,"effectiveHidden":10,"order":71,"depth":28,"number":7,"ownAudience":13,"audiences":72,"coverDeLight":7,"coverEnLight":7,"coverDeDark":7,"coverEnDark":7,"children":73},"_info/13_mailinglisteundnewsletter","13_mailinglisteundnewsletter","Mailing List and Newsletter","Notifications about news and updates","/_info/mailing-list-and-newsletter/en","/_info/13_mailinglisteundnewsletter/en",["Reactive",67],[65],"/_info/13_mailinglisteundnewsletter","content/_Info/13_MailingListeUndNewsLetter/en.md","overview",13,[13],[74,94],{"key":75,"slug":76,"title":77,"cleanTitle":77,"numberedTitle":78,"description":79,"path":80,"sourcePath":81,"aliases":82,"basePath":84,"filePath":85,"pageType":70,"hidden":10,"effectiveHidden":10,"order":11,"depth":86,"number":87,"ownAudience":13,"audiences":88,"coverDeLight":89,"coverEnLight":90,"coverDeDark":91,"coverEnDark":92,"children":93},"_info/13_mailinglisteundnewsletter/newsletter","newsletter","Newsletter","1 Newsletter","Newsletter subscription","/_info/mailing-list-and-newsletter/newsletter/en","/_info/13_mailinglisteundnewsletter/newsletter/en",["Reactive",83],[81],"/_info/13_mailinglisteundnewsletter/newsletter","content/_Info/13_MailingListeUndNewsLetter/newsletter/en.md",3,"1",[13],"cover-de-light.png","cover-en-light.png","cover-de-dark.png","cover-en-dark.png",[],{"key":95,"slug":96,"title":97,"cleanTitle":97,"numberedTitle":98,"description":99,"path":100,"sourcePath":101,"aliases":102,"basePath":104,"filePath":105,"pageType":70,"hidden":10,"effectiveHidden":10,"order":28,"depth":86,"number":106,"ownAudience":13,"audiences":107,"coverDeLight":89,"coverEnLight":90,"coverDeDark":91,"coverEnDark":92,"children":108},"_info/13_mailinglisteundnewsletter/ifk","ifk","Mailing List for Computer Science Teachers in Cologne and the Surrounding Area","2 Mailing List for Computer Science Teachers in Cologne and the Surrounding Area","Discussion and exchange in the wider Cologne region","/_info/mailing-list-and-newsletter/cologne-teachers-mailing-list/en","/_info/13_mailinglisteundnewsletter/ifk/en",["Reactive",103],[101],"/_info/13_mailinglisteundnewsletter/ifk","content/_Info/13_MailingListeUndNewsLetter/ifk/en.md","2",[13],[],{"key":110,"slug":110,"title":111,"cleanTitle":111,"numberedTitle":111,"description":112,"path":113,"sourcePath":113,"aliases":114,"basePath":116,"filePath":117,"pageType":118,"hidden":10,"effectiveHidden":10,"order":-4,"depth":11,"number":7,"ownAudience":7,"audiences":119,"coverDeLight":89,"coverEnLight":90,"coverDeDark":91,"coverEnDark":92,"children":120},"_workshops","Workshops","Workshops and accompanying materials.","/_workshops/en",["Reactive",115],[],"/_workshops","content/_Workshops/en.md","chapter",[],[121],{"key":122,"slug":123,"title":124,"cleanTitle":124,"numberedTitle":125,"description":126,"path":127,"sourcePath":127,"aliases":128,"basePath":130,"filePath":131,"pageType":70,"hidden":10,"effectiveHidden":10,"order":132,"depth":28,"number":87,"ownAudience":7,"audiences":133,"coverDeLight":7,"coverEnLight":7,"coverDeDark":7,"coverEnDark":7,"children":134},"_workshops/2026_09_14","2026_09_14","Informatiktag20260914_AI-Tools","1 Informatiktag20260914_AI-Tools","Subpage for Informatiktag20260914_AI-Tools","/_workshops/2026_09_14/en",["Reactive",129],[],"/_workshops/2026_09_14","content/_Workshops/2026_09_14/en.md",2026,[],[135,150,169,184],{"key":136,"slug":137,"title":138,"cleanTitle":138,"numberedTitle":139,"description":140,"path":141,"sourcePath":142,"aliases":143,"basePath":145,"filePath":146,"pageType":26,"hidden":10,"effectiveHidden":10,"order":-4,"depth":86,"number":147,"ownAudience":7,"audiences":148,"coverDeLight":89,"coverEnLight":90,"coverDeDark":91,"coverEnDark":92,"children":149},"_workshops/2026_09_14/arbeitsauftrag1","arbeitsauftrag1","Task 1","1.1 Task 1","Explore and construct FNN decision regions using Heaviside activations.","/_workshops/2026_09_14/task-1/en","/_workshops/2026_09_14/arbeitsauftrag1/en",["Reactive",144],[142],"/_workshops/2026_09_14/arbeitsauftrag1","content/_Workshops/2026_09_14/arbeitsauftrag1/en.md","1.1",[],[],{"key":151,"slug":152,"title":153,"cleanTitle":153,"numberedTitle":154,"description":155,"path":156,"sourcePath":157,"aliases":158,"basePath":160,"filePath":161,"pageType":26,"hidden":10,"effectiveHidden":10,"order":-4,"depth":86,"number":162,"ownAudience":7,"audiences":163,"coverDeLight":164,"coverEnLight":165,"coverDeDark":166,"coverEnDark":167,"children":168},"_workshops/2026_09_14/arbeitsauftrag2","arbeitsauftrag2","Task 2","1.2 Task 2","Character classification with a Feedforward Neural Network.","/_workshops/2026_09_14/task-2/en","/_workshops/2026_09_14/arbeitsauftrag2/en",["Reactive",159],[157],"/_workshops/2026_09_14/arbeitsauftrag2","content/_Workshops/2026_09_14/arbeitsauftrag2/en.md","1.2",[],"cover-de-light.webp","cover-en-light.webp","cover-de-dark.webp","cover-en-dark.webp",[],{"key":170,"slug":171,"title":172,"cleanTitle":172,"numberedTitle":173,"description":174,"path":175,"sourcePath":176,"aliases":177,"basePath":179,"filePath":180,"pageType":26,"hidden":10,"effectiveHidden":10,"order":-4,"depth":86,"number":181,"ownAudience":7,"audiences":182,"coverDeLight":89,"coverEnLight":90,"coverDeDark":91,"coverEnDark":92,"children":183},"_workshops/2026_09_14/arbeitsauftrag3","arbeitsauftrag3","Task 3","1.3 Task 3","Experimental and mathematical comparison of CCE and MSE in FNN classification.","/_workshops/2026_09_14/task-3/en","/_workshops/2026_09_14/arbeitsauftrag3/en",["Reactive",178],[176],"/_workshops/2026_09_14/arbeitsauftrag3","content/_Workshops/2026_09_14/arbeitsauftrag3/en.md","1.3",[],[],{"key":185,"slug":186,"title":187,"cleanTitle":187,"numberedTitle":188,"description":189,"path":190,"sourcePath":191,"aliases":192,"basePath":194,"filePath":195,"pageType":26,"hidden":10,"effectiveHidden":10,"order":-4,"depth":86,"number":196,"ownAudience":7,"audiences":197,"coverDeLight":89,"coverEnLight":165,"coverDeDark":91,"coverEnDark":167,"children":198},"_workshops/2026_09_14/arbeitsauftrag4","arbeitsauftrag4","Task 4","1.4 Task 4","Two fundamental ideas of RL using bandit problems.","/_workshops/2026_09_14/task-4/en","/_workshops/2026_09_14/arbeitsauftrag4/en",["Reactive",193],[191],"/_workshops/2026_09_14/arbeitsauftrag4","content/_Workshops/2026_09_14/arbeitsauftrag4/en.md","1.4",[],[],{"_path":176,"_dir":171,"_draft":10,"_partial":200,"_locale":7,"title":172,"description":174,"navigation":200,"pageType":26,"coverDeLight":89,"coverEnLight":90,"coverDeDark":91,"coverEnDark":92,"pageId":201,"slug":202,"aliases":203,"body":204,"_type":797,"_id":798,"_source":26,"_file":799,"_stem":800,"_extension":801},true,"c4ed9330-faf0-4e61-a25d-69d6710b0659","task-3",[176],{"type":205,"children":206,"toc":785},"root",[207,214,235,242,253,265,292,335,342,365,370,394,400,405,411,420,425,437,442,454,458,470,474,480,491,497,504,521,525,531,547,553,559,576,580,585,589,594,598,613,619,624,628,633,637,642,646,651,655,665,669,685,691,707,711,721,727,756],{"type":208,"tag":209,"props":210,"children":211},"element","h1",{"id":202},[212],{"type":213,"value":172},"text",{"type":208,"tag":215,"props":216,"children":217},"p",{},[218,220,226,228,233],{"type":213,"value":219},"In this worksheet, you will compare ",{"type":208,"tag":221,"props":222,"children":223},"strong",{},[224],{"type":213,"value":225},"Categorical Cross Entropy (CCE)",{"type":213,"value":227}," and ",{"type":208,"tag":221,"props":229,"children":230},{},[231],{"type":213,"value":232},"Mean Squared Error (MSE)",{"type":213,"value":234}," for classification with feedforward neural networks.",{"type":208,"tag":236,"props":237,"children":239},"h2",{"id":238},"exercise-1-experimental-comparison-of-cce-and-mse",[240],{"type":213,"value":241},"Exercise 1 – Experimental comparison of CCE and MSE",{"type":208,"tag":215,"props":243,"children":244},{},[245],{"type":208,"tag":246,"props":247,"children":250},"a",{"href":248,"style":249},"/tools/KI_ML/01_SupervisedLearning/05_FNN/03_KlassifikationMitFNNs/02_FNN_2x3_Klassifikation","font-size: 1.4em; font-weight: 700;",[251],{"type":213,"value":252},"Open the FNN classification tool",{"type":208,"tag":215,"props":254,"children":255},{},[256,258],{"type":213,"value":257},"Dataset: ",{"type":208,"tag":259,"props":260,"children":262},"content-asset-link",{"src":261,"download":200},"synthetisch_ce_vs_mse_drei_klassen.csv",[263],{"type":213,"value":264},"download synthetisch_ce_vs_mse_drei_klassen.csv",{"type":208,"tag":266,"props":267,"children":270},"info-box",{"label":268,"title":269},"Step 1","Load and normalize the dataset",[271,283],{"type":208,"tag":215,"props":272,"children":273},{},[274,276,281],{"type":213,"value":275},"Load the sample dataset and normalize it to the interval ",{"type":208,"tag":277,"props":278,"children":280},"i-ma",{"code":279},"[-1,1]",[],{"type":213,"value":282},".",{"type":208,"tag":215,"props":284,"children":285},{},[286],{"type":208,"tag":287,"props":288,"children":291},"img",{"alt":289,"src":290},"Settings for normalizing the dataset","media/aufgabe-1-daten-normalisieren.png",[],{"type":208,"tag":266,"props":293,"children":296},{"label":294,"title":295},"Step 2","Choose a suitable FNN",[297,302,307,327],{"type":208,"tag":215,"props":298,"children":299},{},[300],{"type":213,"value":301},"This two-dimensional dataset does not require deep feature abstractions. The main challenge is to place several local polygonal regions.",{"type":208,"tag":215,"props":303,"children":304},{},[305],{"type":213,"value":306},"A wide, shallow network is therefore preferable:",{"type":208,"tag":308,"props":309,"children":310},"ul",{},[311,317,322],{"type":208,"tag":312,"props":313,"children":314},"li",{},[315],{"type":213,"value":316},"Many neurons in one layer provide many possible separating lines.",{"type":208,"tag":312,"props":318,"children":319},{},[320],{"type":213,"value":321},"The gradient only needs to propagate through a few layers.",{"type":208,"tag":312,"props":323,"children":324},{},[325],{"type":213,"value":326},"There is less risk of inactive ReLU paths.",{"type":208,"tag":215,"props":328,"children":329},{},[330],{"type":208,"tag":287,"props":331,"children":334},{"alt":332,"src":333},"Model settings with a wide hidden layer and softmax output","media/aufgabe-1-modell.png",[],{"type":208,"tag":336,"props":337,"children":339},"h3",{"id":338},"a-run-and-compare-the-classifications",[340],{"type":213,"value":341},"a) Run and compare the classifications",{"type":208,"tag":215,"props":343,"children":344},{},[345,347,351,353,357,359,364],{"type":213,"value":346},"Run the classification with multiclass cross entropy ",{"type":208,"tag":277,"props":348,"children":350},{"code":349},"\\mathcal{L}_{\\mathrm{CCE}}",[],{"type":213,"value":352}," and with MSE ",{"type":208,"tag":277,"props":354,"children":356},{"code":355},"\\mathcal{L}_{\\mathrm{MSE}}",[],{"type":213,"value":358},", starting from the same “random” initial parameters with ",{"type":208,"tag":221,"props":360,"children":361},{},[362],{"type":213,"value":363},"seed 42",{"type":213,"value":282},{"type":208,"tag":215,"props":366,"children":367},{},[368],{"type":213,"value":369},"Compare the classification results in terms of:",{"type":208,"tag":308,"props":371,"children":372},{},[373,384,389],{"type":208,"tag":312,"props":374,"children":375},{},[376,378,382],{"type":213,"value":377},"total loss ",{"type":208,"tag":277,"props":379,"children":381},{"code":380},"\\mathcal{L}",[],{"type":213,"value":383},",",{"type":208,"tag":312,"props":385,"children":386},{},[387],{"type":213,"value":388},"accuracy,",{"type":208,"tag":312,"props":390,"children":391},{},[392],{"type":213,"value":393},"the visual quality of the decision regions in the argmax heatmap, which is the lower heatmap.",{"type":208,"tag":336,"props":395,"children":397},{"id":396},"b-loss-after-reaching-complete-accuracy",[398],{"type":213,"value":399},"b) Loss after reaching complete accuracy",{"type":208,"tag":215,"props":401,"children":402},{},[403],{"type":213,"value":404},"Explain why the loss can continue to decrease even after 100% accuracy has been reached.",{"type":208,"tag":236,"props":406,"children":408},{"id":407},"exercise-2-mathematical-comparison-of-cce-and-mse",[409],{"type":213,"value":410},"Exercise 2 – Mathematical comparison of CCE and MSE",{"type":208,"tag":215,"props":412,"children":413},{},[414],{"type":208,"tag":246,"props":415,"children":417},{"href":416,"style":249},"/tools/KI_ML/01_SupervisedLearning/05_FNN/03_KlassifikationMitFNNs/03_Softmax-Aktivierungsfunktion",[418],{"type":213,"value":419},"Open the Softmax tool",{"type":208,"tag":215,"props":421,"children":422},{},[423],{"type":213,"value":424},"We use the following definitions:",{"type":208,"tag":308,"props":426,"children":427},{},[428],{"type":208,"tag":312,"props":429,"children":430},{},[431,435],{"type":208,"tag":221,"props":432,"children":433},{},[434],{"type":213,"value":225},{"type":213,"value":436},":",{"type":208,"tag":438,"props":439,"children":441},"d-ma",{"code":440},"\\mathcal{L}_{\\mathrm{CCE}}(\\mathbf{p},\\mathbf{y})\n= -\\sum_{i=1}^{K} y_i\\ln p_i",[],{"type":208,"tag":308,"props":443,"children":444},{},[445],{"type":208,"tag":312,"props":446,"children":447},{},[448,453],{"type":208,"tag":221,"props":449,"children":450},{},[451],{"type":213,"value":452},"Softmax",{"type":213,"value":436},{"type":208,"tag":438,"props":455,"children":457},{"code":456},"p_i\n= \\operatorname{softmax}(\\mathbf{z})_i\n= \\frac{e^{z_i}}{\\sum_{j=1}^{K}e^{z_j}}",[],{"type":208,"tag":308,"props":459,"children":460},{},[461],{"type":208,"tag":312,"props":462,"children":463},{},[464,469],{"type":208,"tag":221,"props":465,"children":466},{},[467],{"type":213,"value":468},"Per-sample MSE loss",{"type":213,"value":436},{"type":208,"tag":438,"props":471,"children":473},{"code":472},"\\mathcal{L}_{\\mathrm{MSE}}(\\mathbf{p},\\mathbf{y})\n= \\frac{1}{2}\\lVert\\mathbf{p}-\\mathbf{y}\\rVert_2^2\n= \\frac{1}{2}\\sum_{i=1}^{K}(p_i-y_i)^2",[],{"type":208,"tag":336,"props":475,"children":477},{"id":476},"a-softmax",[478],{"type":213,"value":479},"a) Softmax",{"type":208,"tag":215,"props":481,"children":482},{},[483,485,489],{"type":213,"value":484},"Calculate ",{"type":208,"tag":277,"props":486,"children":488},{"code":487},"\\operatorname{softmax}(0,0,1)",[],{"type":213,"value":490}," by hand and with the tool. What is the largest value of a Softmax component that can be produced with the app?",{"type":208,"tag":336,"props":492,"children":494},{"id":493},"b-comparing-losses-cce-softmax-versus-mse-softmax",[495],{"type":213,"value":496},"b) Comparing losses: CCE + Softmax versus MSE + Softmax",{"type":208,"tag":498,"props":499,"children":501},"h4",{"id":500},"i-cce-with-one-hot-encoding",[502],{"type":213,"value":503},"i) CCE with one-hot encoding",{"type":208,"tag":215,"props":505,"children":506},{},[507,509,513,515,519],{"type":213,"value":508},"Explain why, for one-hot encoded target vectors ",{"type":208,"tag":277,"props":510,"children":512},{"code":511},"\\mathbf{y}",[],{"type":213,"value":514}," in single-label classification, the error as a function of the Softmax outputs ",{"type":208,"tag":277,"props":516,"children":518},{"code":517},"(p_i)_i",[],{"type":213,"value":520}," satisfies:",{"type":208,"tag":438,"props":522,"children":524},{"code":523},"\\mathcal{L}_{\\mathrm{CCE}}(\\mathbf{p},\\mathbf{y})=-\\ln p_c",[],{"type":208,"tag":498,"props":526,"children":528},{"id":527},"ii-confidently-incorrect-prediction",[529],{"type":213,"value":530},"ii) Confidently incorrect prediction",{"type":208,"tag":215,"props":532,"children":533},{},[534,536,540,541,545],{"type":213,"value":535},"Use the tool to compare ",{"type":208,"tag":277,"props":537,"children":539},{"code":538},"\\mathcal{L}_{\\mathrm{MSE}}(\\mathbf{p},\\mathbf{y})",[],{"type":213,"value":227},{"type":208,"tag":277,"props":542,"children":544},{"code":543},"\\mathcal{L}_{\\mathrm{CCE}}(\\mathbf{p},\\mathbf{y})",[],{"type":213,"value":546}," when the FNN makes an incorrect prediction with the greatest possible confidence. Inspect the calculations shown by the tool.",{"type":208,"tag":336,"props":548,"children":550},{"id":549},"c-comparing-error-signals-cce-softmax-versus-mse-softmax",[551],{"type":213,"value":552},"c) Comparing error signals: CCE + Softmax versus MSE + Softmax",{"type":208,"tag":498,"props":554,"children":556},{"id":555},"i-total-loss-as-a-function-of-the-logits",[557],{"type":213,"value":558},"i) Total loss as a function of the logits",{"type":208,"tag":215,"props":560,"children":561},{},[562,564,568,570,574],{"type":213,"value":563},"Show by substitution that the total loss as a function of the logits ",{"type":208,"tag":277,"props":565,"children":567},{"code":566},"(z_i)_i",[],{"type":213,"value":569}," and the true value ",{"type":208,"tag":277,"props":571,"children":573},{"code":572},"(y_i)_i",[],{"type":213,"value":575}," is:",{"type":208,"tag":438,"props":577,"children":579},{"code":578},"\\mathcal{L}(\\mathbf{z},\\mathbf{y})=-\\sum_{k=1}^{K}y_k z_k+\\ln\\left(\\sum_{j=1}^{K}e^{z_j}\\right)",[],{"type":208,"tag":215,"props":581,"children":582},{},[583],{"type":213,"value":584},"You may use the form already simplified for single-label classification,",{"type":208,"tag":438,"props":586,"children":588},{"code":587},"\\mathcal{L}_{\\mathrm{CCE}}(\\mathbf{p},\\mathbf{y})=-\\ln p_c,",[],{"type":208,"tag":215,"props":590,"children":591},{},[592],{"type":213,"value":593},"or start from the general form",{"type":208,"tag":438,"props":595,"children":597},{"code":596},"\\mathcal{L}_{\\mathrm{CCE}}(\\mathbf{p},\\mathbf{y})\n= -\\sum_{i=1}^{K}y_i\\ln p_i.",[],{"type":208,"tag":266,"props":599,"children":602},{"label":600,"title":601},"Hint","Property of the target vector",[603],{"type":208,"tag":215,"props":604,"children":605},{},[606,608,612],{"type":213,"value":607},"If you start from the general form, use ",{"type":208,"tag":277,"props":609,"children":611},{"code":610},"\\sum_{k=1}^{K}y_k=1",[],{"type":213,"value":282},{"type":208,"tag":498,"props":614,"children":616},{"id":615},"ii-gradient-of-the-loss",[617],{"type":213,"value":618},"ii) Gradient of the loss",{"type":208,"tag":215,"props":620,"children":621},{},[622],{"type":213,"value":623},"Show by differentiation that",{"type":208,"tag":438,"props":625,"children":627},{"code":626},"\\nabla_{\\mathbf{z}}\\mathcal{L}(\\mathbf{z},\\mathbf{y})\n=\n\\begin{pmatrix}\n\\frac{\\partial}{\\partial z_1}\\mathcal{L}(\\mathbf{z},\\mathbf{y})\\\\\n\\vdots\\\\\n\\frac{\\partial}{\\partial z_c}\\mathcal{L}(\\mathbf{z},\\mathbf{y})\\\\\n\\vdots\\\\\n\\frac{\\partial}{\\partial z_K}\\mathcal{L}(\\mathbf{z},\\mathbf{y})\n\\end{pmatrix}\n=\n\\begin{pmatrix}\np_1\\\\\n\\vdots\\\\\np_c-1\\\\\n\\vdots\\\\\np_K\n\\end{pmatrix}\n=\n\\mathbf{p}-\\mathbf{y}",[],{"type":208,"tag":215,"props":629,"children":630},{},[631],{"type":213,"value":632},"with the estimated probabilities",{"type":208,"tag":438,"props":634,"children":636},{"code":635},"p_i=\\operatorname{softmax}(\\mathbf{z})_i.",[],{"type":208,"tag":215,"props":638,"children":639},{},[640],{"type":213,"value":641},"For the differentiation, you may either start from the simplified form for one-hot encoded targets",{"type":208,"tag":438,"props":643,"children":645},{"code":644},"\\mathcal{L}(\\mathbf{z},\\mathbf{y})\n=-z_c+\\ln\\left(\\sum_{j=1}^{K}e^{z_j}\\right)",[],{"type":208,"tag":215,"props":647,"children":648},{},[649],{"type":213,"value":650},"or alternatively use the general form",{"type":208,"tag":438,"props":652,"children":654},{"code":653},"\\mathcal{L}(\\mathbf{z},\\mathbf{y})\n=-\\sum_{k=1}^{K}y_kz_k\n+\\ln\\left(\\sum_{j=1}^{K}e^{z_j}\\right).",[],{"type":208,"tag":215,"props":656,"children":657},{},[658,660,663],{"type":213,"value":659},"Use one-variable school calculus for the partial derivatives. Treat ",{"type":208,"tag":277,"props":661,"children":662},{"code":380},[],{"type":213,"value":664}," as a function of only one variable at a time,",{"type":208,"tag":438,"props":666,"children":668},{"code":667},"\\frac{\\partial}{\\partial z_i}\\mathcal{L}(\\mathbf{z},\\mathbf{y})\n=\\mathcal{L}_i'(z_i),",[],{"type":208,"tag":215,"props":670,"children":671},{},[672,674,678,680,684],{"type":213,"value":673},"and distinguish between the correct class ",{"type":208,"tag":277,"props":675,"children":677},{"code":676},"i=c",[],{"type":213,"value":679}," and the remaining classes ",{"type":208,"tag":277,"props":681,"children":683},{"code":682},"i\\ne c",[],{"type":213,"value":282},{"type":208,"tag":498,"props":686,"children":688},{"id":687},"iii-examine-error-signals",[689],{"type":213,"value":690},"iii) Examine error signals",{"type":208,"tag":215,"props":692,"children":693},{},[694,696,700,701,705],{"type":213,"value":695},"Examine the error signals for confidently correct, confidently incorrect, uncertain but correct, and uncertain and incorrect predictions. Substitute values of 0 or 1 for ",{"type":208,"tag":277,"props":697,"children":699},{"code":698},"p_i",[],{"type":213,"value":227},{"type":208,"tag":277,"props":702,"children":704},{"code":703},"y_i",[],{"type":213,"value":706}," in",{"type":208,"tag":438,"props":708,"children":710},{"code":709},"\\nabla_{\\mathbf{z}}\\mathcal{L}(\\mathbf{z},\\mathbf{y})\n=\\mathbf{p}(\\mathbf{z})-\\mathbf{y}.",[],{"type":208,"tag":215,"props":712,"children":713},{},[714],{"type":208,"tag":246,"props":715,"children":718},{"href":716,"style":717},"/_workshops/2026_09_14/arbeitsauftrag3/loesung-aufgabe-2/en","color: var(--theme-danger-color); font-size: 1.15em; font-weight: 700;",[719],{"type":213,"value":720},"View the solution to Exercise 2",{"type":208,"tag":236,"props":722,"children":724},{"id":723},"files-data-source-and-license",[725],{"type":213,"value":726},"Files, data source, and license",{"type":208,"tag":308,"props":728,"children":729},{},[730,738,747],{"type":208,"tag":312,"props":731,"children":732},{},[733],{"type":208,"tag":259,"props":734,"children":735},{"src":261,"download":200},[736],{"type":213,"value":737},"\nDownload the synthetic sample dataset\n",{"type":208,"tag":312,"props":739,"children":740},{},[741],{"type":208,"tag":259,"props":742,"children":744},{"src":743,"download":200},"penguins_schnabellaenge_fluegellaenge_geschlecht.csv",[745],{"type":213,"value":746},"\nDownload the prepared penguin dataset\n",{"type":208,"tag":312,"props":748,"children":749},{},[750],{"type":208,"tag":259,"props":751,"children":753},{"src":752,"download":200},"README_Datenquelle_penguins.txt",[754],{"type":213,"value":755},"\nDownload the complete source and license information for the penguin dataset\n",{"type":208,"tag":215,"props":757,"children":758},{},[759,761,767,769,777,779,784],{"type":213,"value":760},"The penguin dataset is an adapted excerpt from ",{"type":208,"tag":762,"props":763,"children":764},"em",{},[765],{"type":213,"value":766},"palmerpenguins: Palmer Archipelago (Antarctica) penguin data",{"type":213,"value":768}," by Horst, Hill, and Gorman (2020), ",{"type":208,"tag":246,"props":770,"children":774},{"href":771,"rel":772},"https://doi.org/10.5281/zenodo.3960218",[773],"nofollow",[775],{"type":213,"value":776},"Zenodo, DOI 10.5281/zenodo.3960218",{"type":213,"value":778},". The original dataset is licensed under ",{"type":208,"tag":221,"props":780,"children":781},{},[782],{"type":213,"value":783},"CC0 1.0 Universal",{"type":213,"value":282},{"title":7,"searchDepth":28,"depth":28,"links":786},[787,791,796],{"id":238,"depth":28,"text":241,"children":788},[789,790],{"id":338,"depth":86,"text":341},{"id":396,"depth":86,"text":399},{"id":407,"depth":28,"text":410,"children":792},[793,794,795],{"id":476,"depth":86,"text":479},{"id":493,"depth":86,"text":496},{"id":549,"depth":86,"text":552},{"id":723,"depth":28,"text":726},"markdown","content:_Workshops:2026_09_14:arbeitsauftrag3:en.md","_Workshops/2026_09_14/arbeitsauftrag3/en.md","_Workshops/2026_09_14/arbeitsauftrag3/en","md",1793367294103]