{"id":53777,"date":"2019-12-10T00:00:00","date_gmt":"2019-12-09T21:00:00","guid":{"rendered":"https:\/\/prohoster.info\/blog\/blog_prohoster\/privodim-uravnenie-linejnoj-regressii-v-matrichnyj-vid"},"modified":"2020-02-18T14:01:42","modified_gmt":"2020-02-18T11:01:42","slug":"privodim-uravnenie-linejnoj-regressii-v-matrichnyj-vid","status":"publish","type":"post","link":"https:\/\/prohoster.info\/en\/blog\/news\/privodim-uravnenie-linejnoj-regressii-v-matrichnyj-vid","title":{"rendered":"We present the equation of linear regression in matrix form.","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/47507c0ae01db89c623d94f540c22aea.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nThe purpose of this article is to support novice data scientists. In <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/474602\/\">the previous article<\/a><\/noindex> simple terms, we analyzed three methods for solving the linear regression equation: analytical solution, gradient descent, and stochastic gradient descent. For the analytical solution, we used the formula <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/50b913c04204ae6400ca1676cca57d18.jpg\" style=\"display:block;margin: 0 auto;\" \/>. In this article, as the title suggests, we will justify the use of this formula or, in other words, derive it ourselves. <\/p>\n<p>Why it makes sense to pay special attention to the formula <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/9d44749d6f8b509b3167a25f0c583f7f.jpg\" style=\"display:block;margin: 0 auto;\" \/>? <\/p>\n<p>It is with the matrix equation that introductions to linear regression typically begin. However, detailed derivations of how the formula was derived are rarely encountered.<br \/>\n<noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><br \/>\nFor example, in Yandex's machine learning courses, when students are introduced to regularization, they are advised to use functions from the library <i>sklearn<\/i>, yet there is no mention of the matrix representation of the algorithm. This is the moment when some students may feel inclined to delve deeper into the issue\u2014writing code without using the built-in functions. To achieve this, one must first represent the equation with the regularizer in matrix form. This article will indeed help those who wish to master such skills. Let's get started.<\/p>\n<h2>Initial Conditions<\/h2>\n<p><\/p>\n<h3>Target Indicators<\/h3>\n<p>\nWe have a series of values for the target indicator. For example, the target indicator could be the price of an asset: oil, gold, wheat, or the dollar, etc. By a series of values of the target indicator, we mean the number of observations. Such observations could be, for instance, the monthly oil prices over a year, which means we will have 12 values for the target indicator. Let's start by introducing notations. We will denote each value of the target indicator as <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/d974b10a558b8a917aca3dd7d16e9a7d.jpg\" style=\"display:block;margin: 0 auto;\" \/>. Overall, we have <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/5e826824b32c20c20eb15b276c544583.jpg\" style=\"display:block;margin: 0 auto;\" \/> observations, and thus we can represent our observations as <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/599bcd56d392e21dcf63b72b07edcbc5.jpg\" style=\"display:block;margin: 0 auto;\" \/>.<\/p>\n<h3>Regressors<\/h3>\n<p>\nLet's assume that there are factors that, to a certain extent, explain the values of the target variable. For example, the exchange rate of the dollar\/ruble is strongly influenced by the price of oil, the Federal Reserve rate, and others. Such factors are called regressors. In this case, each value of the target variable should correspond to a value of the regressor, meaning that if we have 12 target values for each month in 2018, we should also have 12 regressor values for the same period. We denote the values of each regressor as <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/d49b372bea0c1d50c21681357f85610a.jpg\" style=\"display:block;margin: 0 auto;\" \/>. Suppose that in our case there are <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/61a94efcc11446ebee920870a684c216.jpg\" style=\"display:block;margin: 0 auto;\" \/> regressors (i.e., <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/2699691a567d694e61e6fdb288bc9b54.jpg\" style=\"display:block;margin: 0 auto;\" \/> factors that influence the values of the target variable). This means our regressors can be represented as follows: for the 1st regressor (for example, the price of oil): <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/79434bf84a9b18f83602225f43e68cc7.jpg\" style=\"display:block;margin: 0 auto;\" \/>, for the 2nd regressor (for example, the Federal Reserve rate): <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/378180ee8fdaa8f6aca7bc8300a21207.jpg\" style=\"display:block;margin: 0 auto;\" \/>, for the \u201c<img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/fc70caea64d3bc2aa5e797257f6627fb.jpg\" style=\"display:block;margin: 0 auto;\" \/>-th\u201d regressor: <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/90499d34f1577681de33966a024faf2e.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<h3>The dependence of the target variables on the regressors<\/h3>\n<p>\nLet\u2019s assume that the dependence of the target variable <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/aa7d30d8fb9ca837144d34423aed5a77.jpg\" style=\"display:block;margin: 0 auto;\" \/> from regressors \u201c<img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/97a9aba33249a8b9eb3a61bdfc794287.jpg\" style=\"display:block;margin: 0 auto;\" \/>-th\u201d observation can be expressed through the linear regression equation of the form:<\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/ff892eb01b0bb830a94cacf62168d142.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>, where <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/27d8f05c058f7b42aac3a4d3fab1db51.jpg\" style=\"display:block;margin: 0 auto;\" \/> \u2014 \u201c<img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/cd438a2e58f8db5e9f1df8b387b18cff.jpg\" style=\"display:block;margin: 0 auto;\" \/>-th\u201d value of the regressor from 1 to <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/21513049bf0d7b13af73d53605089765.jpg\" style=\"display:block;margin: 0 auto;\" \/>,<\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/268ca408ca89b7846220c920e2078d5d.jpg\" style=\"display:block;margin: 0 auto;\" \/> - the number of regressors from 1 to <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/8be331a5b16bf3796e6200e77ee58c09.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/49558388879a529fc342848d80b60d32.jpg\" style=\"display:block;margin: 0 auto;\" \/> - the coefficients that represent the magnitude by which the calculated target variable will change on average with a change in the regressor. <\/p>\n<p>In other words, we determine a \"unique\" coefficient for each regressor (except for <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/fcc00174a0090f9974712c779718f13c.jpg\" style=\"display:block;margin: 0 auto;\" \/>), then we multiply the coefficients by the values of the regressors for the \" <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/c40688d883e7a22b52905be2517a91f9.jpg\" style=\"display:block;margin: 0 auto;\" \/>, then we multiply the coefficients by the values of the regressors \u201c<img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/48db80e36602c8a55eba1e518b1e3efa.jpg\" style=\"display:block;margin: 0 auto;\" \/>-th\u201d observation, resulting in some approximation \u201c<img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/a182d4ce402fa8b1d8f631ffddd5e63e.jpg\" style=\"display:block;margin: 0 auto;\" \/>-th\u201d target metric.<\/p>\n<p>, for which the values of our approximating function <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/81edeafa5c9539a4b168d5b40027ffd0.jpg\" style=\"display:block;margin: 0 auto;\" \/>will be positioned as close as possible to the values of the target variables. <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/84ae78e0b61fd87769ae120f903f2a8a.jpg\" style=\"display:block;margin: 0 auto;\" \/> Assessment of the quality of the approximating function<\/p>\n<h3>We will define the quality of the approximating function using the method of least squares. The quality assessment function will take the following form:<\/h3>\n<p>\nWe need to find values for the coefficients $w$, for which the value<\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/d50c5c70fda27cf18308baa31c2366a5.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>will be minimal. <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/e2ad7197c6ca2c9ac986a62fcfef1f7d.jpg\" style=\"display:block;margin: 0 auto;\" \/> We convert the equation into matrix form<\/p>\n<h2>Vector representation<\/h2>\n<p><\/p>\n<h3>To start, to make life easier, we should pay attention to the linear regression equation and notice that the first coefficient<\/h3>\n<p>\nTo start with, to make your life easier, you should pay attention to the linear regression equation and notice that the first coefficient <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/4b34e4c0e260b7bc143e95e83169fcc9.jpg\" style=\"display:block;margin: 0 auto;\" \/> is not multiplied by any regressors. Consequently, when we convert the data into matrix form, this circumstance will seriously complicate the calculations. In this regard, it is proposed to introduce another regressor for the first coefficient <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/6b6c662ff0c499870d0f119589ae2b44.jpg\" style=\"display:block;margin: 0 auto;\" \/> and set it to one. More precisely, set each \u201c<img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/7c0aa6c3c797066208fb19a638ef513f.jpg\" style=\"display:block;margin: 0 auto;\" \/>-th\u201d value of this regressor to one \u2014 after all, multiplying by one will not change our results, and in terms of matrix multiplication rules, it will significantly reduce our difficulties. <\/p>\n<p>Now, for a time, to simplify the material, let's assume that we only have one \u201c<img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/eac0db64e38d3ce6b5a0303393704fab.jpg\" style=\"display:block;margin: 0 auto;\" \/>-th\u201d observation. Then, we represent the values of the regressors \u201c<img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/ca79caf5f669c549b97d51ce1cb6f7cd.jpg\" style=\"display:block;margin: 0 auto;\" \/>-th\u201d observation as a vector. <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/63e0cf2d3b09577dfd6d76718864e56a.jpg\" style=\"display:block;margin: 0 auto;\" \/>. The vector <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/bff53727ebff61bbbe97ca02a132338d.jpg\" style=\"display:block;margin: 0 auto;\" \/> has a dimension of <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/f87f7646f1f53f041e53c8f63bb30405.jpg\" style=\"display:block;margin: 0 auto;\" \/>, which means <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/bda60053e47e7a5324106d5e6cdedbab.jpg\" style=\"display:block;margin: 0 auto;\" \/> rows and 1 column:<\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/fc1a58c18e118375c3bee17e1a3143d9.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>The sought coefficients can be represented as a vector <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/4c6805c97148d50d3233e183a4690b47.jpg\" style=\"display:block;margin: 0 auto;\" \/>, which has a dimension of <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/8cbddba5ac5f8c0e8f5d80c5dd5a4c6f.jpg\" style=\"display:block;margin: 0 auto;\" \/>:<\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/ebcf96a3aa612fbdf10864c010787d0e.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>The linear regression equation for the \u201c<img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/6a93855293a06ea44f48077c315dde79.jpg\" style=\"display:block;margin: 0 auto;\" \/>-th\u201d observation will take the form: <\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/e73499da0077212806ea3ce5d639bb9c.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>The function for evaluating the quality of the linear model will take the form:<\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/a33c79a345dccc9e1fce3a32d53b2164.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>Note that according to the rules of matrix multiplication, we needed to transpose the vector <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/3e551ab86fc872959afe9ea10344549e.jpg\" style=\"display:block;margin: 0 auto;\" \/>.<\/p>\n<h3>Matrix representation<\/h3>\n<p>\nAs a result of multiplying the vectors, we will get a number: <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/1889e5ba7053a652c7ad1ea6b37627ab.jpg\" style=\"display:block;margin: 0 auto;\" \/>, which was expected. This number is the approximation of the \u201c<img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/255557422b97a46c2575f2279c656bd0.jpg\" style=\"display:block;margin: 0 auto;\" \/>-th\u201d target metric. But we need the approximation not of just one target metric value, but of all. To do this, let's write all \u201c<img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/63289920f39f55a57a48b48255ad96dd.jpg\" style=\"display:block;margin: 0 auto;\" \/>-th\u201d regressors in matrix format. <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/3a003dcab41a7c3c5cff534fd0b91e3b.jpg\" style=\"display:block;margin: 0 auto;\" \/>. The resulting matrix has a dimension of <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/3435a6daffd0abb5961629671c8fa441.jpg\" style=\"display:block;margin: 0 auto;\" \/>:<\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/3901fc083e9dcf646d9d3da4c06de85d.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>Now the linear regression equation will take the form:<\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/73e7317b0815f3d8bdf514907d0c0a90.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>Let's denote the values of the target indicators (all <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/e3b9482a385dd9be37c568c4e738883e.jpg\" style=\"display:block;margin: 0 auto;\" \/>) as a vector <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/55cdadb0e1c9c9a1f39d918160f51c07.jpg\" style=\"display:block;margin: 0 auto;\" \/> with a dimension of <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/62d6246fd9a76e9da4bea15d44456d68.jpg\" style=\"display:block;margin: 0 auto;\" \/>:<\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/8b7626b09765e9e059c88d21b4593c31.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>Now we can write the equation evaluating the quality of the linear model in matrix format:<\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/394b3b15cc03bb921d7ca55c2ec3db6c.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>In fact, from this formula, we subsequently obtain the well-known formula <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/70f26b6f641c29eb4de0211778b0b207.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>How is this done? Parentheses are expanded, differentiation is performed, the resulting expressions are transformed, etc., and this is exactly what we will now engage in.<\/p>\n<h2>Matrix transformations<\/h2>\n<p><\/p>\n<h3>Let\u2019s expand the parentheses<\/h3>\n<p>\n<img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/e7d2ff15007e174e94cf65793538f6df.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/2ef9bcd45ff0b3268aa40445d38b3ec0.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<h3>Prepare the equation for differentiation<\/h3>\n<p>\nFor this, we will perform some transformations. In the subsequent calculations, it will be more convenient if the vector <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/e14c5e74d164b3fc53f654d1f5b0be41.jpg\" style=\"display:block;margin: 0 auto;\" \/> is presented at the beginning of each product in the equation.<\/p>\n<h4>Transformation 1<\/h4>\n<p>\n<img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/f2a2bf00b2ebbd266789420b0aa33404.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>How did this happen? To answer this question, it's enough to look at the sizes of the multiplied matrices and see that we obtain a number or otherwise <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/e6e75542a7ab114c0dc7277593ccc86d.jpg\" style=\"display:block;margin: 0 auto;\" \/>.<\/p>\n<p>Let's write down the dimensions of the matrix expressions.<\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/9913d89c711c919ea5dcc5f6c2beaadf.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/b8b65ace6ac8a6b5218b9d79f6eceff1.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/b1982bd25dc54b29220c1021c05880ef.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<h4>Transformation 2<\/h4>\n<p>\n<img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/3801b847f4e69894dc0e19ceefb5de55.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>Let's outline similarly to transformation 1<\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/4bb7dbb1211c7e15ba18a8b2a0f63191.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/60e7b41a69d3fb229e36f84960527769.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>On the output, we obtain an equation that we need to differentiate:<br \/>\n<img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/2c3b23bef5eba43159baf5be3effe604.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<h2>Let's differentiate the quality assessment function of the model<\/h2>\n<p>\nWe will differentiate with respect to the vector <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/7f408dd080459692d93f343528219bd6.jpg\" style=\"display:block;margin: 0 auto;\" \/>:<\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/fb6025293b318051b926913bc8e5849c.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>\n<img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/d5d089a76ceeda9dae631e9af478df36.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/4dca6e16f82114a777ec2d5dbd6df998.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/efb26c3a7e8b40de68d8aba115f09feb.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>There should be no questions as to why <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/e814552115f81a72fa60a988b7644af6.jpg\" style=\"display:block;margin: 0 auto;\" \/> but we will consider the operations for determining the derivatives in the two other expressions in more detail.<\/p>\n<h3>Differentiation 1<\/h3>\n<p>\nLet's break down the differentiation: <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/6e00a4d10e726babe1d058c9d2ce7723.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>To determine the derivative of a matrix or vector, we need to look at their contents. Let's take a look:<\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/edccede10d4d013897fefdf65e81add5.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/2263c941aa42adc1ef20031fc2facf17.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/cd4c1ec8f6f5934f24fa7c21ebe51358.jpg\" style=\"display:block;margin: 0 auto;\" \/> <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/d75a93eaae356ef96390b4e95e2d5cb9.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>We will denote the product of matrices <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/75083779f507ad45545f6e10abb3902d.jpg\" style=\"display:block;margin: 0 auto;\" \/> as a matrix <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/10290d0fb2886757f5060bc713e0f666.jpg\" style=\"display:block;margin: 0 auto;\" \/>. The matrix <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/d8c8c636d3f31d64f2c11b723a61ad76.jpg\" style=\"display:block;margin: 0 auto;\" \/> is square and moreover, it is symmetric. These properties will be useful later, let's remember them. The matrix <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/a0bb9002c1453028bcef0d34dfc23573.jpg\" style=\"display:block;margin: 0 auto;\" \/> has a dimension of <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/ee3eb39bf58b2fe9c6a5b69b55ff140e.jpg\" style=\"display:block;margin: 0 auto;\" \/>:<\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/0ce2404bd76804e036b1e5a82dabe22a.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>Now our task is to correctly multiply the vectors by the matrix and avoid getting 'two times two equals five,' so let's focus and be extremely careful.<\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/2fc1ec5f4e6ce5cb08d8790149129621.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/b9b27f264a319fb9599597a7fffd1ac9.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/fe86080e1f0ae686df40eda6b67946db.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/281d7e0888baae8417b485f6ccc7630c.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>However, we ended up with an intricate expression! In fact, we have obtained a number\u2014a scalar. And now, we are truly transitioning to differentiation. We need to find the derivative of the obtained expression with respect to each coefficient <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/b4acde2261a1ef82fdd4bcb851d3d54f.jpg\" style=\"display:block;margin: 0 auto;\" \/> and we will get an output vector of size <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/9f5b8adf1e914ea3c6181a627b355d40.jpg\" style=\"display:block;margin: 0 auto;\" \/>. Just in case, I will describe the procedures step by step:<\/p>\n<p>1) differentiate with respect to <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/2522e823e4dee25af7d0268ea467ad75.jpg\" style=\"display:block;margin: 0 auto;\" \/>, we will obtain: <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/7e89620225eaf5e85348ba0f590ecae1.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>2) differentiate with respect to <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/7e5c21598d060f32fee5bd8c46851799.jpg\" style=\"display:block;margin: 0 auto;\" \/>, we will obtain: <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/e274a91726e02c61ab075625c10373fa.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>3) differentiate with respect to <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/3aab71b33e32b9ce0dee2bcd94c32f14.jpg\" style=\"display:block;margin: 0 auto;\" \/>, we will obtain: <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/abb3d3101af706ea22c98d3cde64dd03.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>On output\u2014the promised vector of size <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/2c50df26519c9627e07598715b132c72.jpg\" style=\"display:block;margin: 0 auto;\" \/>:<\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/2312ff08655bffec14f9b969d984ffc2.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>If we look closely at the vector, we can notice that the left and corresponding right elements of the vector can be grouped in such a way that ultimately, from the presented vector, we can extract a vector <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/c0dfe1a9a170f0893dd698aaf9ba9701.jpg\" style=\"display:block;margin: 0 auto;\" \/> of size <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/a813524108fffe275a91842c79f8bda8.jpg\" style=\"display:block;margin: 0 auto;\" \/>. For example, <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/afdf43758b7923571006e70b1e5de969.jpg\" style=\"display:block;margin: 0 auto;\" \/> (the left element of the top row of the vector) <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/59d90b282c4c6461b19829a1191330d1.jpg\" style=\"display:block;margin: 0 auto;\" \/> (the right element of the top row of the vector) can be represented as <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/4b02117662623ab30edd4f1ea7b1be6c.jpg\" style=\"display:block;margin: 0 auto;\" \/>, and <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/219fe99a3a91a27a630bc99feccb3b55.jpg\" style=\"display:block;margin: 0 auto;\" \/> \u2014 as <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/3179a9d3ec503338de84e5acccc1b4cf.jpg\" style=\"display:block;margin: 0 auto;\" \/> and so on for each row. Let's group them:<\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/07ca35f821e7d5af53d9e0209d007646.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>We will factor out the vector <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/db4e2686a837b8e1c916c267df9faf46.jpg\" style=\"display:block;margin: 0 auto;\" \/> and we will obtain:<\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/54e24819b98dd56d38542e64d977a8bb.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>Now, let's take a closer look at the resulting matrix. The matrix represents the sum of two matrices <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/2676c70f3a1eff48e5fc831a75440194.jpg\" style=\"display:block;margin: 0 auto;\" \/>:<\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/68e49b0efd5cea53f742b7615c77d639.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>Let's remember that some time ago, we pointed out one important property of the matrix <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/78f2e8bc8a9cb907a8317f5859036f71.jpg\" style=\"display:block;margin: 0 auto;\" \/> \u2014 it is symmetric. Based on this property, we can confidently state that the expression <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/60fe7f4b8c34c3dc15fc7c87eb8aaf61.jpg\" style=\"display:block;margin: 0 auto;\" \/> is equal to <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/65f7e5e232d7e3062e17dfbacc979ea7.jpg\" style=\"display:block;margin: 0 auto;\" \/>. This is easy to verify by expanding the matrix multiplication element-wise. <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/d4684c23eba61d9ddf5b05f59cc5b8f8.jpg\" style=\"display:block;margin: 0 auto;\" \/>We won't do this here, those interested can conduct the check themselves. <\/p>\n<p>Let's return to our expression. After our transformations, it turned out just as we wanted to see it:<\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/01349d32efab108cc0208b4ff732f5b4.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>So, we have managed the first differentiation. Now, let's move on to the second expression.<\/p>\n<h3>Differentiation 2<\/h3>\n<p>\n<img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/5774072b36c83a305fd525b0fdffd59b.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>Let's take the beaten path. It will be much shorter than the previous one, so don't stray far from the screen.<\/p>\n<p>Let's break down the vectors and the matrix element by element:<\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/d6f1f2520c683c34c93947fdc1d74c7d.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/a15e0b5d35596a2eb210d4467426ebda.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/6f4f7ebd2f1e9cfa5d5f96c1b5298c3a.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>For now, let's remove the two from the calculations \u2014 it doesn't play a significant role, and we'll put it back later. We'll multiply the vectors by the matrix. First, we will multiply the matrix <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/8f09bef67ae021b46e878b4ae32e122d.jpg\" style=\"display:block;margin: 0 auto;\" \/> by the vector <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/1db14935f79198aebd01b753ff3b697b.jpg\" style=\"display:block;margin: 0 auto;\" \/>, here we have no restrictions. We'll get a vector of size <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/a962a34aa48787f3a5befd3bbfd0ed8c.jpg\" style=\"display:block;margin: 0 auto;\" \/>:<\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/5612d20b4c5523cf0e34c409ba424d0e.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>Next, we will perform the following operation \u2014 multiply the vector <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/6b8566eabdfe892618ca9c26a9ac4faf.jpg\" style=\"display:block;margin: 0 auto;\" \/> by the resulting vector. We will end up with a number:<\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/50698c81b18f0273550fdf34ba6626fd.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>This is what we will differentiate. We will get a vector of dimension <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/73a13a4ef020e6d67551dd2dd66544e0.jpg\" style=\"display:block;margin: 0 auto;\" \/>:<\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/d63b2486e7186c4a7e11d21a769c0aa5.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>Does this remind you of something? That's right! This is the product of the matrix <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/67146a714d3889b5e9fcaf19e7e2407d.jpg\" style=\"display:block;margin: 0 auto;\" \/> by the vector <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/8c3e90abfd5f687c1b5852980c65b0a8.jpg\" style=\"display:block;margin: 0 auto;\" \/>. <\/p>\n<p>Thus, the second differentiation is successfully completed.<\/p>\n<h2>In conclusion<\/h2>\n<p>\nNow we know how the equality was derived <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/8dd8f1dae6629da173b7e71f569a18a1.jpg\" style=\"display:block;margin: 0 auto;\" \/>.<\/p>\n<p>Finally, let's outline a quick way to transform the basic formulas.<\/p>\n<p><b>We will assess the model's quality according to the least squares method:<\/b><br \/>\n<img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/e4f1216018252f75c89bb283dbd165c0.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/18c71ca2156610ab70a7776e0d660560.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><b>Let's differentiate the obtained expression:<\/b><br \/>\n<img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/ef0989a3750d444845d96cd7b4c26568.jpg\" style=\"display:block;margin: 0 auto;\" \/> <img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/2f0788dce58d900c2b11b826943785fb.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><img decoding=\"async\" alt=\"We present the equation of linear regression in matrix form.\" src=\"\/wp-content\/uploads\/2019\/12\/fc6183460bbf00ef4c040502055e032a.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<h2>Literature<\/h2>\n<p>\n<u><b>Internet sources:<\/b><\/u><\/p>\n<p>1) <i><noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/278513\/\">habr.com\/ru\/post\/278513<\/a><\/noindex><\/i><br \/>\n2) <i><noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/ods\/blog\/322076\/\">habr.com\/ru\/company\/ods\/blog\/322076<\/a><\/noindex><\/i><br \/>\n3) <i><noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/307004\/\">habr.com\/ru\/post\/307004<\/a><\/noindex><\/i><br \/>\n4) <i><noindex><a rel=\"nofollow\" href=\"http:\/\/nabatchikov.com\/blog\/view\/matrix_der\">nabatchikov.com\/blog\/view\/matrix_der<\/a><\/noindex><\/i><\/p>\n<p><u><b>Textbooks, problem sets:<\/b><\/u><\/p>\n<p>1) Lecture notes on higher mathematics: complete course \/ D.T. Pismennyi \u2013 4th ed. \u2013 Moscow: Iris-Press, 2006<br \/>\n2) Applied regression analysis \/ N. Draper, G. Smith \u2013 2nd ed. \u2013 Moscow: Finance and Statistics, 1986 (translated from English)<br \/>\n3) Problems on solving matrix equations: <br \/>\n<i><noindex><a rel=\"nofollow\" href=\"https:\/\/function-x.ru\/matrix_equations.html\">function-x.ru\/matrix_equations.html<\/a><\/noindex><br \/>\n<noindex><a rel=\"nofollow\" href=\"http:\/\/mathprofi.ru\/deistviya_s_matricami.html\">mathprofi.ru\/deistviya_s_matricami.html<\/a><\/noindex><\/i><br \/>\n<br \/>Source: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/479398\/\">habr.com<\/a><\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0426\u0435\u043b\u044c \u0441\u0442\u0430\u0442\u044c\u0438 \u2014 \u043e\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u043c \u0434\u0430\u0442\u0430\u0441\u0430\u0439\u043d\u0442\u0438\u0441\u0442\u0430\u043c. \u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043d\u0430 \u043f\u0430\u043b\u044c\u0446\u0430\u0445 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438 \u0442\u0440\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438: \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u044b\u0439 \u0441\u043f\u0443\u0441\u043a, \u0441\u0442\u043e\u0445\u0430\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u044b\u0439 \u0441\u043f\u0443\u0441\u043a. \u0422\u043e\u0433\u0434\u0430 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043c\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0438 \u0444\u043e\u0440\u043c\u0443\u043b\u0443 . \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0437 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430, \u043c\u044b \u043e\u0431\u043e\u0441\u043d\u0443\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u044b \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0435\u0435 \u0432\u044b\u0432\u0435\u0434\u0435\u043c. \u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u0435\u0442 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[702],"tags":[],"class_list":["post-53777","post","type-post","status-publish","format-standard","hentry","category-news"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u0426\u0435\u043b\u044c \u0441\u0442\u0430\u0442\u044c\u0438 \u2014 \u043e\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/en\/blog\/news\/privodim-uravnenie-linejnoj-regressii-v-matrichnyj-vid\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u041f\u0440\u0438\u0432\u043e\u0434\u0438\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u0432 \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u044b\u0439 \u0432\u0438\u0434 | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u0426\u0435\u043b\u044c \u0441\u0442\u0430\u0442\u044c\u0438 \u2014 \u043e\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/en\/blog\/news\/privodim-uravnenie-linejnoj-regressii-v-matrichnyj-vid\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-12-09T21:00:00+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-02-18T11:01:42+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47We bring the linear regression equation into matrix form | ProHoster","description":"The purpose of the article is to provide support.","canonical_url":"https:\/\/prohoster.info\/en\/blog\/news\/privodim-uravnenie-linejnoj-regressii-v-matrichnyj-vid","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u041f\u0440\u0438\u0432\u043e\u0434\u0438\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u0432 \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u044b\u0439 \u0432\u0438\u0434 | ProHoster","og:description":"\u0426\u0435\u043b\u044c \u0441\u0442\u0430\u0442\u044c\u0438 \u2014 \u043e\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438.","og:url":"https:\/\/prohoster.info\/en\/blog\/news\/privodim-uravnenie-linejnoj-regressii-v-matrichnyj-vid","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2019-12-09T21:00:00+00:00","article:modified_time":"2020-02-18T11:01:42+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"53777","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":"2026-01-24 08:43:19","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-02-28 20:18:29","updated":"2026-01-24 08:43:19","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/53777","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/comments?post=53777"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/53777\/revisions"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media?parent=53777"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/categories?post=53777"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/tags?post=53777"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}