{"id":291111,"date":"2018-10-21T12:15:02","date_gmt":"2018-10-21T08:15:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=291111"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=291111","title":{"rendered":"How linear algebra is applied in machine learning"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\n<p>When you study an abstract subject like linear algebra, you may wonder: why do you need all these vectors and matrices? How are you going to apply all this inversions, transpositions, eigenvector and eigenvalues for practical purposes? <\/p>\n<p>  <\/p>\n<p>Well, if you study linear algebra with the purpose of doing machine learning, this is the answer for you.<\/p>\n<p>  <\/p>\n<p>In brief, you can use linear algebra for machine learning on 3 different levels: <\/p>\n<p>  <\/p>\n<ul>\n<li>application of a model to data; <\/li>\n<li>training the model;<\/li>\n<li>understanding how it works or why it does not work. <\/li>\n<\/ul>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/5z\/k4\/gv\/5zk4gvfp1-n9idkuljitjrn2qqk.jpeg\" alt=\"drawing\" width=\"400\"><a name=\"habracut\"><\/a>  <\/p>\n<p>I assume that you, the reader, have at least a vague idea of <a href=\"https:\/\/en.wikipedia.org\/wiki\/Linear_algebra\">linear algebra<\/a> concepts (such as vectors, matrices, their products, inverse matrices, eigenvectors and eigenvalues), and <a href=\"https:\/\/en.wikipedia.org\/wiki\/Machine_learning\">machine learning<\/a> problems (such as regression, classification and dimensionality reduction). If not, maybe now it&#8217;s a good time to read about them in Wikipedia, or even signup for a MOOC on these subjects.<\/p>\n<p>  <\/p>\n<h3 id=\"application\">Application<\/h3>\n<p>  <\/p>\n<p>What machine learning usually does is fitting some function <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/262\/2de\/f07\/2622def072f325a9595066b097bc5dec.svg\" alt=\"$f_W(X)=H$\" data-tex=\"inline\"><\/math>, where <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6d6\/a4f\/78f\/6d6a4f78fbacd6edecc018ce8ad3e364.svg\" alt=\"$X$\" data-tex=\"inline\"><\/math> is the input data, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bd2\/36a\/859\/bd236a859d121c85d92d1acf80ba3597.svg\" alt=\"$H$\" data-tex=\"inline\"><\/math> is some useful representation of this data, and <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6e5\/abb\/15e\/6e5abb15e29d1257aebb0838e6251398.svg\" alt=\"$W$\" data-tex=\"inline\"><\/math> are additional parameters, on which our function depends and which have to be learned. When we have this representation <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bd2\/36a\/859\/bd236a859d121c85d92d1acf80ba3597.svg\" alt=\"$H$\" data-tex=\"inline\"><\/math>, we can use it e.g. to reconstruct the original data <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6d6\/a4f\/78f\/6d6a4f78fbacd6edecc018ce8ad3e364.svg\" alt=\"$X$\" data-tex=\"inline\"><\/math> (as in unsupervised learning), or to predict some value of interest, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c62\/ff2\/5ef\/c62ff25ef4caeaeaef7122a489ef9d07.svg\" alt=\"$Y$\" data-tex=\"inline\"><\/math> (as in supervised learning).<\/p>\n<p>  <\/p>\n<p>All of <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6d6\/a4f\/78f\/6d6a4f78fbacd6edecc018ce8ad3e364.svg\" alt=\"$X$\" data-tex=\"inline\"><\/math>, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bd2\/36a\/859\/bd236a859d121c85d92d1acf80ba3597.svg\" alt=\"$H$\" data-tex=\"inline\"><\/math>, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6e5\/abb\/15e\/6e5abb15e29d1257aebb0838e6251398.svg\" alt=\"$W$\" data-tex=\"inline\"><\/math> and <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c62\/ff2\/5ef\/c62ff25ef4caeaeaef7122a489ef9d07.svg\" alt=\"$Y$\" data-tex=\"inline\"><\/math> are usually numeric arrays, and can be at least stored as vectors and matrices. But storage alone is not important. The important thing is that our function <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/12a\/b92\/a58\/12ab92a586fb3d91b2b9c1e1ca0dc58c.svg\" alt=\"$f$\" data-tex=\"inline\"><\/math> is often linear, that is, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/25e\/169\/c9d\/25e169c9debdd86efbe3785f2575be6f.svg\" alt=\"$H=XW$\" data-tex=\"inline\"><\/math>. Examples of such linear algorithms are:<\/p>\n<p>  <\/p>\n<ul>\n<li>linear regression, where <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e06\/f94\/e4b\/e06f94e4bb69b89d45ec3af36d4065b8.svg\" alt=\"$Y=H$\" data-tex=\"inline\"><\/math>. It is a sensible baseline for regression problems, and a popular tool for answering questions like &#171;does <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/817\/b92\/407\/817b92407f764f57af9226e50cc788fd.svg\" alt=\"$x$\" data-tex=\"inline\"><\/math> affect <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9b3\/4c4\/da5\/9b34c4da5c757d4982bbd1b6f2e8998a.svg\" alt=\"$y$\" data-tex=\"inline\"><\/math>, other things being equal?&#187;<\/li>\n<li>logistic regression, where <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/df4\/ced\/188\/df4ced1889ea99b309a08ea19948ba13.svg\" alt=\"$Y=softmax(H)$\" data-tex=\"inline\"><\/math>. It is a good baseline for classification problems, and sometimes this baseline is difficult to beat. <\/li>\n<li>principal component analysis, where <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bd2\/36a\/859\/bd236a859d121c85d92d1acf80ba3597.svg\" alt=\"$H$\" data-tex=\"inline\"><\/math> is just a low-dimensional representation of high-dimensional <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6d6\/a4f\/78f\/6d6a4f78fbacd6edecc018ce8ad3e364.svg\" alt=\"$X$\" data-tex=\"inline\"><\/math>, from which <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6d6\/a4f\/78f\/6d6a4f78fbacd6edecc018ce8ad3e364.svg\" alt=\"$X$\" data-tex=\"inline\"><\/math> can be restored with high precision. You can think of it as a compression algorithm. <\/li>\n<li>Other PCA-like algorithms (matrix decompositions) are widely used in recommender systems, to turn a very sparce matrix of &#171;which products were purchased by which users&#187; into compact and dense representations of users and products, that can be further used to predict new transactions. <\/li>\n<\/ul>\n<p>  <\/p>\n<p>Other algorithms, like neural network, learn nonlinear transformations, but still rely heavily on linear operations (that is, matrix-matrix or matrix-vector multiplication). A simple neural network may look like <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/25b\/3ab\/3db\/25b3ab3db924aab2a52a708b5278325b.svg\" alt=\"$Y=\\sigma(W_2\\sigma(W_1X))$\" data-tex=\"inline\"><\/math> \u2014 it uses two matrix multiplications, and a nonlinear transformation <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bd2\/53a\/dd0\/bd253add01b6a626f79861899c5e7d73.svg\" alt=\"$\\sigma$\" data-tex=\"inline\"><\/math> between them. <\/p>\n<p>  <\/p>\n<h3 id=\"training\">Training<\/h3>\n<p>  <\/p>\n<p>To train an algorithm, you usually define a loss function and try to optimize it. The loss itself is sometimes convenient to write in terms of linear algebra. For example, the quadratic loss (used in the least squares method) can be written as a dot product <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/aee\/bb0\/112\/aeebb0112abd9073852da78f56f415a5.svg\" alt=\"$(Y-\\hat{Y})^T(Y-\\hat{Y})$\" data-tex=\"inline\"><\/math>, where <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/b7a\/03f\/e22\/b7a03fe229a7202e943b4cc3b079efd7.svg\" alt=\"$\\hat{Y}$\" data-tex=\"inline\"><\/math> is the vector of your prediction, and <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c62\/ff2\/5ef\/c62ff25ef4caeaeaef7122a489ef9d07.svg\" alt=\"$Y$\" data-tex=\"inline\"><\/math> is the ground truth you try to predict. This representation is useful, because it enables us to derive ways to minimize this loss. For example, if you use linear regression with this least squares method, then your optimal solution looks like <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/399\/bf6\/737\/399bf6737d920f383ef99fb2f2cce8bc.svg\" alt=\"$W=(X^TX)^{-1}X^TY$\" data-tex=\"inline\"><\/math>. Lots of linear operations in one place!<\/p>\n<p>  <\/p>\n<p>Another example of linear solution is PCA, where the parameters of interest <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6e5\/abb\/15e\/6e5abb15e29d1257aebb0838e6251398.svg\" alt=\"$W$\" data-tex=\"inline\"><\/math> are the first <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/16d\/a50\/7b2\/16da507b2fc389688ef0659939dcc647.svg\" alt=\"$k$\" data-tex=\"inline\"><\/math> eigenvectors of the matrix <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/702\/7e7\/3b9\/7027e73b9ee54743fabd5cdaa6ba7ad8.svg\" alt=\"$X^TX$\" data-tex=\"inline\"><\/math>, corresponding to the largest eigenvalues. <\/p>\n<p>  <\/p>\n<p>If you train neural networks, there is usually no analytical solution for the optimal parameters, and you have to use gradient descent. To do this, you need to differentiate the loss w.r.t. the parameters, and it while doing so, you again have to multiply matrices, because if <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/28b\/e54\/f51\/28be54f51caaf61a54352d2bef8c0bd0.svg\" alt=\"$loss=f(g(h(w)))$\" data-tex=\"inline\"><\/math> (a composite function), then <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0f4\/a7a\/b8b\/0f4a7ab8bfac32a984c5b1f6895c3bde.svg\" alt=\"$\\frac{\\partial loss}{\\partial w} = f' \\times g' \\times h'$\" data-tex=\"inline\"><\/math>, and all these derivatives are matrices or vectors, because <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bdb\/a74\/99b\/bdba7499baaa2899811e34409321d6eb.svg\" alt=\"$g$\" data-tex=\"inline\"><\/math> and <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/517\/4f4\/9cc\/5174f49cc4f41fc5c4802c76f4c76c5a.svg\" alt=\"$h$\" data-tex=\"inline\"><\/math> are multidimensional. <\/p>\n<p>  <\/p>\n<p>Simple gradient descent is OK, but it is slow. You can speed it up, by applying Newtonian optimization methods. The basic method is <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/69c\/6dc\/b92\/69c6dcb92f7611d60fb884b8dcc44978.svg\" alt=\"$W_{t+1}=W_t - A^{-1}B$\" data-tex=\"inline\"><\/math>, where <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/20d\/8ca\/ec6\/20d8caec693d8d8eaf70885e408419f6.svg\" alt=\"$B$\" data-tex=\"inline\"><\/math> and <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/493\/c1c\/008\/493c1c008018df9bed4910321f29ff00.svg\" alt=\"$A$\" data-tex=\"inline\"><\/math> are are the vector of first derivatives and the matrix of the second derivatives of your loss w.r.t. the parameters <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6e5\/abb\/15e\/6e5abb15e29d1257aebb0838e6251398.svg\" alt=\"$W$\" data-tex=\"inline\"><\/math>. But it can be unstable and\/or computationally expensive, and you may need to come up with its approximations (like L-BFGS) that use even more involved linear algebra for quick and cheap optimization. <\/p>\n<p>  <\/p>\n<h3 id=\"analysis\">Analysis<\/h3>\n<p>  <\/p>\n<p>You see that linear algebra helps you to apply and to train your models. But the real science (or magic) starts when your model refuses to train or predict well. The learning may get stuck at a bad point, or suddenly go wild. In deep learning, it often happens due to vanishing or exploding gradients. That is, whey you calculate the gradient, you multiply lots of matrices, and then strange things happen, and you need to know what, why, and how to overcome it. One of the ways to inspect what is happening is to keep track of the eigenvalues of the matrices you are trying to invert. If they are close to 0, or just very different, then the inversion of this matrix can lead to unstable results. If you multiply many matrices with large eigenvalues, the product explodes. When these eigenvalues are small, the result fades to zero.<\/p>\n<p>  <\/p>\n<p>Different techniques, like L1\/L2 regularization, batch normalization, and LSTM were invented in order to fight these problems with convergence. If you want to apply any of those techniques, you need a way to measure whether they help much for your particular problem. And if you want to invent such a technique yourself, you need a way to prove that it can work at all. This again involves lots of manipulation with vectors, matrices, their decompositions, etc. <\/p>\n<p>  <\/p>\n<h3 id=\"conclusion\">Conclusion<\/h3>\n<p>  <\/p>\n<p>You can see that the deeper you dive into machine learning, the more linear algebra you see there. To apply pre-trained models, you have to at least convert your data into a format, compatible with linear algebra (e.g. <code>numpy.array<\/code> in Python). If you need to implement a training algorithm, or even to invent a new one, be prepared to multiply, invert, and decompose lots of matrices. <\/p>\n<p>  <\/p>\n<p>In this text, I have referenced some concepts you may be unfamiliar with. It&#8217;s okay. What this article encourages you is to search for the unknown words and enlarge your horizons. <\/p>\n<p>  <\/p>\n<p>By the way, it would be interesting to hear some stories from you in the comments, about how you encountered applications of linear algebra in your own job or study.<\/p>\n<p>  <\/p>\n<p>P.S. In <a href=\"http:\/\/habr.com\/post\/347084\/\">one of my articles<\/a>, I argued that you don&#8217;t have to learn maths in order to become successful (it&#8217;s still a popular stereotype in Russia), even if you work in IT. However, I never said that maths is useless (otherwise, I wouldn&#8217;t be teaching it all the time). Usually it is not the key to success, but in many cases, it helps, and in a few (like developing deep learning models), it is essential. <\/p>\n<p>  <\/p>\n<p>P.P.S. <em>\u041f\u043e\u0447\u0435\u043c\u0443 \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c?!<\/em> \u041d\u0443 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043c\u043e\u0433\u0443. \u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u043c\u043d\u0435 \u0437\u0430\u0434\u0430\u043b\u0438 \u043d\u0430 \u044d\u0442\u043e\u043c \u044f\u0437\u044b\u043a\u0435, \u0438 \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c \u0436\u0435 \u044f \u043d\u0430 \u043d\u0435\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0438\u043b. \u0410 \u043f\u043e\u0442\u043e\u043c \u0440\u0435\u0448\u0438\u043b, \u0447\u0442\u043e \u043e\u0442\u0432\u0435\u0442 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0432\u0435\u0441\u0442\u0438 \u0434\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0439 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u044e\u0448\u043a\u0438.<br \/>  <em>\u041f\u043e\u0447\u0435\u043c\u0443 \u0442\u043e\u0433\u0434\u0430 \u0425\u0430\u0431\u0440, \u0430 \u043d\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u041c\u0435\u0434\u0438\u0443\u043c?<\/em> \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u041c\u0435\u0434\u0438\u0443\u043c\u0430, \u0442\u0443\u0442 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043d\u044b \u0444\u043e\u0440\u043c\u0443\u043b\u044b. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0425\u0430\u0431\u0440 \u0432\u0440\u043e\u0434\u0435 \u0441\u0430\u043c \u0441\u043e\u0431\u0438\u0440\u0430\u043b\u0441\u044f \u0432\u044b\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0430 \u043c\u0435\u0436\u0434\u0443\u043d\u0430\u0440\u043e\u0434\u043d\u044b\u0435 \u0440\u044b\u043d\u043a\u0438 \u2014 \u0442\u0430\u043a \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u043d\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0442\u0443\u0442 \u043a\u0443\u0441\u043e\u0447\u0435\u043a \u0430\u043d\u0433\u043b\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430?<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f.<\/p>\n<\/div>\n<p>        <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/post\/427185\/\"> https:\/\/habr.com\/post\/427185\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\n<p>When you study an abstract subject like linear algebra, you may wonder: why do you need all these vectors and matrices? How are you going to apply all this inversions, transpositions, eigenvector and eigenvalues for practical purposes? <\/p>\n<p>  <\/p>\n<p>Well, if you study linear algebra with the purpose of doing machine learning, this is the answer for you.<\/p>\n<p>  <\/p>\n<p>In brief, you can use linear algebra for machine learning on 3 different levels: <\/p>\n<p>  <\/p>\n<ul>\n<li>application of a model to data; <\/li>\n<li>training the model;<\/li>\n<li>understanding how it works or why it does not work. <\/li>\n<\/ul>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/5z\/k4\/gv\/5zk4gvfp1-n9idkuljitjrn2qqk.jpeg\" alt=\"drawing\" width=\"400\"><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-291111","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/291111","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=291111"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/291111\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=291111"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=291111"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=291111"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}