{"id":1204,"date":"2023-07-27T07:20:18","date_gmt":"2023-07-27T07:20:18","guid":{"rendered":"https:\/\/statorials.org\/ja\/python%e3%81%a6%e3%82%99%e3%81%ae%e3%83%a1%e3%82%a4%e3%83%b3%e3%82%b3%e3%83%b3%e3%83%9b%e3%82%9a%e3%83%bc%e3%83%8d%e3%83%b3%e3%83%88%e3%81%ae%e5%9b%9e%e5%b8%b0\/"},"modified":"2023-07-27T07:20:18","modified_gmt":"2023-07-27T07:20:18","slug":"python%e3%81%a6%e3%82%99%e3%81%ae%e3%83%a1%e3%82%a4%e3%83%b3%e3%82%b3%e3%83%b3%e3%83%9b%e3%82%9a%e3%83%bc%e3%83%8d%e3%83%b3%e3%83%88%e3%81%ae%e5%9b%9e%e5%b8%b0","status":"publish","type":"post","link":"https:\/\/statorials.org\/ja\/python%e3%81%a6%e3%82%99%e3%81%ae%e3%83%a1%e3%82%a4%e3%83%b3%e3%82%b3%e3%83%b3%e3%83%9b%e3%82%9a%e3%83%bc%e3%83%8d%e3%83%b3%e3%83%88%e3%81%ae%e5%9b%9e%e5%b8%b0\/","title":{"rendered":"Python \u3067\u306e\u4e3b\u6210\u5206\u56de\u5e30 (\u30b9\u30c6\u30c3\u30d7\u30d0\u30a4\u30b9\u30c6\u30c3\u30d7)"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\"><em>p<\/em>\u500b\u306e\u4e88\u6e2c\u5b50\u5909\u6570\u306e\u30bb\u30c3\u30c8\u3068\u5fdc\u7b54\u5909\u6570\u304c\u4e0e\u3048\u3089\u308c\u308b\u3068\u3001<a href=\"https:\/\/statorials.org\/ja\/\u91cd\u7dda\u5f62\u56de\u5e30\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u591a\u91cd\u7dda\u5f62\u56de\u5e30\u3067\u306f<\/a>\u6700\u5c0f\u4e8c\u4e57\u6cd5\u3068\u3057\u3066\u77e5\u3089\u308c\u308b\u65b9\u6cd5\u3092\u4f7f\u7528\u3057\u3066\u6b8b\u5dee\u4e8c\u4e57\u548c (RSS) \u3092\u6700\u5c0f\u5316\u3057\u307e\u3059\u3002<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>RSS = \u03a3(y <sub>i<\/sub> \u2013 \u0177 <sub>i<\/sub> ) <sup>2<\/sup><\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">\u91d1\uff1a<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\"><strong>\u03a3<\/strong> : \u548c\u3092\u610f\u5473\u3059\u308b\u30ae\u30ea\u30b7\u30e3\u8a9e\u306e<em>\u8a18\u53f7<\/em><\/span><\/li>\n<li><span style=\"color: #000000;\"><strong>y <sub>i<\/sub><\/strong> : <sup>i \u756a\u76ee\u306e<\/sup>\u89b3\u6e2c\u5024\u306e\u5b9f\u969b\u306e\u5fdc\u7b54\u5024<\/span><\/li>\n<li><span style=\"color: #000000;\"><strong>\u0177 <sub>i<\/sub><\/strong> : \u91cd\u56de\u5e30\u30e2\u30c7\u30eb\u306b\u57fa\u3065\u304f\u4e88\u6e2c\u5fdc\u7b54\u5024<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\">\u305f\u3060\u3057\u3001\u4e88\u6e2c\u5909\u6570\u306e\u76f8\u95a2\u6027\u304c\u9ad8\u3044\u5834\u5408\u3001<\/span> <a href=\"https:\/\/statorials.org\/ja\/\u591a\u91cd\u5171\u7dda\u6027\u56de\u5e30\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u591a\u91cd\u5171\u7dda\u6027\u304c<\/a><span style=\"color: #000000;\">\u554f\u984c\u306b\u306a\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30e2\u30c7\u30eb\u306e\u4fc2\u6570\u63a8\u5b9a\u306e\u4fe1\u983c\u6027\u304c\u4f4e\u304f\u306a\u308a\u3001\u5927\u304d\u306a\u5206\u6563\u304c\u793a\u3055\u308c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u3053\u306e\u554f\u984c\u3092\u56de\u907f\u3059\u308b 1 \u3064\u306e\u65b9\u6cd5\u306f\u3001<a href=\"https:\/\/statorials.org\/ja\/\u4e3b\u6210\u5206\u56de\u5e30\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u4e3b\u6210\u5206\u56de\u5e30<\/a>\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3059\u3002\u3053\u308c\u306f\u3001\u5143\u306e<em>p<\/em>\u500b\u306e\u4e88\u6e2c\u5b50\u306e<em>M \u500b<\/em>\u306e\u7dda\u5f62\u7d50\u5408 (\u300c\u4e3b\u6210\u5206\u300d\u3068\u547c\u3070\u308c\u307e\u3059) \u3092\u898b\u3064\u3051\u3001\u6700\u5c0f\u4e8c\u4e57\u3092\u4f7f\u7528\u3057\u3066\u3001\u4e3b\u6210\u5206\u3092\u4e88\u6e2c\u5b50\u3068\u3057\u3066\u4f7f\u7528\u3057\u3066\u7dda\u5f62\u56de\u5e30\u30e2\u30c7\u30eb\u3092\u8fd1\u4f3c\u3057\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001Python \u3067\u4e3b\u6210\u5206\u56de\u5e30\u3092\u5b9f\u884c\u3059\u308b\u65b9\u6cd5\u306e\u30b9\u30c6\u30c3\u30d7\u30d0\u30a4\u30b9\u30c6\u30c3\u30d7\u306e\u4f8b\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002<\/span><\/p>\n<h3><span style=\"color: #000000;\"><strong>\u30b9\u30c6\u30c3\u30d7 1: \u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b<\/strong><\/span><\/h3>\n<p><span style=\"color: #000000;\"><span style=\"color: #000000;\">\u307e\u305a\u3001Python \u3067\u4e3b\u6210\u5206\u56de\u5e30 (PCR) \u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002<\/span><\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #008000;\">import<\/span> numpy <span style=\"color: #008000;\">as<\/span> np\n<span style=\"color: #008000;\">import<\/span> pandas <span style=\"color: #008000;\">as<\/span> pd\n<span style=\"color: #008000;\">import<\/span> matplotlib. <span style=\"color: #3366ff;\">pyplot<\/span> <span style=\"color: #008000;\">as<\/span> plt\n<span style=\"color: #008000;\">from<\/span> sklearn. <span style=\"color: #3366ff;\">preprocessing<\/span> <span style=\"color: #008000;\">import<\/span> scale \n<span style=\"color: #008000;\">from<\/span> sklearn <span style=\"color: #008000;\">import<\/span> model_selection\n<span style=\"color: #008000;\">from<\/span> sklearn. <span style=\"color: #3366ff;\">model_selection<\/span> <span style=\"color: #008000;\">import<\/span> RepeatedKFold\n<span style=\"color: #008000;\">from<\/span> sklearn.model_selection <span style=\"color: #008000;\">import<\/span> train_test_split\n<span style=\"color: #008000;\">from<\/span> sklearn. PCA <span style=\"color: #008000;\">import<\/span> <span style=\"color: #3366ff;\">decomposition<\/span>\n<span style=\"color: #008000;\">from<\/span> sklearn. <span style=\"color: #3366ff;\">linear_model<\/span> <span style=\"color: #008000;\">import<\/span> LinearRegression\n<span style=\"color: #008000;\">from<\/span> sklearn. <span style=\"color: #3366ff;\">metrics<\/span> <span style=\"color: #008000;\">import<\/span> mean_squared_error\n<\/strong><\/span><\/pre>\n<h3><span style=\"color: #000000;\"><strong>\u30b9\u30c6\u30c3\u30d7 2: \u30c7\u30fc\u30bf\u3092\u30ed\u30fc\u30c9\u3059\u308b<\/strong><\/span><\/h3>\n<p><span style=\"color: #000000;\">\u3053\u306e\u4f8b\u3067\u306f\u300133 \u53f0\u306e\u7570\u306a\u308b\u8eca\u306b\u95a2\u3059\u308b\u60c5\u5831\u304c\u542b\u307e\u308c\u308b<strong>mtcars<\/strong>\u3068\u3044\u3046\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u5fdc\u7b54\u5909\u6570\u3068\u3057\u3066<strong>hp \u3092<\/strong>\u4f7f\u7528\u3057\u3001\u4e88\u6e2c\u5909\u6570\u3068\u3057\u3066\u6b21\u306e\u5909\u6570\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\">mpg<\/span><\/li>\n<li><span style=\"color: #000000;\">\u753b\u9762<\/span><\/li>\n<li><span style=\"color: #000000;\">\u305f\u308f\u3054\u3068<\/span><\/li>\n<li><span style=\"color: #000000;\">\u91cd\u3055<\/span><\/li>\n<li><span style=\"color: #000000;\">qsec<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\"><span style=\"color: #000000;\">\u6b21\u306e\u30b3\u30fc\u30c9\u306f\u3001\u3053\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u30ed\u30fc\u30c9\u3057\u3066\u8868\u793a\u3059\u308b\u65b9\u6cd5\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #008080;\">#define URL where data is located\n<\/span>url = \"https:\/\/raw.githubusercontent.com\/Statorials\/Python-Guides\/main\/mtcars.csv\"\n\n<span style=\"color: #008080;\">#read in data\n<\/span>data_full = pd. <span style=\"color: #3366ff;\">read_csv<\/span> (url)\n\n<span style=\"color: #008080;\">#select subset of data\n<\/span>data = data_full[[\"mpg\", \"disp\", \"drat\", \"wt\", \"qsec\", \"hp\"]]\n\n<span style=\"color: #008080;\">#view first six rows of data\n<\/span>data[0:6]\n\n\n        mpg disp drat wt qsec hp\n0 21.0 160.0 3.90 2.620 16.46 110\n1 21.0 160.0 3.90 2.875 17.02 110\n2 22.8 108.0 3.85 2.320 18.61 93\n3 21.4 258.0 3.08 3.215 19.44 110\n4 18.7 360.0 3.15 3.440 17.02 175\n5 18.1 225.0 2.76 3.460 20.22 105<\/strong><\/span><\/pre>\n<h3><strong>\u30b9\u30c6\u30c3\u30d7 3: PCR \u30e2\u30c7\u30eb\u3092\u8abf\u6574\u3059\u308b<\/strong><\/h3>\n<p><span style=\"color: #000000;\">\u6b21\u306e\u30b3\u30fc\u30c9\u306f\u3001PCR \u30e2\u30c7\u30eb\u3092\u3053\u306e\u30c7\u30fc\u30bf\u306b\u9069\u5408\u3055\u305b\u308b\u65b9\u6cd5\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002\u6b21\u306e\u70b9\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\"><strong>pca.fit_transform(scale(X))<\/strong> : \u3053\u308c\u306f\u3001\u5404\u4e88\u6e2c\u5b50\u5909\u6570\u304c\u5e73\u5747 0\u3001\u6a19\u6e96\u504f\u5dee 1 \u306b\u306a\u308b\u3088\u3046\u306b\u30b9\u30b1\u30fc\u30ea\u30f3\u30b0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3053\u3068\u3092 Python \u306b\u6307\u793a\u3057\u307e\u3059\u3002\u3053\u308c\u304c\u8d77\u3053\u308a\u307e\u3059\u3002\u3055\u307e\u3056\u307e\u306a\u5358\u4f4d\u3067\u6e2c\u5b9a\u3055\u308c\u307e\u3059\u3002<\/span><\/li>\n<li> <span style=\"color: #000000;\"><strong>cv = RepeatedKFold()<\/strong> : \u3053\u308c\u306f\u3001\u30e2\u30c7\u30eb\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u8a55\u4fa1\u3059\u308b\u305f\u3081\u306b<a href=\"https:\/\/statorials.org\/ja\/k-\u5206\u5272\u4ea4\u5dee\u691c\u8a3c\/\" target=\"_blank\" rel=\"noopener noreferrer\">k \u5206\u5272\u76f8\u4e92\u691c\u8a3c<\/a>\u3092\u4f7f\u7528\u3059\u308b\u3088\u3046\u306b Python \u306b\u6307\u793a\u3057\u307e\u3059\u3002\u3053\u306e\u4f8b\u3067\u306f\u3001k = 10 \u306e\u6298\u308a\u3092\u9078\u629e\u3057\u30013 \u56de\u7e70\u308a\u8fd4\u3057\u307e\u3059\u3002<\/span> <\/li>\n<\/ul>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #008080;\">#define predictor and response variables\n<\/span>X = data[[\"mpg\", \"disp\", \"drat\", \"wt\", \"qsec\"]]\ny = data[[\"hp\"]]\n\n<span style=\"color: #008080;\">#scale predictor variables\n<\/span>pca = pca()\nX_reduced = pca. <span style=\"color: #3366ff;\">fit_transform<\/span> ( <span style=\"color: #3366ff;\">scale<\/span> (X))\n\n<span style=\"color: #008080;\">#define cross validation method\n<\/span>cv = RepeatedKFold(n_splits= <span style=\"color: #008000;\">10<\/span> , n_repeats= <span style=\"color: #008000;\">3<\/span> , random_state= <span style=\"color: #008000;\">1<\/span> )\n\nregr = LinearRegression()\nmse = []\n\n<span style=\"color: #008080;\"># Calculate MSE with only the intercept\n<\/span>score = -1*model_selection. <span style=\"color: #3366ff;\">cross_val_score<\/span> (regr,\n           n.p. <span style=\"color: #3366ff;\">ones<\/span> ((len(X_reduced),1)), y, cv=cv,\n           scoring=' <span style=\"color: #008000;\">neg_mean_squared_error<\/span> '). <span style=\"color: #3366ff;\">mean<\/span> ()    \nmse. <span style=\"color: #3366ff;\">append<\/span> (score)\n\n<span style=\"color: #008080;\"># Calculate MSE using cross-validation, adding one component at a time\n<\/span><span style=\"color: #008000;\">for<\/span> i <span style=\"color: #008000;\">in<\/span> np. <span style=\"color: #3366ff;\">arange<\/span> (1, 6):\n    score = -1*model_selection. <span style=\"color: #3366ff;\">cross_val_score<\/span> (regr,\n               X_reduced[:,:i], y, cv=cv, scoring=' <span style=\"color: #008000;\">neg_mean_squared_error<\/span> '). <span style=\"color: #3366ff;\">mean<\/span> ()\n    mse. <span style=\"color: #3366ff;\">append<\/span> (score)\n    \n<span style=\"color: #008080;\"># Plot cross-validation results    \n<\/span>plt. <span style=\"color: #3366ff;\">plot<\/span> (mse)\nplt. <span style=\"color: #3366ff;\">xlabel<\/span> ('Number of Principal Components')\nplt. <span style=\"color: #3366ff;\">ylabel<\/span> ('MSE')\nplt. <span style=\"color: #3366ff;\">title<\/span> ('hp')<\/strong><\/span> <\/pre>\n<h3><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-11950 \" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/pcrpython1.png\" alt=\"Python \u3067\u306e\u4e3b\u6210\u5206\u56de\u5e30\" width=\"424\" height=\"285\" srcset=\"\" sizes=\"auto, \"><\/h3>\n<p><span style=\"color: #000000;\">\u30d7\u30ed\u30c3\u30c8\u3067\u306f\u3001X \u8ef8\u306b\u4e3b\u6210\u5206\u306e\u6570\u304c\u8868\u793a\u3055\u308c\u3001Y \u8ef8\u306b MSE (\u5e73\u5747\u4e8c\u4e57\u8aa4\u5dee) \u691c\u5b9a\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u30b0\u30e9\u30d5\u304b\u3089\u30012 \u3064\u306e\u4e3b\u6210\u5206\u3092\u8ffd\u52a0\u3059\u308b\u3068\u30c6\u30b9\u30c8\u306e MSE \u304c\u6e1b\u5c11\u3057\u307e\u3059\u304c\u30013 \u3064\u4ee5\u4e0a\u306e\u4e3b\u6210\u5206\u3092\u8ffd\u52a0\u3059\u308b\u3068\u5897\u52a0\u3057\u59cb\u3081\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u3057\u305f\u304c\u3063\u3066\u3001\u6700\u9069\u306a\u30e2\u30c7\u30eb\u306b\u306f\u6700\u521d\u306e 2 \u3064\u306e\u4e3b\u6210\u5206\u306e\u307f\u304c\u542b\u307e\u308c\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u6b21\u306e\u30b3\u30fc\u30c9\u3092\u4f7f\u7528\u3057\u3066\u3001\u5404\u4e3b\u6210\u5206\u3092\u30e2\u30c7\u30eb\u306b\u8ffd\u52a0\u3059\u308b\u3053\u3068\u3067\u8aac\u660e\u3055\u308c\u308b\u5fdc\u7b54\u5909\u6570\u306e\u5206\u6563\u306e\u30d1\u30fc\u30bb\u30f3\u30c6\u30fc\u30b8\u3092\u8a08\u7b97\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong>n.p. <span style=\"color: #3366ff;\">cumsum<\/span> (np. <span style=\"color: #3366ff;\">round<\/span> (pca. <span style=\"color: #3366ff;\">explained_variance_ratio_<\/span> , decimals= <span style=\"color: #008000;\">4<\/span> )* <span style=\"color: #008000;\">100<\/span> )\n\narray([69.83, 89.35, 95.88, 98.95, 99.99])\n<\/strong><\/span><\/pre>\n<p><span style=\"color: #000000;\">\u6b21\u306e\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002<\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\">\u6700\u521d\u306e\u4e3b\u6210\u5206\u306e\u307f\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u5fdc\u7b54\u5909\u6570\u306e\u5909\u52d5\u306e<strong>69.83%<\/strong>\u3092\u8aac\u660e\u3067\u304d\u307e\u3059\u3002<\/span><\/li>\n<li><span style=\"color: #000000;\">\u7b2c 2 \u4e3b\u6210\u5206\u3092\u8ffd\u52a0\u3059\u308b\u3053\u3068\u3067\u3001\u5fdc\u7b54\u5909\u6570\u306e\u5909\u52d5\u306e<strong>89.35%<\/strong>\u3092\u8aac\u660e\u3067\u304d\u307e\u3059\u3002<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\">\u3088\u308a\u591a\u304f\u306e\u4e3b\u6210\u5206\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3088\u308a\u591a\u304f\u306e\u5206\u6563\u3092\u8aac\u660e\u3067\u304d\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u305f\u3060\u3057\u30012 \u3064\u4ee5\u4e0a\u306e\u4e3b\u6210\u5206\u3092\u8ffd\u52a0\u3057\u3066\u3082\u3001\u5b9f\u969b\u306b\u306f\u8aac\u660e\u3055\u308c\u308b\u5206\u6563\u306e\u30d1\u30fc\u30bb\u30f3\u30c6\u30fc\u30b8\u306f\u305d\u308c\u307b\u3069\u5897\u52a0\u3057\u306a\u3044\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002<\/span><\/p>\n<h3><span style=\"color: #000000;\"><strong>\u30b9\u30c6\u30c3\u30d7 4: \u6700\u7d42\u30e2\u30c7\u30eb\u3092\u4f7f\u7528\u3057\u3066\u4e88\u6e2c\u3092\u884c\u3046<\/strong><\/span><\/h3>\n<p><span style=\"color: #000000;\">\u6700\u7d42\u7684\u306a 2 \u4e3b\u6210\u5206 PCR \u30e2\u30c7\u30eb\u3092\u4f7f\u7528\u3057\u3066\u3001\u65b0\u3057\u3044\u89b3\u6e2c\u5024\u306b\u3064\u3044\u3066\u306e\u4e88\u6e2c\u3092\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u6b21\u306e\u30b3\u30fc\u30c9\u306f\u3001\u5143\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0 \u30bb\u30c3\u30c8\u3068\u30c6\u30b9\u30c8 \u30bb\u30c3\u30c8\u306b\u5206\u5272\u3057\u30012 \u3064\u306e\u4e3b\u6210\u5206\u3092\u6301\u3064 PCR \u30e2\u30c7\u30eb\u3092\u4f7f\u7528\u3057\u3066\u30c6\u30b9\u30c8 \u30bb\u30c3\u30c8\u3067\u4e88\u6e2c\u3092\u884c\u3046\u65b9\u6cd5\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #008080;\">#split the dataset into training (70%) and testing (30%) sets\n<\/span>X_train,X_test,y_train,y_test = <span style=\"color: #3366ff;\">train_test_split<\/span> (X,y,test_size= <span style=\"color: #008000;\">0.3<\/span> , random_state= <span style=\"color: #008000;\">0<\/span> ) \n\n<span style=\"color: #008080;\">#scale the training and testing data\n<\/span>X_reduced_train = pca. <span style=\"color: #3366ff;\">fit_transform<\/span> ( <span style=\"color: #3366ff;\">scale<\/span> (X_train))\nX_reduced_test = pca. <span style=\"color: #3366ff;\">transform<\/span> ( <span style=\"color: #3366ff;\">scale<\/span> (X_test))[:,:1]\n\n<span style=\"color: #008080;\">#train PCR model on training data \n<\/span>regr = LinearRegression()\nreg. <span style=\"color: #3366ff;\">fit<\/span> (X_reduced_train[:,:1], y_train)\n\n<span style=\"color: #008080;\">#calculate RMSE\n<\/span>pred = regr. <span style=\"color: #3366ff;\">predict<\/span> (X_reduced_test)\nn.p. <span style=\"color: #3366ff;\">sqrt<\/span> ( <span style=\"color: #3366ff;\">mean_squared_error<\/span> (y_test, pred))\n\n40.2096\n<\/strong><\/span><\/pre>\n<p> <span style=\"color: #000000;\">RMSE \u30c6\u30b9\u30c8\u306e\u7d50\u679c\u304c<strong>40.2096<\/strong>\u3067\u3042\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002\u3053\u308c\u306f\u3001\u30c6\u30b9\u30c8 \u30bb\u30c3\u30c8\u306e\u89b3\u6e2c\u5024\u306e\u4e88\u6e2c<em>hp<\/em>\u5024\u3068\u89b3\u6e2c\u3055\u308c\u305f<em>hp<\/em>\u5024\u306e\u9593\u306e\u5e73\u5747\u504f\u5dee\u3067\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u3053\u306e\u4f8b\u3067\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u5b8c\u5168\u306a Python \u30b3\u30fc\u30c9\u306f\u3001 <a href=\"https:\/\/github.com\/Statorials\/Python-Guides\/blob\/main\/principal_components_regression.py\" target=\"_blank\" rel=\"noopener noreferrer\">\u3053\u3053\u306b<\/a>\u3042\u308a\u307e\u3059\u3002<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>p\u500b\u306e\u4e88\u6e2c\u5b50\u5909\u6570\u306e\u30bb\u30c3\u30c8\u3068\u5fdc\u7b54\u5909\u6570\u304c\u4e0e\u3048\u3089\u308c\u308b\u3068\u3001\u591a\u91cd\u7dda\u5f62\u56de\u5e30\u3067\u306f\u6700\u5c0f\u4e8c\u4e57\u6cd5\u3068\u3057\u3066\u77e5\u3089\u308c\u308b\u65b9\u6cd5\u3092\u4f7f\u7528\u3057\u3066\u6b8b\u5dee\u4e8c\u4e57\u548c (RSS) \u3092\u6700\u5c0f\u5316\u3057\u307e\u3059\u3002 RSS = \u03a3(y i \u2013 \u0177 i ) 2 \u91d1\uff1a \u03a3 : \u548c\u3092\u610f\u5473\u3059\u308b\u30ae\u30ea [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-1204","post","type-post","status-publish","format-standard","hentry","category-16"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Python \u3067\u306e\u4e3b\u6210\u5206\u56de\u5e30 (\u30b9\u30c6\u30c3\u30d7\u30d0\u30a4\u30b9\u30c6\u30c3\u30d7)<\/title>\n<meta name=\"description\" content=\"\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001Python \u3067\u4e3b\u6210\u5206\u56de\u5e30\u3092\u5b9f\u884c\u3059\u308b\u65b9\u6cd5\u3092\u3001\u30b9\u30c6\u30c3\u30d7\u30d0\u30a4\u30b9\u30c6\u30c3\u30d7\u306e\u4f8b\u3092\u542b\u3081\u3066\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/statorials.org\/ja\/python\u3066\u3099\u306e\u30e1\u30a4\u30f3\u30b3\u30f3\u30db\u309a\u30fc\u30cd\u30f3\u30c8\u306e\u56de\u5e30\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python \u3067\u306e\u4e3b\u6210\u5206\u56de\u5e30 (\u30b9\u30c6\u30c3\u30d7\u30d0\u30a4\u30b9\u30c6\u30c3\u30d7)\" \/>\n<meta property=\"og:description\" content=\"\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001Python \u3067\u4e3b\u6210\u5206\u56de\u5e30\u3092\u5b9f\u884c\u3059\u308b\u65b9\u6cd5\u3092\u3001\u30b9\u30c6\u30c3\u30d7\u30d0\u30a4\u30b9\u30c6\u30c3\u30d7\u306e\u4f8b\u3092\u542b\u3081\u3066\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/ja\/python\u3066\u3099\u306e\u30e1\u30a4\u30f3\u30b3\u30f3\u30db\u309a\u30fc\u30cd\u30f3\u30c8\u306e\u56de\u5e30\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-27T07:20:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/pcrpython1.png\" \/>\n<meta name=\"author\" content=\"\u30d9\u30f3\u30b8\u30e3\u30df\u30f3\u30fb\u30a2\u30f3\u30c0\u30fc\u30bd\u30f3\u535a\u58eb\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u30d9\u30f3\u30b8\u30e3\u30df\u30f3\u30fb\u30a2\u30f3\u30c0\u30fc\u30bd\u30f3\u535a\u58eb\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"2\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/statorials.org\/ja\/python%e3%81%a6%e3%82%99%e3%81%ae%e3%83%a1%e3%82%a4%e3%83%b3%e3%82%b3%e3%83%b3%e3%83%9b%e3%82%9a%e3%83%bc%e3%83%8d%e3%83%b3%e3%83%88%e3%81%ae%e5%9b%9e%e5%b8%b0\/\",\"url\":\"https:\/\/statorials.org\/ja\/python%e3%81%a6%e3%82%99%e3%81%ae%e3%83%a1%e3%82%a4%e3%83%b3%e3%82%b3%e3%83%b3%e3%83%9b%e3%82%9a%e3%83%bc%e3%83%8d%e3%83%b3%e3%83%88%e3%81%ae%e5%9b%9e%e5%b8%b0\/\",\"name\":\"Python \u3067\u306e\u4e3b\u6210\u5206\u56de\u5e30 (\u30b9\u30c6\u30c3\u30d7\u30d0\u30a4\u30b9\u30c6\u30c3\u30d7)\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/ja\/#website\"},\"datePublished\":\"2023-07-27T07:20:18+00:00\",\"dateModified\":\"2023-07-27T07:20:18+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/ja\/#\/schema\/person\/86b92d2dd87368b26360d19d9c6a5d83\"},\"description\":\"\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001Python \u3067\u4e3b\u6210\u5206\u56de\u5e30\u3092\u5b9f\u884c\u3059\u308b\u65b9\u6cd5\u3092\u3001\u30b9\u30c6\u30c3\u30d7\u30d0\u30a4\u30b9\u30c6\u30c3\u30d7\u306e\u4f8b\u3092\u542b\u3081\u3066\u8aac\u660e\u3057\u307e\u3059\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/ja\/python%e3%81%a6%e3%82%99%e3%81%ae%e3%83%a1%e3%82%a4%e3%83%b3%e3%82%b3%e3%83%b3%e3%83%9b%e3%82%9a%e3%83%bc%e3%83%8d%e3%83%b3%e3%83%88%e3%81%ae%e5%9b%9e%e5%b8%b0\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/ja\/python%e3%81%a6%e3%82%99%e3%81%ae%e3%83%a1%e3%82%a4%e3%83%b3%e3%82%b3%e3%83%b3%e3%83%9b%e3%82%9a%e3%83%bc%e3%83%8d%e3%83%b3%e3%83%88%e3%81%ae%e5%9b%9e%e5%b8%b0\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/ja\/python%e3%81%a6%e3%82%99%e3%81%ae%e3%83%a1%e3%82%a4%e3%83%b3%e3%82%b3%e3%83%b3%e3%83%9b%e3%82%9a%e3%83%bc%e3%83%8d%e3%83%b3%e3%83%88%e3%81%ae%e5%9b%9e%e5%b8%b0\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u5bb6\",\"item\":\"https:\/\/statorials.org\/ja\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python \u3067\u306e\u4e3b\u6210\u5206\u56de\u5e30 (\u30b9\u30c6\u30c3\u30d7\u30d0\u30a4\u30b9\u30c6\u30c3\u30d7)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/statorials.org\/ja\/#website\",\"url\":\"https:\/\/statorials.org\/ja\/\",\"name\":\"Statorials\",\"description\":\"\u7d71\u8a08\u80fd\u529b\u3078\u306e\u30ac\u30a4\u30c9\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/statorials.org\/ja\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"ja\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/statorials.org\/ja\/#\/schema\/person\/86b92d2dd87368b26360d19d9c6a5d83\",\"name\":\"\u30d9\u30f3\u30b8\u30e3\u30df\u30f3\u30fb\u30a2\u30f3\u30c0\u30fc\u30bd\u30f3\u535a\u58eb\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/statorials.org\/ja\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/statorials.org\/ja\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"contentUrl\":\"http:\/\/statorials.org\/ja\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"caption\":\"\u30d9\u30f3\u30b8\u30e3\u30df\u30f3\u30fb\u30a2\u30f3\u30c0\u30fc\u30bd\u30f3\u535a\u58eb\"},\"description\":\"\u79c1\u306f\u30d9\u30f3\u30b8\u30e3\u30df\u30f3\u3067\u3059\u3002\u9000\u8077\u3057\u305f\u7d71\u8a08\u6559\u6388\u304b\u3089\u3001\u5c02\u4efb\u306e Statorials \u6559\u80b2\u8005\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u7d71\u8a08\u5206\u91ce\u306b\u304a\u3051\u308b\u8c4a\u5bcc\u306a\u7d4c\u9a13\u3068\u5c02\u9580\u77e5\u8b58\u3092\u6d3b\u304b\u3057\u3066\u3001\u79c1\u306f Statorials \u3092\u901a\u3058\u3066\u5b66\u751f\u306b\u529b\u3092\u4e0e\u3048\u308b\u305f\u3081\u306b\u81ea\u5206\u306e\u77e5\u8b58\u3092\u5171\u6709\u3059\u308b\u3053\u3068\u306b\u5c3d\u529b\u3057\u3066\u3044\u307e\u3059\u3002\u3082\u3063\u3068\u77e5\u308b\",\"sameAs\":[\"http:\/\/statorials.org\/ja\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python \u3067\u306e\u4e3b\u6210\u5206\u56de\u5e30 (\u30b9\u30c6\u30c3\u30d7\u30d0\u30a4\u30b9\u30c6\u30c3\u30d7)","description":"\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001Python \u3067\u4e3b\u6210\u5206\u56de\u5e30\u3092\u5b9f\u884c\u3059\u308b\u65b9\u6cd5\u3092\u3001\u30b9\u30c6\u30c3\u30d7\u30d0\u30a4\u30b9\u30c6\u30c3\u30d7\u306e\u4f8b\u3092\u542b\u3081\u3066\u8aac\u660e\u3057\u307e\u3059\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/statorials.org\/ja\/python\u3066\u3099\u306e\u30e1\u30a4\u30f3\u30b3\u30f3\u30db\u309a\u30fc\u30cd\u30f3\u30c8\u306e\u56de\u5e30\/","og_locale":"ja_JP","og_type":"article","og_title":"Python \u3067\u306e\u4e3b\u6210\u5206\u56de\u5e30 (\u30b9\u30c6\u30c3\u30d7\u30d0\u30a4\u30b9\u30c6\u30c3\u30d7)","og_description":"\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001Python \u3067\u4e3b\u6210\u5206\u56de\u5e30\u3092\u5b9f\u884c\u3059\u308b\u65b9\u6cd5\u3092\u3001\u30b9\u30c6\u30c3\u30d7\u30d0\u30a4\u30b9\u30c6\u30c3\u30d7\u306e\u4f8b\u3092\u542b\u3081\u3066\u8aac\u660e\u3057\u307e\u3059\u3002","og_url":"https:\/\/statorials.org\/ja\/python\u3066\u3099\u306e\u30e1\u30a4\u30f3\u30b3\u30f3\u30db\u309a\u30fc\u30cd\u30f3\u30c8\u306e\u56de\u5e30\/","og_site_name":"Statorials","article_published_time":"2023-07-27T07:20:18+00:00","og_image":[{"url":"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/pcrpython1.png"}],"author":"\u30d9\u30f3\u30b8\u30e3\u30df\u30f3\u30fb\u30a2\u30f3\u30c0\u30fc\u30bd\u30f3\u535a\u58eb","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"\u30d9\u30f3\u30b8\u30e3\u30df\u30f3\u30fb\u30a2\u30f3\u30c0\u30fc\u30bd\u30f3\u535a\u58eb","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"2\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/statorials.org\/ja\/python%e3%81%a6%e3%82%99%e3%81%ae%e3%83%a1%e3%82%a4%e3%83%b3%e3%82%b3%e3%83%b3%e3%83%9b%e3%82%9a%e3%83%bc%e3%83%8d%e3%83%b3%e3%83%88%e3%81%ae%e5%9b%9e%e5%b8%b0\/","url":"https:\/\/statorials.org\/ja\/python%e3%81%a6%e3%82%99%e3%81%ae%e3%83%a1%e3%82%a4%e3%83%b3%e3%82%b3%e3%83%b3%e3%83%9b%e3%82%9a%e3%83%bc%e3%83%8d%e3%83%b3%e3%83%88%e3%81%ae%e5%9b%9e%e5%b8%b0\/","name":"Python \u3067\u306e\u4e3b\u6210\u5206\u56de\u5e30 (\u30b9\u30c6\u30c3\u30d7\u30d0\u30a4\u30b9\u30c6\u30c3\u30d7)","isPartOf":{"@id":"https:\/\/statorials.org\/ja\/#website"},"datePublished":"2023-07-27T07:20:18+00:00","dateModified":"2023-07-27T07:20:18+00:00","author":{"@id":"https:\/\/statorials.org\/ja\/#\/schema\/person\/86b92d2dd87368b26360d19d9c6a5d83"},"description":"\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001Python \u3067\u4e3b\u6210\u5206\u56de\u5e30\u3092\u5b9f\u884c\u3059\u308b\u65b9\u6cd5\u3092\u3001\u30b9\u30c6\u30c3\u30d7\u30d0\u30a4\u30b9\u30c6\u30c3\u30d7\u306e\u4f8b\u3092\u542b\u3081\u3066\u8aac\u660e\u3057\u307e\u3059\u3002","breadcrumb":{"@id":"https:\/\/statorials.org\/ja\/python%e3%81%a6%e3%82%99%e3%81%ae%e3%83%a1%e3%82%a4%e3%83%b3%e3%82%b3%e3%83%b3%e3%83%9b%e3%82%9a%e3%83%bc%e3%83%8d%e3%83%b3%e3%83%88%e3%81%ae%e5%9b%9e%e5%b8%b0\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/ja\/python%e3%81%a6%e3%82%99%e3%81%ae%e3%83%a1%e3%82%a4%e3%83%b3%e3%82%b3%e3%83%b3%e3%83%9b%e3%82%9a%e3%83%bc%e3%83%8d%e3%83%b3%e3%83%88%e3%81%ae%e5%9b%9e%e5%b8%b0\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/ja\/python%e3%81%a6%e3%82%99%e3%81%ae%e3%83%a1%e3%82%a4%e3%83%b3%e3%82%b3%e3%83%b3%e3%83%9b%e3%82%9a%e3%83%bc%e3%83%8d%e3%83%b3%e3%83%88%e3%81%ae%e5%9b%9e%e5%b8%b0\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u5bb6","item":"https:\/\/statorials.org\/ja\/"},{"@type":"ListItem","position":2,"name":"Python \u3067\u306e\u4e3b\u6210\u5206\u56de\u5e30 (\u30b9\u30c6\u30c3\u30d7\u30d0\u30a4\u30b9\u30c6\u30c3\u30d7)"}]},{"@type":"WebSite","@id":"https:\/\/statorials.org\/ja\/#website","url":"https:\/\/statorials.org\/ja\/","name":"Statorials","description":"\u7d71\u8a08\u80fd\u529b\u3078\u306e\u30ac\u30a4\u30c9","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/statorials.org\/ja\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"ja"},{"@type":"Person","@id":"https:\/\/statorials.org\/ja\/#\/schema\/person\/86b92d2dd87368b26360d19d9c6a5d83","name":"\u30d9\u30f3\u30b8\u30e3\u30df\u30f3\u30fb\u30a2\u30f3\u30c0\u30fc\u30bd\u30f3\u535a\u58eb","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/statorials.org\/ja\/#\/schema\/person\/image\/","url":"http:\/\/statorials.org\/ja\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","contentUrl":"http:\/\/statorials.org\/ja\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","caption":"\u30d9\u30f3\u30b8\u30e3\u30df\u30f3\u30fb\u30a2\u30f3\u30c0\u30fc\u30bd\u30f3\u535a\u58eb"},"description":"\u79c1\u306f\u30d9\u30f3\u30b8\u30e3\u30df\u30f3\u3067\u3059\u3002\u9000\u8077\u3057\u305f\u7d71\u8a08\u6559\u6388\u304b\u3089\u3001\u5c02\u4efb\u306e Statorials \u6559\u80b2\u8005\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u7d71\u8a08\u5206\u91ce\u306b\u304a\u3051\u308b\u8c4a\u5bcc\u306a\u7d4c\u9a13\u3068\u5c02\u9580\u77e5\u8b58\u3092\u6d3b\u304b\u3057\u3066\u3001\u79c1\u306f Statorials \u3092\u901a\u3058\u3066\u5b66\u751f\u306b\u529b\u3092\u4e0e\u3048\u308b\u305f\u3081\u306b\u81ea\u5206\u306e\u77e5\u8b58\u3092\u5171\u6709\u3059\u308b\u3053\u3068\u306b\u5c3d\u529b\u3057\u3066\u3044\u307e\u3059\u3002\u3082\u3063\u3068\u77e5\u308b","sameAs":["http:\/\/statorials.org\/ja"]}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"_links":{"self":[{"href":"https:\/\/statorials.org\/ja\/wp-json\/wp\/v2\/posts\/1204","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/statorials.org\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/statorials.org\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/statorials.org\/ja\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/statorials.org\/ja\/wp-json\/wp\/v2\/comments?post=1204"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/ja\/wp-json\/wp\/v2\/posts\/1204\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/ja\/wp-json\/wp\/v2\/media?parent=1204"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/ja\/wp-json\/wp\/v2\/categories?post=1204"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/ja\/wp-json\/wp\/v2\/tags?post=1204"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}