{"id":521,"date":"2023-07-29T15:29:02","date_gmt":"2023-07-29T15:29:02","guid":{"rendered":"https:\/\/statorials.org\/cn\/%e5%a6%82%e4%bd%95%e5%9c%a8-r-%e4%b8%ad%e5%af%b9%e6%a8%a1%e5%9e%8b%e6%80%a7%e8%83%bd%e8%bf%9b%e8%a1%8c%e4%ba%a4%e5%8f%89%e9%aa%8c%e8%af%81\/"},"modified":"2023-07-29T15:29:02","modified_gmt":"2023-07-29T15:29:02","slug":"%e5%a6%82%e4%bd%95%e5%9c%a8-r-%e4%b8%ad%e5%af%b9%e6%a8%a1%e5%9e%8b%e6%80%a7%e8%83%bd%e8%bf%9b%e8%a1%8c%e4%ba%a4%e5%8f%89%e9%aa%8c%e8%af%81","status":"publish","type":"post","link":"https:\/\/statorials.org\/cn\/%e5%a6%82%e4%bd%95%e5%9c%a8-r-%e4%b8%ad%e5%af%b9%e6%a8%a1%e5%9e%8b%e6%80%a7%e8%83%bd%e8%bf%9b%e8%a1%8c%e4%ba%a4%e5%8f%89%e9%aa%8c%e8%af%81\/","title":{"rendered":"\u5982\u4f55\u5728 r \u4e2d\u4ea4\u53c9\u9a8c\u8bc1\u6a21\u578b\u6027\u80fd"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\">\u5728\u7edf\u8ba1\u5b66\u4e2d\uff0c\u6211\u4eec\u7ecf\u5e38\u6784\u5efa\u6a21\u578b\u6709\u4e24\u4e2a\u539f\u56e0\uff1a<\/span><\/p>\n<ul>\n<li>\u4e86\u89e3\u4e00\u4e2a\u6216\u591a\u4e2a\u9884\u6d4b\u53d8\u91cf\u4e0e<span style=\"color: #000000;\">\u54cd\u5e94\u53d8\u91cf<\/span><span style=\"color: #000000;\">\u4e4b\u95f4\u7684\u5173\u7cfb<\/span>\u3002<\/li>\n<li><span style=\"color: #000000;\">\u4f7f\u7528\u6a21\u578b\u6765\u9884\u6d4b\u672a\u6765\u7684\u89c2\u5bdf\u7ed3\u679c\u3002<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\"><strong>\u4ea4\u53c9\u9a8c\u8bc1<\/strong>\u5bf9\u4e8e\u4f30\u8ba1\u6a21\u578b\u9884\u6d4b\u672a\u6765\u89c2\u5bdf\u7ed3\u679c\u7684\u80fd\u529b\u975e\u5e38\u6709\u7528\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u4ee5\u6784\u5efa\u4e00\u4e2a<a href=\"https:\/\/statorials.org\/cn\/\u7edf\u8ba1\u5b66\u4ee5\u7b80\u5355\u76f4\u63a5\u7684\u65b9\u5f0f\u89e3\u91ca\u6982\u5ff5\uff0c\u6211\u4eec\u4f7f\u5b66\u4e60\u7edf\u8ba1\u53d8\u5f97\u66f4\u5bb9\u6613\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u591a\u5143\u7ebf\u6027\u56de\u5f52\u6a21\u578b<\/a><\/span><span style=\"color: #000000;\">\uff0c\u4f7f\u7528<em>\u5e74\u9f84<\/em>\u548c<em>\u6536\u5165<\/em>\u4f5c\u4e3a\u9884\u6d4b\u53d8\u91cf\uff0c<em>\u9ed8\u8ba4\u72b6\u6001\u4f5c\u4e3a<\/em>\u54cd\u5e94\u53d8\u91cf\u3002<\/span><span style=\"color: #000000;\">\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u5c06\u6a21\u578b\u62df\u5408\u5230\u6570\u636e\u96c6\uff0c\u7136\u540e\u4f7f\u7528\u8be5\u6a21\u578b\u6839\u636e<\/span><span style=\"color: #000000;\">\u65b0\u7533\u8bf7\u4eba\u7684\u6536\u5165\u548c\u5e74\u9f84\u6765\u9884\u6d4b\u4ed6\u4eec\u62d6\u6b20\u8d37\u6b3e\u7684\u53ef\u80fd\u6027\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u4e3a\u4e86\u786e\u5b9a\u6a21\u578b\u662f\u5426\u5177\u6709\u5f88\u5f3a\u7684\u9884\u6d4b\u80fd\u529b\uff0c\u6211\u4eec\u9700\u8981\u7528\u5b83\u6765\u5bf9\u5b83<\/span><span style=\"color: #000000;\">\u4ee5\u524d\u4ece\u672a\u89c1\u8fc7\u7684\u6570\u636e\u8fdb\u884c\u9884\u6d4b\u3002\u8fd9\u5c06\u4f7f\u6211\u4eec\u80fd\u591f\u4f30\u8ba1\u6a21\u578b\u7684<strong>\u9884\u6d4b\u8bef\u5dee<\/strong>\u3002<\/span><\/p>\n<h2><strong><span style=\"color: #000000;\">\u4f7f\u7528\u4ea4\u53c9\u9a8c\u8bc1\u6765\u4f30\u8ba1\u9884\u6d4b\u8bef\u5dee<\/span><\/strong><\/h2>\n<p><span style=\"color: #000000;\"><strong>\u4ea4\u53c9\u9a8c\u8bc1<\/strong>\u662f\u6307\u6211\u4eec\u4f30\u8ba1\u9884\u6d4b\u8bef\u5dee\u7684\u4e0d\u540c\u65b9\u6cd5\u3002<\/span><span style=\"color: #000000;\">\u4ea4\u53c9\u9a8c\u8bc1<\/span><span style=\"color: #000000;\">\u7684\u4e00\u822c\u65b9\u6cd5<\/span>\u662f\uff1a<\/p>\n<p> <span style=\"color: #000000;\"><strong>1.<\/strong>\u5728\u6570\u636e\u96c6\u4e2d\u7559\u51fa\u4e00\u5b9a\u6570\u91cf\u7684\u89c2\u6d4b\u503c\u2014\u2014\u901a\u5e38\u5360\u6240\u6709\u89c2\u6d4b\u503c\u7684 15-25%\u3002<\/span><br \/> <span style=\"color: #000000;\"><strong>2.<\/strong>\u6839\u636e\u6211\u4eec\u5728\u6570\u636e\u96c6\u4e2d\u4fdd\u5b58\u7684\u89c2\u5bdf\u7ed3\u679c\u62df\u5408\uff08\u6216\u201c\u8bad\u7ec3\u201d\uff09\u6a21\u578b\u3002<\/span><br \/> <span style=\"color: #000000;\"><strong>3.<\/strong>\u6d4b\u8bd5\u6a21\u578b\u5bf9\u6211\u4eec\u672a\u7528\u4e8e\u8bad\u7ec3\u6a21\u578b\u7684\u89c2\u5bdf\u7ed3\u679c\u8fdb\u884c\u9884\u6d4b\u7684\u80fd\u529b\u3002<\/span><\/p>\n<h2><span style=\"color: #000000;\"><strong>\u8861\u91cf\u6a21\u578b\u7684\u8d28\u91cf<\/strong><\/span><\/h2>\n<p><span style=\"color: #000000;\">\u5f53\u6211\u4eec\u4f7f\u7528\u62df\u5408\u6a21\u578b\u5bf9\u65b0\u89c2\u6d4b\u503c\u8fdb\u884c\u9884\u6d4b\u65f6\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u51e0\u79cd\u4e0d\u540c\u7684\u6307\u6807\u6765\u8861\u91cf\u6a21\u578b\u7684\u8d28\u91cf\uff0c\u5305\u62ec\uff1a<\/span><\/p>\n<p><span style=\"color: #000000;\"><strong>\u591a\u91cd R \u5e73\u65b9\uff1a<\/strong>\u8861\u91cf\u9884\u6d4b\u53d8\u91cf\u548c\u54cd\u5e94\u53d8\u91cf\u4e4b\u95f4\u7ebf\u6027\u5173\u7cfb\u7684\u5f3a\u5ea6<\/span><span style=\"color: #000000;\">\u3002 R \u5e73\u65b9\u500d\u6570\u4e3a 1 \u8868\u793a\u5b8c\u7f8e\u7ebf\u6027\u5173\u7cfb\uff0c\u800c<\/span><span style=\"color: #000000;\">R \u5e73\u65b9\u500d\u6570\u4e3a 0 \u8868\u793a\u6ca1\u6709\u7ebf\u6027\u5173\u7cfb\u3002 R \u5e73\u65b9\u500d\u6570\u8d8a\u9ad8\uff0c\u9884\u6d4b\u53d8\u91cf\u9884\u6d4b\u54cd\u5e94\u53d8\u91cf\u7684\u53ef\u80fd\u6027\u5c31\u8d8a\u5927\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\"><strong>\u5747\u65b9\u6839\u8bef\u5dee (RMSE)\uff1a<\/strong>\u6d4b\u91cf\u6a21\u578b\u5728\u9884\u6d4b<\/span><span style=\"color: #000000;\">\u65b0\u89c2\u6d4b\u503c\u65f6\u4ea7\u751f\u7684\u5e73\u5747\u9884\u6d4b\u8bef\u5dee\u3002\u8fd9\u662f\u89c2\u6d4b\u503c\u7684\u771f\u5b9e\u503c\u4e0e\u6a21\u578b\u9884\u6d4b\u503c\u4e4b\u95f4\u7684\u5e73\u5747\u8ddd\u79bb\u3002<\/span> <span style=\"color: #000000;\">RMSE<\/span>\u503c<span style=\"color: #000000;\">\u8d8a\u4f4e<\/span>\u8868\u660e\u6a21\u578b\u62df\u5408\u8d8a\u597d\u3002<\/p>\n<p><span style=\"color: #000000;\"><strong>\u5e73\u5747\u7edd\u5bf9\u8bef\u5dee (MAE)\uff1a<\/strong>\u8fd9\u662f\u89c2\u6d4b\u503c\u7684\u771f\u5b9e\u503c\u4e0e\u6a21\u578b\u9884\u6d4b\u503c\u4e4b\u95f4\u7684\u5e73\u5747\u7edd\u5bf9\u5dee\u3002<\/span><span style=\"color: #000000;\">\u8be5\u6307\u6807\u901a\u5e38\u5bf9\u5f02\u5e38\u503c\u7684\u654f\u611f\u5ea6\u4f4e\u4e8e RMSE\u3002 MAE \u503c\u8d8a\u4f4e\u8868\u793a\u6a21\u578b\u62df\u5408\u8d8a\u597d\u3002<\/span><\/p>\n<h2><span style=\"color: #000000;\"><strong>\u5728 R \u4e2d\u5b9e\u73b0\u56db\u79cd\u4e0d\u540c\u7684\u4ea4\u53c9\u9a8c\u8bc1\u6280\u672f<\/strong><\/span><\/h2>\n<p><span style=\"color: #000000;\">\u7136\u540e\u6211\u4eec\u5c06\u89e3\u91ca\u5982\u4f55\u5728 R \u4e2d\u5b9e\u73b0\u4ee5\u4e0b\u4ea4\u53c9\u9a8c\u8bc1\u6280\u672f\uff1a<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>1.<\/strong>\u9a8c\u8bc1\u96c6\u65b9\u6cd5<\/span><br \/><span style=\"color: #000000;\"><strong>2.<\/strong> k\u6298\u4ea4\u53c9\u9a8c\u8bc1<\/span><br \/><span style=\"color: #000000;\"><strong>3.<\/strong>\u629b\u5f00\u4ea4\u53c9\u9a8c\u8bc1<\/span><br \/><span style=\"color: #000000;\"><strong>4.<\/strong>\u91cd\u590dk\u6298\u4ea4\u53c9\u9a8c\u8bc1<\/span><\/p>\n<p><span style=\"color: #000000;\">\u4e3a\u4e86\u8bf4\u660e\u5982\u4f55\u4f7f\u7528\u8fd9\u4e9b\u4e0d\u540c\u7684\u6280\u672f\uff0c\u6211\u4eec\u5c06\u4f7f\u7528<em>mtcars<\/em>\u5185\u7f6e R \u6570\u636e\u96c6\u7684\u5b50\u96c6\uff1a<\/span><\/p>\n<pre style=\"background-color: #e5e5e5; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#define dataset\n<\/span>data &lt;- mtcars[, c(\"mpg\", \"disp\", \"hp\", \"drat\")]\n\n<span style=\"color: #008080;\">#view first six rows of new data\n<\/span>head(data)\n\n# mpg disp hp drat\n#Mazda RX4 21.0 160 110 3.90\n#Mazda RX4 Wag 21.0 160 110 3.90\n#Datsun 710 22.8 108 93 3.85\n#Hornet 4 Drive 21.4 258 110 3.08\n#Hornet Sportabout 18.7 360 175 3.15\n#Valiant 18.1 225 105 2.76\n<\/strong><\/pre>\n<p>\u6211\u4eec\u5c06\u4f7f\u7528 disp \u3001 hp \u548c drat \u4f5c\u4e3a\u9884\u6d4b\u53d8\u91cf\uff0c\u5e76\u4f7f\u7528 mpg<span style=\"color: #000000;\">\u4f5c\u4e3a\u54cd\u5e94\u53d8\u91cf\u6765<\/span><span style=\"color: #000000;\"><em>\u6784\u5efa<\/em><em>\u591a\u5143<\/em><em>\u7ebf\u6027<\/em><em>\u56de\u5f52<\/em>\u6a21\u578b<\/span>\u3002<\/p>\n<h2><strong><span style=\"color: #000000;\">\u9a8c\u8bc1\u96c6\u65b9\u6cd5<\/span><\/strong><\/h2>\n<p><span style=\"color: #000000;\"><strong>\u9a8c\u8bc1\u96c6\u65b9\u6cd5\u7684<\/strong>\u5de5\u4f5c\u539f\u7406\u5982\u4e0b\uff1a<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>1.<\/strong>\u5c06\u6570\u636e\u5206\u4e3a\u4e24\u7ec4\uff1a\u4e00\u7ec4\u7528\u4e8e\u8bad\u7ec3\u6a21\u578b\uff08\u5373\u4f30\u8ba1\u6a21\u578b\u53c2\u6570\uff09<\/span> <span style=\"color: #000000;\">\uff0c\u53e6\u4e00\u7ec4\u7528\u4e8e\u6d4b\u8bd5\u6a21\u578b\u3002\u4e00\u822c\u60c5\u51b5\u4e0b\uff0c\u968f\u673a\u9009\u62e9<\/span><span style=\"color: #000000;\">70-80%\u7684\u6570\u636e\u751f\u6210\u8bad\u7ec3\u96c6\uff0c\u5269\u4e0b\u768420-30%\u7684\u6570\u636e\u4f5c\u4e3a\u6d4b\u8bd5\u96c6\u3002<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>2.<\/strong>\u4f7f\u7528\u8bad\u7ec3\u6570\u636e\u96c6\u521b\u5efa\u6a21\u578b\u3002<\/span><br \/> <span style=\"color: #000000;\"><strong>3.<\/strong>\u4f7f\u7528\u6a21\u578b\u5bf9\u6d4b\u8bd5\u96c6\u6570\u636e\u8fdb\u884c\u9884\u6d4b\u3002<\/span><br \/> <span style=\"color: #000000;\"><strong>4.<\/strong>\u4f7f\u7528 R \u5e73\u65b9\u3001RMSE \u548c MAE \u7b49\u6307\u6807\u8861\u91cf\u6a21\u578b\u8d28\u91cf\u3002<\/span><\/p>\n<h3><strong><span style=\"color: #000000;\">\u4f8b\u5b50\uff1a<\/span><\/strong><\/h3>\n<p><span style=\"color: #000000;\">\u4ee5\u4e0b\u793a\u4f8b\u4f7f\u7528\u6211\u4eec\u4e0a\u9762\u5b9a\u4e49\u7684\u6570\u636e\u96c6\u3002\u9996\u5148\uff0c\u6211\u4eec\u5c06\u6570\u636e\u5206\u4e3a<\/span><br \/><span style=\"color: #000000;\">\u4e00\u4e2a\u8bad\u7ec3\u96c6\u548c\u4e00\u4e2a\u6d4b\u8bd5\u96c6\uff0c\u4f7f\u752880%\u7684\u6570\u636e\u4f5c\u4e3a\u8bad\u7ec3\u96c6\uff0c\u5269\u4f5920%\u7684\u6570\u636e<\/span><span style=\"color: #000000;\">\u4f5c\u4e3a\u6d4b\u8bd5\u96c6\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u4f7f\u7528\u8bad\u7ec3\u96c6\u6784\u5efa\u6a21\u578b<\/span><span style=\"color: #000000;\">\u3002\u7136\u540e\u6211\u4eec\u4f7f\u7528\u8be5\u6a21\u578b\u5bf9\u6d4b\u8bd5\u96c6\u8fdb\u884c\u9884\u6d4b\u3002<\/span>\u6700\u540e\uff0c\u6211\u4eec<span style=\"color: #000000;\">\u4f7f\u7528 R \u5e73\u65b9\u3001RMSE \u548c MAE \u6765<\/span><span style=\"color: #000000;\">\u8861\u91cf\u6a21\u578b\u7684\u8d28\u91cf<\/span>\u3002<\/p>\n<pre style=\"background-color: #e5e5e5; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#load <em>dplyr<\/em> library used for data manipulation\n<\/span>library(dplyr)\n\n<span style=\"color: #008080;\">#load <em>caret<\/em> library used for partitioning data into training and test set\n<\/span>library(caret)\n\n<span style=\"color: #008080;\">#make this example reproducible\n<\/span>set.seed(0)\n\n<span style=\"color: #008080;\">#define the dataset\n<\/span>data &lt;- mtcars[, c(\"mpg\", \"disp\", \"hp\", \"drat\")]\n\n<span style=\"color: #008080;\">#split the dataset into a training set (80%) and test set (20%).\n<\/span>training_obs &lt;- data$mpg %&gt;% createDataPartition(p = 0.8, list = FALSE)\n\ntrain &lt;- data[training_obs, ]\ntest &lt;- data[-training_obs, ]\n\n<span style=\"color: #008080;\"># Build the linear regression model on the training set\n<\/span>model &lt;- lm(mpg ~ ., data = train)\n\n<span style=\"color: #008080;\"># Use the model to make predictions on the test set\n<\/span>predictions &lt;- model %&gt;% predict(test)\n\n<span style=\"color: #008080;\">#Examine R-squared, RMSE, and MAE of predictions\n<\/span>data.frame(R_squared = R2(predictions, test$mpg),\n           RMSE = RMSE(predictions, test$mpg),\n           MAE = MAE(predictions, test$mpg))\n\n#R_squared RMSE MAE\n#1 0.9213066 1.876038 1.66614\n<\/strong><\/pre>\n<p><span style=\"color: #000000;\">\u6bd4\u8f83\u4e0d\u540c\u7684\u6a21\u578b\u65f6\uff0c\u5728\u6d4b\u8bd5\u96c6\u4e0a\u4ea7\u751f\u6700\u4f4e RMSE \u7684\u6a21\u578b\u662f\u9996\u9009\u6a21\u578b\u3002<\/span><\/p>\n<h3><span style=\"color: #000000;\"><strong>\u8fd9\u79cd\u65b9\u6cd5\u7684\u4f18\u70b9\u548c\u7f3a\u70b9<\/strong><\/span><\/h3>\n<p><span style=\"color: #000000;\">\u9a8c\u8bc1\u96c6\u65b9\u6cd5\u7684\u4f18\u70b9\u662f\u7b80\u5355\u4e14\u8ba1\u7b97\u6548\u7387\u9ad8\u3002\u7f3a\u70b9<\/span><span style=\"color: #000000;\">\u662f\u8be5\u6a21\u578b\u4ec5\u4f7f\u7528\u5168\u90e8\u6570\u636e\u7684\u4e00\u90e8\u5206\u6765\u6784\u5efa\u3002\u5982\u679c\u6211\u4eec\u4ece\u8bad\u7ec3\u96c6\u4e2d\u9057\u6f0f\u7684\u6570\u636e<\/span><span style=\"color: #000000;\">\u5305\u542b\u6709\u8da3\u6216\u6709\u4ef7\u503c\u7684\u4fe1\u606f\uff0c\u5219\u6a21\u578b\u5c06\u4e0d\u4f1a\u8003\u8651\u5b83\u3002<\/span><\/p>\n<h2> <span style=\"color: #000000;\"><strong>k\u6298\u4ea4\u53c9\u9a8c\u8bc1\u65b9\u6cd5<\/strong><\/span><\/h2>\n<p><span style=\"color: #000000;\"><strong>k \u6298\u4ea4\u53c9\u9a8c\u8bc1\u65b9\u6cd5\u7684<\/strong>\u5de5\u4f5c\u539f\u7406\u5982\u4e0b\uff1a<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>1.<\/strong>\u5c06\u6570\u636e\u968f\u673a\u5206\u4e3a k \u4e2a\u201c\u6298\u53e0\u201d\u6216\u5b50\u96c6\uff08\u4f8b\u5982 5 \u6216 10 \u4e2a\u5b50\u96c6\uff09\u3002<\/span><br \/> <span style=\"color: #000000;\"><strong>2.<\/strong>\u5728\u6240\u6709\u6570\u636e\u4e0a\u8bad\u7ec3\u6a21\u578b\uff0c\u4ec5\u4fdd\u7559\u4e00\u4e2a\u5b50\u96c6\u3002<\/span><br \/> <span style=\"color: #000000;\"><strong>3.<\/strong>\u4f7f\u7528\u6a21\u578b\u5bf9\u9057\u6f0f\u5b50\u96c6\u4e2d\u7684\u6570\u636e\u8fdb\u884c\u9884\u6d4b\u3002<\/span><br \/> <span style=\"color: #000000;\"><strong>4.<\/strong>\u91cd\u590d\u6b64\u8fc7\u7a0b\uff0c\u76f4\u5230 k \u4e2a\u5b50\u96c6\u4e2d\u7684\u6bcf\u4e00\u4e2a\u90fd\u5df2\u7528\u4f5c\u6d4b\u8bd5\u96c6\u3002<\/span><br \/> <span style=\"color: #000000;\"><strong>5<\/strong> .\u901a\u8fc7\u5e73\u5747 k \u4e2a\u6d4b\u8bd5\u8bef\u5dee\u6765\u8861\u91cf\u6a21\u578b\u7684\u8d28\u91cf\u3002\u8fd9\u662f\u5df2\u77e5\u7684<\/span><br \/><span style=\"color: #000000;\">\u4f5c\u4e3a\u4ea4\u53c9\u9a8c\u8bc1\u9519\u8bef\u3002<\/span><\/p>\n<h3><strong><span style=\"color: #000000;\">\u4f8b\u5b50<\/span><\/strong><\/h3>\n<p><span style=\"color: #000000;\">\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u9996\u5148\u5c06\u6570\u636e\u5206\u4e3a<\/span><span style=\"color: #000000;\">5 \u4e2a\u5b50\u96c6\u3002\u7136\u540e\uff0c\u6211\u4eec\u4f7f\u7528\u9664\u6570\u636e\u5b50\u96c6\u4e4b\u5916\u7684\u6240\u6709\u6570\u636e\u6765\u62df\u5408\u6a21\u578b\u3002<\/span>\u7136\u540e\u6211\u4eec\u4f7f\u7528\u8be5\u6a21\u578b<span style=\"color: #000000;\">\u5bf9\u9057\u6f0f\u7684\u5b50\u96c6<\/span><span style=\"color: #000000;\">\u8fdb\u884c<\/span>\u9884\u6d4b\u5e76\u8bb0\u5f55\u6d4b\u8bd5\u8bef\u5dee\uff08\u4f7f\u7528 R \u5e73\u65b9\u3001RMSE \u548c MAE\uff09\u3002<span style=\"color: #000000;\">\u6211\u4eec<\/span><span style=\"color: #000000;\">\u91cd\u590d\u8fd9\u4e2a\u8fc7\u7a0b\uff0c\u76f4\u5230\u6bcf\u4e2a\u5b50\u96c6\u90fd\u88ab\u7528\u4f5c\u6d4b\u8bd5\u96c6\u3002\u7136\u540e\u6211\u4eec\u7b80\u5355\u8ba1\u7b975\u6b21\u6d4b\u8bd5\u8bef\u5dee\u7684\u5e73\u5747\u503c<\/span><span style=\"color: #000000;\">\u3002<\/span><\/p>\n<pre style=\"background-color: #e5e5e5; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#load <em>dplyr<\/em> library used for data manipulation\n<\/span>library(dplyr)\n\n<span style=\"color: #008080;\">#load <em>caret<\/em> library used for partitioning data into training and test set\n<\/span>library(caret)\n\n<span style=\"color: #008080;\">#make this example reproducible\n<\/span>set.seed(0)\n\n<span style=\"color: #008080;\">#define the dataset\n<\/span>data &lt;- mtcars[, c(\"mpg\", \"disp\", \"hp\", \"drat\")]\n\n<span style=\"color: #008080;\">#define the number of subsets (or \"folds\") to use\n<\/span>train_control &lt;- trainControl(method = \"cv\", number = 5)\n\n<span style=\"color: #008080;\">#train the model\n<\/span>model &lt;- train(mpg ~ ., data = data, method = \"lm\", trControl = train_control)\n\n<span style=\"color: #008080;\">#Summarize the results\n<\/span>print(model)\n\n#Linear Regression \n#\n#32 samples\n#3 predictor\n#\n#No pre-processing\n#Resampling: Cross-Validated (5 fold) \n#Summary of sample sizes: 26, 25, 26, 25, 26 \n#Resampling results:\n#\n# RMSE Rsquared MAE     \n#3.095501 0.7661981 2.467427\n#\n#Tuning parameter 'intercept' was held constant at a value of TRUE\n<\/strong><\/pre>\n<h3><strong><span style=\"color: #000000;\">\u8fd9\u79cd\u65b9\u6cd5\u7684\u4f18\u70b9\u548c\u7f3a\u70b9<\/span><\/strong><\/h3>\n<p><span style=\"color: #000000;\">k \u6298\u4ea4\u53c9\u9a8c\u8bc1\u65b9\u6cd5\u76f8\u5bf9\u4e8e\u9a8c\u8bc1\u96c6\u65b9\u6cd5\u7684\u4f18\u70b9\u5728\u4e8e\uff0c\u5b83\u6bcf\u6b21\u4f7f\u7528\u4e0d\u540c\u7684\u6570\u636e\u6765\u591a\u6b21\u6784\u5efa\u6a21\u578b<\/span>\uff0c\u56e0\u6b64\u6211\u4eec\u5728\u6784\u5efa<span style=\"color: #000000;\">\u6a21\u578b<\/span><span style=\"color: #000000;\">\u65f6\u4e0d\u5fc5\u6709\u673a\u4f1a\u9057\u6f0f\u91cd\u8981\u6570\u636e<\/span>\u3002<\/p>\n<p>\u8be5\u65b9\u6cd5\u7684\u4e3b\u89c2\u90e8\u5206\u662f\u9009\u62e9 k \u7684\u503c\uff0c\u5373\u5c06<span style=\"color: #000000;\">\u6570\u636e<\/span><span style=\"color: #000000;\">\u5212\u5206\u4e3a\u5b50\u96c6\u7684\u6570\u91cf<\/span>\u3002<span style=\"color: #000000;\">\u4e00\u822c\u6765\u8bf4\uff0c\u8f83\u4f4e\u7684 k \u503c\u5bfc\u81f4\u8f83\u9ad8\u7684\u504f\u5dee\u4f46\u8f83\u4f4e\u7684\u53d8\u5f02\u6027\uff0c\u800c\u8f83\u9ad8\u7684 k \u503c<\/span><span style=\"color: #000000;\">\u5bfc\u81f4\u8f83\u4f4e\u7684\u504f\u5dee\u4f46\u8f83\u9ad8\u7684\u53d8\u5f02\u6027\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u5728\u5b9e\u8df5\u4e2d\uff0ck\u901a\u5e38\u9009\u62e9\u7b49\u4e8e5\u621610\uff0c\u56e0\u4e3a\u8fd9\u4e2a\u6570\u91cf\u7684<\/span><span style=\"color: #000000;\">\u5b50\u96c6\u5f80\u5f80\u4f1a\u540c\u65f6\u907f\u514d\u592a\u591a\u7684\u504f\u5dee\u548c\u592a\u591a\u7684\u53ef\u53d8\u6027\u3002<\/span><\/p>\n<h2><span style=\"color: #000000;\"><strong>\u7559\u4e00\u4ea4\u53c9\u9a8c\u8bc1 (LOOCV) \u65b9\u6cd5<\/strong><\/span><\/h2>\n<p><span style=\"color: #000000;\"><strong>LOOCV \u65b9\u6cd5\u7684<\/strong>\u5de5\u4f5c\u539f\u7406\u5982\u4e0b\uff1a<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>1.<\/strong>\u4f7f\u7528\u6570\u636e\u96c6\u4e2d\u9664\u4e00\u4e2a\u89c2\u6d4b\u503c\u4e4b\u5916\u7684\u6240\u6709\u89c2\u6d4b\u503c\u6784\u5efa\u6a21\u578b\u3002<\/span><br \/> <span style=\"color: #000000;\"><strong>2.<\/strong>\u4f7f\u7528\u6a21\u578b\u9884\u6d4b\u7f3a\u5931\u89c2\u6d4b\u503c\u7684\u503c\u3002\u8bb0\u5f55\u6d4b\u8bd5\u8be5\u9884\u6d4b\u7684\u8bef\u5dee\u3002<\/span><br \/> <span style=\"color: #000000;\"><strong>3.<\/strong>\u5bf9\u6570\u636e\u96c6\u4e2d\u7684\u6bcf\u4e2a\u89c2\u6d4b\u503c\u91cd\u590d\u6b64\u8fc7\u7a0b\u3002<\/span><br \/> <span style=\"color: #000000;\"><strong>4.<\/strong>\u901a\u8fc7\u5bf9\u6240\u6709\u9884\u6d4b\u8bef\u5dee\u6c42\u5e73\u5747\u503c\u6765\u8861\u91cf\u6a21\u578b\u7684\u8d28\u91cf\u3002<\/span><\/p>\n<h3><strong><span style=\"color: #000000;\">\u4f8b\u5b50<\/span><\/strong><\/h3>\n<p><span style=\"color: #000000;\">\u4ee5\u4e0b\u793a\u4f8b\u6f14\u793a\u4e86\u5982\u4f55\u5bf9\u524d\u9762\u793a\u4f8b\u4e2d\u4f7f\u7528\u7684\u540c\u4e00\u6570\u636e\u96c6\u4f7f\u7528\u6267\u884c LOOCV\uff1a<\/span><\/p>\n<pre style=\"background-color: #e5e5e5; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#load <em>dplyr<\/em> library used for data manipulation\n<\/span>library(dplyr)\n\n<span style=\"color: #008080;\">#load <em>caret<\/em> library used for partitioning data into training and test set\n<\/span>library(caret)\n\n<span style=\"color: #008080;\">#make this example reproducible\n<\/span>set.seed(0)\n\n<span style=\"color: #008080;\">#define the dataset\n<\/span>data &lt;- mtcars[, c(\"mpg\", \"disp\", \"hp\", \"drat\")]\n\n<span style=\"color: #008080;\">#specify that we want to use LOOCV\n<\/span>train_control &lt;- trainControl( <span style=\"color: #800080;\">method = \"LOOCV\"<\/span> )\n\n<span style=\"color: #008080;\">#train the model\n<\/span>model &lt;- train(mpg ~ ., data = data, method = \"lm\", trControl = train_control)\n\n<span style=\"color: #008080;\">#summarize the results\n<\/span>print(model)\n\n#Linear Regression \n#\n#32 samples\n#3 predictor\n#\n#No pre-processing\n#Resampling: Leave-One-Out Cross-Validation \n#Summary of sample sizes: 31, 31, 31, 31, 31, 31, ... \n#Resampling results:\n#\n# RMSE Rsquared MAE     \n#3.168763 0.7170704 2.503544\n#\n#Tuning parameter 'intercept' was held constant at a value of TRUE\n<\/strong><\/pre>\n<h3><span style=\"color: #000000;\"><strong>\u8fd9\u79cd\u65b9\u6cd5\u7684\u4f18\u70b9\u548c\u7f3a\u70b9<\/strong><\/span><\/h3>\n<p><span style=\"color: #000000;\">LOOCV \u7684\u4f18\u70b9\u662f\u6211\u4eec\u4f7f\u7528\u6240\u6709\u6570\u636e\u70b9\uff0c\u8fd9\u901a\u5e38\u4f1a\u51cf\u5c11\u6f5c\u5728\u7684\u504f\u5dee\u3002\u7136\u800c\uff0c\u7531\u4e8e<\/span><span style=\"color: #000000;\">\u6211\u4eec\u4f7f\u7528\u6a21\u578b\u6765\u9884\u6d4b\u6bcf\u4e2a\u89c2\u6d4b\u503c\uff0c\u8fd9\u53ef\u80fd\u4f1a\u5bfc\u81f4<\/span><span style=\"color: #000000;\">\u9884\u6d4b\u8bef\u5dee\u51fa\u73b0\u66f4\u5927\u7684\u53d8\u5f02\u6027\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u8fd9\u79cd\u65b9\u6cd5\u7684\u53e6\u4e00\u4e2a\u7f3a\u70b9\u662f\u5b83\u5fc5\u987b\u9002\u5408\u5927\u91cf\u6a21\u578b\uff0c\u4ece\u800c\u5bfc\u81f4\u6548\u7387\u4f4e\u4e0b\u4e14\u8ba1\u7b97\u91cf\u5927\u3002<\/span><\/p>\n<h2><strong><span style=\"color: #000000;\">\u91cd\u590dk\u6b21\u4ea4\u53c9\u9a8c\u8bc1\u65b9\u6cd5<\/span><\/strong><\/h2>\n<p><span style=\"color: #000000;\">\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u7b80\u5355\u5730\u6267\u884c\u591a\u6b21<strong>k \u6298\u4ea4\u53c9\u9a8c\u8bc1\u6765\u6267\u884c\u91cd\u590d\u7684 k<\/strong>\u6298\u4ea4\u53c9\u9a8c\u8bc1\u3002<\/span>\u6700\u7ec8\u7684\u8bef\u5dee\u662f<span style=\"color: #000000;\">\u91cd\u590d\u6b21\u6570<\/span><span style=\"color: #000000;\">\u7684\u5e73\u5747\u8bef\u5dee<\/span>\u3002<\/p>\n<p><span style=\"color: #000000;\">\u4ee5\u4e0b\u793a\u4f8b\u6267\u884c 5 \u500d\u4ea4\u53c9\u9a8c\u8bc1\uff0c\u91cd\u590d 4 \u6b21\uff1a<\/span><\/p>\n<pre style=\"background-color: #e5e5e5; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#load <em>dplyr<\/em> library used for data manipulation\n<\/span>library(dplyr)\n\n<span style=\"color: #008080;\">#load <em>caret<\/em> library used for partitioning data into training and test set\n<\/span>library(caret)\n\n<span style=\"color: #008080;\">#make this example reproducible\n<\/span>set.seed(0)\n\n<span style=\"color: #008080;\">#define the dataset\n<\/span>data &lt;- mtcars[, c(\"mpg\", \"disp\", \"hp\", \"drat\")]\n\n<span style=\"color: #008080;\">#define the number of subsets to use and number of times to repeat k-fold CV\n<\/span>train_control &lt;- trainControl(method = \"repeatedcv\", number = 5, <span style=\"color: #800080;\">repeats = 4<\/span> )\n\n<span style=\"color: #008080;\">#train the model\n<\/span>model &lt;- train(mpg ~ ., data = data, method = \"lm\", trControl = train_control)\n\n<span style=\"color: #008080;\">#summarize the results\n<\/span>print(model)\n\n#Linear Regression \n#\n#32 samples\n#3 predictor\n#\n#No pre-processing\n#Resampling: Cross-Validated (5 fold, repeated 4 times) \n#Summary of sample sizes: 26, 25, 26, 25, 26, 25, ... \n#Resampling results:\n#\n# RMSE Rsquared MAE     \n#3.176339 0.7909337 2.559131\n#\n#Tuning parameter 'intercept' was held constant at a value of TRUE\n<\/strong><\/pre>\n<h3><span style=\"color: #000000;\"><strong>\u8fd9\u79cd\u65b9\u6cd5\u7684\u4f18\u70b9\u548c\u7f3a\u70b9<\/strong><\/span><\/h3>\n<p><span style=\"color: #000000;\">\u91cd\u590d k \u500d\u4ea4\u53c9\u9a8c\u8bc1\u65b9\u6cd5\u7684\u4f18\u70b9\u662f\uff0c\u5bf9\u4e8e\u6bcf\u6b21\u91cd\u590d\uff0c\u6570\u636e\u5c06\u88ab\u5206\u6210\u7565\u6709\u4e0d\u540c\u7684\u5b50\u96c6\uff0c\u8fd9\u5e94\u8be5\u7ed9\u51fa\u6a21\u578b\u9884\u6d4b\u8bef\u5dee\u7684\u66f4\u52a0\u516c\u6b63\u7684\u4f30\u8ba1\u3002\u8fd9\u79cd\u65b9\u6cd5\u7684\u7f3a\u70b9\u662f\u8ba1\u7b97\u91cf\u5f88\u5927\uff0c\u56e0\u4e3a\u6211\u4eec\u5fc5\u987b\u591a\u6b21\u91cd\u590d\u6a21\u578b\u62df\u5408\u8fc7\u7a0b\u3002<\/span><\/p>\n<h2><strong><span style=\"color: #000000;\">\u4ea4\u53c9\u9a8c\u8bc1\u4e2d\u5982\u4f55\u9009\u62e9\u6298\u53e0\u6570<\/span><\/strong><\/h2>\n<p><span style=\"color: #000000;\">\u4ea4\u53c9\u9a8c\u8bc1\u6700\u4e3b\u89c2\u7684\u90e8\u5206\u662f\u51b3\u5b9a\u4f7f\u7528\u591a\u5c11\u6298\u53e0\uff08\u5373\u5b50\u96c6\uff09\u3002\u4e00\u822c\u6765\u8bf4\uff0c\u6298\u53e0\u6b21\u6570\u8d8a\u5c11\uff0c\u8bef\u5dee\u4f30\u8ba1\u7684\u504f\u5dee\u5c31\u8d8a\u5927\uff0c\u4f46\u53d8\u91cf\u4e5f\u5c31\u8d8a\u5c0f\u3002\u76f8\u53cd\uff0c\u6298\u53e0\u6b21\u6570\u8d8a\u591a\uff0c\u8bef\u5dee\u4f30\u8ba1\u7684\u504f\u5dee\u8d8a\u5c0f\uff0c\u4f46\u53d8\u91cf\u4e5f\u8d8a\u5927\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u8bb0\u4f4f\u8ba1\u7b97\u65f6\u95f4\u4e5f\u5f88\u91cd\u8981\u3002\u5bf9\u4e8e\u6bcf\u6b21\u6298\u53e0\uff0c\u60a8\u90fd\u9700\u8981\u8bad\u7ec3\u4e00\u4e2a\u65b0\u7684\u6a21\u5f0f\uff0c\u867d\u7136\u8fd9\u662f\u4e00\u4e2a\u7f13\u6162\u7684\u8fc7\u7a0b\uff0c\u4f46\u5982\u679c\u60a8\u9009\u62e9\u5927\u91cf\u6298\u53e0\uff0c\u5219\u53ef\u80fd\u9700\u8981\u5f88\u957f\u65f6\u95f4\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u5728\u5b9e\u8df5\u4e2d\uff0c\u4ea4\u53c9\u9a8c\u8bc1\u901a\u5e38\u8fdb\u884c 5 \u6216 10 \u500d\uff0c\u56e0\u4e3a\u8fd9\u53ef\u4ee5\u5728\u53d8\u5f02\u6027\u548c\u504f\u5dee\u4e4b\u95f4\u63d0\u4f9b\u826f\u597d\u7684\u5e73\u8861\uff0c\u540c\u65f6\u8ba1\u7b97\u6548\u7387\u4e5f\u5f88\u9ad8\u3002<\/span><\/p>\n<h2><strong>\u8fdb\u884c\u4ea4\u53c9\u9a8c\u8bc1\u540e\u5982\u4f55\u9009\u62e9\u6a21\u578b<\/strong><\/h2>\n<p><span style=\"color: #000000;\">\u4ea4\u53c9\u9a8c\u8bc1\u7528\u4e8e\u8bc4\u4f30\u6a21\u578b\u7684\u9884\u6d4b\u8bef\u5dee\u3002\u8fd9\u53ef\u4ee5\u901a\u8fc7\u7a81\u51fa\u663e\u793a\u54ea\u4e2a\u6a21\u578b\u5177\u6709\u6700\u4f4e\u7684\u9884\u6d4b\u8bef\u5dee\uff08\u57fa\u4e8e RMSE\u3001R \u5e73\u65b9\u7b49\uff09\u6765\u5e2e\u52a9\u6211\u4eec\u5728\u4e24\u4e2a\u6216\u591a\u4e2a\u4e0d\u540c\u6a21\u578b\u4e4b\u95f4\u8fdb\u884c\u9009\u62e9\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u4e00\u65e6\u6211\u4eec\u4f7f\u7528\u4ea4\u53c9\u9a8c\u8bc1\u6765\u9009\u62e9\u6700\u4f73\u6a21\u578b\uff0c\u6211\u4eec\u5c31\u4f1a\u4f7f\u7528<em>\u6240\u6709<\/em>\u53ef\u7528\u6570\u636e\u6765\u62df\u5408\u6240\u9009\u6a21\u578b\u3002\u6211\u4eec\u4e0d\u4f7f\u7528\u5728\u6700\u7ec8\u6a21\u578b\u7684\u4ea4\u53c9\u9a8c\u8bc1\u8fc7\u7a0b\u4e2d\u8bad\u7ec3\u7684\u5b9e\u9645\u6a21\u578b\u5b9e\u4f8b\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528 5 \u6298\u4ea4\u53c9\u9a8c\u8bc1\u6765\u786e\u5b9a\u5728\u4e24\u4e2a\u4e0d\u540c\u7684\u56de\u5f52\u6a21\u578b\u4e4b\u95f4\u4f7f\u7528\u54ea\u4e2a\u6a21\u578b\u66f4\u597d\u3002\u7136\u800c\uff0c\u4e00\u65e6\u6211\u4eec\u786e\u5b9a\u4e86\u6700\u597d\u4f7f\u7528\u54ea\u4e2a\u6a21\u578b\uff0c\u6211\u4eec\u5c31\u4f1a\u4f7f\u7528<em>\u6240\u6709<\/em>\u6570\u636e\u6765\u62df\u5408\u6700\u7ec8\u6a21\u578b\u3002\u6362\u53e5\u8bdd\u8bf4\uff0c\u5728\u6784\u5efa\u6700\u7ec8\u6a21\u578b\u65f6\u6211\u4eec\u4e0d\u4f1a\u5fd8\u8bb0\u4efb\u4f55\u6298\u53e0\u3002<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u7edf\u8ba1\u5b66\u4e2d\uff0c\u6211\u4eec\u7ecf\u5e38\u6784\u5efa\u6a21\u578b\u6709\u4e24\u4e2a\u539f\u56e0\uff1a \u4e86\u89e3\u4e00\u4e2a\u6216\u591a\u4e2a\u9884\u6d4b\u53d8\u91cf\u4e0e\u54cd\u5e94\u53d8\u91cf\u4e4b\u95f4\u7684\u5173\u7cfb\u3002 \u4f7f\u7528\u6a21\u578b\u6765\u9884\u6d4b\u672a\u6765\u7684\u89c2 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-521","post","type-post","status-publish","format-standard","hentry","category-11"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5982\u4f55\u5728 R \u4e2d\u4ea4\u53c9\u9a8c\u8bc1\u6a21\u578b\u6027\u80fd - Statorials<\/title>\n<meta name=\"description\" content=\"\u672c\u6559\u7a0b\u4ecb\u7ecd\u4e86\u5728 R \u4e2d\u6267\u884c\u4ea4\u53c9\u9a8c\u8bc1\u4ee5\u8bc4\u4f30\u6a21\u578b\u6027\u80fd\u7684\u56db\u79cd\u4e0d\u540c\u65b9\u6cd5\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\/cn\/\u5982\u4f55\u5728-r-\u4e2d\u5bf9\u6a21\u578b\u6027\u80fd\u8fdb\u884c\u4ea4\u53c9\u9a8c\u8bc1\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5982\u4f55\u5728 R \u4e2d\u4ea4\u53c9\u9a8c\u8bc1\u6a21\u578b\u6027\u80fd - Statorials\" \/>\n<meta property=\"og:description\" content=\"\u672c\u6559\u7a0b\u4ecb\u7ecd\u4e86\u5728 R \u4e2d\u6267\u884c\u4ea4\u53c9\u9a8c\u8bc1\u4ee5\u8bc4\u4f30\u6a21\u578b\u6027\u80fd\u7684\u56db\u79cd\u4e0d\u540c\u65b9\u6cd5\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/cn\/\u5982\u4f55\u5728-r-\u4e2d\u5bf9\u6a21\u578b\u6027\u80fd\u8fdb\u884c\u4ea4\u53c9\u9a8c\u8bc1\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-29T15:29:02+00:00\" \/>\n<meta name=\"author\" content=\"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/statorials.org\/cn\/%e5%a6%82%e4%bd%95%e5%9c%a8-r-%e4%b8%ad%e5%af%b9%e6%a8%a1%e5%9e%8b%e6%80%a7%e8%83%bd%e8%bf%9b%e8%a1%8c%e4%ba%a4%e5%8f%89%e9%aa%8c%e8%af%81\/\",\"url\":\"https:\/\/statorials.org\/cn\/%e5%a6%82%e4%bd%95%e5%9c%a8-r-%e4%b8%ad%e5%af%b9%e6%a8%a1%e5%9e%8b%e6%80%a7%e8%83%bd%e8%bf%9b%e8%a1%8c%e4%ba%a4%e5%8f%89%e9%aa%8c%e8%af%81\/\",\"name\":\"\u5982\u4f55\u5728 R \u4e2d\u4ea4\u53c9\u9a8c\u8bc1\u6a21\u578b\u6027\u80fd - Statorials\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/cn\/#website\"},\"datePublished\":\"2023-07-29T15:29:02+00:00\",\"dateModified\":\"2023-07-29T15:29:02+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/cn\/#\/schema\/person\/124e4e5b7c9f8dc0f1f95cc8c1db3261\"},\"description\":\"\u672c\u6559\u7a0b\u4ecb\u7ecd\u4e86\u5728 R \u4e2d\u6267\u884c\u4ea4\u53c9\u9a8c\u8bc1\u4ee5\u8bc4\u4f30\u6a21\u578b\u6027\u80fd\u7684\u56db\u79cd\u4e0d\u540c\u65b9\u6cd5\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/cn\/%e5%a6%82%e4%bd%95%e5%9c%a8-r-%e4%b8%ad%e5%af%b9%e6%a8%a1%e5%9e%8b%e6%80%a7%e8%83%bd%e8%bf%9b%e8%a1%8c%e4%ba%a4%e5%8f%89%e9%aa%8c%e8%af%81\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/cn\/%e5%a6%82%e4%bd%95%e5%9c%a8-r-%e4%b8%ad%e5%af%b9%e6%a8%a1%e5%9e%8b%e6%80%a7%e8%83%bd%e8%bf%9b%e8%a1%8c%e4%ba%a4%e5%8f%89%e9%aa%8c%e8%af%81\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/cn\/%e5%a6%82%e4%bd%95%e5%9c%a8-r-%e4%b8%ad%e5%af%b9%e6%a8%a1%e5%9e%8b%e6%80%a7%e8%83%bd%e8%bf%9b%e8%a1%8c%e4%ba%a4%e5%8f%89%e9%aa%8c%e8%af%81\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u5bb6\",\"item\":\"https:\/\/statorials.org\/cn\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5982\u4f55\u5728 r \u4e2d\u4ea4\u53c9\u9a8c\u8bc1\u6a21\u578b\u6027\u80fd\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/statorials.org\/cn\/#website\",\"url\":\"https:\/\/statorials.org\/cn\/\",\"name\":\"Statorials\",\"description\":\"\u60a8\u7684\u7edf\u8ba1\u7d20\u517b\u6307\u5357\uff01\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/statorials.org\/cn\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/statorials.org\/cn\/#\/schema\/person\/124e4e5b7c9f8dc0f1f95cc8c1db3261\",\"name\":\"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/statorials.org\/cn\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/statorials.org\/cn\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"contentUrl\":\"https:\/\/statorials.org\/cn\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"caption\":\"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a\"},\"description\":\"\u5927\u5bb6\u597d\uff0c\u6211\u662f\u672c\u6770\u660e\uff0c\u4e00\u4f4d\u9000\u4f11\u7684\u7edf\u8ba1\u5b66\u6559\u6388\uff0c\u540e\u6765\u6210\u4e3a Statorials \u7684\u70ed\u5fc3\u6559\u5e08\u3002 \u51ed\u501f\u5728\u7edf\u8ba1\u9886\u57df\u7684\u4e30\u5bcc\u7ecf\u9a8c\u548c\u4e13\u4e1a\u77e5\u8bc6\uff0c\u6211\u6e34\u671b\u5206\u4eab\u6211\u7684\u77e5\u8bc6\uff0c\u901a\u8fc7 Statorials \u589e\u5f3a\u5b66\u751f\u7684\u80fd\u529b\u3002\u4e86\u89e3\u66f4\u591a\",\"sameAs\":[\"https:\/\/statorials.org\/cn\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u5982\u4f55\u5728 R \u4e2d\u4ea4\u53c9\u9a8c\u8bc1\u6a21\u578b\u6027\u80fd - Statorials","description":"\u672c\u6559\u7a0b\u4ecb\u7ecd\u4e86\u5728 R \u4e2d\u6267\u884c\u4ea4\u53c9\u9a8c\u8bc1\u4ee5\u8bc4\u4f30\u6a21\u578b\u6027\u80fd\u7684\u56db\u79cd\u4e0d\u540c\u65b9\u6cd5\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\/cn\/\u5982\u4f55\u5728-r-\u4e2d\u5bf9\u6a21\u578b\u6027\u80fd\u8fdb\u884c\u4ea4\u53c9\u9a8c\u8bc1\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5982\u4f55\u5728 R \u4e2d\u4ea4\u53c9\u9a8c\u8bc1\u6a21\u578b\u6027\u80fd - Statorials","og_description":"\u672c\u6559\u7a0b\u4ecb\u7ecd\u4e86\u5728 R \u4e2d\u6267\u884c\u4ea4\u53c9\u9a8c\u8bc1\u4ee5\u8bc4\u4f30\u6a21\u578b\u6027\u80fd\u7684\u56db\u79cd\u4e0d\u540c\u65b9\u6cd5\u3002","og_url":"https:\/\/statorials.org\/cn\/\u5982\u4f55\u5728-r-\u4e2d\u5bf9\u6a21\u578b\u6027\u80fd\u8fdb\u884c\u4ea4\u53c9\u9a8c\u8bc1\/","og_site_name":"Statorials","article_published_time":"2023-07-29T15:29:02+00:00","author":"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/statorials.org\/cn\/%e5%a6%82%e4%bd%95%e5%9c%a8-r-%e4%b8%ad%e5%af%b9%e6%a8%a1%e5%9e%8b%e6%80%a7%e8%83%bd%e8%bf%9b%e8%a1%8c%e4%ba%a4%e5%8f%89%e9%aa%8c%e8%af%81\/","url":"https:\/\/statorials.org\/cn\/%e5%a6%82%e4%bd%95%e5%9c%a8-r-%e4%b8%ad%e5%af%b9%e6%a8%a1%e5%9e%8b%e6%80%a7%e8%83%bd%e8%bf%9b%e8%a1%8c%e4%ba%a4%e5%8f%89%e9%aa%8c%e8%af%81\/","name":"\u5982\u4f55\u5728 R \u4e2d\u4ea4\u53c9\u9a8c\u8bc1\u6a21\u578b\u6027\u80fd - Statorials","isPartOf":{"@id":"https:\/\/statorials.org\/cn\/#website"},"datePublished":"2023-07-29T15:29:02+00:00","dateModified":"2023-07-29T15:29:02+00:00","author":{"@id":"https:\/\/statorials.org\/cn\/#\/schema\/person\/124e4e5b7c9f8dc0f1f95cc8c1db3261"},"description":"\u672c\u6559\u7a0b\u4ecb\u7ecd\u4e86\u5728 R \u4e2d\u6267\u884c\u4ea4\u53c9\u9a8c\u8bc1\u4ee5\u8bc4\u4f30\u6a21\u578b\u6027\u80fd\u7684\u56db\u79cd\u4e0d\u540c\u65b9\u6cd5\u3002","breadcrumb":{"@id":"https:\/\/statorials.org\/cn\/%e5%a6%82%e4%bd%95%e5%9c%a8-r-%e4%b8%ad%e5%af%b9%e6%a8%a1%e5%9e%8b%e6%80%a7%e8%83%bd%e8%bf%9b%e8%a1%8c%e4%ba%a4%e5%8f%89%e9%aa%8c%e8%af%81\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/cn\/%e5%a6%82%e4%bd%95%e5%9c%a8-r-%e4%b8%ad%e5%af%b9%e6%a8%a1%e5%9e%8b%e6%80%a7%e8%83%bd%e8%bf%9b%e8%a1%8c%e4%ba%a4%e5%8f%89%e9%aa%8c%e8%af%81\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/cn\/%e5%a6%82%e4%bd%95%e5%9c%a8-r-%e4%b8%ad%e5%af%b9%e6%a8%a1%e5%9e%8b%e6%80%a7%e8%83%bd%e8%bf%9b%e8%a1%8c%e4%ba%a4%e5%8f%89%e9%aa%8c%e8%af%81\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u5bb6","item":"https:\/\/statorials.org\/cn\/"},{"@type":"ListItem","position":2,"name":"\u5982\u4f55\u5728 r \u4e2d\u4ea4\u53c9\u9a8c\u8bc1\u6a21\u578b\u6027\u80fd"}]},{"@type":"WebSite","@id":"https:\/\/statorials.org\/cn\/#website","url":"https:\/\/statorials.org\/cn\/","name":"Statorials","description":"\u60a8\u7684\u7edf\u8ba1\u7d20\u517b\u6307\u5357\uff01","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/statorials.org\/cn\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/statorials.org\/cn\/#\/schema\/person\/124e4e5b7c9f8dc0f1f95cc8c1db3261","name":"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/statorials.org\/cn\/#\/schema\/person\/image\/","url":"https:\/\/statorials.org\/cn\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","contentUrl":"https:\/\/statorials.org\/cn\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","caption":"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a"},"description":"\u5927\u5bb6\u597d\uff0c\u6211\u662f\u672c\u6770\u660e\uff0c\u4e00\u4f4d\u9000\u4f11\u7684\u7edf\u8ba1\u5b66\u6559\u6388\uff0c\u540e\u6765\u6210\u4e3a Statorials \u7684\u70ed\u5fc3\u6559\u5e08\u3002 \u51ed\u501f\u5728\u7edf\u8ba1\u9886\u57df\u7684\u4e30\u5bcc\u7ecf\u9a8c\u548c\u4e13\u4e1a\u77e5\u8bc6\uff0c\u6211\u6e34\u671b\u5206\u4eab\u6211\u7684\u77e5\u8bc6\uff0c\u901a\u8fc7 Statorials \u589e\u5f3a\u5b66\u751f\u7684\u80fd\u529b\u3002\u4e86\u89e3\u66f4\u591a","sameAs":["https:\/\/statorials.org\/cn"]}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"_links":{"self":[{"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/posts\/521","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/comments?post=521"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/posts\/521\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/media?parent=521"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/categories?post=521"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/tags?post=521"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}