{"id":2001,"date":"2019-07-12T11:24:49","date_gmt":"2019-07-12T02:24:49","guid":{"rendered":"https:\/\/www.bi.appi.keio.ac.jp\/?p=2001"},"modified":"2019-07-12T11:24:49","modified_gmt":"2019-07-12T02:24:49","slug":"%e7%89%b9%e7%95%b0%e5%80%a4%e5%88%86%e8%a7%a3","status":"publish","type":"post","link":"https:\/\/www.bi.appi.keio.ac.jp\/?p=2001","title":{"rendered":"\u7279\u7570\u5024\u5206\u89e3"},"content":{"rendered":"\n<p>\u7269\u7406\u60c5\u5831\u6570\u5b66B\u3067\u6271\u3063\u305f\u884c\u5217A\u3092A=U\u03a3V<sup>T<\/sup>\u306b\u7279\u7570\u5024\u5206\u89e3\u3057\u307e\u3059\uff0e<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nA = np.array([[2, 2], [-1, 2]])\n\nU, S, V = np.linalg.svd(A) # V^T\u304cV\u306b\u5165\u308b\u3053\u3068\u306b\u6ce8\u610f\u3059\u308b\nprint(\"\u7279\u7570\u5024\u5206\u89e3\")\nprint(\"U\")\nprint(U)\nprint(\"S\")\nprint(S)\nprint(\"V\")\nprint(V)\nprint(\"USV^T\")\nS2  = np.eye(2)*S\n#\nplt.figure(figsize=(5, 5))\nplt.xlim([-3, 3])\nplt.ylim([-3, 3])\nplt.xlabel('x1')\nplt.ylabel('x2')\nprint(np.dot(np.dot(U, S2), V))\n#\ntheta = np.arange(0, 361, 3)\nuc = np.array([np.cos(theta\/180*np.pi), np.sin(theta\/180*np.pi)])\n#\nprint(\"V\u306e\u5217\u30d9\u30af\u30c8\u30eb\u3068\u5358\u4f4d\u5186\")\nplt.plot(uc[0,:], uc[1,:], color='black', alpha=0.3)\nplt.quiver(0, 0,  V[0, 0], V[0, 1], angles=\"xy\", scale_units='xy', scale=1, color='red')\nplt.quiver(0, 0,  V[1, 0], V[1, 1], angles=\"xy\", scale_units='xy', scale=1, color='blue')\nplt.show()\nx1 = np.dot(V, V.T)\nc1 = np.dot(V, uc)\nprint(\"V\u306e\u5217\u3092V^T\u3067\u5199\u50cf\u3059\u308b\u3000V^TV \u56de\u8ee2\u3068\u93e1\u6620\")\nprint(x1)\nplt.figure(figsize=(5, 5))\nplt.xlim([-3, 3])\nplt.ylim([-3, 3])\nplt.xlabel('x1')\nplt.ylabel('x2')\nplt.plot(c1[0,:], c1[1,:], color='black', alpha=0.3)\nplt.quiver(0, 0,  x1[0, 0], x1[1, 0], angles=\"xy\", scale_units='xy', scale=1, color='red')\nplt.quiver(0, 0,  x1[0, 1], x1[1, 1], angles=\"xy\", scale_units='xy', scale=1, color='blue')\nplt.show()\nprint(\"\u305d\u308c\u3092\u30b7\u30b0\u30de\u3067\u5199\u50cf\u3059\u308b\u3000\u03a3V^TV \u8ef8\u65b9\u5411\u306b\u62e1\u5927\u30fb\u7e2e\u5c0f\uff08\u7279\u7570\u5024\u500d\uff09\u3059\u308b\")\nx2 = np.dot(S2, x1 )\nc2 = np.dot(S2, c1)\nprint(x2)\nplt.figure(figsize=(5, 5))\nplt.xlim([-3, 3])\nplt.ylim([-3, 3])\nplt.xlabel('x1')\nplt.ylabel('x2')\nplt.plot(c2[0,:], c2[1,:], color='black', alpha=0.3)\nplt.quiver(0, 0,  x2[0, 0], x2[1, 0], angles=\"xy\", scale_units='xy', scale=1, color='red')\nplt.quiver(0, 0,  x2[0, 1], x2[1, 1], angles=\"xy\", scale_units='xy', scale=1, color='blue')\nplt.show()\nprint(\"\u6700\u5f8c\u306bU\u3067\u5199\u50cf\u3059\u308b U\u03a3V^TV \u56de\u8ee2\u3068\u93e1\u6620\")\nprint(\"u1\u3068u2\u306e\u03c31\u500d\u3068\u03c32\u500d\u306b\u305d\u308c\u305e\u308c\u91cd\u306a\u308b\")\nx3 = np.dot(U, x2)\nc3 = np.dot(U, c2)\nprint(x3)\nplt.figure(figsize=(5, 5))\nplt.xlim([-3, 3])\nplt.ylim([-3, 3])\nplt.xlabel('x1')\nplt.ylabel('x2')\nplt.plot(c3[0,:], c3[1,:], color='black', alpha=0.3)\nplt.quiver(0, 0,  x3[0, 0], x3[1, 0], angles=\"xy\", scale_units='xy', scale=1, color='red')\nplt.quiver(0, 0,  x3[0, 1], x3[1, 1], angles=\"xy\", scale_units='xy', scale=1, color='blue')\nplt.quiver(0, 0,  S[0]*U[0, 0],  S[0]*U[1, 0], angles=\"xy\", scale_units='xy', scale=1, color='black', alpha=0.3)\nplt.quiver(0, 0,  S[1]*U[0, 1],  S[1]*U[1, 1], angles=\"xy\", scale_units='xy', scale=1, color='black', alpha=0.3)\nplt.show()<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\u7279\u7570\u5024\u5206\u89e3\nU\n[[ 0.89442719  0.4472136 ]\n [ 0.4472136  -0.89442719]]\nS\n[3. 2.]\nV\n[[ 0.4472136   0.89442719]\n [ 0.89442719 -0.4472136 ]]\nUSV^T\n[[ 2.  2.]\n [-1.  2.]]\nV\u306e\u5217\u30d9\u30af\u30c8\u30eb\u3068\u5358\u4f4d\u5186<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"332\" height=\"321\" src=\"https:\/\/www.bi.appi.keio.ac.jp\/wordpress\/wp-content\/uploads\/2019\/07\/v.png\" alt=\"\" class=\"wp-image-2006\" srcset=\"https:\/\/www.bi.appi.keio.ac.jp\/wordpress\/wp-content\/uploads\/2019\/07\/v.png 332w, https:\/\/www.bi.appi.keio.ac.jp\/wordpress\/wp-content\/uploads\/2019\/07\/v-300x290.png 300w\" sizes=\"auto, (max-width: 332px) 85vw, 332px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-preformatted\">V\u306e\u5217\u3092V^T\u3067\u5199\u50cf\u3059\u308b\u3000V^TV \u56de\u8ee2\u3068\u93e1\u6620\n[[ 1.00000000e+00 -2.43158597e-17]\n [-2.43158597e-17  1.00000000e+00]]<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"332\" height=\"321\" src=\"https:\/\/www.bi.appi.keio.ac.jp\/wordpress\/wp-content\/uploads\/2019\/07\/vv.png\" alt=\"\" class=\"wp-image-2008\" srcset=\"https:\/\/www.bi.appi.keio.ac.jp\/wordpress\/wp-content\/uploads\/2019\/07\/vv.png 332w, https:\/\/www.bi.appi.keio.ac.jp\/wordpress\/wp-content\/uploads\/2019\/07\/vv-300x290.png 300w\" sizes=\"auto, (max-width: 332px) 85vw, 332px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-preformatted\">\u305d\u308c\u3092\u30b7\u30b0\u30de\u3067\u5199\u50cf\u3059\u308b\u3000\u03a3V^TV \u8ef8\u65b9\u5411\u306b\u62e1\u5927\u30fb\u7e2e\u5c0f\uff08\u7279\u7570\u5024\u500d\uff09\u3059\u308b\n [[ 3.00000000e+00 -7.29475792e-17]\n  [-4.86317195e-17  2.00000000e+00]]<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"332\" height=\"321\" src=\"https:\/\/www.bi.appi.keio.ac.jp\/wordpress\/wp-content\/uploads\/2019\/07\/el2.png\" alt=\"\" class=\"wp-image-2011\" srcset=\"https:\/\/www.bi.appi.keio.ac.jp\/wordpress\/wp-content\/uploads\/2019\/07\/el2.png 332w, https:\/\/www.bi.appi.keio.ac.jp\/wordpress\/wp-content\/uploads\/2019\/07\/el2-300x290.png 300w\" sizes=\"auto, (max-width: 332px) 85vw, 332px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-preformatted\">\u6700\u5f8c\u306bU\u3067\u5199\u50cf\u3059\u308b U\u03a3V^TV \u56de\u8ee2\u3068\u93e1\u6620 u1\u3068u2\u306e\u03c31\u500d\u3068\u03c32\u500d\u306b\u305d\u308c\u305e\u308c\u91cd\u306a\u308b\n [[ 2.68328157  0.89442719]\n  [ 1.34164079 -1.78885438]]<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"332\" height=\"321\" src=\"https:\/\/www.bi.appi.keio.ac.jp\/wordpress\/wp-content\/uploads\/2019\/07\/el3.png\" alt=\"\" class=\"wp-image-2012\" srcset=\"https:\/\/www.bi.appi.keio.ac.jp\/wordpress\/wp-content\/uploads\/2019\/07\/el3.png 332w, https:\/\/www.bi.appi.keio.ac.jp\/wordpress\/wp-content\/uploads\/2019\/07\/el3-300x290.png 300w\" sizes=\"auto, (max-width: 332px) 85vw, 332px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u7269\u7406\u60c5\u5831\u6570\u5b66B\u3067\u6271\u3063\u305f\u884c\u5217A\u3092A=U\u03a3VT\u306b\u7279\u7570\u5024\u5206\u89e3\u3057\u307e\u3059\uff0e # import numpy as np import matplotlib.pyplot as plt A = np.array([[2, 2], [-1 &hellip; <a href=\"https:\/\/www.bi.appi.keio.ac.jp\/?p=2001\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u7279\u7570\u5024\u5206\u89e3&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-2001","post","type-post","status-publish","format-standard","hentry","category-9"],"_links":{"self":[{"href":"https:\/\/www.bi.appi.keio.ac.jp\/index.php?rest_route=\/wp\/v2\/posts\/2001","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bi.appi.keio.ac.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bi.appi.keio.ac.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bi.appi.keio.ac.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bi.appi.keio.ac.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2001"}],"version-history":[{"count":8,"href":"https:\/\/www.bi.appi.keio.ac.jp\/index.php?rest_route=\/wp\/v2\/posts\/2001\/revisions"}],"predecessor-version":[{"id":2013,"href":"https:\/\/www.bi.appi.keio.ac.jp\/index.php?rest_route=\/wp\/v2\/posts\/2001\/revisions\/2013"}],"wp:attachment":[{"href":"https:\/\/www.bi.appi.keio.ac.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2001"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bi.appi.keio.ac.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2001"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bi.appi.keio.ac.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2001"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}