{"componentChunkName":"component---src-templates-post-tsx","path":"/machine_learning_math/gradient_descent_for_linear_regression/","result":{"data":{"logo":{"childImageSharp":{"gatsbyImageData":{"layout":"fixed","backgroundColor":"#f8f8f8","images":{"fallback":{"src":"/static/e43c6530b7b2b056de6bfee951c9e393/b181d/compasslogo.png","srcSet":"/static/e43c6530b7b2b056de6bfee951c9e393/b181d/compasslogo.png 1920w","sizes":"1920px"},"sources":[{"srcSet":"/static/e43c6530b7b2b056de6bfee951c9e393/e02c9/compasslogo.webp 1920w","type":"image/webp","sizes":"1920px"}]},"width":1920,"height":472}}},"mdx":{"body":"const _excluded=[\"components\"];function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function _objectWithoutProperties(source,excluded){if(source==null)return{};var target=_objectWithoutPropertiesLoose(source,excluded);var key,i;if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++){key=sourceSymbolKeys[i];if(excluded.indexOf(key)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(source,key))continue;target[key]=source[key];}}return target;}function _objectWithoutPropertiesLoose(source,excluded){if(source==null)return{};var target={};var sourceKeys=Object.keys(source);var key,i;for(i=0;i<sourceKeys.length;i++){key=sourceKeys[i];if(excluded.indexOf(key)>=0)continue;target[key]=source[key];}return target;}/* @jsxRuntime classic */ /* @jsx mdx */const _frontmatter={\"layout\":\"post\",\"title\":\"Gradient Descent for Linear Regression Explained, Step by Step\",\"author\":[\"Lari Giba\"],\"tags\":[\"Machine Learning Math\"],\"image\":\"img/Gradient_Descent_for_Linear_Regression/GradientDescentLinearRegression_Thumbnail.png\",\"date\":\"2021-04-03T19:07:33.321Z\",\"dateModified\":\"2021-04-03T19:07:33.321Z\",\"changelog\":[],\"draft\":false,\"imgCaption\":\"Background image by Rohit Tandon\",\"imgSource\":\"https://unsplash.com/photos/9wg5jCEPBsw\",\"timeToRead\":23,\"uniquePostId\":6,\"excerpt\":\"Gradient descent is one of the most famous techniques in machine learning and used for training all sorts of neural networks. But gradient descent can not only be used to train neural networks, but many more machine learning models. In particular, gradient descent can be used to train a linear regression model! If you are curious as to how this is possible, or if you want to approach gradient descent with smaller steps and not jump straight to neural networks, this post is for you. You will learn how gradient descent works from an intuitive, visual, and mathematical standpoint and we will apply it to an exemplary dataset in Python.\",\"dependencies\":[],\"proficiencyLevel\":\"Beginner\"};const makeShortcode=name=>function MDXDefaultShortcode(props){console.warn(\"Component \"+name+\" was not imported, exported, or provided by MDXProvider as global scope\");return mdx(\"div\",props);};const ToolTip=makeShortcode(\"ToolTip\");const ConditionalLazyPlot=makeShortcode(\"ConditionalLazyPlot\");const AnimationPlayer=makeShortcode(\"AnimationPlayer\");const WarningTip=makeShortcode(\"WarningTip\");const SmoothScrollLink=makeShortcode(\"SmoothScrollLink\");const layoutProps={_frontmatter};const MDXLayout=\"wrapper\";return function MDXContent(_ref){let{components}=_ref,props=_objectWithoutProperties(_ref,_excluded);return mdx(MDXLayout,_extends({},layoutProps,props,{components:components,mdxType:\"MDXLayout\"}),mdx(\"h2\",{\"id\":\"outline\"},`Outline`),mdx(\"p\",null,`You have most likely heard about gradient descent before.\nBut maybe you still have some questions as to how it really works.\nMaybe you never found an intuitive and visual explanation for the math behind it,\nor maybe you never found clean Python code that implements it.\nIf this situation feels familiar, then this article is exactly for you!\nHere, we’ll go through gradient descent step by step and apply it to linear regression.\nWe’ll take a look at the intuition, the math, and the code behind gradient descent and\nwe’ll also visualize what’s going on under the hood to fully understand this algorithm\nand learn to use it to it’s full potential.`),mdx(\"p\",null,`With that being said, I will assume that you are familiar with linear regression. If you are not, then I would\n`,mdx(\"em\",{parentName:\"p\"},`highly`),` recommend you read `,mdx(\"a\",{parentName:\"p\",\"href\":\"/machine_learning_models/linear_regression\"},`Linear Regression Explained, Step by Step`),` before coming back to this article. In that article,\nyou will learn everything you need to know about how linear regression works and how you can use it. This post\ncan be considered a sequel to the article about linear regression since I will use some terms and functions\nthat were defined in the post about linear regression. So even if you feel somewhat comfortable with linear regression,\nI’d highly recommend at least skimming over the linked article.`),mdx(\"p\",null,`Since gradient descent is in essence, just math, this post will be more math-heavy than some of my other posts. But do not worry,\nwe will take very small steps and I will make sure to explain every piece of an equation\nso that you know exactly what we are doing. As long as you know basic high school-level calculus, you are going\nto be alright. Of course, we are also going to implement gradient descent in raw Python as well as with\nthe help of scikit-learn. And if you have read any of the other articles on this website before, you know that the visual\naspect won’t fall short either! So let’s get started!`),mdx(\"h2\",{\"id\":\"formulating-the-problem\"},`Formulating the Problem`),mdx(\"div\",null,mdx(\"p\",null,`So what exactly are we trying to do?\nSay we have a small dataset where we are given the number of bedrooms in a certain house and we\nwant to predict the price of said house.`,mdx(ToolTip,{trigger:\"*\",mdxType:\"ToolTip\"},`This is the same dataset we used in the post about linear regression.`))),mdx(ConditionalLazyPlot,_extends({},markerData,{mdxType:\"ConditionalLazyPlot\"}),mdx(\"p\",null,mdx(\"span\",{parentName:\"p\",\"className\":\"gatsby-resp-image-wrapper\",\"style\":{\"position\":\"relative\",\"display\":\"block\",\"marginLeft\":\"auto\",\"marginRight\":\"auto\",\"maxWidth\":\"599px\"}},`\n      `,mdx(\"span\",{parentName:\"span\",\"className\":\"gatsby-resp-image-background-image\",\"style\":{\"paddingBottom\":\"67.19999999999999%\",\"position\":\"relative\",\"bottom\":\"0\",\"left\":\"0\",\"backgroundImage\":\"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAANCAYAAACpUE5eAAAACXBIWXMAABYlAAAWJQFJUiTwAAABdklEQVQ4y5VT2W6DMBAkNAcEzB1ic4W7NJWa/v/PTbXGUIJQj4eR1/Z6mN0dtL2bQmdCgvEGQTYgyAf42Ssc3uLFSUA5tG5hvBMSFGt0aEYljLCYiXcEe4wp6SfQ+1NY4hTeZKztbI4gf4MrRjWHXwjW0BmHLQawZIBuc2j2tYafDbAu1VzC36FKZkJCluwlPaLbHeeo/Bfh1LN1+ZqbdBDtAw5voK8ID172nUwq1D2dm3Gz+SGNJknTpaEsFZIC6s9EZvFeNp8GdfQL+OWHmvRaoeiQtA85lGmqRGBearD0Ls8o0RY9jEgRBgWC6rGtkCxDgzHDAntVIhGSDSzezYRGVOHo55u+fFJItvHSDp5o4Zef8pFMoGQmxj46Cdz8XaqmeNnbtc206U8hC1hxhYM3XhhBIfeT2Y0gx9HPZEyELK5xVLnnSwkzUsZeW2UuRU3TjusR10b+irI9UfmU+1TyFCzXZUy2IpATvKSDl/ZS+Tp32n8BxlI3zVlwiPsAAAAASUVORK5CYII=')\",\"backgroundSize\":\"cover\",\"display\":\"block\"}}),`\n  `,mdx(\"picture\",{parentName:\"span\"},`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/008c89723e2962473c6e6c4bc8c82093/601b1/data_plot.webp 500w\",\"/static/008c89723e2962473c6e6c4bc8c82093/b44a7/data_plot.webp 599w\"],\"sizes\":\"(max-width: 599px) 100vw, 599px\",\"type\":\"image/webp\"}),`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/008c89723e2962473c6e6c4bc8c82093/0eb09/data_plot.png 500w\",\"/static/008c89723e2962473c6e6c4bc8c82093/1906d/data_plot.png 599w\"],\"sizes\":\"(max-width: 599px) 100vw, 599px\",\"type\":\"image/png\"}),`\n          `,mdx(\"img\",{parentName:\"picture\",\"className\":\"gatsby-resp-image-image\",\"src\":\"/static/008c89723e2962473c6e6c4bc8c82093/1906d/data_plot.png\",\"alt\":\"Dataset of House Prices\",\"title\":\"Dataset of House Prices\",\"loading\":\"lazy\",\"decoding\":\"async\",\"style\":{\"width\":\"100%\",\"height\":\"100%\",\"margin\":\"0\",\"verticalAlign\":\"middle\",\"position\":\"absolute\",\"top\":\"0\",\"left\":\"0\"}}),`\n        `),`\n    `))),mdx(\"p\",null,`We now want to somehow predict the price of any new house that enters our dataset. To do this,\nwe create a linear function `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`f`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"mi\",{parentName:\"mrow\"},`x`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mi\",{parentName:\"mrow\"},`b`),mdx(\"mo\",{parentName:\"mrow\"},`+`),mdx(\"mi\",{parentName:\"mrow\"},`m`),mdx(\"mi\",{parentName:\"mrow\"},`x`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`f(x) = b + mx`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"1em\",\"verticalAlign\":\"-0.25em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.10764em\"}},`f`),mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`x`),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.77777em\",\"verticalAlign\":\"-0.08333em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`b`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`+`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`x`))))),` that has a minimal mean squared error (or MSE) with regard to our\ndata points.`),mdx(\"div\",null,mdx(\"p\",null,`Once a new point enters our dataset, we simply plug in the number of bedrooms of our house\ninto our function and we receive the predicted price for that dataset.`,mdx(ToolTip,{width:\"15em\",trigger:\"*\",mdxType:\"ToolTip\"},`If most of what I am saying right now does not make a lot of sense to you,\nI recommend you read the article on linear regression first, where all of these terms are explained in-depth.`),`\nBut we can’t just magically come up with our ideal function. We have to somehow compute it.\nAnd there are multiple ways to do so. One option is solving the normal equation for linear regression,\nwhich directly gives us the ideal parameters. We covered this in more depth in the `,mdx(\"a\",{parentName:\"p\",\"href\":\"/machine_learning_models/linear_regression/#finding-the-minimum-normal-equation\"},`article about linear regression`),`. This approach has the downside that it scales poorly with regard to the number\nof our input features. So if we have `,mdx(\"em\",{parentName:\"p\"},`a lot`),` of input features, gradient descent might be a better\noption. So how does it work?`)),mdx(\"h2\",{\"id\":\"the-intuition\"},`The Intuition`),mdx(\"p\",null,`Instead of directly computing the ideal values for our variables, we instead approach them step by step.\nIn a nutshell, gradient descent starts with a random function and continuously improves it until it can\nno longer be improved.`),mdx(\"p\",null,`I think Aurélien Géron describes a great analogy for this method in his book “Hands-On Machine Learning with Scikit-Learn, Keras & TensorFlow”,\nso I will share it with you here.`),mdx(\"p\",null,`Imagine you are on the side of a hill and you want to get to the valley. But the\nair is very foggy. So foggy, that you can only see the ground you are standing on and nothing more.\nBut you can still feel the slope of the hill, right?\nSo by taking very small and cautious steps in the downward direction, you will eventually\nreach the valley. This is in essence how gradient descent works.`),mdx(\"p\",null,`Now let’s apply this to our problem. We can create a three-dimensional plot where we plot\nthe MSE (z-axis) for every `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`m`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`m`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`))))),` (x-axis) and every `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`b`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`b`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.69444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`b`))))),` (y-axis).\nSo let’s take a look:`),mdx(ConditionalLazyPlot,_extends({},somr_for_every_m_and_b_with_minimum,{mdxType:\"ConditionalLazyPlot\"}),mdx(\"p\",null,mdx(\"span\",{parentName:\"p\",\"className\":\"gatsby-resp-image-wrapper\",\"style\":{\"position\":\"relative\",\"display\":\"block\",\"marginLeft\":\"auto\",\"marginRight\":\"auto\",\"maxWidth\":\"727px\"}},`\n      `,mdx(\"span\",{parentName:\"span\",\"className\":\"gatsby-resp-image-background-image\",\"style\":{\"paddingBottom\":\"80.80000000000001%\",\"position\":\"relative\",\"bottom\":\"0\",\"left\":\"0\",\"backgroundImage\":\"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAQCAYAAAAWGF8bAAAACXBIWXMAABYlAAAWJQFJUiTwAAADZElEQVQ4y12U6W8bVRTFXUjseLcTL7E99oxn4njfxntip24cmtYh0FDqUgJtJNSFplLEogBqUaUKSpOGtgrQ0kggEYkvfET8fz/0xjgLH67u6N07Z845794xWaQSE9EyE9FRPg5RG8X/ayKsMR2TL0N9+RJbD77C5M9iOtl8EuDkuV2unKqPzm2yjsmTZGV9g7/++RN/qjMEHA8XMEeKR1+1yRXsSgWXWmMsVKT/4XVKi6u8GSpgjR0D2wRDb4rFK+vsH/6CNaoPAYPZDt5E8wjEqdZwqXUjLJEyT377jo+2bnPGnzfqgtmR5Mk0C+8P2PnjKR6thUkwS86toOhLRoNLq+OM14xsk8oo7Qs8+Ps1n+x8YzByKFUD1K5UDQKmyQz1tctsv/4ep1LHNBYqEM53mW31Da9EswBzaQ0cUonknW16vx/y9quXTFd7WKWSUXfEq4aSM1MZsqtXuPHiCR61MZQcLS1S7K4N5cZruGeauJUyHn2FyJcHxO4fkNo7RLp8C3u4gFMdqhCgb0ylUS8O6O/s4Us0MQnasr5Effmq4aPRrFbwzMwh9R4RHbwi9PE+oc0Dgjd3cc00ccarOOJD2WO+NOHzV6k+3MMjLBAMx0J58mcvESmcwyaX8cZbRLKbyPpztNYL1HM/Iff3iX7wK1PNazhiRcMS4fm4P81kd0Dx258JJBqYxG0JH7X6MrnOGp7EDRbv/sDm7jP82l2CqW2kwiPilT20zkvks49xaU0cSoWJmI45kMbdHhC+vYM1nBsCipsWBmfaq3gSXaKrN3nrx2fUP32ML3kHKb1FIPUZ4ex94vpzQrlb2OUSlqiOZTqDs/oe6vVd/LON400Rwx0t9Qik57EE81jkOYIXN4gsfYFS2GY6d49A9h7BzOf4kuv/raqOOZTFnX8XZeUhHq0yZDgC9SZa+NNtbGKotSZ2qYxzpsVk+h0CmQ18qWsEs33i1R6+1DzmSAlLJIs7uYrS/vo0oDBYzGEw02E6t4Aj0cQ1O49DbRjr5lKrRAoLaPXzTGcXjJGxSGXMUg6XegG5tIU3UTuWLLLwUuyxVltmKjWHe7aFK9EklO8SKy8ZlohRGQ8XMR+9l8cudwmm1/Em6qclj5iO2IoZFQMsbBA1cTb6OQz7R88VLFKF8UiBfwEC3Okkmux96wAAAABJRU5ErkJggg==')\",\"backgroundSize\":\"cover\",\"display\":\"block\"}}),`\n  `,mdx(\"picture\",{parentName:\"span\"},`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/cf986d6ce4798d5c00514f87e8f33744/601b1/3d_mse_with_minimum_plot.webp 500w\",\"/static/cf986d6ce4798d5c00514f87e8f33744/c55bc/3d_mse_with_minimum_plot.webp 727w\"],\"sizes\":\"(max-width: 727px) 100vw, 727px\",\"type\":\"image/webp\"}),`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/cf986d6ce4798d5c00514f87e8f33744/0eb09/3d_mse_with_minimum_plot.png 500w\",\"/static/cf986d6ce4798d5c00514f87e8f33744/96343/3d_mse_with_minimum_plot.png 727w\"],\"sizes\":\"(max-width: 727px) 100vw, 727px\",\"type\":\"image/png\"}),`\n          `,mdx(\"img\",{parentName:\"picture\",\"className\":\"gatsby-resp-image-image\",\"src\":\"/static/cf986d6ce4798d5c00514f87e8f33744/96343/3d_mse_with_minimum_plot.png\",\"alt\":\"MSE for every m and every b\",\"title\":\"MSE for every m and every b\",\"loading\":\"lazy\",\"decoding\":\"async\",\"style\":{\"width\":\"100%\",\"height\":\"100%\",\"margin\":\"0\",\"verticalAlign\":\"middle\",\"position\":\"absolute\",\"top\":\"0\",\"left\":\"0\"}}),`\n        `),`\n    `))),mdx(\"p\",null,`The purple point is the global minimum of our MSE. The question now is, how do we get to this point?\nWe know that we want to approach the minimum iteratively,\nso our end result should look something like this:`),mdx(AnimationPlayer,{path:\"../content/machine_learning_math/img/Gradient_Descent_for_Linear_Regression/anim/gradDesc/\",ending:\".png\",caption:\"Descending To Our Minimum\",identifier:\"gradDesc\",numframes:1,mdxType:\"AnimationPlayer\"},mdx(\"img\",{id:\"full\",src:\"/e3ff4ffdb65141a535c5d353d006e24f/gradDesc.webp\"}),mdx(\"span\",{\"className\":\"gatsby-resp-image-wrapper\",\"style\":{\"position\":\"relative\",\"display\":\"block\",\"marginLeft\":\"auto\",\"marginRight\":\"auto\",\"maxWidth\":\"700px\"}},`\n      `,mdx(\"span\",{parentName:\"span\",\"className\":\"gatsby-resp-image-background-image\",\"style\":{\"paddingBottom\":\"71.4%\",\"position\":\"relative\",\"bottom\":\"0\",\"left\":\"0\",\"backgroundImage\":\"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAOCAYAAAAvxDzwAAAACXBIWXMAAAsTAAALEwEAmpwYAAACCUlEQVQ4y42Ty2sTURTGi6BpzTtpnEkmz8lMZ5LO5J3JpHnS1LooilYsroRmIa0P2qJgF+5cFFyIgoK4cCuCa1fu/MN+kqSR2k5SFx/3cu+53/3OOd9ZWEyUOQ9XvHTx7D9iRliYF+SKT87OY96bBacLV2L6sIQ7XcOTtojk+nhl62/sNN6R8OzlZF/Bp9j4lRYhrUdY7xM1NxFWBwTUNn7FZilZdiT9R+FSssKy3kIqruNJNfErHYJan+XcOqJ5C9HYIKT3xx8s6118WYtrUnF2yu50lYjeYedwn63DA3xql6BsE9Y7COYG0cImwZUeQr5P4/YO7nR9dg2nCClN8je3Gf76if72G8LWMbHSENG4j2D0CGo92k9esDq4y5Ub5mnqDoQj6UHVJlEeIGht0q8+Ir/7TXbnO4r1Hql4hKg/Qt3/TOHZa9xSjcVkxdk2U9lXpSIBtUmq0CPU20Xe/UHW+oBWfY6Y3yPV+UT24CuCuY47bc9vytlaRvQWsUIfuX1CsvgGyXhKNHdE5s4XpM42sXwbb9Z2NPcFH47W66kqotFCMh8gFV8Sze+RqJ4QXxsS0SzCWouwtjZ2xaVNGdsnUSaoNhGNDrHCQ6LmMYnyY0IrdTwZi4DSuCBiPuFpsX2yhZDvEjPujUkCqo1Xro+nZ+6kOKU9hV9p4MlMFHsytbEbZpGNCP8ACamTXDUVIRcAAAAASUVORK5CYII=')\",\"backgroundSize\":\"cover\",\"display\":\"block\"}}),`\n  `,mdx(\"picture\",{parentName:\"span\"},`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/c7a1ae591ca605ac63a5d5b907a30caf/601b1/gradDesc_1.webp 500w\",\"/static/c7a1ae591ca605ac63a5d5b907a30caf/84c6d/gradDesc_1.webp 700w\"],\"sizes\":\"(max-width: 700px) 100vw, 700px\",\"type\":\"image/webp\"}),`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/c7a1ae591ca605ac63a5d5b907a30caf/0eb09/gradDesc_1.png 500w\",\"/static/c7a1ae591ca605ac63a5d5b907a30caf/a27c6/gradDesc_1.png 700w\"],\"sizes\":\"(max-width: 700px) 100vw, 700px\",\"type\":\"image/png\"}),`\n          `,mdx(\"img\",{parentName:\"picture\",\"className\":\"gatsby-resp-image-image\",\"src\":\"/static/c7a1ae591ca605ac63a5d5b907a30caf/a27c6/gradDesc_1.png\",\"alt\":\"gradDesc 1\",\"title\":\"gradDesc 1\",\"loading\":\"lazy\",\"decoding\":\"async\",\"style\":{\"width\":\"100%\",\"height\":\"100%\",\"margin\":\"0\",\"verticalAlign\":\"middle\",\"position\":\"absolute\",\"top\":\"0\",\"left\":\"0\"}}),`\n        `),`\n    `)),mdx(\"p\",null,`We have now covered the intuition, so let’s now slowly approach the math behind gradient descent.`),mdx(\"h2\",{\"id\":\"the-math\"},`The Math`),mdx(\"div\",null,mdx(\"p\",null,`Let’s start with the function that always returns zero.`,mdx(ToolTip,{width:\"20em\",trigger:\"*\",mdxType:\"ToolTip\"},` In a real world scenario, you would probably use what’s called a `,mdx(\"em\",{parentName:\"p\"},`weight-initializer`),`,\nwhich initializes the weights to “random” values that have certain beneficial properties. This topic is complex enough to deserve its own post, which I will create in the future. For now, starting out with this function is good enough.`),`\nWe will continuously improve this function\nbit by bit until we get our (almost) ideal function. Let’s call it `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msub\"},`f`),mdx(\"mn\",{parentName:\"msub\"},`0`))),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`f_0`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.8888799999999999em\",\"verticalAlign\":\"-0.19444em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.10764em\"}},`f`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.30110799999999993em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"-0.10764em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`0`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))))))),`.\nFor now, our function will look like this:`)),mdx(\"div\",{\"className\":\"math math-display\"},mdx(\"span\",{parentName:\"div\",\"className\":\"katex-display\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\",\"display\":\"block\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msub\"},`f`),mdx(\"mn\",{parentName:\"msub\"},`0`)),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mtext\",{parentName:\"msub\",\"mathvariant\":\"bold\"},`x`),mdx(\"mi\",{parentName:\"msub\"},`b`)),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mn\",{parentName:\"mrow\"},`0`),mdx(\"mi\",{parentName:\"mrow\"},`x`),mdx(\"mo\",{parentName:\"mrow\"},`+`),mdx(\"mn\",{parentName:\"mrow\"},`0`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mn\",{parentName:\"mrow\"},`0`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`f_0(\\\\textbf{x}_b) = 0x + 0 = 0`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"1em\",\"verticalAlign\":\"-0.25em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.10764em\"}},`f`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.30110799999999993em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"-0.10764em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`0`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord text\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord textbf\"},`x`)),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.33610799999999996em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`b`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.72777em\",\"verticalAlign\":\"-0.08333em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`0`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`x`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`+`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.64444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`0`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.64444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`0`)))))),mdx(\"p\",null,`In other terms, our `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`m`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`m`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`))))),` is 0 and our `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`b`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`b`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.69444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`b`))))),` is 0.\nIf we were to plug `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`f`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`f`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.8888799999999999em\",\"verticalAlign\":\"-0.19444em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.10764em\"}},`f`))))),` into our MSE, we would get:`),mdx(\"div\",{\"className\":\"math math-display\"},mdx(\"span\",{parentName:\"div\",\"className\":\"katex-display\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\",\"display\":\"block\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`M`),mdx(\"mi\",{parentName:\"mrow\"},`S`),mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msub\"},`E`),mdx(\"msub\",{parentName:\"msub\"},mdx(\"mi\",{parentName:\"msub\"},`f`),mdx(\"mn\",{parentName:\"msub\"},`0`))),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"mi\",{parentName:\"mrow\"},`m`),mdx(\"mo\",{parentName:\"mrow\",\"separator\":\"true\"},`,`),mdx(\"mi\",{parentName:\"mrow\"},`b`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mfrac\",{parentName:\"mrow\"},mdx(\"mn\",{parentName:\"mfrac\"},`1`),mdx(\"mi\",{parentName:\"mfrac\"},`n`)),mdx(\"munderover\",{parentName:\"mrow\"},mdx(\"mo\",{parentName:\"munderover\"},`∑`),mdx(\"mrow\",{parentName:\"munderover\"},mdx(\"mi\",{parentName:\"mrow\"},`i`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mn\",{parentName:\"mrow\"},`1`)),mdx(\"mn\",{parentName:\"munderover\"},`7`)),mdx(\"mrow\",{parentName:\"mrow\"},mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msub\"},`y`),mdx(\"mi\",{parentName:\"msub\"},`i`)),mdx(\"mo\",{parentName:\"mrow\"},`−`),mdx(\"mn\",{parentName:\"mrow\"},`0`),mdx(\"msup\",{parentName:\"mrow\"},mdx(\"mo\",{parentName:\"msup\",\"stretchy\":\"false\"},`)`),mdx(\"mn\",{parentName:\"msup\"},`2`)))),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`MSE_{f_0}(m,b) = \\\\frac{1}{n} \\\\sum_{i=1}^7{(y_i-0)^2}`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"1.036108em\",\"verticalAlign\":\"-0.286108em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.10903em\"}},`M`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.05764em\"}},`S`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.05764em\"}},`E`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.3361079999999999em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"-0.05764em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\",\"style\":{\"marginRight\":\"0.10764em\"}},`f`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.31731428571428577em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.357em\",\"marginLeft\":\"-0.10764em\",\"marginRight\":\"0.07142857142857144em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.5em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size3 size1 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`0`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.143em\"}},mdx(\"span\",{parentName:\"span\"})))))))))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.286108em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`),mdx(\"span\",{parentName:\"span\",\"className\":\"mpunct\"},`,`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.16666666666666666em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`b`),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"3.0787820000000004em\",\"verticalAlign\":\"-1.277669em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen nulldelimiter\"}),mdx(\"span\",{parentName:\"span\",\"className\":\"mfrac\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.32144em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.314em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`n`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.23em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"frac-line\",\"style\":{\"borderBottomWidth\":\"0.04em\"}})),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.677em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`1`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.686em\"}},mdx(\"span\",{parentName:\"span\"}))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose nulldelimiter\"})),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.16666666666666666em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mop op-limits\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.8011130000000004em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-1.872331em\",\"marginLeft\":\"0em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.05em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`i`),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel mtight\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`1`)))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.050005em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.05em\"}}),mdx(\"span\",{parentName:\"span\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mop op-symbol large-op\"},`∑`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-4.3000050000000005em\",\"marginLeft\":\"0em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.05em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`7`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.277669em\"}},mdx(\"span\",{parentName:\"span\"}))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.16666666666666666em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.03588em\"}},`y`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.31166399999999994em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"-0.03588em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`i`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`−`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`0`),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.8641079999999999em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.113em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`2`)))))))))))))),mdx(\"p\",null,`If we would also plug in our data points, we would get that the MSE for our function `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msub\"},`f`),mdx(\"mn\",{parentName:\"msub\"},`0`))),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`f_0`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.8888799999999999em\",\"verticalAlign\":\"-0.19444em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.10764em\"}},`f`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.30110799999999993em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"-0.10764em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`0`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))))))),` is ~`,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mn\",{parentName:\"mrow\"},`25`),mdx(\"msup\",{parentName:\"mrow\"},mdx(\"mn\",{parentName:\"msup\"},`5`),mdx(\"mn\",{parentName:\"msup\"},`2`))),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`255^2`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.8141079999999999em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`2`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`5`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`5`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.8141079999999999em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.063em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`2`)))))))))))),`.\nThis means that the predictions of our function are off by about 255.000`,`$`,` on average.`),mdx(\"h4\",{\"id\":\"the-gradient\"},`The Gradient`),mdx(\"p\",null,`Our MSE tells us how well (or rather how poorly) our function fits our data. This means that\nwe want to make our MSE as low as possible. Our MSE is just a function, so if you have\ntaken a calculus class before you might recall that we can compute the minimum of it directly\nby taking the first derivative of the MSE and setting it equal to 0.`),mdx(\"p\",null,`So if we have a function `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`f`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"mi\",{parentName:\"mrow\"},`x`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"msup\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msup\"},`x`),mdx(\"mn\",{parentName:\"msup\"},`2`))),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`f(x)=x^2`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"1em\",\"verticalAlign\":\"-0.25em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.10764em\"}},`f`),mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`x`),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.8141079999999999em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`x`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.8141079999999999em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.063em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`2`)))))))))))),` we can derive (or `,mdx(\"em\",{parentName:\"p\"},`differentiate`),`) it once and we get:`),mdx(\"div\",{\"className\":\"math math-display\"},mdx(\"span\",{parentName:\"div\",\"className\":\"katex-display\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\",\"display\":\"block\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"msup\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msup\"},`f`),mdx(\"mo\",{parentName:\"msup\",\"mathvariant\":\"normal\",\"lspace\":\"0em\",\"rspace\":\"0em\"},`′`)),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"mi\",{parentName:\"mrow\"},`x`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mn\",{parentName:\"mrow\"},`2`),mdx(\"mi\",{parentName:\"mrow\"},`x`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`f'(x)=2x`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"1.051892em\",\"verticalAlign\":\"-0.25em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.10764em\"}},`f`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.801892em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.113em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`′`))))))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`x`),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.64444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`2`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`x`)))))),mdx(\"p\",null,`This differentiation was done with respect to our variable `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`x`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`x`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`x`))))),`. This way of writing down\nthe derivative is called `,mdx(\"em\",{parentName:\"p\"},`Lagrange’s notation`),`, named after Joseph Louis Lagrange. We can also use what’s called `,mdx(\"em\",{parentName:\"p\"},`Leibniz’s notation`),`,\nnamed after Gottfried Wilhelm Leibniz.\nWith this our derivative now looks like this:`),mdx(\"div\",{\"className\":\"math math-display\"},mdx(\"span\",{parentName:\"div\",\"className\":\"katex-display\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\",\"display\":\"block\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mfrac\",{parentName:\"mrow\"},mdx(\"mrow\",{parentName:\"mfrac\"},mdx(\"mi\",{parentName:\"mrow\"},`d`),mdx(\"mi\",{parentName:\"mrow\"},`f`)),mdx(\"mrow\",{parentName:\"mfrac\"},mdx(\"mi\",{parentName:\"mrow\"},`d`),mdx(\"mi\",{parentName:\"mrow\"},`x`))),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mn\",{parentName:\"mrow\"},`2`),mdx(\"mi\",{parentName:\"mrow\"},`x`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`\\\\frac{df}{dx}=2x`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"2.0574399999999997em\",\"verticalAlign\":\"-0.686em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen nulldelimiter\"}),mdx(\"span\",{parentName:\"span\",\"className\":\"mfrac\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.3714399999999998em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.314em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`d`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`x`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.23em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"frac-line\",\"style\":{\"borderBottomWidth\":\"0.04em\"}})),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.677em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`d`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.10764em\"}},`f`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.686em\"}},mdx(\"span\",{parentName:\"span\"}))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose nulldelimiter\"})),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.64444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`2`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`x`)))))),mdx(\"p\",null,`With the Leibniz notation, we have to explicitly write out the variable in regard to which we want to\nderive our function to.`),mdx(\"p\",null,`But our MSE depends on two variables, not one. So how can we derive a function with two\nvariables? Well, we can compute what’s called a `,mdx(\"em\",{parentName:\"p\"},`partial derivative`),`.\nThis sounds fancy but it really just means: treat one variable as a variable\nand every other variable as a constant.`),mdx(\"p\",null,`So if our function looks like this: `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`f`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"mi\",{parentName:\"mrow\"},`x`),mdx(\"mo\",{parentName:\"mrow\",\"separator\":\"true\"},`,`),mdx(\"mi\",{parentName:\"mrow\"},`y`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mi\",{parentName:\"mrow\"},`x`),mdx(\"mo\",{parentName:\"mrow\"},`⋅`),mdx(\"mi\",{parentName:\"mrow\"},`y`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`f(x,y)=x \\\\cdot y`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"1em\",\"verticalAlign\":\"-0.25em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.10764em\"}},`f`),mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`x`),mdx(\"span\",{parentName:\"span\",\"className\":\"mpunct\"},`,`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.16666666666666666em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.03588em\"}},`y`),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.44445em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`x`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`⋅`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.625em\",\"verticalAlign\":\"-0.19444em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.03588em\"}},`y`))))),`,\nwe can now no longer calculate just one single derivative. Instead, we can calculate two\npartial derivatives. One with respect to `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`x`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`x`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`x`))))),`, and one with respect to `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`y`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`y`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.625em\",\"verticalAlign\":\"-0.19444em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.03588em\"}},`y`))))),`. We can write this down like this:`),mdx(\"div\",{\"className\":\"math math-display\"},mdx(\"span\",{parentName:\"div\",\"className\":\"katex-display\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\",\"display\":\"block\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mfrac\",{parentName:\"mrow\"},mdx(\"mrow\",{parentName:\"mfrac\"},mdx(\"mi\",{parentName:\"mrow\",\"mathvariant\":\"normal\"},`∂`),mdx(\"mi\",{parentName:\"mrow\"},`f`)),mdx(\"mrow\",{parentName:\"mfrac\"},mdx(\"mi\",{parentName:\"mrow\",\"mathvariant\":\"normal\"},`∂`),mdx(\"mi\",{parentName:\"mrow\"},`x`))),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mn\",{parentName:\"mrow\"},`1`),mdx(\"mo\",{parentName:\"mrow\"},`⋅`),mdx(\"mi\",{parentName:\"mrow\"},`y`),mdx(\"mspace\",{parentName:\"mrow\",\"linebreak\":\"newline\"}),mdx(\"mspace\",{parentName:\"mrow\",\"linebreak\":\"newline\"})),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`\n\\\\frac{\\\\partial f}{\\\\partial x} = 1 \\\\cdot y \\\\\\\\\\\\\\\\\n\n`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"2.0574399999999997em\",\"verticalAlign\":\"-0.686em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen nulldelimiter\"}),mdx(\"span\",{parentName:\"span\",\"className\":\"mfrac\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.3714399999999998em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.314em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\",\"style\":{\"marginRight\":\"0.05556em\"}},`∂`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`x`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.23em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"frac-line\",\"style\":{\"borderBottomWidth\":\"0.04em\"}})),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.677em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\",\"style\":{\"marginRight\":\"0.05556em\"}},`∂`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.10764em\"}},`f`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.686em\"}},mdx(\"span\",{parentName:\"span\"}))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose nulldelimiter\"})),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.64444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`1`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`⋅`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.625em\",\"verticalAlign\":\"-0.19444em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.03588em\"}},`y`)),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace newline\"}),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace newline\"}))))),mdx(\"div\",{\"className\":\"math math-display\"},mdx(\"span\",{parentName:\"div\",\"className\":\"katex-display\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\",\"display\":\"block\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mfrac\",{parentName:\"mrow\"},mdx(\"mrow\",{parentName:\"mfrac\"},mdx(\"mi\",{parentName:\"mrow\",\"mathvariant\":\"normal\"},`∂`),mdx(\"mi\",{parentName:\"mrow\"},`f`)),mdx(\"mrow\",{parentName:\"mfrac\"},mdx(\"mi\",{parentName:\"mrow\",\"mathvariant\":\"normal\"},`∂`),mdx(\"mi\",{parentName:\"mrow\"},`y`))),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mi\",{parentName:\"mrow\"},`x`),mdx(\"mo\",{parentName:\"mrow\"},`⋅`),mdx(\"mn\",{parentName:\"mrow\"},`1`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`\n\\\\frac{\\\\partial f}{\\\\partial y} = x \\\\cdot 1\n\n`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"2.25188em\",\"verticalAlign\":\"-0.8804400000000001em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen nulldelimiter\"}),mdx(\"span\",{parentName:\"span\",\"className\":\"mfrac\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.3714399999999998em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.314em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\",\"style\":{\"marginRight\":\"0.05556em\"}},`∂`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.03588em\"}},`y`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.23em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"frac-line\",\"style\":{\"borderBottomWidth\":\"0.04em\"}})),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.677em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\",\"style\":{\"marginRight\":\"0.05556em\"}},`∂`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.10764em\"}},`f`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.8804400000000001em\"}},mdx(\"span\",{parentName:\"span\"}))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose nulldelimiter\"})),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.44445em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`x`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`⋅`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.64444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`1`)))))),mdx(\"p\",null,`We now use the symbol `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\",\"mathvariant\":\"normal\"},`∂`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`\\\\partial`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.69444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\",\"style\":{\"marginRight\":\"0.05556em\"}},`∂`))))),` instead of `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`d`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`d`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.69444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`d`))))),` to signal that we are taking a partial derivative.`),mdx(\"p\",null,`When we differentiate with respect to `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`x`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`x`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`x`))))),`, we treat `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`y`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`y`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.625em\",\"verticalAlign\":\"-0.19444em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.03588em\"}},`y`))))),` as a constant and vice versa.\nThis is how we can calculate partial derivatives.\nSo let’s now calculate the partial derivatives of our MSE with respect to `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`m`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`m`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`))))),` and our MSE with respect to `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`b`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`b`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.69444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`b`))))),`.`),mdx(\"p\",null,`If you do the math, you will get something along the lines of:`),mdx(\"div\",{\"className\":\"math math-display\"},mdx(\"span\",{parentName:\"div\",\"className\":\"katex-display\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\",\"display\":\"block\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mfrac\",{parentName:\"mrow\"},mdx(\"mrow\",{parentName:\"mfrac\"},mdx(\"mi\",{parentName:\"mrow\",\"mathvariant\":\"normal\"},`∂`),mdx(\"mi\",{parentName:\"mrow\"},`M`),mdx(\"mi\",{parentName:\"mrow\"},`S`),mdx(\"mi\",{parentName:\"mrow\"},`E`)),mdx(\"mrow\",{parentName:\"mfrac\"},mdx(\"mi\",{parentName:\"mrow\",\"mathvariant\":\"normal\"},`∂`),mdx(\"mi\",{parentName:\"mrow\"},`m`))),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mfrac\",{parentName:\"mrow\"},mdx(\"mn\",{parentName:\"mfrac\"},`1`),mdx(\"mi\",{parentName:\"mfrac\"},`n`)),mdx(\"munderover\",{parentName:\"mrow\"},mdx(\"mo\",{parentName:\"munderover\"},`∑`),mdx(\"mrow\",{parentName:\"munderover\"},mdx(\"mi\",{parentName:\"mrow\"},`i`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mn\",{parentName:\"mrow\"},`1`)),mdx(\"mi\",{parentName:\"munderover\"},`n`)),mdx(\"mrow\",{parentName:\"mrow\"},mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"mn\",{parentName:\"mrow\"},`2`),mdx(\"mo\",{parentName:\"mrow\"},`⋅`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msub\"},`y`),mdx(\"mi\",{parentName:\"msub\"},`i`)),mdx(\"mo\",{parentName:\"mrow\"},`−`),mdx(\"mstyle\",{parentName:\"mrow\",\"mathcolor\":\"#26a6ed\"},mdx(\"mo\",{parentName:\"mstyle\",\"stretchy\":\"false\"},`(`),mdx(\"mi\",{parentName:\"mstyle\"},`m`),mdx(\"mi\",{parentName:\"mstyle\"},`x`),mdx(\"mo\",{parentName:\"mstyle\"},`+`),mdx(\"mi\",{parentName:\"mstyle\"},`b`),mdx(\"mo\",{parentName:\"mstyle\",\"stretchy\":\"false\"},`)`)),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`),mdx(\"mo\",{parentName:\"mrow\"},`⋅`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"mo\",{parentName:\"mrow\"},`−`),mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msub\"},`x`),mdx(\"mi\",{parentName:\"msub\"},`i`)),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`)),mdx(\"mspace\",{parentName:\"mrow\",\"linebreak\":\"newline\"}),mdx(\"mspace\",{parentName:\"mrow\",\"linebreak\":\"newline\"}),mdx(\"mfrac\",{parentName:\"mrow\"},mdx(\"mrow\",{parentName:\"mfrac\"},mdx(\"mi\",{parentName:\"mrow\",\"mathvariant\":\"normal\"},`∂`),mdx(\"mi\",{parentName:\"mrow\"},`M`),mdx(\"mi\",{parentName:\"mrow\"},`S`),mdx(\"mi\",{parentName:\"mrow\"},`E`)),mdx(\"mrow\",{parentName:\"mfrac\"},mdx(\"mi\",{parentName:\"mrow\",\"mathvariant\":\"normal\"},`∂`),mdx(\"mi\",{parentName:\"mrow\"},`b`))),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mfrac\",{parentName:\"mrow\"},mdx(\"mn\",{parentName:\"mfrac\"},`1`),mdx(\"mi\",{parentName:\"mfrac\"},`n`)),mdx(\"munderover\",{parentName:\"mrow\"},mdx(\"mo\",{parentName:\"munderover\"},`∑`),mdx(\"mrow\",{parentName:\"munderover\"},mdx(\"mi\",{parentName:\"mrow\"},`i`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mn\",{parentName:\"mrow\"},`1`)),mdx(\"mi\",{parentName:\"munderover\"},`n`)),mdx(\"mrow\",{parentName:\"mrow\"},mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"mn\",{parentName:\"mrow\"},`2`),mdx(\"mo\",{parentName:\"mrow\"},`⋅`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msub\"},`y`),mdx(\"mi\",{parentName:\"msub\"},`i`)),mdx(\"mo\",{parentName:\"mrow\"},`−`),mdx(\"mstyle\",{parentName:\"mrow\",\"mathcolor\":\"#26a6ed\"},mdx(\"mo\",{parentName:\"mstyle\",\"stretchy\":\"false\"},`(`),mdx(\"mi\",{parentName:\"mstyle\"},`m`),mdx(\"mi\",{parentName:\"mstyle\"},`x`),mdx(\"mo\",{parentName:\"mstyle\"},`+`),mdx(\"mi\",{parentName:\"mstyle\"},`b`),mdx(\"mo\",{parentName:\"mstyle\",\"stretchy\":\"false\"},`)`)),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`),mdx(\"mo\",{parentName:\"mrow\"},`⋅`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"mo\",{parentName:\"mrow\"},`−`),mdx(\"mn\",{parentName:\"mrow\"},`1`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`))),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`\n\\\\frac{\\\\partial MSE}{\\\\partial m} = \\\\frac{1}{n} \\\\sum_{i=1}^n{(2 \\\\cdot (y_i-{\\\\color{#26a6ed}(mx+b)}) \\\\cdot (-x_i))} \\\\\\\\\\\\\\\\\n\n\\\\frac{\\\\partial MSE}{\\\\partial b} = \\\\frac{1}{n} \\\\sum_{i=1}^n{(2 \\\\cdot (y_i-{\\\\color{#26a6ed}(mx+b)}) \\\\cdot (-1))}\n\n`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"2.05744em\",\"verticalAlign\":\"-0.686em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen nulldelimiter\"}),mdx(\"span\",{parentName:\"span\",\"className\":\"mfrac\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.37144em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.314em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\",\"style\":{\"marginRight\":\"0.05556em\"}},`∂`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.23em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"frac-line\",\"style\":{\"borderBottomWidth\":\"0.04em\"}})),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.677em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\",\"style\":{\"marginRight\":\"0.05556em\"}},`∂`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.10903em\"}},`M`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.05764em\"}},`S`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.05764em\"}},`E`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.686em\"}},mdx(\"span\",{parentName:\"span\"}))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose nulldelimiter\"})),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"2.929066em\",\"verticalAlign\":\"-1.277669em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen nulldelimiter\"}),mdx(\"span\",{parentName:\"span\",\"className\":\"mfrac\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.32144em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.314em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`n`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.23em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"frac-line\",\"style\":{\"borderBottomWidth\":\"0.04em\"}})),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.677em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`1`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.686em\"}},mdx(\"span\",{parentName:\"span\"}))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose nulldelimiter\"})),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.16666666666666666em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mop op-limits\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.6513970000000002em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-1.872331em\",\"marginLeft\":\"0em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.05em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`i`),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel mtight\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`1`)))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.050005em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.05em\"}}),mdx(\"span\",{parentName:\"span\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mop op-symbol large-op\"},`∑`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-4.3000050000000005em\",\"marginLeft\":\"0em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.05em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`n`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.277669em\"}},mdx(\"span\",{parentName:\"span\"}))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.16666666666666666em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`2`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`⋅`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.03588em\"}},`y`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.31166399999999994em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"-0.03588em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`i`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`−`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\",\"style\":{\"color\":\"#26a6ed\"}},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"color\":\"#26a6ed\"}},`m`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"color\":\"#26a6ed\"}},`x`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\",\"style\":{\"color\":\"#26a6ed\"}},`+`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"color\":\"#26a6ed\"}},`b`),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\",\"style\":{\"color\":\"#26a6ed\"}},`)`)),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`⋅`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`−`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`x`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.31166399999999994em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"0em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`i`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`))),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace newline\"}),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace newline\"}),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"2.05744em\",\"verticalAlign\":\"-0.686em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen nulldelimiter\"}),mdx(\"span\",{parentName:\"span\",\"className\":\"mfrac\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.37144em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.314em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\",\"style\":{\"marginRight\":\"0.05556em\"}},`∂`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`b`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.23em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"frac-line\",\"style\":{\"borderBottomWidth\":\"0.04em\"}})),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.677em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\",\"style\":{\"marginRight\":\"0.05556em\"}},`∂`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.10903em\"}},`M`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.05764em\"}},`S`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.05764em\"}},`E`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.686em\"}},mdx(\"span\",{parentName:\"span\"}))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose nulldelimiter\"})),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"2.929066em\",\"verticalAlign\":\"-1.277669em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen nulldelimiter\"}),mdx(\"span\",{parentName:\"span\",\"className\":\"mfrac\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.32144em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.314em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`n`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.23em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"frac-line\",\"style\":{\"borderBottomWidth\":\"0.04em\"}})),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.677em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`1`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.686em\"}},mdx(\"span\",{parentName:\"span\"}))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose nulldelimiter\"})),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.16666666666666666em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mop op-limits\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.6513970000000002em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-1.872331em\",\"marginLeft\":\"0em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.05em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`i`),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel mtight\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`1`)))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.050005em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.05em\"}}),mdx(\"span\",{parentName:\"span\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mop op-symbol large-op\"},`∑`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-4.3000050000000005em\",\"marginLeft\":\"0em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.05em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`n`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.277669em\"}},mdx(\"span\",{parentName:\"span\"}))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.16666666666666666em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`2`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`⋅`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.03588em\"}},`y`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.31166399999999994em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"-0.03588em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`i`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`−`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\",\"style\":{\"color\":\"#26a6ed\"}},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"color\":\"#26a6ed\"}},`m`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"color\":\"#26a6ed\"}},`x`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\",\"style\":{\"color\":\"#26a6ed\"}},`+`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"color\":\"#26a6ed\"}},`b`),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\",\"style\":{\"color\":\"#26a6ed\"}},`)`)),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`⋅`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`−`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`1`),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`))))))),mdx(\"p\",null,`which we can simplify to:`),mdx(\"div\",{\"className\":\"math math-display\"},mdx(\"span\",{parentName:\"div\",\"className\":\"katex-display\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\",\"display\":\"block\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mfrac\",{parentName:\"mrow\"},mdx(\"mrow\",{parentName:\"mfrac\"},mdx(\"mi\",{parentName:\"mrow\",\"mathvariant\":\"normal\"},`∂`),mdx(\"mi\",{parentName:\"mrow\"},`M`),mdx(\"mi\",{parentName:\"mrow\"},`S`),mdx(\"mi\",{parentName:\"mrow\"},`E`)),mdx(\"mrow\",{parentName:\"mfrac\"},mdx(\"mi\",{parentName:\"mrow\",\"mathvariant\":\"normal\"},`∂`),mdx(\"mi\",{parentName:\"mrow\"},`m`))),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mfrac\",{parentName:\"mrow\"},mdx(\"mrow\",{parentName:\"mfrac\"},mdx(\"mo\",{parentName:\"mrow\"},`−`),mdx(\"mn\",{parentName:\"mrow\"},`2`)),mdx(\"mi\",{parentName:\"mfrac\"},`n`)),mdx(\"munderover\",{parentName:\"mrow\"},mdx(\"mo\",{parentName:\"munderover\"},`∑`),mdx(\"mrow\",{parentName:\"munderover\"},mdx(\"mi\",{parentName:\"mrow\"},`i`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mn\",{parentName:\"mrow\"},`1`)),mdx(\"mi\",{parentName:\"munderover\"},`n`)),mdx(\"mrow\",{parentName:\"mrow\"},mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msub\"},`y`),mdx(\"mi\",{parentName:\"msub\"},`i`)),mdx(\"mo\",{parentName:\"mrow\"},`−`),mdx(\"mstyle\",{parentName:\"mrow\",\"mathcolor\":\"#26a6ed\"},mdx(\"mo\",{parentName:\"mstyle\",\"stretchy\":\"false\"},`(`),mdx(\"mi\",{parentName:\"mstyle\"},`m`),mdx(\"mi\",{parentName:\"mstyle\"},`x`),mdx(\"mo\",{parentName:\"mstyle\"},`+`),mdx(\"mi\",{parentName:\"mstyle\"},`b`),mdx(\"mo\",{parentName:\"mstyle\",\"stretchy\":\"false\"},`)`)),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`),mdx(\"mo\",{parentName:\"mrow\"},`⋅`),mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msub\"},`x`),mdx(\"mi\",{parentName:\"msub\"},`i`)),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`)),mdx(\"mspace\",{parentName:\"mrow\",\"linebreak\":\"newline\"}),mdx(\"mspace\",{parentName:\"mrow\",\"linebreak\":\"newline\"}),mdx(\"mfrac\",{parentName:\"mrow\"},mdx(\"mrow\",{parentName:\"mfrac\"},mdx(\"mi\",{parentName:\"mrow\",\"mathvariant\":\"normal\"},`∂`),mdx(\"mi\",{parentName:\"mrow\"},`M`),mdx(\"mi\",{parentName:\"mrow\"},`S`),mdx(\"mi\",{parentName:\"mrow\"},`E`)),mdx(\"mrow\",{parentName:\"mfrac\"},mdx(\"mi\",{parentName:\"mrow\",\"mathvariant\":\"normal\"},`∂`),mdx(\"mi\",{parentName:\"mrow\"},`b`))),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mfrac\",{parentName:\"mrow\"},mdx(\"mrow\",{parentName:\"mfrac\"},mdx(\"mo\",{parentName:\"mrow\"},`−`),mdx(\"mn\",{parentName:\"mrow\"},`2`)),mdx(\"mi\",{parentName:\"mfrac\"},`n`)),mdx(\"munderover\",{parentName:\"mrow\"},mdx(\"mo\",{parentName:\"munderover\"},`∑`),mdx(\"mrow\",{parentName:\"munderover\"},mdx(\"mi\",{parentName:\"mrow\"},`i`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mn\",{parentName:\"mrow\"},`1`)),mdx(\"mi\",{parentName:\"munderover\"},`n`)),mdx(\"mrow\",{parentName:\"mrow\"},mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msub\"},`y`),mdx(\"mi\",{parentName:\"msub\"},`i`)),mdx(\"mo\",{parentName:\"mrow\"},`−`),mdx(\"mstyle\",{parentName:\"mrow\",\"mathcolor\":\"#26a6ed\"},mdx(\"mo\",{parentName:\"mstyle\",\"stretchy\":\"false\"},`(`),mdx(\"mi\",{parentName:\"mstyle\"},`m`),mdx(\"mi\",{parentName:\"mstyle\"},`x`),mdx(\"mo\",{parentName:\"mstyle\"},`+`),mdx(\"mi\",{parentName:\"mstyle\"},`b`),mdx(\"mo\",{parentName:\"mstyle\",\"stretchy\":\"false\"},`)`)),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`))),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`\n\\\\frac{\\\\partial MSE}{\\\\partial m} = \\\\frac{-2}{n} \\\\sum_{i=1}^n{((y_i-{\\\\color{#26a6ed}(mx+b)}) \\\\cdot x_i)} \\\\\\\\\\\\\\\\\n\n\\\\frac{\\\\partial MSE}{\\\\partial b} = \\\\frac{-2}{n} \\\\sum_{i=1}^n{(y_i-{\\\\color{#26a6ed}(mx+b)})}\n\n`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"2.05744em\",\"verticalAlign\":\"-0.686em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen nulldelimiter\"}),mdx(\"span\",{parentName:\"span\",\"className\":\"mfrac\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.37144em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.314em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\",\"style\":{\"marginRight\":\"0.05556em\"}},`∂`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.23em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"frac-line\",\"style\":{\"borderBottomWidth\":\"0.04em\"}})),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.677em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\",\"style\":{\"marginRight\":\"0.05556em\"}},`∂`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.10903em\"}},`M`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.05764em\"}},`S`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.05764em\"}},`E`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.686em\"}},mdx(\"span\",{parentName:\"span\"}))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose nulldelimiter\"})),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"2.929066em\",\"verticalAlign\":\"-1.277669em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen nulldelimiter\"}),mdx(\"span\",{parentName:\"span\",\"className\":\"mfrac\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.32144em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.314em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`n`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.23em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"frac-line\",\"style\":{\"borderBottomWidth\":\"0.04em\"}})),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.677em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`−`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`2`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.686em\"}},mdx(\"span\",{parentName:\"span\"}))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose nulldelimiter\"})),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.16666666666666666em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mop op-limits\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.6513970000000002em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-1.872331em\",\"marginLeft\":\"0em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.05em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`i`),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel mtight\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`1`)))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.050005em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.05em\"}}),mdx(\"span\",{parentName:\"span\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mop op-symbol large-op\"},`∑`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-4.3000050000000005em\",\"marginLeft\":\"0em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.05em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`n`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.277669em\"}},mdx(\"span\",{parentName:\"span\"}))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.16666666666666666em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.03588em\"}},`y`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.31166399999999994em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"-0.03588em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`i`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`−`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\",\"style\":{\"color\":\"#26a6ed\"}},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"color\":\"#26a6ed\"}},`m`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"color\":\"#26a6ed\"}},`x`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\",\"style\":{\"color\":\"#26a6ed\"}},`+`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"color\":\"#26a6ed\"}},`b`),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\",\"style\":{\"color\":\"#26a6ed\"}},`)`)),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`⋅`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`x`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.31166399999999994em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"0em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`i`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`))),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace newline\"}),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace newline\"}),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"2.05744em\",\"verticalAlign\":\"-0.686em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen nulldelimiter\"}),mdx(\"span\",{parentName:\"span\",\"className\":\"mfrac\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.37144em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.314em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\",\"style\":{\"marginRight\":\"0.05556em\"}},`∂`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`b`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.23em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"frac-line\",\"style\":{\"borderBottomWidth\":\"0.04em\"}})),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.677em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\",\"style\":{\"marginRight\":\"0.05556em\"}},`∂`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.10903em\"}},`M`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.05764em\"}},`S`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.05764em\"}},`E`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.686em\"}},mdx(\"span\",{parentName:\"span\"}))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose nulldelimiter\"})),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"2.929066em\",\"verticalAlign\":\"-1.277669em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen nulldelimiter\"}),mdx(\"span\",{parentName:\"span\",\"className\":\"mfrac\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.32144em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.314em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`n`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.23em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"frac-line\",\"style\":{\"borderBottomWidth\":\"0.04em\"}})),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.677em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`−`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`2`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.686em\"}},mdx(\"span\",{parentName:\"span\"}))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose nulldelimiter\"})),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.16666666666666666em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mop op-limits\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.6513970000000002em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-1.872331em\",\"marginLeft\":\"0em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.05em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`i`),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel mtight\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`1`)))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.050005em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.05em\"}}),mdx(\"span\",{parentName:\"span\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mop op-symbol large-op\"},`∑`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-4.3000050000000005em\",\"marginLeft\":\"0em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.05em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`n`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.277669em\"}},mdx(\"span\",{parentName:\"span\"}))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.16666666666666666em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.03588em\"}},`y`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.31166399999999994em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"-0.03588em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`i`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`−`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\",\"style\":{\"color\":\"#26a6ed\"}},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"color\":\"#26a6ed\"}},`m`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"color\":\"#26a6ed\"}},`x`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\",\"style\":{\"color\":\"#26a6ed\"}},`+`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"color\":\"#26a6ed\"}},`b`),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\",\"style\":{\"color\":\"#26a6ed\"}},`)`)),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`))))))),mdx(\"p\",null,`The parts colored in blue are equal to `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`f`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"mi\",{parentName:\"mrow\"},`x`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`f(x)`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"1em\",\"verticalAlign\":\"-0.25em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.10764em\"}},`f`),mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`x`),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`))))),`.`),mdx(\"p\",null,`What we just calculated is the `,mdx(\"em\",{parentName:\"p\"},`gradient`),` of our function!\nThe gradient for a function is denoted with the symbol `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\",\"mathvariant\":\"normal\"},`∇`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`\\\\nabla`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.68333em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`∇`))))),mdx(ToolTip,{trigger:\"*\",mdxType:\"ToolTip\"},`It’s called a `,mdx(\"em\",{parentName:\"p\"},`nabla`),`! 😄`),`\nA gradient is just a representation of all of the partial derivatives of a function.\nSo for our MSE, the gradient looks like this:`),mdx(\"div\",{\"className\":\"math math-display\"},mdx(\"span\",{parentName:\"div\",\"className\":\"katex-display\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\",\"display\":\"block\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\",\"mathvariant\":\"normal\"},`∇`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"mi\",{parentName:\"mrow\"},`M`),mdx(\"mi\",{parentName:\"mrow\"},`S`),mdx(\"mi\",{parentName:\"mrow\"},`E`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mrow\",{parentName:\"mrow\"},mdx(\"mo\",{parentName:\"mrow\",\"fence\":\"true\"},`[`),mdx(\"mtable\",{parentName:\"mrow\",\"rowspacing\":\"0.15999999999999992em\",\"columnalign\":\"center\",\"columnspacing\":\"1em\"},mdx(\"mtr\",{parentName:\"mtable\"},mdx(\"mtd\",{parentName:\"mtr\"},mdx(\"mstyle\",{parentName:\"mtd\",\"scriptlevel\":\"0\",\"displaystyle\":\"false\"},mdx(\"mrow\",{parentName:\"mstyle\"},mdx(\"mfrac\",{parentName:\"mrow\"},mdx(\"mrow\",{parentName:\"mfrac\"},mdx(\"mo\",{parentName:\"mrow\"},`−`),mdx(\"mn\",{parentName:\"mrow\"},`2`)),mdx(\"mi\",{parentName:\"mfrac\"},`n`)),mdx(\"msubsup\",{parentName:\"mrow\"},mdx(\"mo\",{parentName:\"msubsup\"},`∑`),mdx(\"mrow\",{parentName:\"msubsup\"},mdx(\"mi\",{parentName:\"mrow\"},`i`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mn\",{parentName:\"mrow\"},`1`)),mdx(\"mi\",{parentName:\"msubsup\"},`n`)),mdx(\"mrow\",{parentName:\"mrow\"},mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msub\"},`y`),mdx(\"mi\",{parentName:\"msub\"},`i`)),mdx(\"mo\",{parentName:\"mrow\"},`−`),mdx(\"mstyle\",{parentName:\"mrow\",\"mathcolor\":\"#26a6ed\"},mdx(\"mo\",{parentName:\"mstyle\",\"stretchy\":\"false\"},`(`),mdx(\"mi\",{parentName:\"mstyle\"},`m`),mdx(\"mi\",{parentName:\"mstyle\"},`x`),mdx(\"mo\",{parentName:\"mstyle\"},`+`),mdx(\"mi\",{parentName:\"mstyle\"},`b`),mdx(\"mo\",{parentName:\"mstyle\",\"stretchy\":\"false\"},`)`)),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`),mdx(\"mo\",{parentName:\"mrow\"},`⋅`),mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msub\"},`x`),mdx(\"mi\",{parentName:\"msub\"},`i`)),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`)))))),mdx(\"mtr\",{parentName:\"mtable\"},mdx(\"mtd\",{parentName:\"mtr\"},mdx(\"mstyle\",{parentName:\"mtd\",\"scriptlevel\":\"0\",\"displaystyle\":\"false\"},mdx(\"mrow\",{parentName:\"mstyle\"})))),mdx(\"mtr\",{parentName:\"mtable\"},mdx(\"mtd\",{parentName:\"mtr\"},mdx(\"mstyle\",{parentName:\"mtd\",\"scriptlevel\":\"0\",\"displaystyle\":\"false\"},mdx(\"mrow\",{parentName:\"mstyle\"},mdx(\"mfrac\",{parentName:\"mrow\"},mdx(\"mrow\",{parentName:\"mfrac\"},mdx(\"mo\",{parentName:\"mrow\"},`−`),mdx(\"mn\",{parentName:\"mrow\"},`2`)),mdx(\"mi\",{parentName:\"mfrac\"},`n`)),mdx(\"msubsup\",{parentName:\"mrow\"},mdx(\"mo\",{parentName:\"msubsup\"},`∑`),mdx(\"mrow\",{parentName:\"msubsup\"},mdx(\"mi\",{parentName:\"mrow\"},`i`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mn\",{parentName:\"mrow\"},`1`)),mdx(\"mi\",{parentName:\"msubsup\"},`n`)),mdx(\"mrow\",{parentName:\"mrow\"},mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msub\"},`y`),mdx(\"mi\",{parentName:\"msub\"},`i`)),mdx(\"mo\",{parentName:\"mrow\"},`−`),mdx(\"mstyle\",{parentName:\"mrow\",\"mathcolor\":\"#26a6ed\"},mdx(\"mo\",{parentName:\"mstyle\",\"stretchy\":\"false\"},`(`),mdx(\"mi\",{parentName:\"mstyle\"},`m`),mdx(\"mi\",{parentName:\"mstyle\"},`x`),mdx(\"mo\",{parentName:\"mstyle\"},`+`),mdx(\"mi\",{parentName:\"mstyle\"},`b`),mdx(\"mo\",{parentName:\"mstyle\",\"stretchy\":\"false\"},`)`)),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`))))))),mdx(\"mo\",{parentName:\"mrow\",\"fence\":\"true\"},`]`))),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`\n\\\\nabla(MSE) = \\\\left[\\\\begin{array}{c}\n\n    \\\\frac{-2}{n} \\\\sum_{i=1}^n{((y_i-{\\\\color{#26a6ed}(mx+b)}) \\\\cdot x_i)} \\\\\\\\\\\\\\\\\n\n    \\\\frac{-2}{n} \\\\sum_{i=1}^n{(y_i-{\\\\color{#26a6ed}(mx+b)})}\n\n\\\\end{array}\\\\right]\n\n`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"1em\",\"verticalAlign\":\"-0.25em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`∇`),mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.10903em\"}},`M`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.05764em\"}},`S`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.05764em\"}},`E`),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"3.6102160000000003em\",\"verticalAlign\":\"-1.5551080000000006em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"minner\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},mdx(\"span\",{parentName:\"span\",\"className\":\"delimsizing mult\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"2.0510099999999998em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.2500000000000004em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.1550000000000002em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"delimsizinginner delim-size4\"},mdx(\"span\",{parentName:\"span\"},`⎣`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.8099900000000004em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.1550000000000002em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"delimsizinginner delim-size4\"},mdx(\"span\",{parentName:\"span\"},`⎢`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-4.05101em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.1550000000000002em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"delimsizinginner delim-size4\"},mdx(\"span\",{parentName:\"span\"},`⎡`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.55002em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mtable\"},mdx(\"span\",{parentName:\"span\",\"className\":\"arraycolsep\",\"style\":{\"width\":\"0.5em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"col-align-c\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"2.0551079999999997em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-4.21em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen nulldelimiter\"}),mdx(\"span\",{parentName:\"span\",\"className\":\"mfrac\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.845108em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.6550000000000002em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`n`)))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.23em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"frac-line\",\"style\":{\"borderBottomWidth\":\"0.04em\"}})),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.394em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`−`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`2`))))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.345em\"}},mdx(\"span\",{parentName:\"span\"}))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose nulldelimiter\"})),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.16666666666666666em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mop\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mop op-symbol small-op\",\"style\":{\"position\":\"relative\",\"top\":\"-0.0000050000000000050004em\"}},`∑`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.804292em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.40029em\",\"marginLeft\":\"0em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`i`),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel mtight\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`1`)))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.2029em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`n`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.29971000000000003em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.16666666666666666em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.03588em\"}},`y`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.31166399999999994em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"-0.03588em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`i`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`−`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\",\"style\":{\"color\":\"#26a6ed\"}},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"color\":\"#26a6ed\"}},`m`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"color\":\"#26a6ed\"}},`x`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\",\"style\":{\"color\":\"#26a6ed\"}},`+`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"color\":\"#26a6ed\"}},`b`),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\",\"style\":{\"color\":\"#26a6ed\"}},`)`)),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`⋅`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`x`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.31166399999999994em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"0em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`i`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`)))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.0099999999999993em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"})),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-1.8048919999999995em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen nulldelimiter\"}),mdx(\"span\",{parentName:\"span\",\"className\":\"mfrac\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.845108em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.6550000000000002em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`n`)))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.23em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"frac-line\",\"style\":{\"borderBottomWidth\":\"0.04em\"}})),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.394em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`−`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`2`))))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.345em\"}},mdx(\"span\",{parentName:\"span\"}))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose nulldelimiter\"})),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.16666666666666666em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mop\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mop op-symbol small-op\",\"style\":{\"position\":\"relative\",\"top\":\"-0.0000050000000000050004em\"}},`∑`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.804292em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.40029em\",\"marginLeft\":\"0em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`i`),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel mtight\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`1`)))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.2029em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`n`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.29971000000000003em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.16666666666666666em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.03588em\"}},`y`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.31166399999999994em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"-0.03588em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`i`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`−`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\",\"style\":{\"color\":\"#26a6ed\"}},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"color\":\"#26a6ed\"}},`m`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"color\":\"#26a6ed\"}},`x`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\",\"style\":{\"color\":\"#26a6ed\"}},`+`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"color\":\"#26a6ed\"}},`b`),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\",\"style\":{\"color\":\"#26a6ed\"}},`)`)),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`))))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.5551080000000006em\"}},mdx(\"span\",{parentName:\"span\"}))))),mdx(\"span\",{parentName:\"span\",\"className\":\"arraycolsep\",\"style\":{\"width\":\"0.5em\"}}))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},mdx(\"span\",{parentName:\"span\",\"className\":\"delimsizing mult\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"2.0510099999999998em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.2500000000000004em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.1550000000000002em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"delimsizinginner delim-size4\"},mdx(\"span\",{parentName:\"span\"},`⎦`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.8099900000000004em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.1550000000000002em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"delimsizinginner delim-size4\"},mdx(\"span\",{parentName:\"span\"},`⎥`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-4.05101em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.1550000000000002em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"delimsizinginner delim-size4\"},mdx(\"span\",{parentName:\"span\"},`⎤`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.55002em\"}},mdx(\"span\",{parentName:\"span\"})))))))))))),mdx(\"p\",null,`If we now plug in our values for `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`m`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`m`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`))))),` and `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`b`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`b`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.69444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`b`))))),`, namely 0 and 0,\nand we also explicitly write out our data values, we get:`),mdx(\"div\",{\"className\":\"math math-display\"},mdx(\"span\",{parentName:\"div\",\"className\":\"katex-display\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\",\"display\":\"block\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\",\"mathvariant\":\"normal\"},`∇`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"mi\",{parentName:\"mrow\"},`M`),mdx(\"mi\",{parentName:\"mrow\"},`S`),mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msub\"},`E`),mdx(\"msub\",{parentName:\"msub\"},mdx(\"mi\",{parentName:\"msub\"},`f`),mdx(\"mn\",{parentName:\"msub\"},`0`))),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mrow\",{parentName:\"mrow\"},mdx(\"mo\",{parentName:\"mrow\",\"fence\":\"true\"},`[`),mdx(\"mtable\",{parentName:\"mrow\",\"rowspacing\":\"0.15999999999999992em\",\"columnalign\":\"center\",\"columnspacing\":\"1em\"},mdx(\"mtr\",{parentName:\"mtable\"},mdx(\"mtd\",{parentName:\"mtr\"},mdx(\"mstyle\",{parentName:\"mtd\",\"scriptlevel\":\"0\",\"displaystyle\":\"false\"},mdx(\"mrow\",{parentName:\"mstyle\"},mdx(\"mfrac\",{parentName:\"mrow\"},mdx(\"mrow\",{parentName:\"mfrac\"},mdx(\"mo\",{parentName:\"mrow\"},`−`),mdx(\"mn\",{parentName:\"mrow\"},`2`)),mdx(\"mn\",{parentName:\"mfrac\"},`7`)),mdx(\"mo\",{parentName:\"mrow\"},`⋅`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"mn\",{parentName:\"mrow\"},`80`),mdx(\"mo\",{parentName:\"mrow\"},`−`),mdx(\"mstyle\",{parentName:\"mrow\",\"mathcolor\":\"#26a6ed\"},mdx(\"mn\",{parentName:\"mstyle\"},`0`)),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`),mdx(\"mo\",{parentName:\"mrow\"},`⋅`),mdx(\"mn\",{parentName:\"mrow\"},`1`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`),mdx(\"mo\",{parentName:\"mrow\"},`+`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"mn\",{parentName:\"mrow\"},`170`),mdx(\"mo\",{parentName:\"mrow\"},`−`),mdx(\"mstyle\",{parentName:\"mrow\",\"mathcolor\":\"#26a6ed\"},mdx(\"mn\",{parentName:\"mstyle\"},`0`)),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`),mdx(\"mo\",{parentName:\"mrow\"},`⋅`),mdx(\"mn\",{parentName:\"mrow\"},`2`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`),mdx(\"mo\",{parentName:\"mrow\"},`+`),mdx(\"mi\",{parentName:\"mrow\",\"mathvariant\":\"normal\"},`.`),mdx(\"mi\",{parentName:\"mrow\",\"mathvariant\":\"normal\"},`.`),mdx(\"mi\",{parentName:\"mrow\",\"mathvariant\":\"normal\"},`.`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`))))),mdx(\"mtr\",{parentName:\"mtable\"},mdx(\"mtd\",{parentName:\"mtr\"},mdx(\"mstyle\",{parentName:\"mtd\",\"scriptlevel\":\"0\",\"displaystyle\":\"false\"},mdx(\"mrow\",{parentName:\"mstyle\"})))),mdx(\"mtr\",{parentName:\"mtable\"},mdx(\"mtd\",{parentName:\"mtr\"},mdx(\"mstyle\",{parentName:\"mtd\",\"scriptlevel\":\"0\",\"displaystyle\":\"false\"},mdx(\"mrow\",{parentName:\"mstyle\"},mdx(\"mfrac\",{parentName:\"mrow\"},mdx(\"mrow\",{parentName:\"mfrac\"},mdx(\"mo\",{parentName:\"mrow\"},`−`),mdx(\"mn\",{parentName:\"mrow\"},`2`)),mdx(\"mn\",{parentName:\"mfrac\"},`7`)),mdx(\"mo\",{parentName:\"mrow\"},`⋅`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"mn\",{parentName:\"mrow\"},`80`),mdx(\"mo\",{parentName:\"mrow\"},`−`),mdx(\"mstyle\",{parentName:\"mrow\",\"mathcolor\":\"#26a6ed\"},mdx(\"mn\",{parentName:\"mstyle\"},`0`)),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`),mdx(\"mo\",{parentName:\"mrow\"},`+`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"mn\",{parentName:\"mrow\"},`170`),mdx(\"mo\",{parentName:\"mrow\"},`−`),mdx(\"mstyle\",{parentName:\"mrow\",\"mathcolor\":\"#26a6ed\"},mdx(\"mn\",{parentName:\"mstyle\"},`0`)),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`),mdx(\"mo\",{parentName:\"mrow\"},`+`),mdx(\"mi\",{parentName:\"mrow\",\"mathvariant\":\"normal\"},`.`),mdx(\"mi\",{parentName:\"mrow\",\"mathvariant\":\"normal\"},`.`),mdx(\"mi\",{parentName:\"mrow\",\"mathvariant\":\"normal\"},`.`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`)))))),mdx(\"mo\",{parentName:\"mrow\",\"fence\":\"true\"},`]`))),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`\n\\\\nabla(MSE_{f_0}) = \\\\left[\\\\begin{array}{c}\n\n    \\\\frac{-2}{7} \\\\cdot (((80-{\\\\color{#26a6ed}0}) \\\\cdot 1) + ((170-{\\\\color{#26a6ed}0}) \\\\cdot 2) + ...) \\\\\\\\\\\\\\\\\n\n    \\\\frac{-2}{7} \\\\cdot ((80-{\\\\color{#26a6ed}0}) + (170-{\\\\color{#26a6ed}0}) + ...)\n\n\\\\end{array}\\\\right]\n\n`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"1.036108em\",\"verticalAlign\":\"-0.286108em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`∇`),mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.10903em\"}},`M`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.05764em\"}},`S`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.05764em\"}},`E`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.3361079999999999em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"-0.05764em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\",\"style\":{\"marginRight\":\"0.10764em\"}},`f`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.31731428571428577em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.357em\",\"marginLeft\":\"-0.10764em\",\"marginRight\":\"0.07142857142857144em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.5em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size3 size1 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`0`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.143em\"}},mdx(\"span\",{parentName:\"span\"})))))))))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.286108em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"3.6102160000000003em\",\"verticalAlign\":\"-1.5551080000000006em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"minner\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},mdx(\"span\",{parentName:\"span\",\"className\":\"delimsizing mult\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"2.0510099999999998em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.2500000000000004em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.1550000000000002em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"delimsizinginner delim-size4\"},mdx(\"span\",{parentName:\"span\"},`⎣`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.8099900000000004em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.1550000000000002em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"delimsizinginner delim-size4\"},mdx(\"span\",{parentName:\"span\"},`⎢`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-4.05101em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.1550000000000002em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"delimsizinginner delim-size4\"},mdx(\"span\",{parentName:\"span\"},`⎡`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.55002em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mtable\"},mdx(\"span\",{parentName:\"span\",\"className\":\"arraycolsep\",\"style\":{\"width\":\"0.5em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"col-align-c\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"2.0551079999999997em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-4.21em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen nulldelimiter\"}),mdx(\"span\",{parentName:\"span\",\"className\":\"mfrac\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.845108em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.6550000000000002em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`7`)))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.23em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"frac-line\",\"style\":{\"borderBottomWidth\":\"0.04em\"}})),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.394em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`−`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`2`))))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.345em\"}},mdx(\"span\",{parentName:\"span\"}))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose nulldelimiter\"})),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`⋅`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`8`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`0`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`−`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\",\"style\":{\"color\":\"#26a6ed\"}},`0`)),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`⋅`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`1`),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`+`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`1`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`7`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`0`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`−`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\",\"style\":{\"color\":\"#26a6ed\"}},`0`)),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`⋅`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`2`),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`+`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`.`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`.`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`.`),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.0099999999999993em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"})),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-1.8048919999999995em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen nulldelimiter\"}),mdx(\"span\",{parentName:\"span\",\"className\":\"mfrac\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.845108em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.6550000000000002em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`7`)))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.23em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"frac-line\",\"style\":{\"borderBottomWidth\":\"0.04em\"}})),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.394em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`−`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`2`))))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.345em\"}},mdx(\"span\",{parentName:\"span\"}))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose nulldelimiter\"})),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`⋅`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`8`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`0`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`−`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\",\"style\":{\"color\":\"#26a6ed\"}},`0`)),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`+`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`1`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`7`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`0`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`−`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\",\"style\":{\"color\":\"#26a6ed\"}},`0`)),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`+`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`.`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`.`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`.`),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.5551080000000006em\"}},mdx(\"span\",{parentName:\"span\"}))))),mdx(\"span\",{parentName:\"span\",\"className\":\"arraycolsep\",\"style\":{\"width\":\"0.5em\"}}))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},mdx(\"span\",{parentName:\"span\",\"className\":\"delimsizing mult\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"2.0510099999999998em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.2500000000000004em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.1550000000000002em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"delimsizinginner delim-size4\"},mdx(\"span\",{parentName:\"span\"},`⎦`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.8099900000000004em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.1550000000000002em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"delimsizinginner delim-size4\"},mdx(\"span\",{parentName:\"span\"},`⎥`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-4.05101em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.1550000000000002em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"delimsizinginner delim-size4\"},mdx(\"span\",{parentName:\"span\"},`⎤`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.55002em\"}},mdx(\"span\",{parentName:\"span\"})))))))))))),mdx(\"p\",null,`which is equal to:`),mdx(\"div\",{\"className\":\"math math-display\"},mdx(\"span\",{parentName:\"div\",\"className\":\"katex-display\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\",\"display\":\"block\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\",\"mathvariant\":\"normal\"},`∇`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"mi\",{parentName:\"mrow\"},`M`),mdx(\"mi\",{parentName:\"mrow\"},`S`),mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msub\"},`E`),mdx(\"msub\",{parentName:\"msub\"},mdx(\"mi\",{parentName:\"msub\"},`f`),mdx(\"mn\",{parentName:\"msub\"},`0`))),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mrow\",{parentName:\"mrow\"},mdx(\"mo\",{parentName:\"mrow\",\"fence\":\"true\"},`[`),mdx(\"mtable\",{parentName:\"mrow\",\"rowspacing\":\"0.15999999999999992em\",\"columnalign\":\"center\",\"columnspacing\":\"1em\"},mdx(\"mtr\",{parentName:\"mtable\"},mdx(\"mtd\",{parentName:\"mtr\"},mdx(\"mstyle\",{parentName:\"mtd\",\"scriptlevel\":\"0\",\"displaystyle\":\"false\"},mdx(\"mrow\",{parentName:\"mstyle\"},mdx(\"mo\",{parentName:\"mrow\"},`−`),mdx(\"mn\",{parentName:\"mrow\"},`1645.7142857142856`))))),mdx(\"mtr\",{parentName:\"mtable\"},mdx(\"mtd\",{parentName:\"mtr\"},mdx(\"mstyle\",{parentName:\"mtd\",\"scriptlevel\":\"0\",\"displaystyle\":\"false\"},mdx(\"mrow\",{parentName:\"mstyle\"})))),mdx(\"mtr\",{parentName:\"mtable\"},mdx(\"mtd\",{parentName:\"mtr\"},mdx(\"mstyle\",{parentName:\"mtd\",\"scriptlevel\":\"0\",\"displaystyle\":\"false\"},mdx(\"mrow\",{parentName:\"mstyle\"},mdx(\"mo\",{parentName:\"mrow\"},`−`),mdx(\"mn\",{parentName:\"mrow\"},`440.0`)))))),mdx(\"mo\",{parentName:\"mrow\",\"fence\":\"true\"},`]`))),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`\n\\\\nabla(MSE_{f_0}) = \\\\left[\\\\begin{array}{c}\n\n    -1645.7142857142856 \\\\\\\\\\\\\\\\\n\n    -440.0\n\n\\\\end{array}\\\\right]\n\n`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"1.036108em\",\"verticalAlign\":\"-0.286108em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`∇`),mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.10903em\"}},`M`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.05764em\"}},`S`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.05764em\"}},`E`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.3361079999999999em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"-0.05764em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\",\"style\":{\"marginRight\":\"0.10764em\"}},`f`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.31731428571428577em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.357em\",\"marginLeft\":\"-0.10764em\",\"marginRight\":\"0.07142857142857144em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.5em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size3 size1 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`0`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.143em\"}},mdx(\"span\",{parentName:\"span\"})))))))))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.286108em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"3.6010299999999997em\",\"verticalAlign\":\"-1.55002em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"minner\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},mdx(\"span\",{parentName:\"span\",\"className\":\"delimsizing mult\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"2.0510099999999998em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.2500000000000004em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.1550000000000002em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"delimsizinginner delim-size4\"},mdx(\"span\",{parentName:\"span\"},`⎣`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.8099900000000004em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.1550000000000002em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"delimsizinginner delim-size4\"},mdx(\"span\",{parentName:\"span\"},`⎢`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-4.05101em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.1550000000000002em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"delimsizinginner delim-size4\"},mdx(\"span\",{parentName:\"span\"},`⎡`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.55002em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mtable\"},mdx(\"span\",{parentName:\"span\",\"className\":\"arraycolsep\",\"style\":{\"width\":\"0.5em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"col-align-c\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"2.05em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-4.21em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`−`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`1`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`6`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`4`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`5`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`.`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`7`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`1`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`4`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`2`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`8`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`5`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`7`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`1`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`4`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`2`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`8`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`5`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`6`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.0099999999999993em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"})),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-1.8099999999999994em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`−`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`4`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`4`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`0`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`.`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`0`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.5500000000000007em\"}},mdx(\"span\",{parentName:\"span\"}))))),mdx(\"span\",{parentName:\"span\",\"className\":\"arraycolsep\",\"style\":{\"width\":\"0.5em\"}}))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},mdx(\"span\",{parentName:\"span\",\"className\":\"delimsizing mult\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"2.0510099999999998em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.2500000000000004em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.1550000000000002em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"delimsizinginner delim-size4\"},mdx(\"span\",{parentName:\"span\"},`⎦`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.8099900000000004em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.1550000000000002em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"delimsizinginner delim-size4\"},mdx(\"span\",{parentName:\"span\"},`⎥`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-4.05101em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.1550000000000002em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"delimsizinginner delim-size4\"},mdx(\"span\",{parentName:\"span\"},`⎤`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.55002em\"}},mdx(\"span\",{parentName:\"span\"})))))))))))),mdx(\"p\",null,`And with that, we have computed the gradient for our function `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msub\"},`f`),mdx(\"mn\",{parentName:\"msub\"},`0`))),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`f_0`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.8888799999999999em\",\"verticalAlign\":\"-0.19444em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.10764em\"}},`f`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.30110799999999993em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"-0.10764em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`0`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))))))),`, great!\nNow that the `,mdx(\"em\",{parentName:\"p\"},`gradient`),`-part is done, we can move to the `,mdx(\"em\",{parentName:\"p\"},`descent`),`-part!`),mdx(\"h4\",{\"id\":\"the-descent\"},`The Descent`),mdx(\"div\",null,mdx(\"p\",null,`If we think back to the analogy with the hill and the fog,\nour final goal was to get to the valley. But because of the fog,\nwe can only see what is directly below our feet. We can feel the slope of the hill.\nIn our case, the 3d-plot of the MSE is our hill and the slope is represented by our gradient.\nIn order to `,mdx(\"em\",{parentName:\"p\"},`move`),`, we have to increase or decrease the values of our parameters\n`,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`m`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`m`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`))))),` and `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`b`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`b`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.69444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`b`))))),mdx(ToolTip,{trigger:\"*\",mdxType:\"ToolTip\"},`You can think of it this way:\nIf we increase `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`m`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`m`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`))))),`, we go north. If we decrease it, we go south.\nSimilarly, increasing `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`b`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`b`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.69444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`b`))))),` makes us go east, and decreasing it makes us go west.`),`.\nHow do we know if we have to increase or decrease them? Our gradient tells us what to do!`)),mdx(\"p\",null,`The derivative `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"msup\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msup\"},`f`),mdx(\"mo\",{parentName:\"msup\",\"mathvariant\":\"normal\",\"lspace\":\"0em\",\"rspace\":\"0em\"},`′`))),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`f'`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.946332em\",\"verticalAlign\":\"-0.19444em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.10764em\"}},`f`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.751892em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.063em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`′`))))))))))))),` of a function `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`f`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`f`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.8888799999999999em\",\"verticalAlign\":\"-0.19444em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.10764em\"}},`f`))))),` gives us the slope of `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`f`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`f`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.8888799999999999em\",\"verticalAlign\":\"-0.19444em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.10764em\"}},`f`))))),`.\nIn our case, the first value of the gradient (~ -1645) is negative.\nIdeally, we want this value to be 0, because that would mean we don’t need to\n`,mdx(\"em\",{parentName:\"p\"},`move`),` anymore and thus have reached\nour minimum.\nRight now this value is negative, which means that the\ncurrent slope of our MSE with respect to `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`m`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`m`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`))))),` is negative.\nThis means that to get closer to our minimum, we have to `,mdx(\"em\",{parentName:\"p\"},`increase`),` `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`m`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`m`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`))))),`.\nWhy?\nLet’s consider a more simple example.`),mdx(\"h4\",{\"id\":\"visualizing-in-2d\"},`Visualizing in 2D`),mdx(\"p\",null,`Imagine we have this simple quadratic function `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`q`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"mi\",{parentName:\"mrow\"},`x`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"msup\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msup\"},`x`),mdx(\"mn\",{parentName:\"msup\"},`2`))),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`q(x) = x^2`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"1em\",\"verticalAlign\":\"-0.25em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.03588em\"}},`q`),mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`x`),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.8141079999999999em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`x`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.8141079999999999em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.063em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`2`)))))))))))),`, which looks like this:`),mdx(ConditionalLazyPlot,_extends({},quadraticPlot,{mdxType:\"ConditionalLazyPlot\"}),mdx(\"p\",null,mdx(\"span\",{parentName:\"p\",\"className\":\"gatsby-resp-image-wrapper\",\"style\":{\"position\":\"relative\",\"display\":\"block\",\"marginLeft\":\"auto\",\"marginRight\":\"auto\",\"maxWidth\":\"917px\"}},`\n      `,mdx(\"span\",{parentName:\"span\",\"className\":\"gatsby-resp-image-background-image\",\"style\":{\"paddingBottom\":\"54%\",\"position\":\"relative\",\"bottom\":\"0\",\"left\":\"0\",\"backgroundImage\":\"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAABYlAAAWJQFJUiTwAAABKklEQVQoz52Ty3qDIBCFWdWItzZdxuIlJl0mgoHY93+v029GScTWLrqYT2CGn3MYFPnRQlYGUXnF7qP/V/BepZE2A8T+PCLvxk1gVPaQah5vQjXiakBxukO8f44oTiMvLIvixVgqHcyDOqWRNI4FvRwuEHlrkVQGsnEse7dS+pdCghAsVs8rE0XnkNSGYf6kTWAZwsiVbOxjD33Fa3fny4zKC2R941hCfwUSTM2ulo0hhVlzY4VT8RWytgylMUW0vkNWZtjNj04TMK0N0noIEgRMWvecq34+oA9yvikrhQMytnxddHdW0boJ4GOee7ivDYBkN6k0iqNF3k7FtPbWOcQM1tifv5C1lnPkiGo5p3quIwcPoH8/9HRIvk/4v2eyHNrydfxsKhMo/AZMpifU3tneHgAAAABJRU5ErkJggg==')\",\"backgroundSize\":\"cover\",\"display\":\"block\"}}),`\n  `,mdx(\"picture\",{parentName:\"span\"},`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/f1af4c173632ec8db28b0fd7e912767d/601b1/quadraticPlot.webp 500w\",\"/static/f1af4c173632ec8db28b0fd7e912767d/18069/quadraticPlot.webp 917w\"],\"sizes\":\"(max-width: 917px) 100vw, 917px\",\"type\":\"image/webp\"}),`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/f1af4c173632ec8db28b0fd7e912767d/0eb09/quadraticPlot.png 500w\",\"/static/f1af4c173632ec8db28b0fd7e912767d/90f05/quadraticPlot.png 917w\"],\"sizes\":\"(max-width: 917px) 100vw, 917px\",\"type\":\"image/png\"}),`\n          `,mdx(\"img\",{parentName:\"picture\",\"className\":\"gatsby-resp-image-image\",\"src\":\"/static/f1af4c173632ec8db28b0fd7e912767d/90f05/quadraticPlot.png\",\"alt\":\"quadratic function\",\"title\":\"quadratic function\",\"loading\":\"lazy\",\"decoding\":\"async\",\"style\":{\"width\":\"100%\",\"height\":\"100%\",\"margin\":\"0\",\"verticalAlign\":\"middle\",\"position\":\"absolute\",\"top\":\"0\",\"left\":\"0\"}}),`\n        `),`\n    `))),mdx(\"p\",null,`Now we want to find its minimum. We derive the function and we get `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"msup\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msup\"},`q`),mdx(\"mo\",{parentName:\"msup\",\"mathvariant\":\"normal\",\"lspace\":\"0em\",\"rspace\":\"0em\"},`′`)),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"mi\",{parentName:\"mrow\"},`x`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mn\",{parentName:\"mrow\"},`2`),mdx(\"mi\",{parentName:\"mrow\"},`x`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`q'(x) = 2x`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"1.001892em\",\"verticalAlign\":\"-0.25em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.03588em\"}},`q`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.751892em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.063em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`′`))))))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`x`),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.64444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`2`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`x`))))),`.\nThere is only one derivative because we only have one variable.\nNow we can overlay `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`q`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`q`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.625em\",\"verticalAlign\":\"-0.19444em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.03588em\"}},`q`))))),` and `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"msup\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msup\"},`q`),mdx(\"mo\",{parentName:\"msup\",\"mathvariant\":\"normal\",\"lspace\":\"0em\",\"rspace\":\"0em\"},`′`))),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`q'`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.946332em\",\"verticalAlign\":\"-0.19444em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.03588em\"}},`q`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.751892em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.063em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`′`))))))))))))),`. Let’s imagine `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`q`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`q`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.625em\",\"verticalAlign\":\"-0.19444em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.03588em\"}},`q`))))),` as our imaginary “2D-hill” for a moment,\nand choose a random starting position, like this one:`),mdx(ConditionalLazyPlot,_extends({},quadraticWithDerivativeWithPoint,{mdxType:\"ConditionalLazyPlot\"}),mdx(\"p\",null,mdx(\"span\",{parentName:\"p\",\"className\":\"gatsby-resp-image-wrapper\",\"style\":{\"position\":\"relative\",\"display\":\"block\",\"marginLeft\":\"auto\",\"marginRight\":\"auto\",\"maxWidth\":\"909px\"}},`\n      `,mdx(\"span\",{parentName:\"span\",\"className\":\"gatsby-resp-image-background-image\",\"style\":{\"paddingBottom\":\"49%\",\"position\":\"relative\",\"bottom\":\"0\",\"left\":\"0\",\"backgroundImage\":\"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAABYlAAAWJQFJUiTwAAABa0lEQVQoz5WTS0+DQBSF2VgYntPqQtvyplSstcPwmFZifCxcmrjx//+TY2YgTTGmSRcnTAL3u+eeuWiz/AAvFdCXDIZfXigG3S9hJQ28tMVksYMmgdN1B8Pn/xaRQf/BSFiDhBVo8Yy77StIUPZALxMw4/YiIAk4rFiAhBzpxxeazx+w929obtrCiWvVTULV6AE/D1wyWIkACSrldLoRuLnvlDS62sNJGjW/BErwZP50BsiO3+kLBn1ZYjJnqv5KZugkrQJKZ/rQ+Xrz1gcu3Q5SxQsGM2yH7EqQiMMIxu41O6rhJs1Q2Luh+UufT1DBinvZWQP62MEtBOy8grOulcyEjzZEs+MablzDjGTIHHZa4VZ08IoGdHOAV+zhPQi461a9tyIOM+QgQ3NpQvdPgHLcaSFgrSrYea002x7U7RnBeGRZfNTJmCOH8vplHjTbw40bTOY79fSSflHlwtJMHM/ucIE0Fer894f4BWt2EMZxYoO7AAAAAElFTkSuQmCC')\",\"backgroundSize\":\"cover\",\"display\":\"block\"}}),`\n  `,mdx(\"picture\",{parentName:\"span\"},`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/37e6adcc3df30db81b6b17a5957a0239/601b1/quadraticPlotWithDerivativeWithPoints.webp 500w\",\"/static/37e6adcc3df30db81b6b17a5957a0239/a0a21/quadraticPlotWithDerivativeWithPoints.webp 909w\"],\"sizes\":\"(max-width: 909px) 100vw, 909px\",\"type\":\"image/webp\"}),`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/37e6adcc3df30db81b6b17a5957a0239/0eb09/quadraticPlotWithDerivativeWithPoints.png 500w\",\"/static/37e6adcc3df30db81b6b17a5957a0239/2f7b1/quadraticPlotWithDerivativeWithPoints.png 909w\"],\"sizes\":\"(max-width: 909px) 100vw, 909px\",\"type\":\"image/png\"}),`\n          `,mdx(\"img\",{parentName:\"picture\",\"className\":\"gatsby-resp-image-image\",\"src\":\"/static/37e6adcc3df30db81b6b17a5957a0239/2f7b1/quadraticPlotWithDerivativeWithPoints.png\",\"alt\":\"quadratic function with random point\",\"title\":\"quadratic function with random point\",\"loading\":\"lazy\",\"decoding\":\"async\",\"style\":{\"width\":\"100%\",\"height\":\"100%\",\"margin\":\"0\",\"verticalAlign\":\"middle\",\"position\":\"absolute\",\"top\":\"0\",\"left\":\"0\"}}),`\n        `),`\n    `))),mdx(\"p\",null,`Ok, so how do we know which direction we need to move towards to reach\nthe minimum of our simplified “2D-hill”? Our derivative at this point is -2.25.`),mdx(\"p\",null,`Our minimum is at the point where our derivative is zero, i.e. the point where `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`y`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mn\",{parentName:\"mrow\"},`0`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`y=0`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.625em\",\"verticalAlign\":\"-0.19444em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.03588em\"}},`y`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.64444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`0`))))),`.\nSo we always want to go towards this point.`),mdx(\"p\",null,`If we move towards the right, i.e. if we increase `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`x`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`x`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`x`))))),`, we get closer to the point where `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`y`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mn\",{parentName:\"mrow\"},`0`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`y=0`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.625em\",\"verticalAlign\":\"-0.19444em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.03588em\"}},`y`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.64444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`0`))))),`.\nIf we would be standing on the opposite side of our hill, our derivative would be positive. In that case,\nwe would have to decrease `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`x`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`x`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`x`))))),` to get closer to our minimum.`),mdx(\"p\",null,`So for every point on the green line (the derivative), if it is below 0 (i.e. if our derivative is negative),\nwe have to increase our variable. And if it is above zero (i.e. our derivative is positive),\nwe have to decrease it. In other words, we just subtract our derivative from our variable.\nIf our derivative is negative, the minuses will cancel out and\nit will be added instead.`),mdx(\"p\",null,`But our derivative not only tells us which direction we should move towards, it also\ntells us how large our steps should be. If the absolute value of our derivative is high,\nmeaning it is high in the negatives or high in the positives, then our steps can be larger.\nSimilarly, if our derivative is close to zero, we will only perform small steps.\nIn other words, if the slope below our feet is very steep, we can cover more distance\nwith a single step than if our slope was very shallow.`),mdx(\"p\",null,`We can draw imaginary arrows to visualize the direction and size of our steps at any point based on our derivative:`),mdx(\"p\",null,mdx(\"span\",{parentName:\"p\",\"className\":\"gatsby-resp-image-wrapper\",\"style\":{\"position\":\"relative\",\"display\":\"block\",\"marginLeft\":\"auto\",\"marginRight\":\"auto\",\"maxWidth\":\"1280px\"}},`\n      `,mdx(\"span\",{parentName:\"span\",\"className\":\"gatsby-resp-image-background-image\",\"style\":{\"paddingBottom\":\"56.199999999999996%\",\"position\":\"relative\",\"bottom\":\"0\",\"left\":\"0\",\"backgroundImage\":\"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAIAAADwazoUAAAACXBIWXMAAAsTAAALEwEAmpwYAAABlklEQVQoz41RWy8DQRhdquayq65VXTuzM6uiWnbnsrtV7ZaICCEVQUKoFyISLxL/P5HpahEeJOdhvsv5zvedsbCvFzc6kMjfwFT+lReQqNm1HUyVhalaqncxT/9FphKzBDFVCXszLLawr8ubHcwSmyeQCETkGDaV30NIBGYJZgkkEgxnWYiquVoLEmEHLeRr6An0SxlRialyeFqqtb8vYmGqlzZ2EVWIKjtoYRYbHV/bBirPAy8quFGhGk2UN4fLKzhWnq21EFXY14hIzFPkx1PVcKq6Db0IGHvkQr3b6F30+oP+4HU5ygAVn2RIZClIwKoorGxNu6HDdLmRsfSEp8er0X5z77x9dndw9bh3/tA5vWuf3DrcnPalPLeeroTZzfP77cv79dNb1r8P0iOmDyvNrsNiRCXwoslKc7LcsMzaAo28MGQn0JXtTB5cLje6kIgST4puWHTDGR7nfaW11OGx7av59R2b6S/DjO+eAJ4oulHRDc0snuQ+OTzOm2xfD20TjhmnfpBH/6HyAhidNH6MAbwf4QdD6FbMPaHXdgAAAABJRU5ErkJggg==')\",\"backgroundSize\":\"cover\",\"display\":\"block\"}}),`\n  `,mdx(\"picture\",{parentName:\"span\"},`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/8f6e5de6427f6031e755e39fb8348358/601b1/derivativeGraphicsArrows2DHD.webp 500w\",\"/static/8f6e5de6427f6031e755e39fb8348358/80c60/derivativeGraphicsArrows2DHD.webp 1000w\",\"/static/8f6e5de6427f6031e755e39fb8348358/94b1e/derivativeGraphicsArrows2DHD.webp 1280w\"],\"sizes\":\"(max-width: 1280px) 100vw, 1280px\",\"type\":\"image/webp\"}),`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/8f6e5de6427f6031e755e39fb8348358/0eb09/derivativeGraphicsArrows2DHD.png 500w\",\"/static/8f6e5de6427f6031e755e39fb8348358/1263b/derivativeGraphicsArrows2DHD.png 1000w\",\"/static/8f6e5de6427f6031e755e39fb8348358/bbbf7/derivativeGraphicsArrows2DHD.png 1280w\"],\"sizes\":\"(max-width: 1280px) 100vw, 1280px\",\"type\":\"image/png\"}),`\n          `,mdx(\"img\",{parentName:\"picture\",\"className\":\"gatsby-resp-image-image\",\"src\":\"/static/8f6e5de6427f6031e755e39fb8348358/bbbf7/derivativeGraphicsArrows2DHD.png\",\"alt\":\"gradient with respect to m with arrows\",\"title\":\"gradient with respect to m with arrows\",\"loading\":\"lazy\",\"decoding\":\"async\",\"style\":{\"width\":\"100%\",\"height\":\"100%\",\"margin\":\"0\",\"verticalAlign\":\"middle\",\"position\":\"absolute\",\"top\":\"0\",\"left\":\"0\"}}),`\n        `),`\n    `)),mdx(\"p\",null,`So the important points to remember are:`),mdx(\"ul\",null,mdx(\"li\",{parentName:\"ul\"},`positive derivative -> reduce`),mdx(\"li\",{parentName:\"ul\"},`negative derivative -> increase`),mdx(\"li\",{parentName:\"ul\"},`high absolute derivative -> large step`),mdx(\"li\",{parentName:\"ul\"},`low absolute derivative -> small step`)),mdx(\"p\",null,`Now let’s go back to our original example.`),mdx(\"h4\",{\"id\":\"visualizing-in-3d\"},`Visualizing in 3D`),mdx(\"p\",null,`In the case of our gradient, the first value tells us how\nto adjust `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`m`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`m`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`))))),` and the second one tells us how to adjust `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`b`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`b`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.69444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`b`))))),`.\nLet’s first recall the visualization of the MSE (our “hill”) and\nlet’s also add in the point we are currently at as well as the minimum:`),mdx(ConditionalLazyPlot,_extends({},msePlotWithPoints,{mdxType:\"ConditionalLazyPlot\"}),mdx(\"p\",null,mdx(\"span\",{parentName:\"p\",\"className\":\"gatsby-resp-image-wrapper\",\"style\":{\"position\":\"relative\",\"display\":\"block\",\"marginLeft\":\"auto\",\"marginRight\":\"auto\",\"maxWidth\":\"717px\"}},`\n      `,mdx(\"span\",{parentName:\"span\",\"className\":\"gatsby-resp-image-background-image\",\"style\":{\"paddingBottom\":\"84.60000000000001%\",\"position\":\"relative\",\"bottom\":\"0\",\"left\":\"0\",\"backgroundImage\":\"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAARCAYAAADdRIy+AAAACXBIWXMAABYlAAAWJQFJUiTwAAADgklEQVQ4y4WU608cZRSHBynTvV9Zlr2ws7OXGZaF2d3ZHZZdVi5lKbQKJGhJm1YRsKlVSgxV4z2mrUiqpA3RCrZpQuM3v/kP+Kc9Zl6ERUPih5N3Lud93t85c34jOQYqXEyWsdf/i/PyuvsNUpVJiq15pEgR6bxNZ8N+diFmIP8HZr9zK1UkT47Ve/c4+uMFXVED6TyAHc5UBXe6ysVkhUJznpA2hpz4d57LBnrzXL/7Ec9+P+A1ATwFmOJET7qGN2PhEzGKV63xwy/fU2jNC7idd6LQpZhIXo237txm7+gJctxECuYbFF9fxKtaIgQkY+HPjuJIVtAn53n51yHtmzfojhr4spY41AYLoE/njdvv8c3hQ7p6R5BsVcMTS/QVWqLEU2CujitRprF1nw//fMXCV5/iTFbwqDWRc1KJ5NeZWF1l8+cdvCkLqbt/hHz9CulqG1fKFMm+bB2fYhIwL6M/+g3z6UvGn/xKuDSNO2UKkA0WwICOeXON5d0d5MgwUqTQojp7jdzovGiyP1sX6vyqSXThc2KbL4h9/AzlwRF9Cxt4EgZe0VsLt1qjK6iRX1mnvbNHX2b0uOSU2aY0vYw7bRLIVXEMlIgU18jOHqJc3Sf59j7xtQOit3bx5cbwqbZCC1e6SndII7n8PsYXj5HDOlJP3MCdrmFdXiGkT+JSZilPrVKof0t/4QGZ2h7Z8X3US/uklw7otW7gUUpCpSNl0hPWCV9ZZ+izp4SVyvFg2yNQaL2JZi0yt/Au7xw+Z+PHnwjn7hDRt4gVv0Qp7ZCp75Nu7uLPNXErpgDKEZ3AzBrJjV088X+cYqu0e6mNzRHRKgQbyxjb31HceERseIt0cZvw4F36C5+glB4THVrHmTJwDFSRo4MEGrdQVx4SUEod69kqB8ozuNU6zngZR9wkWF+kv/kBSWObmLFFdHiTsL5BWJvDmbLdYiLHCgTL18nMfU0gU+6UbM9gWG/SN9TCbY9NvoknZYrx8OfaBPNL9A5eFYdqjTlCWkNYUY4PESpcI12/jyc90gHa3rWnP2FMER2ewKs18GnjeDJjeNQq0eI4aq2NYs6IL3zsZxM5UcSfWUQ1N+kdtI5/Didly4kSthUHypfw5Sx8+TFCehPFnCU2MkXvYIueeEnkdVo1gluZJpBdxJkqdRSe7aUsjF8V9ycWuxA3Tn8MZ/d01uPrvwEQQgavOD6FOAAAAABJRU5ErkJggg==')\",\"backgroundSize\":\"cover\",\"display\":\"block\"}}),`\n  `,mdx(\"picture\",{parentName:\"span\"},`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/6c76193be1e8211cf15515bd93164660/601b1/msePlotWithMinimumAndCurrentPoint.webp 500w\",\"/static/6c76193be1e8211cf15515bd93164660/4d96b/msePlotWithMinimumAndCurrentPoint.webp 717w\"],\"sizes\":\"(max-width: 717px) 100vw, 717px\",\"type\":\"image/webp\"}),`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/6c76193be1e8211cf15515bd93164660/0eb09/msePlotWithMinimumAndCurrentPoint.png 500w\",\"/static/6c76193be1e8211cf15515bd93164660/034aa/msePlotWithMinimumAndCurrentPoint.png 717w\"],\"sizes\":\"(max-width: 717px) 100vw, 717px\",\"type\":\"image/png\"}),`\n          `,mdx(\"img\",{parentName:\"picture\",\"className\":\"gatsby-resp-image-image\",\"src\":\"/static/6c76193be1e8211cf15515bd93164660/034aa/msePlotWithMinimumAndCurrentPoint.png\",\"alt\":\"MSE for every m and every b with minimum and current position\",\"title\":\"MSE for every m and every b with minimum and current position\",\"loading\":\"lazy\",\"decoding\":\"async\",\"style\":{\"width\":\"100%\",\"height\":\"100%\",\"margin\":\"0\",\"verticalAlign\":\"middle\",\"position\":\"absolute\",\"top\":\"0\",\"left\":\"0\"}}),`\n        `),`\n    `))),mdx(\"p\",null,`Great! The orange point displays our current position.\nNow we can visualize the partial derivative of our MSE with respect to `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`m`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`m`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`))))),` in the same way,\nand we will also display our two points as well:`),mdx(ConditionalLazyPlot,_extends({},mse_plot_partial_derivative_m,{mdxType:\"ConditionalLazyPlot\"}),mdx(\"p\",null,mdx(\"span\",{parentName:\"p\",\"className\":\"gatsby-resp-image-wrapper\",\"style\":{\"position\":\"relative\",\"display\":\"block\",\"marginLeft\":\"auto\",\"marginRight\":\"auto\",\"maxWidth\":\"730px\"}},`\n      `,mdx(\"span\",{parentName:\"span\",\"className\":\"gatsby-resp-image-background-image\",\"style\":{\"paddingBottom\":\"80.19999999999999%\",\"position\":\"relative\",\"bottom\":\"0\",\"left\":\"0\",\"backgroundImage\":\"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAQCAYAAAAWGF8bAAAACXBIWXMAABYlAAAWJQFJUiTwAAADuElEQVQ4y5WUXUxbZRzGTwj9pBRKWz56OG1p6SentD0tlI+Rzg1wyIZzfG5jsrkxYaLJNsUxI8ISs8XPeeGNGvTCbJkjGcYwdZOwCduAxCyweKEm6mKiXnnhlYkxP3NONU535cU/eU/e533e3/u+z/8IhsokRimBUUr+7zK5FQR7hJFnjtPWuwfBFkZQzQxSEkNl4r4yexQKvClM7ty88R6dOlbnBWuQs++8wcj4OII9qhrev7NKrYkdUQRrgHxXrWZsdP9bp2mKQ0yefZHHTzyLQVQQ9GIctVQKsydFgSeF1V+HYIvQc3CUF146gyPcjFAU0nSFvjrtqGrlDMOMv/482w8OIVgCCKWRTfjrt2lGhVV12IIN5JXGaNu9l59+W+cP7nL77nWePDVBudxMnlPGJCWxeNO5O7RFOHT6BDvHRtFXJBDUHVUCjaw6g75MJtnVzfwPV7j+yzU+/fEKt35dYv33NWa/vMTAxDGcNc2YVUqVsCRM1+RJWkfHMItJhCJ/Bl+6Has/Q35JDdLmHo7fWGTyzirPfbHM1MZNpjeWObW+xKtfr/LWzxsc/fA8RYEG7THz7BFaJiYJ9e5HKA4i2AINmlmBp5ZQ3w76l+fYt/E5fSuLDKwuMbC6zKOLtxi8ucLgyhIHNm7TODGFrjSKyZsm3x5GPjZNcM8R8u0hBGe0hSJvCkfTw9RfWKB98Srda5cY+mqW4e8vcOi7Dxj+dpYD38zSd2eBpvcuUlidwaRGx62gc4TxjEwhPjKCzhFC0Fcm8CS34MrswHV4Bv/UDaqnF4i9dpWmdz+m8/IcnZ/MUTfzGZE31yjZPIRFjGH2pjFICvrSMKWDkxS3PYbeGUZQQ1ouZykLN2L11ePb9TLyyGVCw3OEDn9E6Mg84bF5Ik9fo2r3KxRIaibTWoRUQ0N5BMf2caRto1TWNOdy6FFacSdb0YkJXJE0D3U/hbxzltiuc8R6zlPbfxG5/xyOWAeWKgX1mirjW7QG0FdEKcsexZ7ei8EVzRGqZIFMB1KyFYuvHos3iZQYI5adQc6+TXzr+7jTY5g8ccrkLKnWXg1CLybQi1EqlCdwyP0YxJpc66mmalgrYlmckRatGyzeBPZgH770abzJk5jdubyGmzo1Xa6n1bUyjuB+vMo+3Eo2R/i3qUqqpt8Z2YRY+wDlNU1Y/R0UVbfjDDfiq3sQS1U6B+BW/jKMYfV1UeDZik6U/yG890+ic9WiBt4WaMTkjmOU4hRXN2jdpBPj/HeNUUphlBTt+091hSXzEVCGsQAAAABJRU5ErkJggg==')\",\"backgroundSize\":\"cover\",\"display\":\"block\"}}),`\n  `,mdx(\"picture\",{parentName:\"span\"},`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/e83490fefb8d3b2079d51f4bd7dbb537/601b1/partialDerivativeMPlot.webp 500w\",\"/static/e83490fefb8d3b2079d51f4bd7dbb537/3a833/partialDerivativeMPlot.webp 730w\"],\"sizes\":\"(max-width: 730px) 100vw, 730px\",\"type\":\"image/webp\"}),`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/e83490fefb8d3b2079d51f4bd7dbb537/0eb09/partialDerivativeMPlot.png 500w\",\"/static/e83490fefb8d3b2079d51f4bd7dbb537/a6a70/partialDerivativeMPlot.png 730w\"],\"sizes\":\"(max-width: 730px) 100vw, 730px\",\"type\":\"image/png\"}),`\n          `,mdx(\"img\",{parentName:\"picture\",\"className\":\"gatsby-resp-image-image\",\"src\":\"/static/e83490fefb8d3b2079d51f4bd7dbb537/a6a70/partialDerivativeMPlot.png\",\"alt\":\"partial derivative with respect to m with minimum and current position\",\"title\":\"partial derivative with respect to m with minimum and current position\",\"loading\":\"lazy\",\"decoding\":\"async\",\"style\":{\"width\":\"100%\",\"height\":\"100%\",\"margin\":\"0\",\"verticalAlign\":\"middle\",\"position\":\"absolute\",\"top\":\"0\",\"left\":\"0\"}}),`\n        `),`\n    `))),mdx(\"p\",null,`As you may notice, this looks very similar to our simplified example with `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`q`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`q`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.625em\",\"verticalAlign\":\"-0.19444em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.03588em\"}},`q`))))),` and `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"msup\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msup\"},`q`),mdx(\"mo\",{parentName:\"msup\",\"mathvariant\":\"normal\",\"lspace\":\"0em\",\"rspace\":\"0em\"},`′`))),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`q'`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.946332em\",\"verticalAlign\":\"-0.19444em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.03588em\"}},`q`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.751892em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.063em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`′`))))))))))))),`!\nHere we have three variables, so we want to get to the “point” where `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`z`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mn\",{parentName:\"mrow\"},`0`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`z=0`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.04398em\"}},`z`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.64444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`0`))))),`.\nBut because we are in three dimensions, there isn’t just one point where this is true,\nthere is an entire plane where `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`z`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mn\",{parentName:\"mrow\"},`0`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`z=0`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.04398em\"}},`z`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.64444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`0`))))),`. So to make the plot a bit easier to interpret, I also added in a greenish plane at `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`z`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mn\",{parentName:\"mrow\"},`0`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`z=0`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.04398em\"}},`z`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.64444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`0`))))),`.`),mdx(\"p\",null,`We can now apply the same logic we used in our 2d-example.\nCurrently, we only care about adjusting `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`m`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`m`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`))))),`. So for every point on this plane, if it is above\nthis `,mdx(\"em\",{parentName:\"p\"},`slightly transparent greenish`),` plane, we need to decrease `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`m`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`m`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`))))),`. Similarly, if it is below the plane,\nwe have to increase `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`m`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`m`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`))))),`. We can once again draw our imaginary arrows to visualize the direction\nand size of our steps:`),mdx(\"p\",null,mdx(\"span\",{parentName:\"p\",\"className\":\"gatsby-resp-image-wrapper\",\"style\":{\"position\":\"relative\",\"display\":\"block\",\"marginLeft\":\"auto\",\"marginRight\":\"auto\",\"maxWidth\":\"1220px\"}},`\n      `,mdx(\"span\",{parentName:\"span\",\"className\":\"gatsby-resp-image-background-image\",\"style\":{\"paddingBottom\":\"88.6%\",\"position\":\"relative\",\"bottom\":\"0\",\"left\":\"0\",\"backgroundImage\":\"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAIAAADUsmlHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAEAElEQVQ4y1WU+VMTZxjHd8Acm83FmUB2N5vN5iLHntmcRpJwn+EoIxYNBZRTCvYaLE6ZokOxo6VWW3GmUEelUzFtattYCLQdWyzKEcGp2h/a/8H/oLPQcdqZ7zzzzDvP55n3Od4XkCI0iDIgSgv612dkgmXFsCvXyAF5NjFMQnp2L1IIkKKM4CM0INKRWVqHBKbkGAeijNzAKQxuNeEBCuyN8aGZq49f6TmbYwpmFdqkCKXEeZmelemF7DI9C2jsIdehWIEtIDdwKiOvMvI5Zm9WgSvW03E7/ddnX76YW3xxcW7r8NC4mggc0DgVOKciPEojD6IMoHWEcHelAneDKKMwuFWEJ7vA5W9tmFt9cDn552wqM5PYvXX/6fX035Pz6djgsNLoE2lLZCgrRWkARBmdK1xYEpRjXK7FJysmbVUNH66l3/v+yXhy83Ri54OVzemljTOJzKePHl9ZezqRTB6Mj+Y7ghKYAnLNPircXOQIgSgrKSQ13rque8udyWedX293JXf6fswMLW32JHZOrmyPLG+N/rQx9tsf4+vbprL67EIHINMzUpiSInSOmbHEqmLpO233N2KptabU77HURmtqPXZ3K3Yv07a62bKcaV999Ora89LpKanGAepZwOStLnaFZTBVVN5YtnS3++GdnsxC//OFoWe3Tu7cHHk437v7Vd/u7b7dxd4ni93rqbJvf1C7QtDewISaFTivd4Z0PRf8UysVp2/Un7t5+PIXRxZvDH43O/Bgrn/7+sD6fPzXhe7Za1wiU9zYD2pKlIRHitCAFKHNvhp7sF5uDgZrTh3pvNLecaG2a7b96MWOEx+1jl87Pv1x9FKiq/u8++wv8PDnSpSGMA7COMk+DGEcxpbnm70yAxf0dfZXTfRXvxtvmOxomDoVfbOp5VJ3w2T9saumd9J5rio5SimNPISxYpgCJAhN8NVkuGn/SE64affRt/jhM2zvSGC0pfJ8vPz9Md8A3vczHn1DbWRyLH65gVMTHgjjAAlMqQiP1V+HkGElzisIH2TkaEvNIDl8znJsiHl9zHXCEvvGXvlJjvWgyuRVmrwWf22k+TWEiggwhHEwGaEjLWZfjdrklWN8FsYReKSWenu+KFrBTNgOzRfZ2+Q4A2Fue6gx1BjXM2ViHSnULIEpsY4S6UiEisBkJM/izzd5RCafVevw2I5rvTOwsw/CaCXhKQnWk+FmHRlWGXmxjhLgfYEIXWALQBirMvK2QF2hNYDyVRJDMJdoVxlLVYTb4qu1BurEOlJoDcYJ6/kS3n/YEpgCUVqkI4udpThXobEHDWyZAndjbDlMRUXFrv2bSvaW8n/wf7IINlvrxLiKfGtATXjVhPdAkRPc+wZe6h9IXSa5Vg4jggAAAABJRU5ErkJggg==')\",\"backgroundSize\":\"cover\",\"display\":\"block\"}}),`\n  `,mdx(\"picture\",{parentName:\"span\"},`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/37033b811bced02da81f69220be4f897/601b1/derivativeGraphicsArrows3DMHD.webp 500w\",\"/static/37033b811bced02da81f69220be4f897/80c60/derivativeGraphicsArrows3DMHD.webp 1000w\",\"/static/37033b811bced02da81f69220be4f897/f6961/derivativeGraphicsArrows3DMHD.webp 1220w\"],\"sizes\":\"(max-width: 1220px) 100vw, 1220px\",\"type\":\"image/webp\"}),`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/37033b811bced02da81f69220be4f897/0eb09/derivativeGraphicsArrows3DMHD.png 500w\",\"/static/37033b811bced02da81f69220be4f897/1263b/derivativeGraphicsArrows3DMHD.png 1000w\",\"/static/37033b811bced02da81f69220be4f897/1e677/derivativeGraphicsArrows3DMHD.png 1220w\"],\"sizes\":\"(max-width: 1220px) 100vw, 1220px\",\"type\":\"image/png\"}),`\n          `,mdx(\"img\",{parentName:\"picture\",\"className\":\"gatsby-resp-image-image\",\"src\":\"/static/37033b811bced02da81f69220be4f897/1e677/derivativeGraphicsArrows3DMHD.png\",\"alt\":\"3d-derivative visualization with arrows to indicate direction\",\"title\":\"3d-derivative visualization with arrows to indicate direction\",\"loading\":\"lazy\",\"decoding\":\"async\",\"style\":{\"width\":\"100%\",\"height\":\"100%\",\"margin\":\"0\",\"verticalAlign\":\"middle\",\"position\":\"absolute\",\"top\":\"0\",\"left\":\"0\"}}),`\n        `),`\n    `)),mdx(\"p\",null,`As you see, right now we only move across the x-axis (or in our case, the `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`m`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`m`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`))))),`-axis), because we only\nwant to know how we need to adjust `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`m`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`m`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`))))),`.`),mdx(\"p\",null,`We can also create a similar 3d-plot for the partial derivative of our MSE with respect to `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`b`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`b`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.69444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`b`))))),`\nto see how we need to adjust b:`),mdx(ConditionalLazyPlot,_extends({},mse_plot_partial_derivative_b,{mdxType:\"ConditionalLazyPlot\"}),mdx(\"p\",null,mdx(\"span\",{parentName:\"p\",\"className\":\"gatsby-resp-image-wrapper\",\"style\":{\"position\":\"relative\",\"display\":\"block\",\"marginLeft\":\"auto\",\"marginRight\":\"auto\",\"maxWidth\":\"727px\"}},`\n      `,mdx(\"span\",{parentName:\"span\",\"className\":\"gatsby-resp-image-background-image\",\"style\":{\"paddingBottom\":\"81.4%\",\"position\":\"relative\",\"bottom\":\"0\",\"left\":\"0\",\"backgroundImage\":\"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAQCAYAAAAWGF8bAAAACXBIWXMAABYlAAAWJQFJUiTwAAADr0lEQVQ4y52US2xUVRjHL2k7007n0eljXp3pdJ6d3rmdzuvOTKcP+pp2oC9BbG2koBhirJJoupFEFz5ACSJQFm60EbVoVagtFiRGLKUgtIGIRGtg48q4cOlOk5+5d4w2UTcuvpyc5P/9vu985/yPUOqK8X+jrC7GFqtEIN3Lsy8cxCK2I/yXWOuMqgk6d+Kv/T+BcYTKEO3Do8xf+oAiWwRBEWpqm9WEzaGIix0RBHODmqxzx/9VI1Q1Iud38O7CacyBFgRzIENdvJdydwJ9fRK9J4nJn6LYHqE+3sNDjz+JtjaGUCNh8MoYvTLl9Qk1CkCRRH6Ykx+eQFsbRTB6U9QncqpAgZmDGUqdcWxSG1+snQd+YnHlLJ27ximySCrc6Eup2jJ3HKE6jJQb4OXZY1QGsggKKJjZrlY2+GR0rhiWcJa3lk/z3W83uf7LZX74fY1vfl3lldk3aOwaoMQioasrzHBLtUigZ4j9b76OzhVH0Dij+FJ5KhuyaG3NmEPtTH4yy6kf13jt7jLHNq5ydOMKJ+6t8M7Ptzi5sczOw4cwKXpnlCJLGNfWIXZOT1OtzFCp4ox2U+FNYpVb2X7mPfbeucXoyirj124wfv0me66sM7GyzvjK1+y/8y0TFy9SEcygNFNiCWPtGCFzeBqtrQnBGu7AKrZRKXUiz8zxwO2vGL09z6P3zvHY/Xn23v+UfXcX2bexwCPfLzF47Sr2/Dhaq0ipO4HGImLOjiA+fwqNTUIocUSojXTikfupfvglAkdvIJ64jPz2JXIL59m1epax9Y/JfbZI8sw67snj6OwSem8KrSuGxipiTA3jPHAcWyhbADoiXXiTOXSOMM78FI1Pf05wcongUxcQpy4QeW6JhqkvCRw4hynUSXldTIWpYQtjiA3i2H2EKn+qALSK7fhS/eqtmbwx+kZ2Ex+bQxqdQxqbIzz2Ec17FnC2P4HBG8MUbMHR1EmpK47GHsYY3oZz4EUsoZaCU5Q3FUhvw53oQ+/LoPdEsUUmaOqaoal7hubc+wQ7XkXvkzEFMkS7H0RsG0JTq7hMwhjsx9V6kKpguuBlBaqri6tV7dJW9J60CjX7h/EmDuGXj2Dy92HwJmnIDuJP5/+0XwyNU8Lo7cUVeQaLmC10qEAVP+s9MgaPTFVDFme0B1s4S0UgT2VwBxUBWT1FTai10IA7oQK1zgjl7g6qghNYxda/O9z8y5Q4mtUx1DS2YfAoHo9j9KUx+dKqxzfnFNYEZa4MxfYm/gBk9SXVa9GvnwAAAABJRU5ErkJggg==')\",\"backgroundSize\":\"cover\",\"display\":\"block\"}}),`\n  `,mdx(\"picture\",{parentName:\"span\"},`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/ee859f43f86182abbd31d510990771e1/601b1/partialDerivativeBPlot.webp 500w\",\"/static/ee859f43f86182abbd31d510990771e1/c55bc/partialDerivativeBPlot.webp 727w\"],\"sizes\":\"(max-width: 727px) 100vw, 727px\",\"type\":\"image/webp\"}),`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/ee859f43f86182abbd31d510990771e1/0eb09/partialDerivativeBPlot.png 500w\",\"/static/ee859f43f86182abbd31d510990771e1/96343/partialDerivativeBPlot.png 727w\"],\"sizes\":\"(max-width: 727px) 100vw, 727px\",\"type\":\"image/png\"}),`\n          `,mdx(\"img\",{parentName:\"picture\",\"className\":\"gatsby-resp-image-image\",\"src\":\"/static/ee859f43f86182abbd31d510990771e1/96343/partialDerivativeBPlot.png\",\"alt\":\"partial derivative with respect to b with minimum and current position\",\"title\":\"partial derivative with respect to b with minimum and current position\",\"loading\":\"lazy\",\"decoding\":\"async\",\"style\":{\"width\":\"100%\",\"height\":\"100%\",\"margin\":\"0\",\"verticalAlign\":\"middle\",\"position\":\"absolute\",\"top\":\"0\",\"left\":\"0\"}}),`\n        `),`\n    `))),mdx(\"p\",null,`And we can again draw some imaginary arrows to visualize the steps we would have to take\nat any particular point:`),mdx(\"p\",null,mdx(\"span\",{parentName:\"p\",\"className\":\"gatsby-resp-image-wrapper\",\"style\":{\"position\":\"relative\",\"display\":\"block\",\"marginLeft\":\"auto\",\"marginRight\":\"auto\",\"maxWidth\":\"1220px\"}},`\n      `,mdx(\"span\",{parentName:\"span\",\"className\":\"gatsby-resp-image-background-image\",\"style\":{\"paddingBottom\":\"88.6%\",\"position\":\"relative\",\"bottom\":\"0\",\"left\":\"0\",\"backgroundImage\":\"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAIAAADUsmlHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAD/0lEQVQ4y12Ra0xTdxjGuyhQzqE9bVco0NOeS9tToO3pOf33nPaUUgultONW7rcJ5SaXqKGiC2xjzOyiGU6JxJAMCIoisSKC4HTDZNl0mYaNikAXpsu+7aNf9mVfl0KyuCVPnrzJ+/yS9yKSkrwyJx/GQCpmgzAA7TuMARjnYIzBQf6hDItYw0pILlV7EDiQLVVrExH2EpuvTkpyaQSH6B0yvUNucCooF6Q1Wb3dd7+OX7l6SU0XvqU0p+FATjkRHS8lE0oj7CIFJZg9IbnBCWNApndIdbzM4BSrLWZv+8LDV6Pjf41N/v376yfHz56REPzhTFpCcoiOlxAcjAOR3CBYjlQpKAHCAKJ3KIyCWE2bilrOzjw/ee7PT6/uXbyzNX77j0e/7q1sXytuC0Mom4qyUnIflumdNl+d0uiCMaAwulIyLXnBxtM3NyLTLyNzO4Nz8aH53eHoi85Le5M/7q69/umDxa+MxaE0HCTGhnF7nrsStXphnINUtC7YeDS60f/Ndte9zY5bL969Fj96I952PR5Zj7XMxbsWds7vPf/81TPQ2pukMoskBEcJpSqzR4aatDVNpWs/tDx+FlzbrHwYq37wc2g1FroTK13aDS7Eq1d3Kle2g/Mva+4+UecHkjJpkVEoezvHBWlZuqxxaH4ivLPaFYu+tznd9dtyz9bt3l+iPbHF/u8XOmP3whv322L3G58+1lYPQmqTWAtEMAY0TLHF9Y6ycdhz7kHfibGKK7c8y+vHotOD302Gt6ORp1MnNmdPPZo8tjjTPLvkjlyAtVZEx4s1rCgFZUguwBTVIBpaXnnKMvJtT/1nAzUj5o/Ww70XPx4cbpqd6zs/Xj80Vd8/1RoeS7cGJDiQkvtwstqKMkU2Xx2id0pRs9LdntO3Uld/eYJvqmme6Ah+MlwYCYZnTgbeHwl9mOfpEGtoKZn4cwJOyrZm0167vyHxepJHSFbF1mItSw0lF6aM5bUVXwaqJq9TgVHPgN8/kqUHCCVIEkkOwoAoWc0oKIEtqkVpr4R0SCk3YnRmWMrJwAxVsTya17klI8t842eY40xuYaqpQEYJGXkF3qpwSX13YmcIAxjwcyUNue4KuUGAMA7CbQpdodH5hcU91WoaWFG5gbU7mRLSCF5r8xdVt9v9DQpKEIk1bArKpKgZMcoSdr+W9Slz8hGdINPzEOZU0wNZwmWj9XQ2xkIERwC/UNpM2EtUJs/hLDoB/6v0XDeic0hI3uKpyjQfwWw+md4lJ5sQQxlM2nHgtxXXSXV8sppB9I7Ewd6EYRwcFCkoozJ5TAUhBeXUOwISgkethbn55QctsYZN3vf/wG8K0toOZVowthgHfgnBpee6k7Lp/2X+AbnpLLvwQj5tAAAAAElFTkSuQmCC')\",\"backgroundSize\":\"cover\",\"display\":\"block\"}}),`\n  `,mdx(\"picture\",{parentName:\"span\"},`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/896a5521c8cdf52e181897e0f23f99ce/601b1/derivativeGraphicsArrows3DBHD.webp 500w\",\"/static/896a5521c8cdf52e181897e0f23f99ce/80c60/derivativeGraphicsArrows3DBHD.webp 1000w\",\"/static/896a5521c8cdf52e181897e0f23f99ce/f6961/derivativeGraphicsArrows3DBHD.webp 1220w\"],\"sizes\":\"(max-width: 1220px) 100vw, 1220px\",\"type\":\"image/webp\"}),`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/896a5521c8cdf52e181897e0f23f99ce/0eb09/derivativeGraphicsArrows3DBHD.png 500w\",\"/static/896a5521c8cdf52e181897e0f23f99ce/1263b/derivativeGraphicsArrows3DBHD.png 1000w\",\"/static/896a5521c8cdf52e181897e0f23f99ce/1e677/derivativeGraphicsArrows3DBHD.png 1220w\"],\"sizes\":\"(max-width: 1220px) 100vw, 1220px\",\"type\":\"image/png\"}),`\n          `,mdx(\"img\",{parentName:\"picture\",\"className\":\"gatsby-resp-image-image\",\"src\":\"/static/896a5521c8cdf52e181897e0f23f99ce/1e677/derivativeGraphicsArrows3DBHD.png\",\"alt\":\"gradient with respect to b with arrows\",\"title\":\"gradient with respect to b with arrows\",\"loading\":\"lazy\",\"decoding\":\"async\",\"style\":{\"width\":\"100%\",\"height\":\"100%\",\"margin\":\"0\",\"verticalAlign\":\"middle\",\"position\":\"absolute\",\"top\":\"0\",\"left\":\"0\"}}),`\n        `),`\n    `)),mdx(\"p\",null,`This again looks very familiar.\nOur gradient was this:`),mdx(\"div\",{\"className\":\"math math-display\"},mdx(\"span\",{parentName:\"div\",\"className\":\"katex-display\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\",\"display\":\"block\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\",\"mathvariant\":\"normal\"},`∇`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"mi\",{parentName:\"mrow\"},`M`),mdx(\"mi\",{parentName:\"mrow\"},`S`),mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msub\"},`E`),mdx(\"mrow\",{parentName:\"msub\"},mdx(\"mn\",{parentName:\"mrow\"},`0`),mdx(\"mo\",{parentName:\"mrow\",\"separator\":\"true\"},`,`),mdx(\"mn\",{parentName:\"mrow\"},`0`))),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mrow\",{parentName:\"mrow\"},mdx(\"mo\",{parentName:\"mrow\",\"fence\":\"true\"},`[`),mdx(\"mtable\",{parentName:\"mrow\",\"rowspacing\":\"0.15999999999999992em\",\"columnalign\":\"center\",\"columnspacing\":\"1em\"},mdx(\"mtr\",{parentName:\"mtable\"},mdx(\"mtd\",{parentName:\"mtr\"},mdx(\"mstyle\",{parentName:\"mtd\",\"scriptlevel\":\"0\",\"displaystyle\":\"false\"},mdx(\"mrow\",{parentName:\"mstyle\"},mdx(\"mo\",{parentName:\"mrow\"},`−`),mdx(\"mn\",{parentName:\"mrow\"},`1645.7142857142856`))))),mdx(\"mtr\",{parentName:\"mtable\"},mdx(\"mtd\",{parentName:\"mtr\"},mdx(\"mstyle\",{parentName:\"mtd\",\"scriptlevel\":\"0\",\"displaystyle\":\"false\"},mdx(\"mrow\",{parentName:\"mstyle\"})))),mdx(\"mtr\",{parentName:\"mtable\"},mdx(\"mtd\",{parentName:\"mtr\"},mdx(\"mstyle\",{parentName:\"mtd\",\"scriptlevel\":\"0\",\"displaystyle\":\"false\"},mdx(\"mrow\",{parentName:\"mstyle\"},mdx(\"mo\",{parentName:\"mrow\"},`−`),mdx(\"mn\",{parentName:\"mrow\"},`440.0`)))))),mdx(\"mo\",{parentName:\"mrow\",\"fence\":\"true\"},`]`))),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`\n\\\\nabla(MSE_{0,0}) = \\\\left[\\\\begin{array}{c}\n\n    -1645.7142857142856 \\\\\\\\\\\\\\\\\n\n    -440.0\n\n\\\\end{array}\\\\right]\n\n`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"1.036108em\",\"verticalAlign\":\"-0.286108em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`∇`),mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.10903em\"}},`M`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.05764em\"}},`S`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.05764em\"}},`E`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.301108em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"-0.05764em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`0`),mdx(\"span\",{parentName:\"span\",\"className\":\"mpunct mtight\"},`,`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`0`))))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.286108em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"3.6010299999999997em\",\"verticalAlign\":\"-1.55002em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"minner\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},mdx(\"span\",{parentName:\"span\",\"className\":\"delimsizing mult\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"2.0510099999999998em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.2500000000000004em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.1550000000000002em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"delimsizinginner delim-size4\"},mdx(\"span\",{parentName:\"span\"},`⎣`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.8099900000000004em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.1550000000000002em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"delimsizinginner delim-size4\"},mdx(\"span\",{parentName:\"span\"},`⎢`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-4.05101em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.1550000000000002em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"delimsizinginner delim-size4\"},mdx(\"span\",{parentName:\"span\"},`⎡`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.55002em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mtable\"},mdx(\"span\",{parentName:\"span\",\"className\":\"arraycolsep\",\"style\":{\"width\":\"0.5em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"col-align-c\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"2.05em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-4.21em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`−`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`1`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`6`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`4`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`5`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`.`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`7`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`1`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`4`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`2`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`8`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`5`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`7`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`1`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`4`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`2`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`8`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`5`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`6`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.0099999999999993em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"})),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-1.8099999999999994em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`−`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`4`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`4`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`0`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`.`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`0`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.5500000000000007em\"}},mdx(\"span\",{parentName:\"span\"}))))),mdx(\"span\",{parentName:\"span\",\"className\":\"arraycolsep\",\"style\":{\"width\":\"0.5em\"}}))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},mdx(\"span\",{parentName:\"span\",\"className\":\"delimsizing mult\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"2.0510099999999998em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.2500000000000004em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.1550000000000002em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"delimsizinginner delim-size4\"},mdx(\"span\",{parentName:\"span\"},`⎦`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.8099900000000004em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.1550000000000002em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"delimsizinginner delim-size4\"},mdx(\"span\",{parentName:\"span\"},`⎥`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-4.05101em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.1550000000000002em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"delimsizinginner delim-size4\"},mdx(\"span\",{parentName:\"span\"},`⎤`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.55002em\"}},mdx(\"span\",{parentName:\"span\"})))))))))))),mdx(\"p\",null,`so now we know that we need to increase both our `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`m`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`m`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`))))),` and our `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`b`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`b`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.69444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`b`))))),`. But we need to increase our `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`m`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`m`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`))))),`\na lot more than we need to increase our `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`b`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`b`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.69444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`b`))))),`! This makes sense\nbecause the slope of our “MSE-hill” at our current point is steeper in the `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`m`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`m`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`))))),`-direction\nthan it is in the `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`b`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`b`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.69444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`b`))))),`-direction. If you have been following this post `,mdx(\"em\",{parentName:\"p\"},`very`),` closely,\nyou might notice that something is off.`),mdx(\"h4\",{\"id\":\"a-mistake\"},`A Mistake..?`),mdx(\"p\",null,`Let’s see how our step would change our position on the hill:`),mdx(\"p\",null,mdx(\"span\",{parentName:\"p\",\"className\":\"gatsby-resp-image-wrapper\",\"style\":{\"position\":\"relative\",\"display\":\"block\",\"marginLeft\":\"auto\",\"marginRight\":\"auto\",\"maxWidth\":\"760px\"}},`\n      `,mdx(\"span\",{parentName:\"span\",\"className\":\"gatsby-resp-image-background-image\",\"style\":{\"paddingBottom\":\"100%\",\"position\":\"relative\",\"bottom\":\"0\",\"left\":\"0\",\"backgroundImage\":\"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAACXBIWXMAAAsTAAALEwEAmpwYAAADbklEQVQ4y2VTaW8bVRQ1osbLjGfG8b7M9uZ5xktsz/Jm8dhxZYekWZwQ2kITmqZJ1dgtCUkDCi2ULkFJUxWViBRRgdUAEnygQnzhAxJCQuKXoYmrYAfpSe/o6J175s491+WlFS+tuJMlL634GNXHqD3Q40/IHuPv47204vKkZT+r5UdmWfXN16JFEpo4jwK8jnEI5xDGIQLoDgN0P6sRgjEg7tXO12bt6Xl75rwnpeAcIgQD5xDO6w4GBs7rBNADQCeh2f9RLh+julPlWL7ePL/8/LeDdz7sOFaMGhAMEugEMEjBJAWDEHRScDDGagPOGKvlqq367NLWN3v3/3gxvbuTGmnh6bInjXwsOtY45q8AhwZ6DvA6q42NTC9e2n/cOuo2v/tB+7IbvbSl160sqmXMiXihHgBGEJqkYAaAPtgzrbgi+WJlauKzx4WD7+HnXfrTbnjraHHn6bsb+2+vPlCaF/2MMiRaxLH5Sduu3uWhlRBA6srHqbtHsZtfM9cOo61HrVs/i2NPCvU9EW1HMgsUtChoEsDAOG1A7GVUb7LIji6mlp8NXzmcutlFM19cWHkuabcpph0S1iPSOgVtEjr/DOf1QbETgHKueZkZ3wO1HaDdTWVvzc4/5eRNAqxG8muJ4kZQPBsUTSpjEWBQ/EZK9rNKubHAyncS0mYE3sDoq2MXHzHqB6FsO1neFNBuenjJl8i7k4qf1XpRc8SetIxxiJYbUmUuInSGYDsEVxPZtdhwO158n5a3M2hfbL5gOy/l9U/OXVnK1SY9tPyfs5/VGGU0Y80E4fUhqR3NdYTSR4nSBi/fE+1DePnX8rN/3vvr7zsvu63la+Gs7WP64nkmWUoM16XKW+Hc9XjxRrK4Rpdvi9ZB9sIv2Xt/Gt/+3ni4q07NBXnNnZD9p0blTpUTxTo055KlDU67L9pfSRM/gqs/pToH9Px6VBvFWc3HopBkk4I5EJLjthVOawJ9gZEf8sYDurodqa4Q5XEcICfn0AoXapF8lQDGwGKcoHDWFvSZYKaRLDVIQQtBw88oGG9QYoUSrVhhJCTZwYzlScunxT5GfT1ezFiTkZwtViZjhTqrjlHQpKAl6OfC2apoTccLZ4E+fiZROh3P3sE45Mywt3RpJSTZFDR7pbHj2fbv42lx//GkX9U6Cf//3/wLuGbb5rtIhUIAAAAASUVORK5CYII=')\",\"backgroundSize\":\"cover\",\"display\":\"block\"}}),`\n  `,mdx(\"picture\",{parentName:\"span\"},`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/86c043bebefb02f6afd8da4bc0677fe0/601b1/gradientDescentStepGraphic.webp 500w\",\"/static/86c043bebefb02f6afd8da4bc0677fe0/7df04/gradientDescentStepGraphic.webp 760w\"],\"sizes\":\"(max-width: 760px) 100vw, 760px\",\"type\":\"image/webp\"}),`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/86c043bebefb02f6afd8da4bc0677fe0/0eb09/gradientDescentStepGraphic.png 500w\",\"/static/86c043bebefb02f6afd8da4bc0677fe0/efd7b/gradientDescentStepGraphic.png 760w\"],\"sizes\":\"(max-width: 760px) 100vw, 760px\",\"type\":\"image/png\"}),`\n          `,mdx(\"img\",{parentName:\"picture\",\"className\":\"gatsby-resp-image-image\",\"src\":\"/static/86c043bebefb02f6afd8da4bc0677fe0/efd7b/gradientDescentStepGraphic.png\",\"alt\":\"First Step of Gradient Descent Visualized\",\"title\":\"First Step of Gradient Descent Visualized\",\"loading\":\"lazy\",\"decoding\":\"async\",\"style\":{\"width\":\"100%\",\"height\":\"100%\",\"margin\":\"0\",\"verticalAlign\":\"middle\",\"position\":\"absolute\",\"top\":\"0\",\"left\":\"0\"}}),`\n        `),`\n    `)),mdx(\"p\",null,`Indeed, the slope in `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`m`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`m`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`))))),`-direction is steeper than the one in `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`b`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`b`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.69444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`b`))))),`-direction.\nAnd indeed, the arrow in `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`m`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`m`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`))))),`-direction leads us towards our minimum.\nBut wait! The arrow in `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`b`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`b`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.69444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`b`))))),`-direction leads us `,mdx(\"em\",{parentName:\"p\"},`away`),` from our minimum!\n`,mdx(\"strong\",{parentName:\"p\"},`What?!`),`\nHave we done something wrong? Isn’t gradient descent supposed to take us `,mdx(\"em\",{parentName:\"p\"},`to`),` the minimum,\nnot `,mdx(\"em\",{parentName:\"p\"},`away`),` from it? Well, no, we did not do anything wrong and yes,\ngradient descent seems to take us in the wrong direction. But our derivatives are correct and we have\nalso not made any other mistakes up until this point. But why are we moving in the wrong direction, then?`),mdx(\"p\",null,`Let’s take a closer look at the slope in `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`b`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`b`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.69444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`b`))))),`-direction. It really does look like it is\nleading down towards the right in the above image. Meaning there `,mdx(\"em\",{parentName:\"p\"},`could`),` be a minimum there.\nGradient descent just doesn’t know if there is one. Right now, it seems like a valid option because\nthe slope points us towards this side of the plot. But once we perform a couple more\nsteps of gradient descent, we will soon see that the slope in `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`b`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`b`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.69444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`b`))))),`-direction begins to change\nand we do indeed “turn around” and start moving in the right direction again.\nSo right now there isn’t really anything we can do to “correct” our movements,\nbecause we don’t know where the minimum really is, or at least, our program does not know so.\nOnly we have this fancy 3d-visualization where we can see that we are moving in the wrong\ndirection. But gradient descent does not see the issue, at least not now. In our case, this is no big deal.\nWe only have one minimum, which means that we will find it sooner or later.\nBut in scenarios where we have more than one minimum, gradient descent can actually get stuck\nin a local minimum, and not get out. But this is beyond the scope of this article. For now, everything is alright\nand we will soon see that gradient descent will still find our minimum, it might just need a few\nextra steps to do so.`),mdx(\"h4\",{\"id\":\"introducing-the-learning-rate\"},`Introducing: The Learning Rate`),mdx(\"p\",null,`Ok, so we now understand how and why we need to adjust our parameters.\nBut by how much should we adjust them?\nShould we really increase our `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`m`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`m`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`))))),` by 1645? No, that would be way too much!\nIf we were to increase our `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`m`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`m`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`))))),` by 1645, we would completely overshoot our minimum\nand land on the other side of our plot.\nInstead, we choose a so-called `,mdx(\"em\",{parentName:\"p\"},`learning rate`),`. Our gradient is then multiplied by\nour learning rate before we apply it to our parameters. This learning rate is a number\nbetween 0 and 1. 0 means we do not change our values at all and 1 means we subtract the entirety\nof our gradient. Common values for a learning rate are usually in the range of `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mn\",{parentName:\"mrow\"},`1`),mdx(\"mi\",{parentName:\"mrow\"},`e`),mdx(\"mo\",{parentName:\"mrow\"},`−`),mdx(\"mn\",{parentName:\"mrow\"},`3`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mn\",{parentName:\"mrow\"},`0.001`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`1e-3 = 0.001`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.72777em\",\"verticalAlign\":\"-0.08333em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`1`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`e`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`−`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.64444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`3`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.64444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`0`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`.`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`0`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`0`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`1`))))),`.\nIf we choose a learning rate of 0.001, we would update our values like this:`),mdx(\"div\",{\"className\":\"math math-display\"},mdx(\"span\",{parentName:\"div\",\"className\":\"katex-display\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\",\"display\":\"block\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`m`),mdx(\"mo\",{parentName:\"mrow\"},`:`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mi\",{parentName:\"mrow\"},`m`),mdx(\"mo\",{parentName:\"mrow\"},`+`),mdx(\"mn\",{parentName:\"mrow\"},`0.001`),mdx(\"mo\",{parentName:\"mrow\"},`⋅`),mdx(\"mn\",{parentName:\"mrow\"},`1645.71`),mdx(\"mspace\",{parentName:\"mrow\",\"linebreak\":\"newline\"}),mdx(\"mi\",{parentName:\"mrow\"},`b`),mdx(\"mo\",{parentName:\"mrow\"},`:`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mi\",{parentName:\"mrow\"},`b`),mdx(\"mo\",{parentName:\"mrow\"},`+`),mdx(\"mn\",{parentName:\"mrow\"},`0.001`),mdx(\"mo\",{parentName:\"mrow\"},`⋅`),mdx(\"mn\",{parentName:\"mrow\"},`440.0`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`\nm := m + 0.001 \\\\cdot 1645.71 \\\\\\\\\n\nb := b + 0.001 \\\\cdot 440.0\n\n`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`:`)),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.36687em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.66666em\",\"verticalAlign\":\"-0.08333em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`+`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.64444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`0`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`.`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`0`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`0`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`1`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`⋅`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.64444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`1`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`6`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`4`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`5`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`.`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`7`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`1`)),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace newline\"}),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.69444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`b`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`:`)),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.36687em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.77777em\",\"verticalAlign\":\"-0.08333em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`b`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`+`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.64444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`0`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`.`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`0`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`0`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`1`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`⋅`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.64444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`4`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`4`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`0`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`.`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`0`)))))),mdx(\"p\",null,`Our new values would now be:`),mdx(\"div\",{\"className\":\"math math-display\"},mdx(\"span\",{parentName:\"div\",\"className\":\"katex-display\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\",\"display\":\"block\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`m`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mn\",{parentName:\"mrow\"},`1.64571`),mdx(\"mspace\",{parentName:\"mrow\",\"linebreak\":\"newline\"}),mdx(\"mi\",{parentName:\"mrow\"},`b`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mn\",{parentName:\"mrow\"},`0.44`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`\nm = 1.64571 \\\\\\\\\n\nb = 0.44\n\n`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.64444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`1`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`.`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`6`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`4`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`5`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`7`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`1`)),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace newline\"}),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.69444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`b`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.64444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`0`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`.`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`4`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`4`)))))),mdx(\"p\",null,`So we update our function:`),mdx(\"div\",{\"className\":\"math math-display\"},mdx(\"span\",{parentName:\"div\",\"className\":\"katex-display\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\",\"display\":\"block\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`f`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"mi\",{parentName:\"mrow\"},`x`),mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mo\",{parentName:\"msub\",\"stretchy\":\"false\"},`)`),mdx(\"mn\",{parentName:\"msub\"},`1`)),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mn\",{parentName:\"mrow\"},`1.64571`),mdx(\"mi\",{parentName:\"mrow\"},`x`),mdx(\"mo\",{parentName:\"mrow\"},`+`),mdx(\"mn\",{parentName:\"mrow\"},`0.44`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`f(x)_1 = 1.64571x + 0.44`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"1em\",\"verticalAlign\":\"-0.25em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.10764em\"}},`f`),mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`x`),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.30110799999999993em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"0em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`1`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.72777em\",\"verticalAlign\":\"-0.08333em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`1`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`.`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`6`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`4`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`5`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`7`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`1`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`x`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`+`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.64444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`0`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`.`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`4`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`4`)))))),mdx(\"p\",null,`We can add a little `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mrow\",{parentName:\"msub\"}),mdx(\"mn\",{parentName:\"msub\"},`1`))),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`_1`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.45110799999999995em\",\"verticalAlign\":\"-0.15em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\"}),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.30110799999999993em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`1`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))))))),` at the bottom to show that this is our function after one iteration of\nperforming gradient descent.`),mdx(\"p\",null,`If we calculate the MSE for our new function, we get ~62362.30 `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mo\",{parentName:\"mrow\"},`≈`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`\\\\approx`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.48312em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`≈`))))),` `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mn\",{parentName:\"mrow\"},`24`),mdx(\"msup\",{parentName:\"mrow\"},mdx(\"mn\",{parentName:\"msup\"},`9`),mdx(\"mn\",{parentName:\"msup\"},`2`))),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`249^2`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.8141079999999999em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`2`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`4`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`9`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.8141079999999999em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.063em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`2`)))))))))))),`!\nIt’s improved (before it was ~`,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mn\",{parentName:\"mrow\"},`25`),mdx(\"msup\",{parentName:\"mrow\"},mdx(\"mn\",{parentName:\"msup\"},`5`),mdx(\"mn\",{parentName:\"msup\"},`2`))),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`255^2`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.8141079999999999em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`2`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`5`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`5`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.8141079999999999em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.063em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`2`)))))))))))),`)!`),mdx(\"p\",null,`Now we do this over and over again until we cannot improve our MSE any further. In practice,\nyou will almost never achieve an MSE of 0, so it’s a good idea to look at how much our MSE improves\nevery iteration, and once we make little to no improvements, we can usually stop. This\ntechnique in particular even has a name and it’s called `,mdx(\"em\",{parentName:\"p\"},`early stopping`),`.`),mdx(\"p\",null,`We have now learned how the math behind gradient descent works and how\nwe can start with some random function and\niteratively improve it until we end up with our ideal function.\nNow, let’s also implement this algorithm in Python.`),mdx(\"h2\",{\"id\":\"the-code\"},`The Code`),mdx(\"p\",null,`In essence, we want to define a function `,mdx(\"inlineCode\",{parentName:\"p\"},`gradient_descent`),` that takes in our data (`,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`x`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`x`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`x`))))),` and `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`y`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`y`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.625em\",\"verticalAlign\":\"-0.19444em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.03588em\"}},`y`))))),`),\nour variables (`,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`m`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`m`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`))))),` and `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`b`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`b`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.69444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`b`))))),`), our minimization criterion (in our case this will be the MSE,\nsince we want to minimize that) and performs gradient descent to find the values for our variables that minimize the criterion.\nWe also need to pass in a learning rate and the number of iterations (commonly called `,mdx(\"em\",{parentName:\"p\"},`epochs`),`) we want to perform gradient descent for.`),mdx(\"pre\",null,mdx(\"code\",{parentName:\"pre\",\"className\":\"language-python\"},`dataset = np.array([\n    (1,80),\n    (2,170),\n    (3,100),\n    (3,220),\n    (4,200),\n    (4,270),\n    (5,500)\n    ])\n\nx = dataset[:,0]\ny = dataset[:,1]\n\ndef add_intercept_ones(X):\n    intercept_ones = np.ones((len(X),1)) # results in array( [ [1],..,[1] ] )\n    X_b = np.c_[intercept_ones,X]\n    return X_b\n\nX_b = add_intercept_ones(X)\n`)),mdx(\"h3\",{\"id\":\"adjustment-vectorization\"},`Adjustment: Vectorization`),mdx(\"p\",null,`Since we could have more than just one feature (the number of bedrooms), we might have a function\nwith more variables. If we wanted to predict the price of a house based on the number of bedrooms,\nthe year it was built in and the average house price of the city the house stands in, our function\nwould look more like this:`),mdx(\"div\",{\"className\":\"math math-display\"},mdx(\"span\",{parentName:\"div\",\"className\":\"katex-display\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\",\"display\":\"block\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`f`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msub\"},`x`),mdx(\"mn\",{parentName:\"msub\"},`1`)),mdx(\"mo\",{parentName:\"mrow\",\"separator\":\"true\"},`,`),mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msub\"},`x`),mdx(\"mn\",{parentName:\"msub\"},`2`)),mdx(\"mo\",{parentName:\"mrow\",\"separator\":\"true\"},`,`),mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msub\"},`x`),mdx(\"mn\",{parentName:\"msub\"},`3`)),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msub\"},`x`),mdx(\"mn\",{parentName:\"msub\"},`1`)),mdx(\"mo\",{parentName:\"mrow\"},`⋅`),mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msub\"},`m`),mdx(\"mn\",{parentName:\"msub\"},`1`)),mdx(\"mo\",{parentName:\"mrow\"},`+`),mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msub\"},`x`),mdx(\"mn\",{parentName:\"msub\"},`2`)),mdx(\"mo\",{parentName:\"mrow\"},`⋅`),mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msub\"},`m`),mdx(\"mn\",{parentName:\"msub\"},`3`)),mdx(\"mo\",{parentName:\"mrow\"},`+`),mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msub\"},`x`),mdx(\"mn\",{parentName:\"msub\"},`3`)),mdx(\"mo\",{parentName:\"mrow\"},`⋅`),mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msub\"},`m`),mdx(\"mn\",{parentName:\"msub\"},`3`)),mdx(\"mo\",{parentName:\"mrow\"},`+`),mdx(\"mi\",{parentName:\"mrow\"},`b`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`f(x_1,x_2,x_3) = x_1 \\\\cdot m_1 + x_2 \\\\cdot m_3 + x_3 \\\\cdot m_3 + b`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"1em\",\"verticalAlign\":\"-0.25em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.10764em\"}},`f`),mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`x`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.30110799999999993em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"0em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`1`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mpunct\"},`,`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.16666666666666666em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`x`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.30110799999999993em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"0em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`2`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mpunct\"},`,`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.16666666666666666em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`x`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.30110799999999993em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"0em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`3`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.59445em\",\"verticalAlign\":\"-0.15em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`x`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.30110799999999993em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"0em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`1`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`⋅`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.73333em\",\"verticalAlign\":\"-0.15em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.30110799999999993em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"0em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`1`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`+`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.59445em\",\"verticalAlign\":\"-0.15em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`x`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.30110799999999993em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"0em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`2`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`⋅`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.73333em\",\"verticalAlign\":\"-0.15em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.30110799999999993em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"0em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`3`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`+`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.59445em\",\"verticalAlign\":\"-0.15em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`x`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.30110799999999993em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"0em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`3`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`⋅`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.73333em\",\"verticalAlign\":\"-0.15em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.30110799999999993em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"0em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`3`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`+`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.69444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`b`)))))),mdx(\"p\",null,`To make our life easier, we will vectorize our function and instead write:`),mdx(\"div\",{\"className\":\"math math-display\"},mdx(\"span\",{parentName:\"div\",\"className\":\"katex-display\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\",\"display\":\"block\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`f`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msub\"},`X`),mdx(\"mi\",{parentName:\"msub\"},`b`)),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msub\"},`X`),mdx(\"mi\",{parentName:\"msub\"},`b`)),mdx(\"mo\",{parentName:\"mrow\"},`⋅`),mdx(\"mi\",{parentName:\"mrow\"},`θ`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`f(X_b) = X_b \\\\cdot \\\\theta`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"1em\",\"verticalAlign\":\"-0.25em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.10764em\"}},`f`),mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.07847em\"}},`X`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.33610799999999996em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"-0.07847em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`b`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.83333em\",\"verticalAlign\":\"-0.15em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.07847em\"}},`X`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.33610799999999996em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"-0.07847em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`b`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`⋅`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.69444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.02778em\"}},`θ`)))))),mdx(\"p\",null,`If you are asking yourself where the `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mo\",{parentName:\"mrow\"},`+`),mdx(\"mi\",{parentName:\"mrow\"},`b`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`+ b`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.77777em\",\"verticalAlign\":\"-0.08333em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`+`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`b`))))),` went, what this ”`,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mrow\",{parentName:\"msub\"}),mdx(\"mi\",{parentName:\"msub\"},`b`))),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`_b`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.486108em\",\"verticalAlign\":\"-0.15em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\"}),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.33610799999999996em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`b`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))))))),`” in `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msub\"},`X`),mdx(\"mi\",{parentName:\"msub\"},`b`))),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`X_b`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.83333em\",\"verticalAlign\":\"-0.15em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.07847em\"}},`X`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.33610799999999996em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"-0.07847em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`b`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))))))),` means, or if our function really remained the same,\nI encourage you to read the `,mdx(\"a\",{parentName:\"p\",\"href\":\"/machine_learning_models/linear_regression/#adjustment-vectorization\"},`section about vectorization in the post about linear regression`),`,\nwhere I explain this step in a lot more detail.`),mdx(\"h3\",{\"id\":\"code-outline\"},`Code Outline`),mdx(\"p\",null,`So the skeleton of our function should look something like this:`),mdx(\"pre\",null,mdx(\"code\",{parentName:\"pre\",\"className\":\"language-python\"},`def gradient_descent(x, y, theta, criterion, number_of_iterations, alpha):\n    for i in range(number_of_iterations):\n        # perform one step of gradient descent\n\n    return ideal_theta\n`)),mdx(\"p\",null,`We want to perform `,mdx(\"em\",{parentName:\"p\"},`number_of_iterations`),` many gradient descent-steps, which is\nwhy we added the for-loop. Now let’s perform gradient descent step by step.`),mdx(\"h3\",{\"id\":\"making-predictions\"},`Making Predictions`),mdx(\"p\",null,`First, we have to calculate the predictions of our model for `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mtext\",{parentName:\"msub\",\"mathvariant\":\"bold\"},`X`),mdx(\"mi\",{parentName:\"msub\"},`b`))),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`\\\\textbf{X}_b`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.83611em\",\"verticalAlign\":\"-0.15em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord text\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord textbf\"},`X`)),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.33610799999999996em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`b`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))))))),`.\nWe can do this by defining a higher order function that takes in `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mtext\",{parentName:\"msub\",\"mathvariant\":\"bold\"},`X`),mdx(\"mi\",{parentName:\"msub\"},`b`))),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`\\\\textbf{X}_b`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.83611em\",\"verticalAlign\":\"-0.15em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord text\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord textbf\"},`X`)),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.33610799999999996em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`b`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))))))),` and `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\",\"mathvariant\":\"bold-italic\"},`θ`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`\\\\boldsymbol{\\\\theta}`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.69444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord boldsymbol\",\"style\":{\"marginRight\":\"0.03194em\"}},`θ`))))))),` and\ncreates our linear function for us, which it then returns. This would look like this:`),mdx(\"pre\",null,mdx(\"code\",{parentName:\"pre\",\"className\":\"language-python\"},`def create_function(theta):\n    def f(X_b):\n        return np.dot(X_b,theta)\n\n    return f\n`)),mdx(\"p\",null,`We can then use our function like this:`),mdx(\"pre\",null,mdx(\"code\",{parentName:\"pre\",\"className\":\"language-python\"},`f = create_function(theta)\ny_predicted = f(X_b)\n`)),mdx(\"p\",null,`Note that we could also just write `,mdx(\"inlineCode\",{parentName:\"p\"},`np.dot(X_b,theta)`),` directly,\ninstead of creating this higher order-function,\nbut this way we can more easily reuse our code if we wanted to create a more complicated function.`),mdx(\"h3\",{\"id\":\"calculating-the-loss\"},`Calculating the Loss`),mdx(\"div\",null,mdx(\"p\",null,`Now we need to calculate our loss (the MSE). Let’s recall what our `,mdx(\"em\",{parentName:\"p\"},`vectorized`),` MSE looks like`,mdx(ToolTip,{trigger:\"*\",mdxType:\"ToolTip\"},`If you’re interested in how we got to this vectorized version of the MSE, we derive it step by step in the `,mdx(\"a\",{parentName:\"p\",\"href\":\"/machine_learning_math/vectorization/#example-2-mse\"},`article about vectorization`),`.`),`:`)),mdx(\"div\",{\"className\":\"math math-display\"},mdx(\"span\",{parentName:\"div\",\"className\":\"katex-display\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\",\"display\":\"block\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`M`),mdx(\"mi\",{parentName:\"mrow\"},`S`),mdx(\"mi\",{parentName:\"mrow\"},`E`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"mi\",{parentName:\"mrow\"},`m`),mdx(\"mo\",{parentName:\"mrow\",\"separator\":\"true\"},`,`),mdx(\"mi\",{parentName:\"mrow\"},`b`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mfrac\",{parentName:\"mrow\"},mdx(\"mn\",{parentName:\"mfrac\"},`1`),mdx(\"mi\",{parentName:\"mfrac\"},`n`)),mdx(\"mo\",{parentName:\"mrow\"},`⋅`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msub\"},`y`),mdx(\"mi\",{parentName:\"msub\"},`i`)),mdx(\"mo\",{parentName:\"mrow\"},`−`),mdx(\"mstyle\",{parentName:\"mrow\",\"mathcolor\":\"#26a6ed\"},mdx(\"msub\",{parentName:\"mstyle\"},mdx(\"mi\",{parentName:\"msub\"},`y`),mdx(\"mrow\",{parentName:\"msub\"},mdx(\"mi\",{parentName:\"mrow\"},`p`),mdx(\"mi\",{parentName:\"mrow\"},`r`),mdx(\"mi\",{parentName:\"mrow\"},`e`),mdx(\"mi\",{parentName:\"mrow\"},`d`)))),mdx(\"msup\",{parentName:\"mrow\"},mdx(\"mo\",{parentName:\"msup\",\"stretchy\":\"false\"},`)`),mdx(\"mi\",{parentName:\"msup\"},`T`)),mdx(\"mo\",{parentName:\"mrow\"},`⋅`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msub\"},`y`),mdx(\"mi\",{parentName:\"msub\"},`i`)),mdx(\"mo\",{parentName:\"mrow\"},`−`),mdx(\"mstyle\",{parentName:\"mrow\",\"mathcolor\":\"#26a6ed\"},mdx(\"msub\",{parentName:\"mstyle\"},mdx(\"mi\",{parentName:\"msub\"},`y`),mdx(\"mrow\",{parentName:\"msub\"},mdx(\"mi\",{parentName:\"mrow\"},`p`),mdx(\"mi\",{parentName:\"mrow\"},`r`),mdx(\"mi\",{parentName:\"mrow\"},`e`),mdx(\"mi\",{parentName:\"mrow\"},`d`)))),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`MSE(m,b) = \\\\frac{1}{n} \\\\cdot ( (y_i-{\\\\color{#26a6ed}y_{pred}})^T \\\\cdot (y_i-{\\\\color{#26a6ed}y_{pred}}) )`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"1em\",\"verticalAlign\":\"-0.25em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.10903em\"}},`M`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.05764em\"}},`S`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.05764em\"}},`E`),mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`),mdx(\"span\",{parentName:\"span\",\"className\":\"mpunct\"},`,`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.16666666666666666em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`b`),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"2.00744em\",\"verticalAlign\":\"-0.686em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen nulldelimiter\"}),mdx(\"span\",{parentName:\"span\",\"className\":\"mfrac\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.32144em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.314em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`n`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.23em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"frac-line\",\"style\":{\"borderBottomWidth\":\"0.04em\"}})),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.677em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`1`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.686em\"}},mdx(\"span\",{parentName:\"span\"}))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose nulldelimiter\"})),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`⋅`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"1em\",\"verticalAlign\":\"-0.25em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.03588em\"}},`y`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.31166399999999994em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"-0.03588em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`i`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`−`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"1.177439em\",\"verticalAlign\":\"-0.286108em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\",\"style\":{\"color\":\"#26a6ed\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.03588em\",\"color\":\"#26a6ed\"}},`y`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.3361079999999999em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"-0.03588em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\",\"style\":{\"color\":\"#26a6ed\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\",\"style\":{\"color\":\"#26a6ed\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\",\"style\":{\"color\":\"#26a6ed\"}},`p`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\",\"style\":{\"marginRight\":\"0.02778em\",\"color\":\"#26a6ed\"}},`r`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\",\"style\":{\"color\":\"#26a6ed\"}},`e`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\",\"style\":{\"color\":\"#26a6ed\"}},`d`))))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.286108em\"}},mdx(\"span\",{parentName:\"span\"}))))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.8913309999999999em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.113em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\",\"style\":{\"marginRight\":\"0.13889em\"}},`T`)))))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`⋅`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"1em\",\"verticalAlign\":\"-0.25em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.03588em\"}},`y`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.31166399999999994em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"-0.03588em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`i`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`−`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"1.036108em\",\"verticalAlign\":\"-0.286108em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\",\"style\":{\"color\":\"#26a6ed\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.03588em\",\"color\":\"#26a6ed\"}},`y`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.3361079999999999em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"-0.03588em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\",\"style\":{\"color\":\"#26a6ed\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\",\"style\":{\"color\":\"#26a6ed\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\",\"style\":{\"color\":\"#26a6ed\"}},`p`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\",\"style\":{\"marginRight\":\"0.02778em\",\"color\":\"#26a6ed\"}},`r`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\",\"style\":{\"color\":\"#26a6ed\"}},`e`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\",\"style\":{\"color\":\"#26a6ed\"}},`d`))))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.286108em\"}},mdx(\"span\",{parentName:\"span\"}))))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`)))))),mdx(\"p\",null,`And now let’s translate it into (vectorized) code:`),mdx(\"pre\",null,mdx(\"code\",{parentName:\"pre\",\"className\":\"language-python\"},`def mse(y, y_predicted):\n    error = y-y_predicted\n    loss = 1/(y.size) * np.dot(error.T, error)\n    return loss\n`)),mdx(\"p\",null,`Note that since `,mdx(\"inlineCode\",{parentName:\"p\"},`error`),` is just a vector containing all of the residuals,\n`,mdx(\"inlineCode\",{parentName:\"p\"},`np.dot(error.T, error)`),` is just a shortcut for the dot product of `,mdx(\"inlineCode\",{parentName:\"p\"},`error`),` with itself.\nThis results in the same output as if we were to calculate each residual\nindividually, square them up and add them together.\nIf you are still unsure about this, I recommend you implement this function both\nvectorized and non-vectorized and then compare them to each other.`),mdx(\"p\",null,`Now we can calculate our loss like this:`),mdx(\"pre\",null,mdx(\"code\",{parentName:\"pre\",\"className\":\"language-python\"},`loss = mse(y, y_predicted)\n`)),mdx(\"h3\",{\"id\":\"optimizing-our-variables\"},`Optimizing our Variables`),mdx(\"p\",null,`The last step which we have to perform is to optimize our variables.\nFirst, we have to compute the gradient of our MSE. For this, we need our two partial derivatives.\nLet’s recall what they look like:`),mdx(\"div\",{\"className\":\"math math-display\"},mdx(\"span\",{parentName:\"div\",\"className\":\"katex-display\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\",\"display\":\"block\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mfrac\",{parentName:\"mrow\"},mdx(\"mrow\",{parentName:\"mfrac\"},mdx(\"mi\",{parentName:\"mrow\",\"mathvariant\":\"normal\"},`∂`),mdx(\"mi\",{parentName:\"mrow\"},`M`),mdx(\"mi\",{parentName:\"mrow\"},`S`),mdx(\"mi\",{parentName:\"mrow\"},`E`)),mdx(\"mrow\",{parentName:\"mfrac\"},mdx(\"mi\",{parentName:\"mrow\",\"mathvariant\":\"normal\"},`∂`),mdx(\"mi\",{parentName:\"mrow\"},`m`))),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mfrac\",{parentName:\"mrow\"},mdx(\"mrow\",{parentName:\"mfrac\"},mdx(\"mo\",{parentName:\"mrow\"},`−`),mdx(\"mn\",{parentName:\"mrow\"},`2`)),mdx(\"mi\",{parentName:\"mfrac\"},`n`)),mdx(\"munderover\",{parentName:\"mrow\"},mdx(\"mo\",{parentName:\"munderover\"},`∑`),mdx(\"mrow\",{parentName:\"munderover\"},mdx(\"mi\",{parentName:\"mrow\"},`i`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mn\",{parentName:\"mrow\"},`1`)),mdx(\"mi\",{parentName:\"munderover\"},`n`)),mdx(\"mrow\",{parentName:\"mrow\"},mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msub\"},`y`),mdx(\"mi\",{parentName:\"msub\"},`i`)),mdx(\"mo\",{parentName:\"mrow\"},`−`),mdx(\"mstyle\",{parentName:\"mrow\",\"mathcolor\":\"#26a6ed\"},mdx(\"mo\",{parentName:\"mstyle\",\"stretchy\":\"false\"},`(`),mdx(\"mi\",{parentName:\"mstyle\"},`m`),mdx(\"mi\",{parentName:\"mstyle\"},`x`),mdx(\"mo\",{parentName:\"mstyle\"},`+`),mdx(\"mi\",{parentName:\"mstyle\"},`b`),mdx(\"mo\",{parentName:\"mstyle\",\"stretchy\":\"false\"},`)`)),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`),mdx(\"mo\",{parentName:\"mrow\"},`⋅`),mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msub\"},`x`),mdx(\"mi\",{parentName:\"msub\"},`i`)),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`)),mdx(\"mspace\",{parentName:\"mrow\",\"linebreak\":\"newline\"}),mdx(\"mspace\",{parentName:\"mrow\",\"linebreak\":\"newline\"}),mdx(\"mfrac\",{parentName:\"mrow\"},mdx(\"mrow\",{parentName:\"mfrac\"},mdx(\"mi\",{parentName:\"mrow\",\"mathvariant\":\"normal\"},`∂`),mdx(\"mi\",{parentName:\"mrow\"},`M`),mdx(\"mi\",{parentName:\"mrow\"},`S`),mdx(\"mi\",{parentName:\"mrow\"},`E`)),mdx(\"mrow\",{parentName:\"mfrac\"},mdx(\"mi\",{parentName:\"mrow\",\"mathvariant\":\"normal\"},`∂`),mdx(\"mi\",{parentName:\"mrow\"},`b`))),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mfrac\",{parentName:\"mrow\"},mdx(\"mrow\",{parentName:\"mfrac\"},mdx(\"mo\",{parentName:\"mrow\"},`−`),mdx(\"mn\",{parentName:\"mrow\"},`2`)),mdx(\"mi\",{parentName:\"mfrac\"},`n`)),mdx(\"munderover\",{parentName:\"mrow\"},mdx(\"mo\",{parentName:\"munderover\"},`∑`),mdx(\"mrow\",{parentName:\"munderover\"},mdx(\"mi\",{parentName:\"mrow\"},`i`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mn\",{parentName:\"mrow\"},`1`)),mdx(\"mi\",{parentName:\"munderover\"},`n`)),mdx(\"mrow\",{parentName:\"mrow\"},mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`(`),mdx(\"msub\",{parentName:\"mrow\"},mdx(\"mi\",{parentName:\"msub\"},`y`),mdx(\"mi\",{parentName:\"msub\"},`i`)),mdx(\"mo\",{parentName:\"mrow\"},`−`),mdx(\"mstyle\",{parentName:\"mrow\",\"mathcolor\":\"#26a6ed\"},mdx(\"mo\",{parentName:\"mstyle\",\"stretchy\":\"false\"},`(`),mdx(\"mi\",{parentName:\"mstyle\"},`m`),mdx(\"mi\",{parentName:\"mstyle\"},`x`),mdx(\"mo\",{parentName:\"mstyle\"},`+`),mdx(\"mi\",{parentName:\"mstyle\"},`b`),mdx(\"mo\",{parentName:\"mstyle\",\"stretchy\":\"false\"},`)`)),mdx(\"mo\",{parentName:\"mrow\",\"stretchy\":\"false\"},`)`))),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`\n\\\\frac{\\\\partial MSE}{\\\\partial m} = \\\\frac{-2}{n} \\\\sum_{i=1}^n{((y_i-{\\\\color{#26a6ed}(mx+b)}) \\\\cdot x_i)} \\\\\\\\\\\\\\\\\n\n\\\\frac{\\\\partial MSE}{\\\\partial b} = \\\\frac{-2}{n} \\\\sum_{i=1}^n{(y_i-{\\\\color{#26a6ed}(mx+b)})}\n\n`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"2.05744em\",\"verticalAlign\":\"-0.686em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen nulldelimiter\"}),mdx(\"span\",{parentName:\"span\",\"className\":\"mfrac\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.37144em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.314em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\",\"style\":{\"marginRight\":\"0.05556em\"}},`∂`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.23em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"frac-line\",\"style\":{\"borderBottomWidth\":\"0.04em\"}})),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.677em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\",\"style\":{\"marginRight\":\"0.05556em\"}},`∂`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.10903em\"}},`M`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.05764em\"}},`S`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.05764em\"}},`E`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.686em\"}},mdx(\"span\",{parentName:\"span\"}))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose nulldelimiter\"})),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"2.929066em\",\"verticalAlign\":\"-1.277669em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen nulldelimiter\"}),mdx(\"span\",{parentName:\"span\",\"className\":\"mfrac\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.32144em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.314em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`n`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.23em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"frac-line\",\"style\":{\"borderBottomWidth\":\"0.04em\"}})),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.677em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`−`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`2`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.686em\"}},mdx(\"span\",{parentName:\"span\"}))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose nulldelimiter\"})),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.16666666666666666em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mop op-limits\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.6513970000000002em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-1.872331em\",\"marginLeft\":\"0em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.05em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`i`),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel mtight\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`1`)))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.050005em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.05em\"}}),mdx(\"span\",{parentName:\"span\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mop op-symbol large-op\"},`∑`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-4.3000050000000005em\",\"marginLeft\":\"0em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.05em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`n`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.277669em\"}},mdx(\"span\",{parentName:\"span\"}))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.16666666666666666em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.03588em\"}},`y`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.31166399999999994em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"-0.03588em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`i`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`−`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\",\"style\":{\"color\":\"#26a6ed\"}},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"color\":\"#26a6ed\"}},`m`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"color\":\"#26a6ed\"}},`x`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\",\"style\":{\"color\":\"#26a6ed\"}},`+`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"color\":\"#26a6ed\"}},`b`),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\",\"style\":{\"color\":\"#26a6ed\"}},`)`)),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`⋅`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`x`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.31166399999999994em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"0em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`i`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`))),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace newline\"}),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace newline\"}),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"2.05744em\",\"verticalAlign\":\"-0.686em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen nulldelimiter\"}),mdx(\"span\",{parentName:\"span\",\"className\":\"mfrac\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.37144em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.314em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\",\"style\":{\"marginRight\":\"0.05556em\"}},`∂`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`b`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.23em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"frac-line\",\"style\":{\"borderBottomWidth\":\"0.04em\"}})),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.677em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\",\"style\":{\"marginRight\":\"0.05556em\"}},`∂`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.10903em\"}},`M`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.05764em\"}},`S`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.05764em\"}},`E`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.686em\"}},mdx(\"span\",{parentName:\"span\"}))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose nulldelimiter\"})),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"2.929066em\",\"verticalAlign\":\"-1.277669em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen nulldelimiter\"}),mdx(\"span\",{parentName:\"span\",\"className\":\"mfrac\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.32144em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.314em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`n`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.23em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"frac-line\",\"style\":{\"borderBottomWidth\":\"0.04em\"}})),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.677em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`−`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`2`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.686em\"}},mdx(\"span\",{parentName:\"span\"}))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose nulldelimiter\"})),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.16666666666666666em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mop op-limits\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.6513970000000002em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-1.872331em\",\"marginLeft\":\"0em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.05em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`i`),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel mtight\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`1`)))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.050005em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.05em\"}}),mdx(\"span\",{parentName:\"span\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mop op-symbol large-op\"},`∑`))),mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-4.3000050000000005em\",\"marginLeft\":\"0em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"3.05em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`n`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"1.277669em\"}},mdx(\"span\",{parentName:\"span\"}))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.16666666666666666em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\"},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"marginRight\":\"0.03588em\"}},`y`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t vlist-t2\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.31166399999999994em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-2.5500000000000003em\",\"marginLeft\":\"-0.03588em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal mtight\"},`i`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-s\"},`​`)),mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.15em\"}},mdx(\"span\",{parentName:\"span\"})))))),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\"},`−`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mopen\",\"style\":{\"color\":\"#26a6ed\"}},`(`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"color\":\"#26a6ed\"}},`m`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"color\":\"#26a6ed\"}},`x`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mbin\",\"style\":{\"color\":\"#26a6ed\"}},`+`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2222222222222222em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\",\"style\":{\"color\":\"#26a6ed\"}},`b`),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\",\"style\":{\"color\":\"#26a6ed\"}},`)`)),mdx(\"span\",{parentName:\"span\",\"className\":\"mclose\"},`)`))))))),mdx(\"p\",null,`We can implement our derivatives like this:`),mdx(\"pre\",null,mdx(\"code\",{parentName:\"pre\",\"className\":\"language-python\"},`def mse_derivative_m(X,y,y_predicted):\n    return -(2/y.size) * sum(X * (y - y_predicted))\n\ndef mse_derivative_b(y,y_predicted):\n    return -(2/y.size) * sum(y - y_predicted)\n`)),mdx(WarningTip,{mdxType:\"WarningTip\"},mdx(\"p\",null,`Note that since we do not multiply our `,mdx(\"strong\",{parentName:\"p\"},`X_b`),` with `,mdx(\"strong\",{parentName:\"p\"},`theta`),` here, we need to use\nour regular `,mdx(\"strong\",{parentName:\"p\"},`X`),` instead of `,mdx(\"strong\",{parentName:\"p\"},`X`),mdx(\"sub\",null,`b`),`.`)),mdx(\"p\",null,`Now we can compute our gradient in just one line of code:`),mdx(\"pre\",null,mdx(\"code\",{parentName:\"pre\",\"className\":\"language-python\"},`gradient = [mse_derivative_m(x,y,y_predicted),\n            mse_derivative_b(y,y_predicted)]\n`)),mdx(\"p\",null,`Once we have our gradient, we can adjust our `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`m`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`m`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`))))),` and our `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`b`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`b`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.69444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`b`))))),`:`),mdx(\"pre\",null,mdx(\"code\",{parentName:\"pre\",\"className\":\"language-python\"},`m -= learning_rate * gradient[0] #adjust m\nb -= learning_rate * gradient[1] #adjust b\n`)),mdx(\"p\",null,`Let’s now put all of this into our main function:`),mdx(\"pre\",null,mdx(\"code\",{parentName:\"pre\",\"className\":\"language-python\"},`def gradient_descent(x, y, theta, criterion, number_of_iterations, learning_rate):\n    X_b = add_intercept_ones(X)\n    for i in range(number_of_iterations):\n\n        # predict and calculate loss\n        f = create_function(theta) # create the current function\n        y_predicted = f(X_b) # predict our entire x\n        loss = criterion(y,y_predicted) # calculate the error\n\n        # perform optimization\n        gradient = np.array([mse_derivative_b(y,y_predicted), mse_derivative_m(x,y,y_predicted)]) # calculate gradient\n        theta = theta - learning_rate * gradient #adjust m and b\n\n    return theta\n`)),mdx(\"p\",null,`Great! Let’s try it out:`),mdx(\"pre\",null,mdx(\"code\",{parentName:\"pre\",\"className\":\"language-python\"},`theta = np.array([0.,0.])\nnum_epochs = 25\nlearning_rate = 0.001\nideal_theta = gradient_descent(X, y, theta, mse, num_epochs, learning_rate)\n`)),mdx(\"p\",null,`If we then inspect our ideal theta we get:`),mdx(\"pre\",null,mdx(\"code\",{parentName:\"pre\",\"className\":\"language-python\"},`>>>print(ideal_theta)\narray([ 8.19030548, 31.03371126])\n`)),mdx(\"p\",null,`It’s certainly getting closer to our minimum!\nOur minimum lies at the point where and `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`b`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mo\",{parentName:\"mrow\"},`−`),mdx(\"mn\",{parentName:\"mrow\"},`46.316`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`b=-46.316`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.69444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`b`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.72777em\",\"verticalAlign\":\"-0.08333em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`−`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`4`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`6`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`.`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`3`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`1`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`6`))))),` and `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`m`),mdx(\"mo\",{parentName:\"mrow\"},`=`),mdx(\"mn\",{parentName:\"mrow\"},`84.737`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`m=84.737`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`=`),mdx(\"span\",{parentName:\"span\",\"className\":\"mspace\",\"style\":{\"marginRight\":\"0.2777777777777778em\"}})),mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.64444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`8`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`4`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`.`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`7`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`3`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`7`))))),`.\nAs you see, `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`m`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`m`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.43056em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`m`))))),` is moving in the right direction, but `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mi\",{parentName:\"mrow\"},`b`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`b`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.69444em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord mathnormal\"},`b`))))),` is still moving\nthe wrong way.`),mdx(\"p\",null,`We can now calculate the MSE for our ideal function:`),mdx(\"pre\",null,mdx(\"code\",{parentName:\"pre\",\"className\":\"language-python\"},`ideal_function = create_function(ideal_theta)\ny_pred = f(X_b)\nprint(mse(y,y_pred))\n`)),mdx(\"p\",null,`which returns us a value of ~23223 `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mo\",{parentName:\"mrow\"},`≈`)),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`\\\\approx`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.48312em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mrel\"},`≈`))))),` `,mdx(\"span\",{parentName:\"p\",\"className\":\"math math-inline\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex\"},mdx(\"span\",{parentName:\"span\",\"className\":\"katex-mathml\"},mdx(\"math\",{parentName:\"span\",\"xmlns\":\"http://www.w3.org/1998/Math/MathML\"},mdx(\"semantics\",{parentName:\"math\"},mdx(\"mrow\",{parentName:\"semantics\"},mdx(\"mn\",{parentName:\"mrow\"},`15`),mdx(\"msup\",{parentName:\"mrow\"},mdx(\"mn\",{parentName:\"msup\"},`2`),mdx(\"mn\",{parentName:\"msup\"},`2`))),mdx(\"annotation\",{parentName:\"semantics\",\"encoding\":\"application/x-tex\"},`152^2`)))),mdx(\"span\",{parentName:\"span\",\"className\":\"katex-html\",\"aria-hidden\":\"true\"},mdx(\"span\",{parentName:\"span\",\"className\":\"base\"},mdx(\"span\",{parentName:\"span\",\"className\":\"strut\",\"style\":{\"height\":\"0.8141079999999999em\",\"verticalAlign\":\"0em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`1`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`5`),mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord\"},`2`),mdx(\"span\",{parentName:\"span\",\"className\":\"msupsub\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-t\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist-r\"},mdx(\"span\",{parentName:\"span\",\"className\":\"vlist\",\"style\":{\"height\":\"0.8141079999999999em\"}},mdx(\"span\",{parentName:\"span\",\"style\":{\"top\":\"-3.063em\",\"marginRight\":\"0.05em\"}},mdx(\"span\",{parentName:\"span\",\"className\":\"pstrut\",\"style\":{\"height\":\"2.7em\"}}),mdx(\"span\",{parentName:\"span\",\"className\":\"sizing reset-size6 size3 mtight\"},mdx(\"span\",{parentName:\"span\",\"className\":\"mord mtight\"},`2`)))))))))))),`! Awesome!\nBut it’s not exactly at the minimum yet.\nIf we adjust our learning rate a bit and train our model longer, we do eventually reach the minimum.\nF.e. with a learning rate of 0.075 and 200 training epochs, we reach a loss of ~5692, which is\nvery close to our minimum. Feel free to experiment with the values a bit and see if you find a more\noptimal configuration. If you do, definitely let me know in the comments below!`),mdx(\"h3\",{\"id\":\"some-adjustments\"},`Some Adjustments`),mdx(\"p\",null,`Let’s now make a few improvements to our function.\nWouldn’t it be cool if we could track the loss of our function across every epoch?\nWe can do this by creating a new list and always appending the current loss to it.\nAlso, we can print the current loss every 10 or so epochs!`),mdx(\"pre\",null,mdx(\"code\",{parentName:\"pre\",\"className\":\"language-python\",\"metastring\":\"{3,10,16-17,21}\",\"{3,10,16-17,21}\":true},`def gradient_descent(x, y, theta, criterion, number_of_iterations, learning_rate):\n    X_b = add_intercept_ones(X)\n    loss_history=[]\n    for i in range(number_of_iterations):\n\n        # predict and calculate loss\n        f = create_function(theta) # create the current function\n        y_predicted = f(X_b) # predict our entire x\n        loss = criterion(y,y_predicted) # calculate the error\n        loss_history.append(loss)\n\n        # perform optimization\n        gradient = np.array([mse_derivative_b(y,y_predicted), mse_derivative_m(x,y,y_predicted)]) # calculate gradient\n        theta = theta - learning_rate * gradient #adjust m and b\n\n        if i%10==0:\n            print(\"Current Epoch: {}, Current Loss: {}\".format(i,loss))\n\n    return theta,loss_history\n`)),mdx(\"p\",null,`We now execute gradient descent once again:`),mdx(\"pre\",null,mdx(\"code\",{parentName:\"pre\",\"className\":\"language-python\"},`theta = np.array([0.,0.])\nnum_epochs = 200\nlearning_rate = 0.0075\nideal_theta, loss_history = gradient_descent(X, y, theta, mse, num_epochs, learning_rate)\n`)),mdx(\"p\",null,`Now we can plot our loss across the iterations:`),mdx(\"pre\",null,mdx(\"code\",{parentName:\"pre\",\"className\":\"language-python\"},`import matplotlib.pyplot as plt\nplt.plot(np.arange(num_epochs),loss_history)\n`)),mdx(\"p\",null,`which gives us the following plot:`),mdx(\"p\",null,mdx(\"span\",{parentName:\"p\",\"className\":\"gatsby-resp-image-wrapper\",\"style\":{\"position\":\"relative\",\"display\":\"block\",\"marginLeft\":\"auto\",\"marginRight\":\"auto\",\"maxWidth\":\"387px\"}},`\n      `,mdx(\"span\",{parentName:\"span\",\"className\":\"gatsby-resp-image-background-image\",\"style\":{\"paddingBottom\":\"64.08268733850129%\",\"position\":\"relative\",\"bottom\":\"0\",\"left\":\"0\",\"backgroundImage\":\"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAANCAIAAAAmMtkJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA3klEQVQoz52R2Y6DMAxF+f/PHAIhJGTzSqCLoK00j6VX1nmwdGxL7h5nlpSRWOXbqCoAdKO1g+lHn6TdHlciIp2IrCo2JG77ZXmapsH01v8kMzMThVSqbpflEMLsXC41Ubss55xD8KVCpPWyDACl5Ao/yc65vv8rtcbz7PsXdfv/KmaugBGvb7bWGmMIsXDL3GjdQTf8EF9cd/rU2dxlu7NI9xoT41JKtT6O83IyHHRhnMPg/DgvZnpzcEfH+mX2/i2rats2VWVmVUWE1lYRJoScEzOVkg/mg0SICCH4J+aI94L9fruUAAAAAElFTkSuQmCC')\",\"backgroundSize\":\"cover\",\"display\":\"block\"}}),`\n  `,mdx(\"picture\",{parentName:\"span\"},`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/6ee558bbe79ccb8db56e1b4840e53a4c/95960/lossHistory.webp 387w\"],\"sizes\":\"(max-width: 387px) 100vw, 387px\",\"type\":\"image/webp\"}),`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/6ee558bbe79ccb8db56e1b4840e53a4c/0082d/lossHistory.png 387w\"],\"sizes\":\"(max-width: 387px) 100vw, 387px\",\"type\":\"image/png\"}),`\n          `,mdx(\"img\",{parentName:\"picture\",\"className\":\"gatsby-resp-image-image\",\"src\":\"/static/6ee558bbe79ccb8db56e1b4840e53a4c/0082d/lossHistory.png\",\"alt\":\"loss history of our model\",\"title\":\"loss history of our model\",\"loading\":\"lazy\",\"decoding\":\"async\",\"style\":{\"width\":\"100%\",\"height\":\"100%\",\"margin\":\"0\",\"verticalAlign\":\"middle\",\"position\":\"absolute\",\"top\":\"0\",\"left\":\"0\"}}),`\n        `),`\n    `)),mdx(\"p\",null,`Nice!`),mdx(\"p\",null,`If you want to add some additional features to the implementation, here are a few ideas:`),mdx(\"ul\",null,mdx(\"li\",{parentName:\"ul\"},`Return the history of thetas in addition to the history of losses`),mdx(\"li\",{parentName:\"ul\"},`Add functionality to save/load your (ideal) function`),mdx(\"li\",{parentName:\"ul\"},`Implement early stopping`)),mdx(\"p\",null,`If you want to make sure you understood everything in this article, try to implement one or two\nof these features!`),mdx(\"h3\",{\"id\":\"scikit-learn\"},`Scikit-Learn`),mdx(\"p\",null,`We can also use the popular library scikit-learn to solve our linear regression problem using\ngradient descent. For this, we can use the `,mdx(\"a\",{parentName:\"p\",\"href\":\"https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.SGDRegressor.html\",\"target\":\"_blank\",\"rel\":\"nofollow noopener noreferrer\"},mdx(\"inlineCode\",{parentName:\"a\"},`SGDRegressor`),`-class`),`.\nScikit-learn expects our x to be two-dimensional (since, in most cases, we will have more than one feature), so we’ll also redefine our x to be two-dimensional:\nThe code looks like this:`),mdx(\"pre\",null,mdx(\"code\",{parentName:\"pre\",\"className\":\"language-python\"},`X = np.array(\n    [\n            [1], [2], [3], [3], [4], [4], [5]\n    ]\n)\n`)),mdx(\"p\",null,`Then, we use the `,mdx(\"inlineCode\",{parentName:\"p\"},`SGDRegressor`),`-class like this:`),mdx(\"pre\",null,mdx(\"code\",{parentName:\"pre\",\"className\":\"language-python\"},`from sklearn.linear_model import SGDRegressor\nsgdreg = SGDRegressor(learning_rate=\"constant\",eta0=0.0075,max_iter=200,random_state=42) #eta0 is our initial learning rate\nsgdreg.fit(X,y)\n`)),mdx(\"p\",null,`And we can then inspect our parameters like this:`),mdx(\"pre\",null,mdx(\"code\",{parentName:\"pre\",\"className\":\"language-python\"},`>>>print(sgdreg.coef_,sgdreg.intercept_)\n[68.95520002] [12.285233]\n`)),mdx(\"p\",null,`Now you might notice that this variant does not directly converge to our minimum, which is because\nscikit-learn does a bit more under the hood than our own implementation. It may look like our\nimplementation is faster, but in truth scikit-learn’s implementation is a lot more general\nand implements a variety of other aspects like a `,mdx(\"em\",{parentName:\"p\"},`regularization term`),` to reduce the risk of overfitting.\nApart from that scikit-learn starts with random values for the parameters instead of starting with 0,\nwhich has some benefits, but in this particular case can result in more epochs being needed to reach the minimum. But this article is getting pretty long and I don’t want to make this\neven longer, so for now, this should suffice. If you want, you can also play around a bit with the individual parameters and see which ones have the strongest effect\non the final model parameters.`),mdx(\"h3\",{\"id\":\"visualizing-gradient-descent\"},`Visualizing Gradient Descent`),mdx(\"p\",null,`Now that we have covered gradient descent in detail, let’s have some fun and look at a complete\nvisualization of the process, shall we? We can visualize the MSE as well\nas our function and both partial derivatives for every epoch. As you may have noticed\nfrom the loss history above, the loss takes a deep dive in the first few epochs\nand then decreases only slowly. So to keep the visualization fluid, I will show\nthe first 10 epochs and then only every 15th epoch after that.\nWe will display our current function/state at that particular epoch with\nthe familiar orange and the optimal point in a familiar purple. Putting all this together,\nwe get:`),mdx(AnimationPlayer,{path:\"../content/machine_learning_math/img/Gradient_Descent_for_Linear_Regression/anim/fourVis/\",ending:\".png\",caption:\"Visualizing Gradient Descent\",identifier:\"fourVis\",numframes:18,mdxType:\"AnimationPlayer\"},mdx(\"img\",{id:\"full\",src:\"/ee6f59e264c435fb700cfbcd627107b7/fourVis.webp\"}),mdx(\"span\",{\"className\":\"gatsby-resp-image-wrapper\",\"style\":{\"position\":\"relative\",\"display\":\"block\",\"marginLeft\":\"auto\",\"marginRight\":\"auto\",\"maxWidth\":\"1600px\"}},`\n      `,mdx(\"span\",{parentName:\"span\",\"className\":\"gatsby-resp-image-background-image\",\"style\":{\"paddingBottom\":\"75%\",\"position\":\"relative\",\"bottom\":\"0\",\"left\":\"0\",\"backgroundImage\":\"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAIAAABr+ngCAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC9klEQVQoz02SzWsbRxjGhYs0M7vatSzLliXN7Mx+2HJXlnZn9kMr2dGH5UhObFq72DQNpHEC7aWBJKYFl156jEPIMSa3HnJpaXHdnAotJDnlkkL/CDf/RhhFTQLv4eWF5315fu+TgoQD7GcqHqJh1owRDQD2IeEQ+5A1IWsqhlBZCAiHbwtzRCd9CmCusrDU6M4utQtut1C9MLOYAMwhkWLAmioVOTmRG5HBFVMgJhQWQiJSgHAN8/ir24sHx/PVfXNwrRIO06UGIhyyZobGOac5W20D4iumUKxAoQEygsllua/SKDY/NbceEf6jtX2YtcL3l2msm1G+2oKmUFgASYBooLIIVLyJGGA+bQZ45XPMv5ldXlOpGDt855nP1zq6Fet2nK+2c06iWbFuRWgiHjPLmlHOTpDBoSE+BAawn654yBAKDfJLLYWGCg2z0jNPpUt14vX7O9edeBQN99e2rvL1z1QaQOwrZhOxOMuCauuSu7pth8NMpeHEI7+3U6530qV6Cpit7FKn6I/yK4MFvlkWlwr1jYzZKnzcqa1tE6+v262c259x1/O1gb7cLXrDnNtXnDVotVOQhhki3M6OnWx5g/3e7g0WbWaIUKjQ7ASxGBliquQZwdBb3/MGe9Hoi+JKL405YlFKgsG+yoJM2YNlb6pQA9gbDz1ApWfZE66yAGKu0WBqbgVgH42JSmDTThMU+eUvD37++/Hlg+v56uqY2Ttg3rSTKDgSo71fX/x08/u787W+yiIJDBlCY9HilZvf/vvnw/OXD/77p/fdDx8VXGQIKTblZY2GdOvq1y/O7p2/PH79avfkBFb8iVi3YvfopPvLs+HTs9UnT+eST0CpLl9IZTwh4ZrBrWtHq0+eb/z2e//0L7p3K1OsQUPIbOtWPOdetNbv1/f/oN3DvD0OIPZVK1HtFiS+ysK8k5DWnfruqTM6LshvB//H0xBZU8zY7XLtRmHpgmbJACDCcaNnhcOsGY0jFOqWWHCvzC0PNbldBukNCG+dKlUwvxUAAAAASUVORK5CYII=')\",\"backgroundSize\":\"cover\",\"display\":\"block\"}}),`\n  `,mdx(\"picture\",{parentName:\"span\"},`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/39518b7b14145ca6c5efbd59faed7eda/601b1/1.webp 500w\",\"/static/39518b7b14145ca6c5efbd59faed7eda/80c60/1.webp 1000w\",\"/static/39518b7b14145ca6c5efbd59faed7eda/64296/1.webp 1600w\"],\"sizes\":\"(max-width: 1600px) 100vw, 1600px\",\"type\":\"image/webp\"}),`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/39518b7b14145ca6c5efbd59faed7eda/0eb09/1.png 500w\",\"/static/39518b7b14145ca6c5efbd59faed7eda/1263b/1.png 1000w\",\"/static/39518b7b14145ca6c5efbd59faed7eda/42cbc/1.png 1600w\"],\"sizes\":\"(max-width: 1600px) 100vw, 1600px\",\"type\":\"image/png\"}),`\n          `,mdx(\"img\",{parentName:\"picture\",\"className\":\"gatsby-resp-image-image\",\"src\":\"/static/39518b7b14145ca6c5efbd59faed7eda/42cbc/1.png\",\"alt\":\"1\",\"title\":\"1\",\"loading\":\"lazy\",\"decoding\":\"async\",\"style\":{\"width\":\"100%\",\"height\":\"100%\",\"margin\":\"0\",\"verticalAlign\":\"middle\",\"position\":\"absolute\",\"top\":\"0\",\"left\":\"0\"}}),`\n        `),`\n    `),mdx(\"span\",{\"className\":\"gatsby-resp-image-wrapper\",\"style\":{\"position\":\"relative\",\"display\":\"block\",\"marginLeft\":\"auto\",\"marginRight\":\"auto\",\"maxWidth\":\"1600px\"}},`\n      `,mdx(\"span\",{parentName:\"span\",\"className\":\"gatsby-resp-image-background-image\",\"style\":{\"paddingBottom\":\"75%\",\"position\":\"relative\",\"bottom\":\"0\",\"left\":\"0\",\"backgroundImage\":\"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAIAAABr+ngCAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC8UlEQVQoz22Tz28TRxTHzY/szK537fgXie2Z2dm14w3e2Dszu95dO8Z24tgmIfwUoAhQDVUrpF5aqlatxKmnFqntoWp74YQEEkKCSOGEVCFVcOAE6h9R+DfQJIZLK73D6Gm+8977vO8kIOYAc6XkaSQw7Eg1fYAYxBwiBmkEaaQSrpm+zPwnEgDxJPWRWM8tdwv1fmG5l3U6+3opBjRKmmJ+KZ69+CE0M4BYJADmOmLBZ186n/+yuLxjjW+UgtFcsaliDmmkmOF8Ncw5HaXs/U9liLmKvGOtbWvyGxY/mJu3dMsHiM8qm2HKbmVqbYCYSgQkvkYD3Q4PGpFigLhhiVL9YpndzDodnR5MOJtZI3yh0Z934nknztW7meV2uhall8IPYqlnutVK2aFKuFJmEIuPwABic2WmmkKjfs7paGagEV92gXlirtjA3trauWk1nIjhhXhzJ9i4aFgBREyzIpWGOvWd9majd3YpnEDECFtf6Z7ubl+lYiMBrLZe6y2ySaa+fswbF/nJfGNDsdr5er++uk3FMOOspo+v5VaGWXdo1PoLbJJdGWZXhnrtRAKagYKF2z9PWycr0Vb3zBTx0dGy3K1RiTUrVIk4XGya/qTeO4fFONy8UolOQRIoxE9AzABiSeorJQ8Um4fz7owW8oApZ5ZnLL0AEFcRO5RzIeLq/h0JLF2NwALf+mT68PndrevXs04HSh4fgXnpaqyWgvDU5ccv7k2/+6rgDpK0JYGpRBi0tbTz6Tf/PPv17auf370ZfHv7SL4uedIIWrKyYQb09LWbL/d++vfVnXevz/7+Byh5kOyLU3bofv/n4NHz8dO91ftPC/EZUGzIFZrSnhBzg3B7erv34O/Rk93B7l/kwhfKgguJkN5O2WHBHVXW7zQv7Zn9r7MVXyU+RCxpx8lKG2KWpEG2GuPOrcb53er4x3wtPvgq+/YkQrdEptIpuTfytROGHcgk5qg5sIOxbrWkhWiQssTi8Z2CMzLsmUneA78PnYQ/HzzQAAAAAElFTkSuQmCC')\",\"backgroundSize\":\"cover\",\"display\":\"block\"}}),`\n  `,mdx(\"picture\",{parentName:\"span\"},`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/7a2933143f689907a806bd4329e89b0a/601b1/2.webp 500w\",\"/static/7a2933143f689907a806bd4329e89b0a/80c60/2.webp 1000w\",\"/static/7a2933143f689907a806bd4329e89b0a/64296/2.webp 1600w\"],\"sizes\":\"(max-width: 1600px) 100vw, 1600px\",\"type\":\"image/webp\"}),`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/7a2933143f689907a806bd4329e89b0a/0eb09/2.png 500w\",\"/static/7a2933143f689907a806bd4329e89b0a/1263b/2.png 1000w\",\"/static/7a2933143f689907a806bd4329e89b0a/42cbc/2.png 1600w\"],\"sizes\":\"(max-width: 1600px) 100vw, 1600px\",\"type\":\"image/png\"}),`\n          `,mdx(\"img\",{parentName:\"picture\",\"className\":\"gatsby-resp-image-image\",\"src\":\"/static/7a2933143f689907a806bd4329e89b0a/42cbc/2.png\",\"alt\":\"2\",\"title\":\"2\",\"loading\":\"lazy\",\"decoding\":\"async\",\"style\":{\"width\":\"100%\",\"height\":\"100%\",\"margin\":\"0\",\"verticalAlign\":\"middle\",\"position\":\"absolute\",\"top\":\"0\",\"left\":\"0\"}}),`\n        `),`\n    `),mdx(\"span\",{\"className\":\"gatsby-resp-image-wrapper\",\"style\":{\"position\":\"relative\",\"display\":\"block\",\"marginLeft\":\"auto\",\"marginRight\":\"auto\",\"maxWidth\":\"1600px\"}},`\n      `,mdx(\"span\",{parentName:\"span\",\"className\":\"gatsby-resp-image-background-image\",\"style\":{\"paddingBottom\":\"75%\",\"position\":\"relative\",\"bottom\":\"0\",\"left\":\"0\",\"backgroundImage\":\"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAIAAABr+ngCAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC9UlEQVQoz12S3YsTVxjGg5KcczJJdjNJXJOZOefMySazOzEzc86czCSzJnGzJruu2hXrtutFdbXUCy8UbEsLpfS2tCIUSgV7Wwr1xs8bBT+gUOhFC/4P2v4bcpIVRTicixee932f3/ukoMWBGWQMHxGZsyNEQmAG0OLQDCCNIY0R5lkSqsq7D6s/BUyuUVn1hqVmUnGHZadfbHSByaGlxIDGGhHzqjLryBHhWVtorDMVWzxv8uizq43d7w842/bRTww5SVc9ZHFI4wyJ5hejkpNkzAARobEwawtExGx+ClocGd5CvGUf/wXz7+jxz3NMvp1MogLr6E6CqNCYRCREOMzSDjD8PTEw+RwLjdbHRnC5tHQ4R2eN99bOYrFwaFioxwUW6U4yv9gtsCg/W1uJp8zyLCo1VzT6PjBoBumaD7HQqNSbvSyRCIsZwlS62rb81dVT5xvxujfYCtc+7Iy3C3YHmn7WjhGNcrZsdjec3ibmo7ThNbsbYnRaowIYfgrYvVxzcDBYL7ZGFW9c8cZFdwTspLw8cFdOEL6mO4fnl1f11lrRHemH1ireWG+NUH0FsiQFicxYwh2caiQnw8mOO9gCWAIsERH5ejdrRwiLfVUfi3V/dKazcVaMP9KX+hlTICpTCowZaDTM1AJQ9VL68tRzAE0fkKlnSyFQLIwgfdDbX2nvQbECBWxuMQYLfPPc7h9Pf928sKs7CcRiRlsBN/25Rg8ZUoxP//741s6Vy7rT16hUwBAWedpp7Fz84sWjG6/+uv7fv0e+/GZ/2UVYKLGtJuepJBtnLz27e+P/v6+//Gfrp59BLYB4Ki6wyP365vD288mDeyu/Pah0PwDVtjohUXeGFs8Tvvjpt4Pbf07u3zn68Im9cyWz0IJYqGwXWFRxx2z0Q3v7Phle0+sqRgoE62r1HrQCjcpSI8H9r9pn7jWO/VhW1w7fxBOLnC2K9aTWulBu9vNM+UEWN70jTE5ydgeYPEfDORbWWucOLK0XVHeVwtd4Hpxjv2MCmwAAAABJRU5ErkJggg==')\",\"backgroundSize\":\"cover\",\"display\":\"block\"}}),`\n  `,mdx(\"picture\",{parentName:\"span\"},`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/c82d8b32fb7399466f38cee578a53e4e/601b1/3.webp 500w\",\"/static/c82d8b32fb7399466f38cee578a53e4e/80c60/3.webp 1000w\",\"/static/c82d8b32fb7399466f38cee578a53e4e/64296/3.webp 1600w\"],\"sizes\":\"(max-width: 1600px) 100vw, 1600px\",\"type\":\"image/webp\"}),`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/c82d8b32fb7399466f38cee578a53e4e/0eb09/3.png 500w\",\"/static/c82d8b32fb7399466f38cee578a53e4e/1263b/3.png 1000w\",\"/static/c82d8b32fb7399466f38cee578a53e4e/42cbc/3.png 1600w\"],\"sizes\":\"(max-width: 1600px) 100vw, 1600px\",\"type\":\"image/png\"}),`\n          `,mdx(\"img\",{parentName:\"picture\",\"className\":\"gatsby-resp-image-image\",\"src\":\"/static/c82d8b32fb7399466f38cee578a53e4e/42cbc/3.png\",\"alt\":\"3\",\"title\":\"3\",\"loading\":\"lazy\",\"decoding\":\"async\",\"style\":{\"width\":\"100%\",\"height\":\"100%\",\"margin\":\"0\",\"verticalAlign\":\"middle\",\"position\":\"absolute\",\"top\":\"0\",\"left\":\"0\"}}),`\n        `),`\n    `),mdx(\"span\",{\"className\":\"gatsby-resp-image-wrapper\",\"style\":{\"position\":\"relative\",\"display\":\"block\",\"marginLeft\":\"auto\",\"marginRight\":\"auto\",\"maxWidth\":\"1600px\"}},`\n      `,mdx(\"span\",{parentName:\"span\",\"className\":\"gatsby-resp-image-background-image\",\"style\":{\"paddingBottom\":\"75%\",\"position\":\"relative\",\"bottom\":\"0\",\"left\":\"0\",\"backgroundImage\":\"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAIAAABr+ngCAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC20lEQVQoz22TzU8TQRjGawyd2d0upaWllM7uzO62XWjpdnf2q1+WFmkLhVQ0QYmKKEajifGAxIOcvCNq9MDdRE+YEIJGYzReNeo/YdQ/w4wFL5q8p3nzvE9+z/tOAEoWkKzgmMnJtqiWeOIAZELJgsiExIfE52SLxzZ7+acCULIEYiM6PTxei+WmRsbrUb0CWI+JAfEFTIcypcOJR8VjB0o0ACRLSJnO2q3s9YcJfVltX0m57YGkwUkWJH4Qe0Npb1ivBFPF/ztzqBi3u8rsY0zv47l1UXUAOnLG3qDqRjJlgEye2By2eeKIGZ91+2KArEGFJnNnxoo3hvVqiPQJD5l52UoUpsLZUkQvDedrEb08qHmi5h6Jmd4UFTecLgGpeIR3KAbIHEiZAptIo5kyj20e2yHiMPFAsiAVm83FVc1tu60lr33WqPeYOTJ5xeeIF1JsvdydrPfM5mlepoTOTFTm014HIjMAlHIoWx+1OpHcdKzQSjnzscJMUCnHclO56gK2Tkb02lCuGclPx41WeKIZN1pDE81Qtg7VSgBiJyjRfH1R8eY0v+vNnR+ZbAwgymNb1Eq84nGYHksaxOmM13oT9cVq75LqdXnFA7IdYGyIIQXHjOBoMRDNAbYVE6IiwIy5H6xAbAY/ahwfKXAy7YfCAgunfZAwZy+sPH+701lZiWYrkLX/BlYMp0s8co1G79nrneXbNyOZqtAPjJOpSNz00uWNb28e/fz04MfXxsbm8ViOjSc+VJiziB00s3Tt3e72r89b378sPnkKkXUoHlS9/L2d6d0Pswd7tRcH8copkCywFWJ2nlCyREy1tc3m7sfO/svWq/faxfVgIg9lGmAXonrxyY42s2Wc28eNO1HN5mS2KkEtCVoZSqZAnGi2Ip+4ayztZRa2Y9lK/6v8OU+ZhhQaSVdTk1djel1UGQ8nWchoqE47pLgAmSHFCav2WH41Md4Np+1+Zr8BiTadG3lLuU0AAAAASUVORK5CYII=')\",\"backgroundSize\":\"cover\",\"display\":\"block\"}}),`\n  `,mdx(\"picture\",{parentName:\"span\"},`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/9cc29ef6d6ba3dd6b2ef37800181d1ac/601b1/4.webp 500w\",\"/static/9cc29ef6d6ba3dd6b2ef37800181d1ac/80c60/4.webp 1000w\",\"/static/9cc29ef6d6ba3dd6b2ef37800181d1ac/64296/4.webp 1600w\"],\"sizes\":\"(max-width: 1600px) 100vw, 1600px\",\"type\":\"image/webp\"}),`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/9cc29ef6d6ba3dd6b2ef37800181d1ac/0eb09/4.png 500w\",\"/static/9cc29ef6d6ba3dd6b2ef37800181d1ac/1263b/4.png 1000w\",\"/static/9cc29ef6d6ba3dd6b2ef37800181d1ac/42cbc/4.png 1600w\"],\"sizes\":\"(max-width: 1600px) 100vw, 1600px\",\"type\":\"image/png\"}),`\n          `,mdx(\"img\",{parentName:\"picture\",\"className\":\"gatsby-resp-image-image\",\"src\":\"/static/9cc29ef6d6ba3dd6b2ef37800181d1ac/42cbc/4.png\",\"alt\":\"4\",\"title\":\"4\",\"loading\":\"lazy\",\"decoding\":\"async\",\"style\":{\"width\":\"100%\",\"height\":\"100%\",\"margin\":\"0\",\"verticalAlign\":\"middle\",\"position\":\"absolute\",\"top\":\"0\",\"left\":\"0\"}}),`\n        `),`\n    `),mdx(\"span\",{\"className\":\"gatsby-resp-image-wrapper\",\"style\":{\"position\":\"relative\",\"display\":\"block\",\"marginLeft\":\"auto\",\"marginRight\":\"auto\",\"maxWidth\":\"1600px\"}},`\n      `,mdx(\"span\",{parentName:\"span\",\"className\":\"gatsby-resp-image-background-image\",\"style\":{\"paddingBottom\":\"75%\",\"position\":\"relative\",\"bottom\":\"0\",\"left\":\"0\",\"backgroundImage\":\"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAIAAABr+ngCAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC5UlEQVQozz1SWWtTQRgNajJzl6TZ2jS9y8zcJDcm6c1d5i5ZbJpqmkRbbbF1JyoWfPChLxYERfBVrEJBVPwBFURw7YMFUfBFH9Q/Ifo3ZGJa+J5m5sw53zknBBUbyHZEsjhERRLwiALZgooNZQviAOKAU20eUXayP/JwFDsEFFtAdLI6m9Lr4+XZ8eJMolAH7BEDAxwIyIkXaqMfh8NjWyAuVBwGFmXLX1svXLs/oZ8hxwaS1w1nq5xiQxxEkB/P+6lig0lTHZ5QXqM8ppzqMGao2JxsZoKTeOEJsu/hhQ1R84C8x4z8mOYl9AbEjqC5DIaogD0gmSMwkO0YcaTKWdm+kS7NCMjZlw1xwKtOxpiN5YOY5ieLjXi+FtP8qObtgRneiuWCpN6EigVGrozAULbCU4xHQDSh13nENP+3MBTOGrI5N7d8hbgds73UXLgoGe1w1uBVmycBRwKR0ELQLzUXcl43nvNzXtftrBLaOZQ1QoDURb01afXi5bnU9DGJnojqrTCupcuz5eYiofMJvRkvsatE5Wi8NJexeqnpjqi3AGmEIHIjilOaWdKbp4z2itFeEYgPVKYtmqvxxOdU50C2imiv0lomfr+xOCBeH6ouRG6IGSNbPKaRKTOSNUPJEpDN4aEJ0HBnhSUsYAokKzJZPTBhcIozDNxiho3lA5Cx+pcG27tPe4NBUq9DFuPIMCCbY4U6J7nO/Ont3efn128ki0cE7DLDmDzs5c9c3fj1cevvt4d/frY37hxMl1kNcAAJY45iF/UvXP/85tHf75u/fyxtPQZTFlSH4JjmV24/a7/60t15e+TFznhjCWQNFiFi9YSKHUV2fu1u6+XX7rvXnQ+fyPn1SKYCVSfEGqL549M9rbNZPfcetW8mc5RTKZQtQasJuTpULAG7qUJDnbllrL4tHH+QHqa9V0/VEYmTyDel6bV0sRXV2D6cYsvVtuZ2RcLaKmI6ptGpyuWJw71YbtTtf3OInHum75qHAAAAAElFTkSuQmCC')\",\"backgroundSize\":\"cover\",\"display\":\"block\"}}),`\n  `,mdx(\"picture\",{parentName:\"span\"},`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/4e0b2911e26e16a6b5a912ccb7039551/601b1/5.webp 500w\",\"/static/4e0b2911e26e16a6b5a912ccb7039551/80c60/5.webp 1000w\",\"/static/4e0b2911e26e16a6b5a912ccb7039551/64296/5.webp 1600w\"],\"sizes\":\"(max-width: 1600px) 100vw, 1600px\",\"type\":\"image/webp\"}),`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/4e0b2911e26e16a6b5a912ccb7039551/0eb09/5.png 500w\",\"/static/4e0b2911e26e16a6b5a912ccb7039551/1263b/5.png 1000w\",\"/static/4e0b2911e26e16a6b5a912ccb7039551/42cbc/5.png 1600w\"],\"sizes\":\"(max-width: 1600px) 100vw, 1600px\",\"type\":\"image/png\"}),`\n          `,mdx(\"img\",{parentName:\"picture\",\"className\":\"gatsby-resp-image-image\",\"src\":\"/static/4e0b2911e26e16a6b5a912ccb7039551/42cbc/5.png\",\"alt\":\"5\",\"title\":\"5\",\"loading\":\"lazy\",\"decoding\":\"async\",\"style\":{\"width\":\"100%\",\"height\":\"100%\",\"margin\":\"0\",\"verticalAlign\":\"middle\",\"position\":\"absolute\",\"top\":\"0\",\"left\":\"0\"}}),`\n        `),`\n    `),mdx(\"span\",{\"className\":\"gatsby-resp-image-wrapper\",\"style\":{\"position\":\"relative\",\"display\":\"block\",\"marginLeft\":\"auto\",\"marginRight\":\"auto\",\"maxWidth\":\"1600px\"}},`\n      `,mdx(\"span\",{parentName:\"span\",\"className\":\"gatsby-resp-image-background-image\",\"style\":{\"paddingBottom\":\"75%\",\"position\":\"relative\",\"bottom\":\"0\",\"left\":\"0\",\"backgroundImage\":\"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAIAAABr+ngCAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC20lEQVQoz2WS0U/TUBTGJ8p627VjG2xjrO29bbcWVrb13nbtOsbGALcBI0IiEAkoSuITJhrCC08+azA+SKK+q4lRE2JIDAkx8U0T9a9Q/g1zYaCJyXm6J9895/y+LwAkzIg4mLaAbPOKx0GbES0gYSBaAHkAeayMOWjTl/8qACQcgnaqUI9l/XiuHjdq0Wz5tEfFDPJCkESy5e6P58VBB0gkwEiYFy33zr3s5qOEsaRMrYulZm+qwEoYIC8I3UjG7TcqwXTxr1jGrEy6k1mxmHA7amcf4odobkfQSox4Phm6YbUU1X1GwiyyOcXmtZKQ9Wj3TMyIOKyQtLmcxlv9w+M8JBdrA+RxMk7m6xHdixjl/lw1qpfDmiuopXMx1VuC5vZlyhwkjET+BcaIVm/aYiXCQTum+xy0WZmcIQz0pvJisTG5eAuRKbe57DaXzOo8JxNWtDjFY5HLI9vwZ8xqR7IaIUgMf6YyeyPjtoLpYoBRfF6vDeJ2ZKSRtFqJYjNmTgaRP5Cr58Y6iExF9bG+kUbMnIrmGoJRH8TteP5q2KgDtRIA0AlKxKwvotJM1u9U5teh07qSpt4KWpkOl0lPqgCdVq62kCnP1RY2Mn4HQAdAJ0DBiFYI2cFUoTdZuJQY7dISiwykN5+BDSEaHmbI6onnzz2zKLC+jMckrfbazddHL5pra9Gsf2rjBbAiBSmWipMLr45erj7YihnjIeRQYKxMBFTKLm3s/Pz09OTr3u8fE9u7lwdyVI88oNDJPHSk5srd4/dPTr49/vV98dk+EHFXHFZdc/d5493n9uFB9c1hvHKNSdHdGEjjCSQsQKzd3q2//dI6+DB9eKyu3g8mTSCTAE2I6iZGW+r0Xn7lI5zYjmmElW0KQi2HNB9IVgg5/XpFru7krx/os3txvdL1mcZTJjwi0cxYenRzQK8JKr2HlbBYmFCdJq/QtPKK3afaQ+Z6Yrgd1uyzbP8BtuqdO8eW9HQAAAAASUVORK5CYII=')\",\"backgroundSize\":\"cover\",\"display\":\"block\"}}),`\n  `,mdx(\"picture\",{parentName:\"span\"},`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/265fceda8bdfff71e6bc0a4c35fecf50/601b1/6.webp 500w\",\"/static/265fceda8bdfff71e6bc0a4c35fecf50/80c60/6.webp 1000w\",\"/static/265fceda8bdfff71e6bc0a4c35fecf50/64296/6.webp 1600w\"],\"sizes\":\"(max-width: 1600px) 100vw, 1600px\",\"type\":\"image/webp\"}),`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/265fceda8bdfff71e6bc0a4c35fecf50/0eb09/6.png 500w\",\"/static/265fceda8bdfff71e6bc0a4c35fecf50/1263b/6.png 1000w\",\"/static/265fceda8bdfff71e6bc0a4c35fecf50/42cbc/6.png 1600w\"],\"sizes\":\"(max-width: 1600px) 100vw, 1600px\",\"type\":\"image/png\"}),`\n          `,mdx(\"img\",{parentName:\"picture\",\"className\":\"gatsby-resp-image-image\",\"src\":\"/static/265fceda8bdfff71e6bc0a4c35fecf50/42cbc/6.png\",\"alt\":\"6\",\"title\":\"6\",\"loading\":\"lazy\",\"decoding\":\"async\",\"style\":{\"width\":\"100%\",\"height\":\"100%\",\"margin\":\"0\",\"verticalAlign\":\"middle\",\"position\":\"absolute\",\"top\":\"0\",\"left\":\"0\"}}),`\n        `),`\n    `),mdx(\"span\",{\"className\":\"gatsby-resp-image-wrapper\",\"style\":{\"position\":\"relative\",\"display\":\"block\",\"marginLeft\":\"auto\",\"marginRight\":\"auto\",\"maxWidth\":\"1600px\"}},`\n      `,mdx(\"span\",{parentName:\"span\",\"className\":\"gatsby-resp-image-background-image\",\"style\":{\"paddingBottom\":\"75%\",\"position\":\"relative\",\"bottom\":\"0\",\"left\":\"0\",\"backgroundImage\":\"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAIAAABr+ngCAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC6klEQVQoz2VSTWsTURQNlWTezOS7SdMk8+a9mUwmdUJm5s1MZpLpRz7aTKUtNSCxXaithS50oVAVhS7civgFil24EzeKIrWgCFIEF4II4n9Q+jfkpQEF4a7u5dxz7zknBCBhBDNSNFjkRCWXRTYjmAASIJgAewB7rEg4ZNPOfxViBMJjJ6+3xlU/q7UyldlUucEIBEAKZrDHIytJO8cbabEi4eX6EAxJTCDu9tXy5p2JykBaOF90gnBeZyEB2IsgN6m44xU/UjQAJBy2OMnmJJsVLQoGkLBFPeedxstPEbmNl69FZecvM3Ljcj2lNgEifMnhJIfFNofrzHBXaPgzSch2sbpWJJfHp2aiyGLgCAywx4nWZK2VULx4yU1X/KTSiMlu7PhsCh5qRmeqz4qEgda/ggHBDBcoD4/slNrkscMh+1jCUDhfE4xOp78hOz2j3feCs4q7yELCQpOTPBa7MclRG6em/CWRdJMl9+T0stHuT2gz4YIeYqRmVJ3LmYsprZvRexNGEK+0IlIzo7W0mRXR7MaVZlLrpKvzqWo3pXWzei+ldThlBsh+CCAnAi1trl9urljBmt49A0SbER1WtGKlBie5QLTG8oZoBcb8wA7W7WBtUu+Ei4TF9RCAJiOYPLYjBQMUzFCmOrTUBILBoOHPkDrMY5taUDDHsjXq9lBRKlhC8ZgcWbqw+fLw2dLmZrriA2rjSDBGMBJKgxPqenv1+Ye99SuX0uo0jx0qGD0P18vrW9d/fnz4++u9ox/tG7snMhqNAfaARJljyIELg+1Pbx4dfbv/63v/8ZNjcgqOy652a6/16nNwsD/94iDbWGXyNWohovEEkMSQpWzttl5/WTx423t/WDq3E8lVgWjRbMdlN6v15O7d2uAdau2kSzYr2kAwebnBl5oAmjx20qovzt7UB/vllQcZ1R/5TOMpWlHJSpX8QvViRp2NyfQfFhJBb8tOEJXqjGBGJSch24XqRm5qKaGMsv0HVYWcb1/oNu4AAAAASUVORK5CYII=')\",\"backgroundSize\":\"cover\",\"display\":\"block\"}}),`\n  `,mdx(\"picture\",{parentName:\"span\"},`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/de250e23107c4bac278e7a7f93559ba9/601b1/7.webp 500w\",\"/static/de250e23107c4bac278e7a7f93559ba9/80c60/7.webp 1000w\",\"/static/de250e23107c4bac278e7a7f93559ba9/64296/7.webp 1600w\"],\"sizes\":\"(max-width: 1600px) 100vw, 1600px\",\"type\":\"image/webp\"}),`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/de250e23107c4bac278e7a7f93559ba9/0eb09/7.png 500w\",\"/static/de250e23107c4bac278e7a7f93559ba9/1263b/7.png 1000w\",\"/static/de250e23107c4bac278e7a7f93559ba9/42cbc/7.png 1600w\"],\"sizes\":\"(max-width: 1600px) 100vw, 1600px\",\"type\":\"image/png\"}),`\n          `,mdx(\"img\",{parentName:\"picture\",\"className\":\"gatsby-resp-image-image\",\"src\":\"/static/de250e23107c4bac278e7a7f93559ba9/42cbc/7.png\",\"alt\":\"7\",\"title\":\"7\",\"loading\":\"lazy\",\"decoding\":\"async\",\"style\":{\"width\":\"100%\",\"height\":\"100%\",\"margin\":\"0\",\"verticalAlign\":\"middle\",\"position\":\"absolute\",\"top\":\"0\",\"left\":\"0\"}}),`\n        `),`\n    `),mdx(\"span\",{\"className\":\"gatsby-resp-image-wrapper\",\"style\":{\"position\":\"relative\",\"display\":\"block\",\"marginLeft\":\"auto\",\"marginRight\":\"auto\",\"maxWidth\":\"1600px\"}},`\n      `,mdx(\"span\",{parentName:\"span\",\"className\":\"gatsby-resp-image-background-image\",\"style\":{\"paddingBottom\":\"75%\",\"position\":\"relative\",\"bottom\":\"0\",\"left\":\"0\",\"backgroundImage\":\"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAIAAABr+ngCAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC7ElEQVQoz2VTS4sTSxSOj0lVv/KYZCZm+lHVFTvJJNPprq5OdzpDHvNKxsl1HLmMiqDGBygoCqKgCOJWGVRcqAtX4kZBQQdBF+rCjQgi9z9crn/jUpMZ7+LC2VSd89V3zne+ikGdAo3GVVdATDZDETGguVCnUHMhDiEOBYOKiPGb/0UM6FRCbF+tkylGE5XORKmdtiLAcxwMcCghL2U1tl/cCRH5UPc4WNbc4Oxl68zdXGndXDih1ntj+ZqgU4jDOApS+4NMqRlXnd9IAXmC4XFmftCcyeCgOXiM6B00uK6QOtB2mFGQIPV0kfciYiYSXyrUFSvk2REYaDRhemr1iEovZsotGY8m3G5bNGjO7iRLjVSpkSnPpoqNBAkUEuyAOd5VSJC2miL2tmj/Ewxo7pjqigYTDI8XbE0rIiYYNDaWtzVnbv7wUHO6dns1Wj7GFv5MmHWouaIZCjiQTb8UHZhpHbSCfpLUC37P6R6qtVdlxGLAjORiex9dTk3PZe3FnNvP2otxM8pWOpXZAWFLmXIrOT2XrsxnZhYS5e6k08vai8npOUiaMYj8uO5VO4dxfdmK/mgdGiLW36vy3SqFhmgGguHtyteQ36+01grhSnttWGgMgOED5Meg7gLNlTCLTzkgX9udndlWS3MA4jOPhJUwA6obzzt7Jm1B90Y1XLDk/hDk6MrJ4cvPz1aGw/FSE/I1/hbMSVqRoPp0ce35h6frly6krVkJ+1xtwfAUXLeOnbn218f7/3zb+PWze/3WnmyF2wCH0OTMCvaN3tHzn988+PV94+8fqw8fgSkXGlvgBAkqN550X33pb76dfbE50VgFeZuvEPE9Q50qBrXO3e68/trffL30/hM5fiWeq0LDi3GHkGCiskTm79nr71Dn6niBCQaDmiuRhlSIoO5K2B8vNo32TfvIW2uwkS02R19ly56GJ5teutCcqp7OFlsK4fMIOtVqXeL3ZJO7VcYsSdhU9dRk+UCSv869/S8kjZ1nuFdb0QAAAABJRU5ErkJggg==')\",\"backgroundSize\":\"cover\",\"display\":\"block\"}}),`\n  `,mdx(\"picture\",{parentName:\"span\"},`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/9435877c1fc9e5e4158adf3cc4f9008b/601b1/8.webp 500w\",\"/static/9435877c1fc9e5e4158adf3cc4f9008b/80c60/8.webp 1000w\",\"/static/9435877c1fc9e5e4158adf3cc4f9008b/64296/8.webp 1600w\"],\"sizes\":\"(max-width: 1600px) 100vw, 1600px\",\"type\":\"image/webp\"}),`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/9435877c1fc9e5e4158adf3cc4f9008b/0eb09/8.png 500w\",\"/static/9435877c1fc9e5e4158adf3cc4f9008b/1263b/8.png 1000w\",\"/static/9435877c1fc9e5e4158adf3cc4f9008b/42cbc/8.png 1600w\"],\"sizes\":\"(max-width: 1600px) 100vw, 1600px\",\"type\":\"image/png\"}),`\n          `,mdx(\"img\",{parentName:\"picture\",\"className\":\"gatsby-resp-image-image\",\"src\":\"/static/9435877c1fc9e5e4158adf3cc4f9008b/42cbc/8.png\",\"alt\":\"8\",\"title\":\"8\",\"loading\":\"lazy\",\"decoding\":\"async\",\"style\":{\"width\":\"100%\",\"height\":\"100%\",\"margin\":\"0\",\"verticalAlign\":\"middle\",\"position\":\"absolute\",\"top\":\"0\",\"left\":\"0\"}}),`\n        `),`\n    `),mdx(\"span\",{\"className\":\"gatsby-resp-image-wrapper\",\"style\":{\"position\":\"relative\",\"display\":\"block\",\"marginLeft\":\"auto\",\"marginRight\":\"auto\",\"maxWidth\":\"1600px\"}},`\n      `,mdx(\"span\",{parentName:\"span\",\"className\":\"gatsby-resp-image-background-image\",\"style\":{\"paddingBottom\":\"75%\",\"position\":\"relative\",\"bottom\":\"0\",\"left\":\"0\",\"backgroundImage\":\"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAIAAABr+ngCAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC60lEQVQoz2VSTWsTQRgOSrKzH8kmMTFNsrszu8lu243JzuxsdrOpaWrSJq2tWg+xIqj1AxUUBVFQRPDqFxYP6sGTeBDBghZBD4oHQRBB/A+K/gyZpOpBGObwzjzvw/MRASrhFBIrYh5SSQ8ESDkFA5UABQMUABTwGhEgZZP/ToRTiQjpWK29zQqzdjs73kqZIcfeGJhDgQjdpNnY3MiWslvUPaC6DCwp2D9x3jx+c7s10LuHi/VeNF/jVQJQEIN+suxvG2/Gig5QCY9cwaBiiQrIZcxspDi5YA9afADJDbR4STLqnPKHGfoJo56yQgCJWPJEwxORJ+r10a7ISHNCd4uVAwo5m5loSWikcFOzoLlj1bZsBnIpSFtNuRwkDD9h+H/ADI8lw5fLIVDxkPafYUDB0SLmNVeANGk2ROQJkI4sjETzVcXZ1dl/VCOdoL9SnxtYjXkJUqBgQQ8EPYjr1GosVHYuGd5cdqKp09lae59Sm4nmqxFODyVrOof7KbuTc/o53JcnZmJ6mJls21NLiHST1lRycle60klVOim7M4bnU5WuaE1zehgB0Iuprj29XA6XJlvLZPaAgHxOozx046UGj3xec7fka9Dr263lUrC7t3Kq4HSjCuGRFxmKxCKisYLD5Z0t2R3DSDFQHA4ONassYRFRrohjY+zDKGqgYmaYXA64HNl9ZPXZ+8cLq6vp8SbQ3L9uc4ojmyFf9Eh3+cmbR4NzZ1LmlIg8ZhivuXFUNw8ev/Tt7b0fn27//Dpz+drWjM1rLgPrjDmOPK23cvr9+tqvz3e/f9m7dp8rYKANwQnDt688bD//0N94OfV0I9vYy+WrLELI6glUEteIefJ6+8XH3sb63Ot3xqELsVwFaG6ENcTws/ac0blVHbyC7YvpEuU1FpVoNMQSS15EXtpqatNXq4OX5uKdjNXczJnVU3Ml3U2VmoXKsYzVihtMD68SpTZjeD1JZ22VEJUNWqgc3T6xILPtrNu/AdHdnJ83ZrqaAAAAAElFTkSuQmCC')\",\"backgroundSize\":\"cover\",\"display\":\"block\"}}),`\n  `,mdx(\"picture\",{parentName:\"span\"},`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/c2bfa7c4e4ddef4d04984601c1f4e18c/601b1/9.webp 500w\",\"/static/c2bfa7c4e4ddef4d04984601c1f4e18c/80c60/9.webp 1000w\",\"/static/c2bfa7c4e4ddef4d04984601c1f4e18c/64296/9.webp 1600w\"],\"sizes\":\"(max-width: 1600px) 100vw, 1600px\",\"type\":\"image/webp\"}),`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/c2bfa7c4e4ddef4d04984601c1f4e18c/0eb09/9.png 500w\",\"/static/c2bfa7c4e4ddef4d04984601c1f4e18c/1263b/9.png 1000w\",\"/static/c2bfa7c4e4ddef4d04984601c1f4e18c/42cbc/9.png 1600w\"],\"sizes\":\"(max-width: 1600px) 100vw, 1600px\",\"type\":\"image/png\"}),`\n          `,mdx(\"img\",{parentName:\"picture\",\"className\":\"gatsby-resp-image-image\",\"src\":\"/static/c2bfa7c4e4ddef4d04984601c1f4e18c/42cbc/9.png\",\"alt\":\"9\",\"title\":\"9\",\"loading\":\"lazy\",\"decoding\":\"async\",\"style\":{\"width\":\"100%\",\"height\":\"100%\",\"margin\":\"0\",\"verticalAlign\":\"middle\",\"position\":\"absolute\",\"top\":\"0\",\"left\":\"0\"}}),`\n        `),`\n    `),mdx(\"span\",{\"className\":\"gatsby-resp-image-wrapper\",\"style\":{\"position\":\"relative\",\"display\":\"block\",\"marginLeft\":\"auto\",\"marginRight\":\"auto\",\"maxWidth\":\"1600px\"}},`\n      `,mdx(\"span\",{parentName:\"span\",\"className\":\"gatsby-resp-image-background-image\",\"style\":{\"paddingBottom\":\"75%\",\"position\":\"relative\",\"bottom\":\"0\",\"left\":\"0\",\"backgroundImage\":\"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAIAAABr+ngCAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC8klEQVQoz2VTXYsbVRieYpNzZiaTr002m+TMOWcmmcl24iTnnJnMTLLtTrLb7K67a9kWsoqgXbcFERVBLCiCeG2LiiB64Z3eKFSUpdBetL3ojRRK6X+o9G/ISdoiCO/Ved/n/Xie5yjQ5ADxbJNBHOSsWCMBQAyaHCIGaQxprGKukUC+/C8UaHKdBPVeWnaGVS+tdtZLTjLPSTCgsU5E0Umed1wE4hoJoSkUYHIdsej4I+fK18vuzNp8Gw22MvWeanJI4yyJiu1oqTPKNvsLpIqFRgKViOeTVdRfjvbt/R8I/4ruXTNaA4BeTCZR3h6U3BEwuUZDzQ711sBwYpldgAHieUs0uzPEP1haPZejwcu1IY01zGt+WnCTghMvra4VnThvR3k7egGWeJazoqIz1Ob7/JcwgFimyVQsdBIU24lOQxWLRSiZuo/6k8nBZSI2+eRiNJ3Zg+npuq9hrtJIs2LDCjvDXW9tv+GnNe+sG+/E24eYbZyu+wqwhjl3fYVtl7xJtTet+FOjk2ZIUvMn3bOvU3G+9uq4cGZc8jYKZ8bl7uYK36n2ZA2whgokYdYU3fTAinZNMe1vzlQ6ADjUSGC0E82KNBKcqvdouOOtH7STvfGl40ZvI2sKSEIFmgwgptMg2+hnVvxTle5cUgZRH8xvhnOFdRqAJsvW+7KgOS8wmSSs0I5Bje++c/Tb/Z93j47KnRHE4iXbAPULzlBthvz8wS+3fzr88P2Su6bTULKtYmHQgfPm8adP7nzzz9/Xnz0eX/vilYqnYiHBlpTUoCHeeuO9e398++zhjaePLnz3PWgwiOfgvB15n/2Y/n5/++TPtV9PqskFUPelhETaE5rcwNy5+mV688H2yc3prbv2Wx9na12IhSIdYkdVb2pvXPdnJyT9pNwKVBxAxHQ70VtDaDKdhmV3hNc/9w//cvZuVNzR4qsoC7vmLFFqjZrddyvuOcOW96gmR72xHW7lLOnWHA0KdtDoXl5efa0gu0tv/wtto5xtx8xP0QAAAABJRU5ErkJggg==')\",\"backgroundSize\":\"cover\",\"display\":\"block\"}}),`\n  `,mdx(\"picture\",{parentName:\"span\"},`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/a239a4f54cb8f4937c913f789ef39d35/601b1/10.webp 500w\",\"/static/a239a4f54cb8f4937c913f789ef39d35/80c60/10.webp 1000w\",\"/static/a239a4f54cb8f4937c913f789ef39d35/64296/10.webp 1600w\"],\"sizes\":\"(max-width: 1600px) 100vw, 1600px\",\"type\":\"image/webp\"}),`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/a239a4f54cb8f4937c913f789ef39d35/0eb09/10.png 500w\",\"/static/a239a4f54cb8f4937c913f789ef39d35/1263b/10.png 1000w\",\"/static/a239a4f54cb8f4937c913f789ef39d35/42cbc/10.png 1600w\"],\"sizes\":\"(max-width: 1600px) 100vw, 1600px\",\"type\":\"image/png\"}),`\n          `,mdx(\"img\",{parentName:\"picture\",\"className\":\"gatsby-resp-image-image\",\"src\":\"/static/a239a4f54cb8f4937c913f789ef39d35/42cbc/10.png\",\"alt\":\"10\",\"title\":\"10\",\"loading\":\"lazy\",\"decoding\":\"async\",\"style\":{\"width\":\"100%\",\"height\":\"100%\",\"margin\":\"0\",\"verticalAlign\":\"middle\",\"position\":\"absolute\",\"top\":\"0\",\"left\":\"0\"}}),`\n        `),`\n    `),mdx(\"span\",{\"className\":\"gatsby-resp-image-wrapper\",\"style\":{\"position\":\"relative\",\"display\":\"block\",\"marginLeft\":\"auto\",\"marginRight\":\"auto\",\"maxWidth\":\"1600px\"}},`\n      `,mdx(\"span\",{parentName:\"span\",\"className\":\"gatsby-resp-image-background-image\",\"style\":{\"paddingBottom\":\"75%\",\"position\":\"relative\",\"bottom\":\"0\",\"left\":\"0\",\"backgroundImage\":\"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAIAAABr+ngCAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC5klEQVQoz2WSzWsTQRjG10qzM9lN0rRN66azs7Oz2SRNmuzOzn7kw3aT1KbYlmKRVimotQoKKoIoKCJ49gOqIHrwJB5EUNAi6EHxIAgiiP+Don+GbBIvCnOamed9n/f3PgJQmYhYbMoGmMt6ENe4iGygMoBsQAJAAohZXOPRzX9HACqTNK5Uw1GznimFmcJc2qz13iKxSAJJc0bM2qBi/yAWJy7AjiCqTEK2v33BPHUrk1/X548hrzusVKHKAAlimj+S88cKjdiUBVQGsQM1R6I8TpxBZ4isCX+FrjzQ2E2yfCVheCL621nzk9RL5+siZhJ145RLhisbft+I0J85qTtT5XXEzo1Nz8qDCQe245hNzoSpfJCKLDRTRpCgXoJ6f8WR3pZ1fyTXgJrzDzARWcNZK465RNyRXE3WPYm4fYTCsFJBVruztqXabX7gcHNps1BfgiqDqg2JD0lkO+cvUndhX3l2YrqJWYd11lC1NaxUBFGvy/m5ffZiutSesLqZ6kKyEMZIfbLSLjVXDK+rVOeTxVZqup0stsZm5tPlTrIYSuYsoA0BaG5MdUpzh4zacjlcM2rLQ4oFiQc1nsjVJOrHNT6kVDHvsgMb1fbh4v7VmMpFzIHmCkC1RWRLhMeylpi1hPFyb2YbIEvsAQM9BL3wMFGx9gw+REQjYKlcIE6ypeNbzz48XtraGi00AHb6tPvAUmYdTrls/tCTt482zp9Nm02JuBEwiJ0E8cyj25e/v9v5+fn2r2+tK9f3jpcgdiKxHgDVThAXd4+c+fDy3u8vd398Xd25L2ZtgHviJPVLVx+Gzz8u7r5qPt3N1FZFpRKtUOvZVlkCM/P0jfDFp+7uy4U37+nmxdhkuRdPxJLUz5QWaOdWZf21Fl4aNTjEHCBbojXJqAPVlog7mm/guWuV9Vfm8p3xfGOw535iZd1JG41s+eR4fjZBo3mgylC1Rd2urEdplQlPUZ4tn5goHkxF1aNs/wGRLZvhenPF8gAAAABJRU5ErkJggg==')\",\"backgroundSize\":\"cover\",\"display\":\"block\"}}),`\n  `,mdx(\"picture\",{parentName:\"span\"},`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/79b89bf596918992d37a59fc5202dab6/601b1/25.webp 500w\",\"/static/79b89bf596918992d37a59fc5202dab6/80c60/25.webp 1000w\",\"/static/79b89bf596918992d37a59fc5202dab6/64296/25.webp 1600w\"],\"sizes\":\"(max-width: 1600px) 100vw, 1600px\",\"type\":\"image/webp\"}),`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/79b89bf596918992d37a59fc5202dab6/0eb09/25.png 500w\",\"/static/79b89bf596918992d37a59fc5202dab6/1263b/25.png 1000w\",\"/static/79b89bf596918992d37a59fc5202dab6/42cbc/25.png 1600w\"],\"sizes\":\"(max-width: 1600px) 100vw, 1600px\",\"type\":\"image/png\"}),`\n          `,mdx(\"img\",{parentName:\"picture\",\"className\":\"gatsby-resp-image-image\",\"src\":\"/static/79b89bf596918992d37a59fc5202dab6/42cbc/25.png\",\"alt\":\"25\",\"title\":\"25\",\"loading\":\"lazy\",\"decoding\":\"async\",\"style\":{\"width\":\"100%\",\"height\":\"100%\",\"margin\":\"0\",\"verticalAlign\":\"middle\",\"position\":\"absolute\",\"top\":\"0\",\"left\":\"0\"}}),`\n        `),`\n    `),mdx(\"span\",{\"className\":\"gatsby-resp-image-wrapper\",\"style\":{\"position\":\"relative\",\"display\":\"block\",\"marginLeft\":\"auto\",\"marginRight\":\"auto\",\"maxWidth\":\"1600px\"}},`\n      `,mdx(\"span\",{parentName:\"span\",\"className\":\"gatsby-resp-image-background-image\",\"style\":{\"paddingBottom\":\"75%\",\"position\":\"relative\",\"bottom\":\"0\",\"left\":\"0\",\"backgroundImage\":\"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAIAAABr+ngCAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC9ElEQVQoz2WTW4sURxTHx+hOV9/mtrOOM1NdVV0z3bPb7Wx3dfVlLpnt3dndGeKaNV5WRVBXDURQFEKEiAi+Ggy5PCSBvIU8hICCLII+RPIQ8iASyHcI6scINa0QCJynU/Wvc/6/cyoHDCZBlm/6MuaamSiYS9AHBgPQByQBJJERUzAXmf9FTjKYivmh5XTe7i84abWzUrb6kjgTYokkKg5KVu/ti1lAppAQoECINejHV25Yl+8ftHfM9fPNaDJXX5YNBkiSx3GpHc93BvmmBwwmo0DGgUq5QgJRWaSgV4s/NLe+Q+we2bql00iC7yrjuECjsj2QEFNpqFCutiKtFWeN5DLPBTOA7ukmuza/ONJI5vBt2wpitW5atHslK6l0BsV2T6eRTiOAMrHQ+5oZV+yBjAS8/wKToDfX8GTEVcwrdl/BoSrQhqLyXL0LvbXx8YuIjQ+PtqONU61wkm94isFkEitmotOwHU9puBmMTy4sDaG3ivwxXz+p4iAnmX3NXqn507I7LjnjirteXFydI71ad80ZHm1F06a/UVhMS85atbtRWloru2Ol/X6hk8qtYQ7gMG8ES6Nj9nDbTU9UnZUDkAEcypjr7Z5ixgrm++rLJJwujY5Z/aOYT/c3fAmFAIc5AQb6KuH5hqdCtm/emZH0AfSkmWcwAysuNP183Xuv6r6buS+AFduJVGNHLuz+8vzHI7u7lc4AoCCjnQErWn25GbL1j356+sPO9atla6iSGTAZBTqJ7LOXP/v72Vev/nzw+q/VW3f2Vx0ZBUJsJsDwdRKiyZlPnj/65s2LL/95uf31t1LDF6OSUVCgsfP59+mvv0/3Hg9/3qv2tqV6V4wQizkDg+mIWR/fTR/+Mdl7tPnkN3ruZr7mztYTsgKNF5xNOv6iu7OH008rLS4jLkDQntrqA8NXSVixB2jldnfnsbX1oGoPsq+SyzZWM4Nya9BwL1XtkU6FH9lgcHmVhhPNFNuqEV6kvOFePLj4QVG8Lnb7X0TTm6P1OCLuAAAAAElFTkSuQmCC')\",\"backgroundSize\":\"cover\",\"display\":\"block\"}}),`\n  `,mdx(\"picture\",{parentName:\"span\"},`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/78395b936c47796cafd420cbfd55fa85/601b1/50.webp 500w\",\"/static/78395b936c47796cafd420cbfd55fa85/80c60/50.webp 1000w\",\"/static/78395b936c47796cafd420cbfd55fa85/64296/50.webp 1600w\"],\"sizes\":\"(max-width: 1600px) 100vw, 1600px\",\"type\":\"image/webp\"}),`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/78395b936c47796cafd420cbfd55fa85/0eb09/50.png 500w\",\"/static/78395b936c47796cafd420cbfd55fa85/1263b/50.png 1000w\",\"/static/78395b936c47796cafd420cbfd55fa85/42cbc/50.png 1600w\"],\"sizes\":\"(max-width: 1600px) 100vw, 1600px\",\"type\":\"image/png\"}),`\n          `,mdx(\"img\",{parentName:\"picture\",\"className\":\"gatsby-resp-image-image\",\"src\":\"/static/78395b936c47796cafd420cbfd55fa85/42cbc/50.png\",\"alt\":\"50\",\"title\":\"50\",\"loading\":\"lazy\",\"decoding\":\"async\",\"style\":{\"width\":\"100%\",\"height\":\"100%\",\"margin\":\"0\",\"verticalAlign\":\"middle\",\"position\":\"absolute\",\"top\":\"0\",\"left\":\"0\"}}),`\n        `),`\n    `),mdx(\"span\",{\"className\":\"gatsby-resp-image-wrapper\",\"style\":{\"position\":\"relative\",\"display\":\"block\",\"marginLeft\":\"auto\",\"marginRight\":\"auto\",\"maxWidth\":\"1600px\"}},`\n      `,mdx(\"span\",{parentName:\"span\",\"className\":\"gatsby-resp-image-background-image\",\"style\":{\"paddingBottom\":\"75%\",\"position\":\"relative\",\"bottom\":\"0\",\"left\":\"0\",\"backgroundImage\":\"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAIAAABr+ngCAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC7ElEQVQoz2VSW4sURxRukZmqmp77jI47U9VVXTPTszu37qru6Z5Ldi67O7Pq4roioyLoegMFQwJBwRACeVUMER9MII/JSwIRZAnog+KDIIgI/gdRf4ZUu+qDcKiH4nznnO+iQSIAFtGSg6gbN4MYdQF2IBEQO5AFkAUxQ+rMA0TAr0oDROjUPdAe5azevvooXxtmqr2wVYEBC3Qq09Xu7sSwAHZizINEKnAcO/7F76oXbu635ubqmVJnFlloIyIgC6LUT1eCXK0fLdmQCGTIGHP1ioeYVJvVF7YL/hFz454hfmEb1xO8A/CnzdRP8k7G6gFD6GUvxl2de7pqsHfBAIukKUuNE1hczS0u61R+PjvkLArNYbrWTVWDbK2fKgdJ7ie5j3bBIY246WesPqIiXPtFMIDtSNFGRMmWtfo6dSERsfDVIgstbE9Wjm0bYqU13OwePFnxZ4gIRBzE/JgZJHmn4q9zb2qPjupUmu6aPd7qTOdJ3tGA2Ytbw4Kznqmv5FprueZaojaKsG6hOWl8c4TJtUJznFwcp5cm2cZqojbKNVdTS5N0fYLKAw1SL0rk0vJRa7DZmhzP1AYRLCH1EHUTlW7M9BF19yy0qXewPtzCcorFdG/RiRIXGp6mhMGOztxo0UZFR8suhZY6ENsg5AxDh3XmgpKIFNp7co1PnjtKsFQlAAVx+Oz2P0/+3Dh3LlvrQ0N+VhtgO1XtoZInVrf+evjH/NsrmepAVyERGjJkgnWsUxeuvX7029vnt9+9Gl//aW++jgypwGYAiZNgnjE7efnJ/TvvX/z65uXmnbug6EAjBCe5X7/x++jfp+s7DwZ/7+S7m2ChpSykKp6QiIQhqpd+Hv33bLZzf/r/Y376+2ihAQ2pqYRwf199ylduteY7dPRDtuwiw1VC8K5e7kHifHTYGP7Ymj+obtzOW/1dnz8mNm7KTLlfbJzPW8sJrvggInB7zL1Z3FRpjTM3xd1iY3v/4qGUmq6y/QFpSJuqRM+32QAAAABJRU5ErkJggg==')\",\"backgroundSize\":\"cover\",\"display\":\"block\"}}),`\n  `,mdx(\"picture\",{parentName:\"span\"},`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/dc3f6d3518d45fcfde9e6e7ae76c4ade/601b1/75.webp 500w\",\"/static/dc3f6d3518d45fcfde9e6e7ae76c4ade/80c60/75.webp 1000w\",\"/static/dc3f6d3518d45fcfde9e6e7ae76c4ade/64296/75.webp 1600w\"],\"sizes\":\"(max-width: 1600px) 100vw, 1600px\",\"type\":\"image/webp\"}),`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/dc3f6d3518d45fcfde9e6e7ae76c4ade/0eb09/75.png 500w\",\"/static/dc3f6d3518d45fcfde9e6e7ae76c4ade/1263b/75.png 1000w\",\"/static/dc3f6d3518d45fcfde9e6e7ae76c4ade/42cbc/75.png 1600w\"],\"sizes\":\"(max-width: 1600px) 100vw, 1600px\",\"type\":\"image/png\"}),`\n          `,mdx(\"img\",{parentName:\"picture\",\"className\":\"gatsby-resp-image-image\",\"src\":\"/static/dc3f6d3518d45fcfde9e6e7ae76c4ade/42cbc/75.png\",\"alt\":\"75\",\"title\":\"75\",\"loading\":\"lazy\",\"decoding\":\"async\",\"style\":{\"width\":\"100%\",\"height\":\"100%\",\"margin\":\"0\",\"verticalAlign\":\"middle\",\"position\":\"absolute\",\"top\":\"0\",\"left\":\"0\"}}),`\n        `),`\n    `),mdx(\"span\",{\"className\":\"gatsby-resp-image-wrapper\",\"style\":{\"position\":\"relative\",\"display\":\"block\",\"marginLeft\":\"auto\",\"marginRight\":\"auto\",\"maxWidth\":\"1600px\"}},`\n      `,mdx(\"span\",{parentName:\"span\",\"className\":\"gatsby-resp-image-background-image\",\"style\":{\"paddingBottom\":\"75%\",\"position\":\"relative\",\"bottom\":\"0\",\"left\":\"0\",\"backgroundImage\":\"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAIAAABr+ngCAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC7ElEQVQoz2WT22vUQBTGI7KbSbL3blt3dzKZZDfZbtJtMkk2yabt3nrZ2mpbkcULaL2BiIggCooIPotiEUTBR30QQUWKiA8WHwRBRPB/EPXPkMm2fRHO0wzf+c78zjcMEAkLSbxkAeQkZJ+XHBZaQCQAWgD7APscIrzk0JP/igEiESSnMNXOqc1RvT1abWXVILqjYhb7gmRn1GCnY1QsJDx2AbIZViQCtLxzV9Tz90a1gTx3CjYWY4UpTiQA+3HJy1S8kWoYL5lAJByyOckWyg6P7R1nDppj3iHl0GNE7uKVG8lyg4W7zpKXUhpZrUk9FFcoO0K5kVC84SDMcIyUbJeMASSXR2qtBHb2xgbY5xE5UG9nqkFGC3LVMFMJUoqXVLxdMdVbCdnLqiGHSGQ7BBYAHLDQjJVMTqRz5qqhgF0gRgiRzcQKdWh2e0c2RKtrdtbC5ROVRp+nYhPgBoe9pOJWvL7sLDQWBiNa84Axa8wcduaOjmhNhpWbCa01bvWzei9r9HKT86mJdhw3xya7qr+E7fmiOZeaaGf07pi5mKp1skYvU+umax2+MsMAyY2Ldm12rTq9qrfW83orViJAcnnJTZYDIdr8vsKU5C5NzKyp4WHZW4pBwiIbSC5DwUBLwE68aPLQYvJ6RNJioclKHmUWgRWww5aseMHclzdooiKiFFi64rPjZPn0xsvtZ8tnzuSqIUD2Hm0Wmmm1yZVcMrf+/MPTwZVLWW16iI3hkJ3EDe34ues/Pz78/fX+nx+dG7f353UO2VQs+0C0kthFi8cubr/Z/Pvtwa/vq5uP2KIFUCROKZ5+80n71ef+1rvpF1v5YJUt1OkKJRpPIJIkIuqFO+3XX/pbbxfef1JOXo2PG1E8IUkp3qi+oPTu1QdbUvtaruxwyKEglEAoN4FoCdjNaSFq3aoP3qkr9/NaOPwqzDCxCdnOlsOicTavzSYV+h5OJHCqo7iLCZmmNYGdtOIUjY2xiYNp2p1m+x/KeJvrGOcZyAAAAABJRU5ErkJggg==')\",\"backgroundSize\":\"cover\",\"display\":\"block\"}}),`\n  `,mdx(\"picture\",{parentName:\"span\"},`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/5d82553135d01a6fe0ead4255ca5d08f/601b1/100.webp 500w\",\"/static/5d82553135d01a6fe0ead4255ca5d08f/80c60/100.webp 1000w\",\"/static/5d82553135d01a6fe0ead4255ca5d08f/64296/100.webp 1600w\"],\"sizes\":\"(max-width: 1600px) 100vw, 1600px\",\"type\":\"image/webp\"}),`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/5d82553135d01a6fe0ead4255ca5d08f/0eb09/100.png 500w\",\"/static/5d82553135d01a6fe0ead4255ca5d08f/1263b/100.png 1000w\",\"/static/5d82553135d01a6fe0ead4255ca5d08f/42cbc/100.png 1600w\"],\"sizes\":\"(max-width: 1600px) 100vw, 1600px\",\"type\":\"image/png\"}),`\n          `,mdx(\"img\",{parentName:\"picture\",\"className\":\"gatsby-resp-image-image\",\"src\":\"/static/5d82553135d01a6fe0ead4255ca5d08f/42cbc/100.png\",\"alt\":\"100\",\"title\":\"100\",\"loading\":\"lazy\",\"decoding\":\"async\",\"style\":{\"width\":\"100%\",\"height\":\"100%\",\"margin\":\"0\",\"verticalAlign\":\"middle\",\"position\":\"absolute\",\"top\":\"0\",\"left\":\"0\"}}),`\n        `),`\n    `),mdx(\"span\",{\"className\":\"gatsby-resp-image-wrapper\",\"style\":{\"position\":\"relative\",\"display\":\"block\",\"marginLeft\":\"auto\",\"marginRight\":\"auto\",\"maxWidth\":\"1600px\"}},`\n      `,mdx(\"span\",{parentName:\"span\",\"className\":\"gatsby-resp-image-background-image\",\"style\":{\"paddingBottom\":\"75%\",\"position\":\"relative\",\"bottom\":\"0\",\"left\":\"0\",\"backgroundImage\":\"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAIAAABr+ngCAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC9UlEQVQoz2WTzWsbRxjGtynemdXu6suWY0mzs7Oz2pW9srQ7O6v9kLFkS5HixMZxWkRCoY2bFtpDSqE00BICOYeElEJpIMfkEAJJCCaQHhp6KPTQUuj/UNr+GWEkO5fCnN7heZ93fu8zEjQYQEyuBxBzzUpyJgcogAaDKIAkgSRRMMuZXFT+dyRoMNXk1c6g7GQVb1Bp9ktOOrsTYkAS1QyLTnrccXYAYjkSQRxKwGAqCuKrXzif3F52p9boQ9SdLFQ7isEgSWQzLjbixWZPrvvQYAoOFTNUbZ4j4bGzgvzleI/u/YDZLbJ7Xbe7AJ04m3GedktuJjxopNqRanc1Gs8HkeZj5K2w3poidm1pra8R/nZsSJIcZivtQbGZFt2kvNorNNI8jXXaPRELfaDTuGCn0AgEvGNgKSQpQP6CqIQKDktupppcwaE6M5AWqm3kb4/eO6y1+2sbu9nOZTa8qBEOkA9JVyGxTqNGvGOyYXTmfRwMLT5Ozl6y+FgxmASsTHP7K2ynuLZd6YwX22dK3lC2suX1LSfZIeFopb2dX90qetuVzqTcGpXXRyVvqLl9SHsSNCPZCL3+QSPb8zYP8o1soc6gGeVIpNuZOtv8O9WOGZ1d27zQSHebG/sAcxlzaEaSAIMClXC55sOaLy16M5IBQD4wY0CSOViVcFAP5BX/VGX9ZOeBAFZoJOA0O//RlcevH5w/PCw3exCHb2kD5BecTKlHbHTw8NX96bXPS86GSiIBTMGhTrru5atf//XTvX9+u/Pvn1vXb7y75Ck4FGIrgUagkwhPLn32+tm9/36/+/cf+999D2oBxDNxnsbeNz8OnvwyOXqx8eioku6Dalus0BTxhAbTMXM+vTl4+uvk6Pn45c/0gy/l061ZPBHL07jijenwdnt6ZA6+KttcwVyAoKlqZ9AIVBKV3R7uf9uevnB27yy5vflXkeaJ1aywZPdqrY+X3E2divcoBkOdLRpNNEukVSO8QHmtdWV59VxBdBfZfgPxyZv9XjOGTQAAAABJRU5ErkJggg==')\",\"backgroundSize\":\"cover\",\"display\":\"block\"}}),`\n  `,mdx(\"picture\",{parentName:\"span\"},`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/50bb646c7a93b531c47ad8d2431242dc/601b1/125.webp 500w\",\"/static/50bb646c7a93b531c47ad8d2431242dc/80c60/125.webp 1000w\",\"/static/50bb646c7a93b531c47ad8d2431242dc/64296/125.webp 1600w\"],\"sizes\":\"(max-width: 1600px) 100vw, 1600px\",\"type\":\"image/webp\"}),`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/50bb646c7a93b531c47ad8d2431242dc/0eb09/125.png 500w\",\"/static/50bb646c7a93b531c47ad8d2431242dc/1263b/125.png 1000w\",\"/static/50bb646c7a93b531c47ad8d2431242dc/42cbc/125.png 1600w\"],\"sizes\":\"(max-width: 1600px) 100vw, 1600px\",\"type\":\"image/png\"}),`\n          `,mdx(\"img\",{parentName:\"picture\",\"className\":\"gatsby-resp-image-image\",\"src\":\"/static/50bb646c7a93b531c47ad8d2431242dc/42cbc/125.png\",\"alt\":\"125\",\"title\":\"125\",\"loading\":\"lazy\",\"decoding\":\"async\",\"style\":{\"width\":\"100%\",\"height\":\"100%\",\"margin\":\"0\",\"verticalAlign\":\"middle\",\"position\":\"absolute\",\"top\":\"0\",\"left\":\"0\"}}),`\n        `),`\n    `),mdx(\"span\",{\"className\":\"gatsby-resp-image-wrapper\",\"style\":{\"position\":\"relative\",\"display\":\"block\",\"marginLeft\":\"auto\",\"marginRight\":\"auto\",\"maxWidth\":\"1600px\"}},`\n      `,mdx(\"span\",{parentName:\"span\",\"className\":\"gatsby-resp-image-background-image\",\"style\":{\"paddingBottom\":\"75%\",\"position\":\"relative\",\"bottom\":\"0\",\"left\":\"0\",\"backgroundImage\":\"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAIAAABr+ngCAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC90lEQVQoz2WTzW8bRRjGDVV3Zr27/kocJ+uZ2dmxvf5InN2Znf2w8+GvxE1biKGF0AMqCSBVnCqglVA5cakQQj0gAQduwAEBqqhyqiohOPBxoVL/B0T/jWrs9IQ0l3mlZ97n/b3PZCDmAHPN9rNEWizVnRCgAGIOUQBpAmmiE551QlX538kAxA0aIjFebm2XO4Nya7fU7M/1SgxoYjii0EjPXpwfgHiWSkhEBmBuokC+e7Pxzr1K85o7PbHl/vm1TR1zSBPNiQv1eKnZ16o+xFwnQneEUQuzVKjOqoT8legleuELIj5xLr5vuiFA/KyzE+dYVPR6AHODySyTRi0ya/HCSGZhw3KF3XmtGtwoNfsmXUx4ZjtLRGVjkPeSQiMptfr5eppjscWi52KlDywW5VgMibo+B5YqfdXXUKAT5bnk9UwqIeYGlToRmfNrXeSPJleO7e5ue+tyPD0KJ1dNxdzXaQSdeMnrOXzipQfh5GqxnmB/xEev8vEVXdF2e6a3u8oPCu3Rij+tBNNCe6S5vZWNYSM5oGLP9vdMb7e0Pilv7ufbw2JnXOyMc80BYP0MdKSGRXtn1tw6DPaOWjszDYeAyCyVVi013CTrhC+u+Y680Nqe1dPLre1DDQsNC+jIjAKDAoOGmu1D239hqbNYMkA+cGKVkzlYk4agyi0izq1satVAnxNVwPL1BFT4petv/fDrN5eOj0vNPiRiQRu6CUB+vpHq1Sh5+Y37f353cufDSndk0DltnQiLRo1rb9968vDef39//vTx8PbH55Y7OhELMcSBRaV7+OaNP07v/vvXp0//mX35FbB9SObiHIs7H309+PG36emDre9Py+khWOuqFTpqz8oz4ez6nf63v09+/mX40yP0yntgdX0eT8RzLC539tn4s+7rp87gg1It1EmoQLDUqPUgDgwqi/UU925uzO7X9+4ue+niq2QWiTVdUaz17fWTZW/HYioGOuZoc8jk1HQjgALDlTkmVttH5ea+xUI1FObPAAAbnGRKOC0LAAAAAElFTkSuQmCC')\",\"backgroundSize\":\"cover\",\"display\":\"block\"}}),`\n  `,mdx(\"picture\",{parentName:\"span\"},`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/7020020608b559810f196ec68fdc5b11/601b1/150.webp 500w\",\"/static/7020020608b559810f196ec68fdc5b11/80c60/150.webp 1000w\",\"/static/7020020608b559810f196ec68fdc5b11/64296/150.webp 1600w\"],\"sizes\":\"(max-width: 1600px) 100vw, 1600px\",\"type\":\"image/webp\"}),`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/7020020608b559810f196ec68fdc5b11/0eb09/150.png 500w\",\"/static/7020020608b559810f196ec68fdc5b11/1263b/150.png 1000w\",\"/static/7020020608b559810f196ec68fdc5b11/42cbc/150.png 1600w\"],\"sizes\":\"(max-width: 1600px) 100vw, 1600px\",\"type\":\"image/png\"}),`\n          `,mdx(\"img\",{parentName:\"picture\",\"className\":\"gatsby-resp-image-image\",\"src\":\"/static/7020020608b559810f196ec68fdc5b11/42cbc/150.png\",\"alt\":\"150\",\"title\":\"150\",\"loading\":\"lazy\",\"decoding\":\"async\",\"style\":{\"width\":\"100%\",\"height\":\"100%\",\"margin\":\"0\",\"verticalAlign\":\"middle\",\"position\":\"absolute\",\"top\":\"0\",\"left\":\"0\"}}),`\n        `),`\n    `),mdx(\"span\",{\"className\":\"gatsby-resp-image-wrapper\",\"style\":{\"position\":\"relative\",\"display\":\"block\",\"marginLeft\":\"auto\",\"marginRight\":\"auto\",\"maxWidth\":\"1600px\"}},`\n      `,mdx(\"span\",{parentName:\"span\",\"className\":\"gatsby-resp-image-background-image\",\"style\":{\"paddingBottom\":\"75%\",\"position\":\"relative\",\"bottom\":\"0\",\"left\":\"0\",\"backgroundImage\":\"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAIAAABr+ngCAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC8klEQVQoz2WT22sbRxSHlybZmb1JsqRYVnZmZ3Z0WVuytTO7o92ValuWHF8ShwgHOyn0glrwUyiFtqGFUuhLaRNCHttAnwp5KL3Qi59CoSQQ0ryEkP8hJP9GGDmXh8B5OvDN4XznNxrEAiCuu6FBpO0nBokB4hALiDikKaSp4QmTxKrzRmkACYvKamdQavbLrUE5WJlpZAAJiBUMaGqRqKA6/BUDkDCphF6kASwcJJKDTxqTq7PBvn/6fVdunqh2DCwgTXWSFOpJKejrbgixMLzIIJFVi00aqcmq5XYq6djf+QGLb+jOZw6TryeTJMe6M80ewMJi0mTSqnXtWgJQ+AIGSORZ7LYvIXG5NL9sT189giFNTU9UFlfzQZZvpsWgn69nDksc1n0JT505LMmxzPAi/bWwTPGIQ09AHJkkLgV92+8aXmT70vAi7UR1CYXD0e4E86E8vZdtX6onW5YXQRRC2jVo4jDZSLdxOIzX90i0jsMhX9vtDMYG4hrwe3ZzdY5vzbRGFb5VbI9y8wOd9mYX1xrptidGs+2B3VwtLAzLSxuF1rCwoMoJBpD1NUikjqOFlXGwPO6M9sqt1eOugESaJHZqPZMmJonfqoZEbi2sjGvZzvzyGOBYxzEkUlNiELdorJ8KDZdrpfb0pBygEJBE7YyVAotK4HKHxMdmOypRU6NKWL6egoo4+8Hkl/9+OjuZFIM+9KJXtgEK8/WehbryzP6f928dfH1lrjOy6NS24UUO7Tbe+ejzx7dvPH1w/dmjtStfHSu3DC9SsK8mO0TSc+8e3Pvn2yf/f//s4e7Nm9DlL+AcS1pf/jj49c7m4d9v3zo8mZ0H1SV1QqLiCbGwPe6/90X/57vrv/01/P1f78Jlfa49jScSOZacbG2w0bWl/UMy+LRYiw0vViJYZtV6EHOLymI9xdnHi+f/qG98Vw56R19FO0qs7Ucztf6p9ofl5orDpGpigTprTG7afhcgbvky54vK/MVysOGwWC2FxXNxQJwTK0n+8gAAAABJRU5ErkJggg==')\",\"backgroundSize\":\"cover\",\"display\":\"block\"}}),`\n  `,mdx(\"picture\",{parentName:\"span\"},`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/b05cdde9cb5f4729dff2ed24f225cb29/601b1/175.webp 500w\",\"/static/b05cdde9cb5f4729dff2ed24f225cb29/80c60/175.webp 1000w\",\"/static/b05cdde9cb5f4729dff2ed24f225cb29/64296/175.webp 1600w\"],\"sizes\":\"(max-width: 1600px) 100vw, 1600px\",\"type\":\"image/webp\"}),`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/b05cdde9cb5f4729dff2ed24f225cb29/0eb09/175.png 500w\",\"/static/b05cdde9cb5f4729dff2ed24f225cb29/1263b/175.png 1000w\",\"/static/b05cdde9cb5f4729dff2ed24f225cb29/42cbc/175.png 1600w\"],\"sizes\":\"(max-width: 1600px) 100vw, 1600px\",\"type\":\"image/png\"}),`\n          `,mdx(\"img\",{parentName:\"picture\",\"className\":\"gatsby-resp-image-image\",\"src\":\"/static/b05cdde9cb5f4729dff2ed24f225cb29/42cbc/175.png\",\"alt\":\"175\",\"title\":\"175\",\"loading\":\"lazy\",\"decoding\":\"async\",\"style\":{\"width\":\"100%\",\"height\":\"100%\",\"margin\":\"0\",\"verticalAlign\":\"middle\",\"position\":\"absolute\",\"top\":\"0\",\"left\":\"0\"}}),`\n        `),`\n    `)),mdx(\"p\",null,`Cool! Now you might notice a few things in the top left animation.`),mdx(\"h4\",{\"id\":\"looking-at-the-details\"},`Looking at the Details`),mdx(\"p\",null,`First of all, our point seems to jump around a bit too much. It first starts off\n“to the left” of the minimum, then jumps and is then located to the “right of it”, then it again\njumps to the left side, and so on. When we created our initial visualization\nin the section `,mdx(SmoothScrollLink,{scrollid:\"the-intuition\",mdxType:\"SmoothScrollLink\"},`The Intuition`),`,\nthis process looked a bit cleaner and our orange friend did not jump around this much.`),mdx(\"p\",null,`Usually, this “jumping around” is not what we want. This is a clear sign that our learning rate is too high\nand our parameters may `,mdx(\"em\",{parentName:\"p\"},`overshoot`),` the minimum. In our particular case,\nthis does not end up being a big problem, because our function still gets to our\nminimum pretty quickly. However, if we were to just `,mdx(\"em\",{parentName:\"p\"},`sliiightly`),` increase our learning rate,\nsay to 0.08, we would get a problem. Because in that case, we overshoot our minimum\n`,mdx(\"em\",{parentName:\"p\"},`so`),` much that we actually end up “jumping out” of it:`),mdx(AnimationPlayer,{path:\"../content/machine_learning_math/img/Gradient_Descent_for_Linear_Regression/anim/gradDescDivergence/\",ending:\".png\",caption:\"Too High Learning Rate\",identifier:\"gradDescDivergence\",numframes:1,mdxType:\"AnimationPlayer\"},mdx(\"img\",{id:\"full\",src:\"/fa8f245748e35c936805c6d148aca334/gradDescDivergence.webp\"}),mdx(\"span\",{\"className\":\"gatsby-resp-image-wrapper\",\"style\":{\"position\":\"relative\",\"display\":\"block\",\"marginLeft\":\"auto\",\"marginRight\":\"auto\",\"maxWidth\":\"700px\"}},`\n      `,mdx(\"span\",{parentName:\"span\",\"className\":\"gatsby-resp-image-background-image\",\"style\":{\"paddingBottom\":\"71.4%\",\"position\":\"relative\",\"bottom\":\"0\",\"left\":\"0\",\"backgroundImage\":\"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAOCAYAAAAvxDzwAAAACXBIWXMAAAsTAAALEwEAmpwYAAAB70lEQVQ4y42TPW/aUBSGsxRIZWyMKRA+jMEYMIQv82WCwagkkTJGHStFqtSxHaoM2TpkaVirDqhD/0x/2FNdByRCIOnw6lrnHj/3PfecexTJd9lVONfZiXWexZ7nPOroNchGkbyz9X0YfLQdFGto/VMoJxJ6SMUR0dKYeHWKVHKJ6L2dg55Cnzh8WxCAAZHCiFrXJW1PiFV84tUZCdtHsabI5UlwwLHeJ7yuZG/JoWwHuTQg3fCJWR5a1UO1PGLWlETNR6vNUcoectlDrQi3Y6Kl0f6St22fnArgJAAJqZUZmj0nYc9RrNka6KFYk6Cag8ANNFUXjmaPLu05anWOJlSbBRC14iMZYxRzElzRQWAo20a1XDKtOZnm+8CJUpygGC7JU5+cc02q8QGpMCTrXJLvnRPOdQnnX+iygMrmkHe2T8G54POvJe3lH4yb35juklz9G8bVA/2v30nZZ7zJtA93eXtDq3mkK2N69z+p/viLOVuRqX9BH9xjflqRHlyiiBH6n8HeDLFsOGjONeZihd64pdC6Q188kOiek6y4JGoex7rzclM2QJEomyPi5QH59g0nzVv0/h3J5gVKqUfMcveYeAUoJBX7aNUzsq2PJO0FcWtItDhEMvp7YQfvcPtpiVlTLaERkjEIGncIJoD/AI7kjEoJQzAWAAAAAElFTkSuQmCC')\",\"backgroundSize\":\"cover\",\"display\":\"block\"}}),`\n  `,mdx(\"picture\",{parentName:\"span\"},`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/81f968b9cce223af16220189e1cbd07d/601b1/too_high_50.webp 500w\",\"/static/81f968b9cce223af16220189e1cbd07d/84c6d/too_high_50.webp 700w\"],\"sizes\":\"(max-width: 700px) 100vw, 700px\",\"type\":\"image/webp\"}),`\n          `,mdx(\"source\",{parentName:\"picture\",\"srcSet\":[\"/static/81f968b9cce223af16220189e1cbd07d/0eb09/too_high_50.png 500w\",\"/static/81f968b9cce223af16220189e1cbd07d/a27c6/too_high_50.png 700w\"],\"sizes\":\"(max-width: 700px) 100vw, 700px\",\"type\":\"image/png\"}),`\n          `,mdx(\"img\",{parentName:\"picture\",\"className\":\"gatsby-resp-image-image\",\"src\":\"/static/81f968b9cce223af16220189e1cbd07d/a27c6/too_high_50.png\",\"alt\":\"too high 50\",\"title\":\"too high 50\",\"loading\":\"lazy\",\"decoding\":\"async\",\"style\":{\"width\":\"100%\",\"height\":\"100%\",\"margin\":\"0\",\"verticalAlign\":\"middle\",\"position\":\"absolute\",\"top\":\"0\",\"left\":\"0\"}}),`\n        `),`\n    `)),mdx(\"p\",null,`At this point, you might ask, “so how can we pick a good learning rate?“.\nGreat question! In fact, this is such a good question that I decided to dedicate\n`,mdx(\"a\",{parentName:\"p\",\"href\":\"/model_optimization/learning_rates\"},`an entire post`),`\nto answer this question and go over the different techniques to choose and adapt your learning rate,\nand look at the effects different learning rates have on your model. I highly recommend you read that article\nafter reading this one, it blends in really well with the content from this post!`),mdx(\"p\",null,`With this, you have now learned how to use gradient descent to iteratively solve linear regression.\nWe’ve looked at the problem from a mathematical as well as a visual aspect, and we’ve translated\nour understanding of it into working code, once using just Python and once with the help of scikit-learn.\nIf you have any feedback on this post, I’d love to hear your thoughts in the comments below! These articles\ntake many hours to create and it makes me truly happy to see people give both praise and critique\nso that I can make sure these posts do their intended job well: help you become better at machine learning!`),mdx(\"h2\",{\"id\":\"further-reading\"},`Further Reading`),mdx(\"p\",null,`If you’ve made it to the end, good job! Pat yourself on the back, you deserve it. Gradient\ndescent surely isn’t the easiest algorithm in machine learning, but if you approach it step by\nstep it is a lot less scary than only seeing the final equation with no explanation.`),mdx(\"p\",null,`If you can’t get enough of linear regression, I recommend you read the post `,mdx(\"a\",{parentName:\"p\",\"href\":\"/machine_learning_models/lasso_and_ridge\"},`Lasso and Ridge Regression Explained, Step by Step`),` next,\nwhere you will learn everything about lasso and ridge regression, which are variations of linear regression\nthat solve some of the issues vanilla linear regression has.`),mdx(\"p\",null,`If you are more interested in gradient descent and want to continue right where this post ends,\nyou should read the article `,mdx(\"a\",{parentName:\"p\",\"href\":\"/model_optimization/learning_rates\"},`How To Choose Your Learning Rate`),`,\nwhere we will take a detailed look at the issues we saw at the end of this article. You will learn about all of the\ndifferent techniques for choosing and adapting learning rates, so you’ll never have to worry about\npicking random learning rates again!`));};MDXContent.isMDXComponent=true;","excerpt":"Gradient descent is one of the most famous techniques in machine learning and used for training all sorts of neural networks. But gradient descent can not only be used to train neural networks, but many more machine learning models. In particular, gradient descent can be used to train a linear regression model! If you are curious as to how this is possible, or if you want to approach gradient descent with smaller steps and not jump straight to neural networks, this post is for you. You will learn how gradient descent works from an intuitive, visual, and mathematical standpoint and we will apply it to an exemplary dataset in Python.","tableOfContents":{"items":[{"url":"#outline","title":"Outline"},{"url":"#formulating-the-problem","title":"Formulating the Problem"},{"url":"#the-intuition","title":"The Intuition"},{"url":"#the-math","title":"The Math","items":[{"items":[{"url":"#the-gradient","title":"The Gradient"},{"url":"#the-descent","title":"The Descent"},{"url":"#visualizing-in-2d","title":"Visualizing in 2D"},{"url":"#visualizing-in-3d","title":"Visualizing in 3D"},{"url":"#a-mistake","title":"A Mistake..?"},{"url":"#introducing-the-learning-rate","title":"Introducing: The Learning Rate"}]}]},{"url":"#the-code","title":"The Code","items":[{"url":"#adjustment-vectorization","title":"Adjustment: Vectorization"},{"url":"#code-outline","title":"Code Outline"},{"url":"#making-predictions","title":"Making Predictions"},{"url":"#calculating-the-loss","title":"Calculating the Loss"},{"url":"#optimizing-our-variables","title":"Optimizing our Variables"},{"url":"#some-adjustments","title":"Some Adjustments"},{"url":"#scikit-learn","title":"Scikit-Learn"},{"url":"#visualizing-gradient-descent","title":"Visualizing Gradient Descent","items":[{"url":"#looking-at-the-details","title":"Looking at the Details"}]}]},{"url":"#further-reading","title":"Further Reading"}]},"frontmatter":{"title":"Gradient Descent for Linear Regression Explained, Step by Step","userDate":"3 April 2021","date":"2021-04-03T19:07:33.321Z","dateModified":"2021-04-03T19:07:33.321Z","changelog":[],"tags":["Machine Learning Math"],"timeToRead":23,"excerpt":"Gradient descent is one of the most famous techniques in machine learning and used for training all sorts of neural networks. But gradient descent can not only be used to train neural networks, but many more machine learning models. In particular, gradient descent can be used to train a linear regression model! If you are curious as to how this is possible, or if you want to approach gradient descent with smaller steps and not jump straight to neural networks, this post is for you. You will learn how gradient descent works from an intuitive, visual, and mathematical standpoint and we will apply it to an exemplary dataset in Python.","image":{"childImageSharp":{"gatsbyImageData":{"layout":"fullWidth","placeholder":{"fallback":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAIAAADwazoUAAAACXBIWXMAAAsTAAALEwEAmpwYAAACV0lEQVQozxWQWXOaUACFebexigiSVpMoakoSV2QRROSyCGi0cQHuBRNTTUxMmk477Uxm+tCf3vHtvJxvvnOwlg4FEMpG2LORaqOehWQLcQB1AFJsJJmoOThk2YCKCVUbySYUQdjWYRvEmGyEvIF4cOiow0hzIt2N+04s2xFvRpwOeXBAyFakWKhrHEBtHTW1sGtGmObEfQsKdtwxoKj7sr6UgK9ZoWqGvB6A0a1khA3Vr/f8S8WvdpeXit/sB7wO1WGM1Tpm313l3X3G2eecF8J5TXo/cs6evnkvuPvH3ff3v/82T2/rh5fN88/925/d8+s8emppgeqsMJxiCkyrLE2uhnc1b/vFvGXtdclYn2rR5SAAo2gS7saL9Sy4ny6/zYKNOQrN8eowx1ph2eMqTjFZmqmwgjK4MdzYdKO28vXG3262u83+l2RB3oCSefiFA7AxQPUBagMkWjFG0JUsXc3kykmi+CFT+lwWWeG6rsw7wAfDuTeJpMGiC3wJBB1teaHMa71Fq7/kNF8w4EE7X6zb7vR6Op8twvkivL3bTuFjavybtJ9x7T43esvZT5S+zhrbtH5PWw95sGaFaZUbYSnijKAYUQaSonOCajtTyx5XrsSj8z7JjUlrRw9fjnsR1Q1oNSr0I7rrUw2PFSZsx8OI0wZeURJ4MZEqJNIniVThCD/7SBRTmZM0USTz9VLDZvnJRWfEcl654ZTqFsu5vL48F6fYp+aQEcf48Xkyc5omSzjJ4BSTJpmPJJPMlpKZYpoqF85lpuWWWl657VU5r9abtQDM1+z/7PCizWjDAaIAAAAASUVORK5CYII="},"images":{"fallback":{"src":"/static/97717e791c8dcde652d468d6f7784a65/87706/GradientDescentLinearRegression_Thumbnail.png","srcSet":"/static/97717e791c8dcde652d468d6f7784a65/0dee1/GradientDescentLinearRegression_Thumbnail.png 750w,\n/static/97717e791c8dcde652d468d6f7784a65/8beaa/GradientDescentLinearRegression_Thumbnail.png 1080w,\n/static/97717e791c8dcde652d468d6f7784a65/87706/GradientDescentLinearRegression_Thumbnail.png 1280w","sizes":"100vw"},"sources":[{"srcSet":"/static/97717e791c8dcde652d468d6f7784a65/a66aa/GradientDescentLinearRegression_Thumbnail.webp 750w,\n/static/97717e791c8dcde652d468d6f7784a65/65dd5/GradientDescentLinearRegression_Thumbnail.webp 1080w,\n/static/97717e791c8dcde652d468d6f7784a65/71d4d/GradientDescentLinearRegression_Thumbnail.webp 1280w","type":"image/webp","sizes":"100vw"}]},"width":1,"height":0.5625}}},"author":[{"id":"Lari Giba","bio":"Hi! I'm Lari and I run this website. You can find more information in the \"About\"-tab.","avatar":{"children":[{"fluid":{"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAbABQDASIAAhEBAxEB/8QAGAAAAwEBAAAAAAAAAAAAAAAAAAMEAgH/xAAWAQEBAQAAAAAAAAAAAAAAAAABAgP/2gAMAwEAAhADEAAAAeDIop5sDKn0aCSgzv8A/8QAHhABAAICAQUAAAAAAAAAAAAAAQACAxEEEyEiMjP/2gAIAQEAAQUC3ZAE6ZGW8HtMw1M2O+tTlfI9Z//EABURAQEAAAAAAAAAAAAAAAAAABAR/9oACAEDAQE/AYU//8QAFxEBAAMAAAAAAAAAAAAAAAAAABAREv/aAAgBAgEBPwFbMf/EABwQAAIBBQEAAAAAAAAAAAAAAAABMQIQESFxkf/aAAgBAQAGPwLfpJvBhuRVIgXRNwpsxct//8QAHRABAAMAAgMBAAAAAAAAAAAAAQARIUFRMWGBcf/aAAgBAQABPyG78vaUcDUeYJrJrCUcHAhzK6pYRVinqYAdKT7Y0/Yi+8UGE//aAAwDAQACAAMAAAAQsO1C/8QAGBEBAQEBAQAAAAAAAAAAAAAAAREAECH/2gAIAQMBAT8QPF4uTBS7/8QAGBEBAQEBAQAAAAAAAAAAAAAAAQARIVH/2gAIAQIBAT8QO2vYEgOZf//EAB8QAQEAAgIBBQAAAAAAAAAAAAERACExQVFhcZGxwf/aAAgBAQABPxDlRMDhDreGljrJ8uK5DiW/WJE4rXSx7wgAOy8sEKuzsxERAF59XxirS0k0dz03g4T3iY5jH9MRu2FvejEgEAAM/9k=","aspectRatio":0.7407407407407407,"src":"/static/9eab840ebd4087faf31c48702c92af36/2f1b1/lari.jpg","srcSet":"/static/9eab840ebd4087faf31c48702c92af36/b3d27/lari.jpg 40w,\n/static/9eab840ebd4087faf31c48702c92af36/5a735/lari.jpg 80w,\n/static/9eab840ebd4087faf31c48702c92af36/6e81a/lari.jpg 120w,\n/static/9eab840ebd4087faf31c48702c92af36/2f1b1/lari.jpg 800w,\n/static/9eab840ebd4087faf31c48702c92af36/75b83/lari.jpg 1520w","sizes":"(max-width: 800px) 100vw, 800px"}}]}}],"imgCaption":"Background image by Rohit Tandon","imgSource":"https://unsplash.com/photos/9wg5jCEPBsw","uniquePostId":6,"tutorialId":null,"tutorialEntryIdx":null,"dependencies":[],"proficiencyLevel":"Beginner"}},"relatedPosts":{"totalCount":3,"edges":[{"node":{"id":"d331ba94-308d-5859-8c5e-3f7526c59b0a","excerpt":"Gradient descent is one of the most popular algorithms to train machine learning models. However, many of the popular machine learning models like lasso regression or support vector machines contain loss functions that are not differentiable. Because of this, regular gradient descent can not be used. One of the most commonly utilized techniques to circumvent this issue is to use subgradients instead of regular gradients. And in this article, you will learn how it's done.","frontmatter":{"title":"Subgradient Descent Explained, Step by Step","timeToRead":18,"date":"2021-07-27T19:49:21.503Z"},"fields":{"slug":"/machine_learning_math/subgradient_descent/"}}},{"node":{"id":"340d90b8-6082-5581-a444-263bddfa3711","excerpt":"Gradient descent is one of the most famous techniques in machine learning and used for training all sorts of neural networks. But gradient descent can not only be used to train neural networks, but many more machine learning models. In particular, gradient descent can be used to train a linear regression model! If you are curious as to how this is possible, or if you want to approach gradient descent with smaller steps and not jump straight to neural networks, this post is for you. You will learn how gradient descent works from an intuitive, visual, and mathematical standpoint and we will apply it to an exemplary dataset in Python.","frontmatter":{"title":"Gradient Descent for Linear Regression Explained, Step by Step","timeToRead":23,"date":"2021-04-03T19:07:33.321Z"},"fields":{"slug":"/machine_learning_math/gradient_descent_for_linear_regression/"}}},{"node":{"id":"8eab4786-e5fd-5dd7-bc3f-bec6b2d4b411","excerpt":"Vectorization is one of the most useful techniques to make your machine learning code more efficient. In this post, you will learn everything you need to know to start using vectorization efficiently in your machine learning projects.","frontmatter":{"title":"Vectorization Explained, Step by Step","timeToRead":7,"date":"2021-03-06T18:32:05.647Z"},"fields":{"slug":"/machine_learning_math/vectorization/"}}}]}},"pageContext":{"slug":"/machine_learning_math/gradient_descent_for_linear_regression/","prev":{"excerpt":"Linear regression is one of the most famous algorithms in statistics and machine learning. In this post you will learn how linear regression works on a fundamental level. You will also implement linear regression both from scratch as well as with the popular library scikit-learn in Python. You will learn when and how to best use linear regression in your machine learning projects. You do not need any knowledge prior to reading this article.","frontmatter":{"title":"Linear Regression Explained, Step by Step","tags":["Machine Learning Models"],"date":"2021-03-20T18:17:30.352Z","dateModified":"2021-03-22T10:07:41.913Z","changelog":[["2023-01-17T18:46:34.276Z","Fixed a small typo. Thanks Андрей for pointing this out!"],["2023-05-21T21:43:11.881Z","Fixed a small typo. Thanks John for pointing this out!"]],"draft":false,"excerpt":"Linear regression is one of the most famous algorithms in statistics and machine learning. In this post you will learn how linear regression works on a fundamental level. You will also implement linear regression both from scratch as well as with the popular library scikit-learn in Python. You will learn when and how to best use linear regression in your machine learning projects. You do not need any knowledge prior to reading this article.","uniquePostId":5,"timeToRead":23,"tutorialId":null,"tutorialEntryIdx":null,"dependencies":[],"proficiencyLevel":"Beginner","image":{"childImageSharp":{"gatsbyImageData":{"layout":"fullWidth","placeholder":{"fallback":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAIAAADwazoUAAAACXBIWXMAAAsTAAALEwEAmpwYAAACRElEQVQozx2Na2+aYACF2YeZtiL6XgSvgIoXBAVvIFdRuVqwpnXt0m5Z2q1tmm2/Yf3pi01OTp7z4ckh0GRdmfmVmc8uQl6P2stYMOKBtZPsVLLTkZuN3VR20pGTSU56ipuNvCtpcyW6KQHVNVQ8qK7p6ZaZ+dVFUNeClhELZtIx4p6Z9M2kayY9aydYu7a5E6xk4GaCt1fDI1FsT5HsYHVdlOyibOdFi5SckuLR021NC5p6yOphXQ8aelid+xUtZKy4EV+P029ifEuQiCWZzgWvLoLDKjkcv/+Kjg/7+0cj/QLUVWW+LU83SPWw5lezGzDxaCsZJnet9B4YEXEBmjVuCJhOR5xZ28SND5v05vL6q2Ruc61JSTbhyIGyjSZr6F3WNF/OHioLH5oRNiPi01l5f3337/396efL08vb4fbh8fXPj+e3x+fX199//csb0NfB0KBEg19d9VcZnm5KqoudBJkBkYcc0+x3BqrjRUG8b/CiOJqNtZViR7IV8m6AFLskG4IR9+IjmHlAsaHqYCdEyw2Rh+x5qZGjajmy+jlfOSvWc4UTn0H+HPfL2YFxwv4yYhWvpLhoYqOxBSQDyCZSbQILMh7PKKZdQDyF+QI+9QkQW0BssSYK03V1sCx250yYgoEGunMg6kAykGIRTcPpuetSTchDlsQ8CVkScSe//MGwSSKuUBfhUMe2D6Ql6C1AXwOijhWLyDOtQqVNApbEHIm4D4Gl6BZF86eJOYpuFTBH1br02KrOV0g2Ts8jk9ZW/wHXs3ZCj57nlgAAAABJRU5ErkJggg=="},"images":{"fallback":{"src":"/static/c32af02d3a84ba704bed82458e50c3fb/87706/LinearRegression_Thumbnail.png","srcSet":"/static/c32af02d3a84ba704bed82458e50c3fb/0dee1/LinearRegression_Thumbnail.png 750w,\n/static/c32af02d3a84ba704bed82458e50c3fb/8beaa/LinearRegression_Thumbnail.png 1080w,\n/static/c32af02d3a84ba704bed82458e50c3fb/87706/LinearRegression_Thumbnail.png 1280w","sizes":"100vw"},"sources":[{"srcSet":"/static/c32af02d3a84ba704bed82458e50c3fb/a66aa/LinearRegression_Thumbnail.webp 750w,\n/static/c32af02d3a84ba704bed82458e50c3fb/65dd5/LinearRegression_Thumbnail.webp 1080w,\n/static/c32af02d3a84ba704bed82458e50c3fb/71d4d/LinearRegression_Thumbnail.webp 1280w","type":"image/webp","sizes":"100vw"}]},"width":1,"height":0.5625}}},"author":[{"id":"Lari Giba","bio":"Hi! I'm Lari and I run this website. You can find more information in the \"About\"-tab.","avatar":{"children":[{"fluid":{"aspectRatio":0.7434944237918215,"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAbABQDASIAAhEBAxEB/8QAGAAAAwEBAAAAAAAAAAAAAAAAAAMEAgH/xAAWAQEBAQAAAAAAAAAAAAAAAAABAgP/2gAMAwEAAhADEAAAAeDIop5sDKn0aCSgzv8A/8QAHhABAAICAQUAAAAAAAAAAAAAAQACAxEEEyEiMjP/2gAIAQEAAQUC3ZAE6ZGW8HtMw1M2O+tTlfI9Z//EABURAQEAAAAAAAAAAAAAAAAAABAR/9oACAEDAQE/AYU//8QAFxEBAAMAAAAAAAAAAAAAAAAAABAREv/aAAgBAgEBPwFbMf/EABwQAAIBBQEAAAAAAAAAAAAAAAABMQIQESFxkf/aAAgBAQAGPwLfpJvBhuRVIgXRNwpsxct//8QAHRABAAMAAgMBAAAAAAAAAAAAAQARIUFRMWGBcf/aAAgBAQABPyG78vaUcDUeYJrJrCUcHAhzK6pYRVinqYAdKT7Y0/Yi+8UGE//aAAwDAQACAAMAAAAQsO1C/8QAGBEBAQEBAQAAAAAAAAAAAAAAAREAECH/2gAIAQMBAT8QPF4uTBS7/8QAGBEBAQEBAQAAAAAAAAAAAAAAAQARIVH/2gAIAQIBAT8QO2vYEgOZf//EAB8QAQEAAgIBBQAAAAAAAAAAAAERACExQVFhcZGxwf/aAAgBAQABPxDlRMDhDreGljrJ8uK5DiW/WJE4rXSx7wgAOy8sEKuzsxERAF59XxirS0k0dz03g4T3iY5jH9MRu2FvejEgEAAM/9k=","sizes":"(max-width: 800px) 100vw, 800px","src":"/static/9eab840ebd4087faf31c48702c92af36/2f1b1/lari.jpg","srcSet":"/static/9eab840ebd4087faf31c48702c92af36/fd013/lari.jpg 200w,\n/static/9eab840ebd4087faf31c48702c92af36/25252/lari.jpg 400w,\n/static/9eab840ebd4087faf31c48702c92af36/2f1b1/lari.jpg 800w,\n/static/9eab840ebd4087faf31c48702c92af36/0ff54/lari.jpg 1200w,\n/static/9eab840ebd4087faf31c48702c92af36/75b83/lari.jpg 1520w"}}]}}]},"fields":{"layout":"post","slug":"/machine_learning_models/linear_regression/"}},"next":{"excerpt":"You have likely heard about bias and variance before. They are two fundamental terms in machine learning and often used to explain overfitting and underfitting. If you're working with machine learning methods, it's crucial to understand these concepts well so that you can make optimal decisions in your own projects. In this article, you'll learn everything you need to know about bias, variance, overfitting, and the bias-variance tradeoff.","frontmatter":{"title":"Bias, Variance, and Overfitting Explained, Step by Step","tags":["Model Optimization"],"date":"2021-04-17T19:54:40.006Z","dateModified":"2021-04-17T19:54:40.006Z","changelog":[["2022-03-19T19:39:23.993Z","Fixed typo, thanks to Ali Jan!"]],"draft":false,"excerpt":"You have likely heard about bias and variance before. They are two fundamental terms in machine learning and often used to explain overfitting and underfitting. If you're working with machine learning methods, it's crucial to understand these concepts well so that you can make optimal decisions in your own projects. In this article, you'll learn everything you need to know about bias, variance, overfitting, and the bias-variance tradeoff.","uniquePostId":7,"timeToRead":20,"tutorialId":null,"tutorialEntryIdx":null,"dependencies":[],"proficiencyLevel":"Beginner","image":{"childImageSharp":{"gatsbyImageData":{"layout":"fullWidth","placeholder":{"fallback":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAIAAADwazoUAAAACXBIWXMAAAsTAAALEwEAmpwYAAACdElEQVQozxXOWVLaAAAA0HxVHGXJngAhLGELCYSyJYSQoAhFBK1FtCiLSFiDMyjYTqmg/rXTS9iTdvpO8AAuxHAhpl6tfK6fyJlknAtzQSbOs8l4LOSlaTse5zk+HGTcLi9NIaCFpuyimM4rOU3NA1HWHwn6ttvN8/PzcDicz41ep1MtHz0sFt+eVveGMZtO5/PZavk4m0wvLhq6Puj1ulImXdBUwOt2R0LMeKQP9cFkPDJmU31wd3py3O+29X5vNNQb52f3hmFMp6e16lm91r657nTakpguaHkAhBwESaeSyePSYU7KpOKx0oFaPixoOemqcX5cKhY1pajlU0LU56YwyMownmxWzCvy/zYEO6wgaQXtDBOWJelAzX0qFqrloiZLk+FgrN9l0wk1lxX4iN/nwSArFwnl84qiyKqaB6w2knYHr6+7HJ+w2Aguwmu5rCpLlVJx0L+VMunaSbVULMqSyAb9BAwG/D5NU5WcLIoZYMcENputxcNys3np3+mLh+V6/WO1Ws0N48/vXzet1uvry8/1ejqZLBaLt7e31Wq53W50feD3M8DePhIV0qun71qh1O70a/Xzx+XTl8ZlhItXK5VK+ei2171pXXW7HWM2vWxeTMaj9/e/xnyOIDDgdQeCbp/ZjJp2oQ8m244J2tkF98woiFD7FowgHJmEkBFYIexjGYoPuj7yoa/NhpwVKRID0lEhl5JI0mMFCQh2ICiFkx6McOOkB0EpixVHUCeJYk7URhNwKsYeKJIQCWSSQoz1AwjiwHEXCDtgxAkjFIK5UJyGYAeKu6w2wmzBEJSCYCcM4S4c9tgR1k8n43wqIUQjgX/XKpxML/eDfwAAAABJRU5ErkJggg=="},"images":{"fallback":{"src":"/static/7e8675c2404d1fdaa12b78c05104d577/87706/BiasAndVariance_Thumbnail.png","srcSet":"/static/7e8675c2404d1fdaa12b78c05104d577/0dee1/BiasAndVariance_Thumbnail.png 750w,\n/static/7e8675c2404d1fdaa12b78c05104d577/8beaa/BiasAndVariance_Thumbnail.png 1080w,\n/static/7e8675c2404d1fdaa12b78c05104d577/87706/BiasAndVariance_Thumbnail.png 1280w","sizes":"100vw"},"sources":[{"srcSet":"/static/7e8675c2404d1fdaa12b78c05104d577/a66aa/BiasAndVariance_Thumbnail.webp 750w,\n/static/7e8675c2404d1fdaa12b78c05104d577/65dd5/BiasAndVariance_Thumbnail.webp 1080w,\n/static/7e8675c2404d1fdaa12b78c05104d577/71d4d/BiasAndVariance_Thumbnail.webp 1280w","type":"image/webp","sizes":"100vw"}]},"width":1,"height":0.5625}}},"author":[{"id":"Lari Giba","bio":"Hi! I'm Lari and I run this website. You can find more information in the \"About\"-tab.","avatar":{"children":[{"fluid":{"aspectRatio":0.7434944237918215,"base64":"data:image/jpeg;base64,/9j/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wgARCAAbABQDASIAAhEBAxEB/8QAGAAAAwEBAAAAAAAAAAAAAAAAAAMEAgH/xAAWAQEBAQAAAAAAAAAAAAAAAAABAgP/2gAMAwEAAhADEAAAAeDIop5sDKn0aCSgzv8A/8QAHhABAAICAQUAAAAAAAAAAAAAAQACAxEEEyEiMjP/2gAIAQEAAQUC3ZAE6ZGW8HtMw1M2O+tTlfI9Z//EABURAQEAAAAAAAAAAAAAAAAAABAR/9oACAEDAQE/AYU//8QAFxEBAAMAAAAAAAAAAAAAAAAAABAREv/aAAgBAgEBPwFbMf/EABwQAAIBBQEAAAAAAAAAAAAAAAABMQIQESFxkf/aAAgBAQAGPwLfpJvBhuRVIgXRNwpsxct//8QAHRABAAMAAgMBAAAAAAAAAAAAAQARIUFRMWGBcf/aAAgBAQABPyG78vaUcDUeYJrJrCUcHAhzK6pYRVinqYAdKT7Y0/Yi+8UGE//aAAwDAQACAAMAAAAQsO1C/8QAGBEBAQEBAQAAAAAAAAAAAAAAAREAECH/2gAIAQMBAT8QPF4uTBS7/8QAGBEBAQEBAQAAAAAAAAAAAAAAAQARIVH/2gAIAQIBAT8QO2vYEgOZf//EAB8QAQEAAgIBBQAAAAAAAAAAAAERACExQVFhcZGxwf/aAAgBAQABPxDlRMDhDreGljrJ8uK5DiW/WJE4rXSx7wgAOy8sEKuzsxERAF59XxirS0k0dz03g4T3iY5jH9MRu2FvejEgEAAM/9k=","sizes":"(max-width: 800px) 100vw, 800px","src":"/static/9eab840ebd4087faf31c48702c92af36/2f1b1/lari.jpg","srcSet":"/static/9eab840ebd4087faf31c48702c92af36/fd013/lari.jpg 200w,\n/static/9eab840ebd4087faf31c48702c92af36/25252/lari.jpg 400w,\n/static/9eab840ebd4087faf31c48702c92af36/2f1b1/lari.jpg 800w,\n/static/9eab840ebd4087faf31c48702c92af36/0ff54/lari.jpg 1200w,\n/static/9eab840ebd4087faf31c48702c92af36/75b83/lari.jpg 1520w"}}]}}]},"fields":{"layout":"post","slug":"/model_optimization/bias_and_variance/"}},"primaryTag":"Machine Learning Math"}},"staticQueryHashes":["13077718","1316742457","1394499604","2907728042","3762220167"]}