{"id":55185,"date":"2024-06-16T16:18:31","date_gmt":"2024-06-16T08:18:31","guid":{"rendered":"http:\/\/www.biocloudservice.com\/wordpress\/?p=55185"},"modified":"2024-06-16T16:18:31","modified_gmt":"2024-06-16T08:18:31","slug":"%e4%bb%8b%e7%bb%8dr%e8%af%ad%e8%a8%80%e5%8c%85leaps","status":"publish","type":"post","link":"http:\/\/www.biocloudservice.com\/wordpress\/?p=55185","title":{"rendered":"\u4ecb\u7ecdR\u8bed\u8a00\u5305\u201cleaps\u201d"},"content":{"rendered":"<p><html><br \/>\n<head><br \/>\n<title><\/title><br \/>\n<meta charset=\"utf-8\"><br \/>\n<meta name=\"viewport\" content=\"width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0,viewport-fit=cover\"><\/p>\n<style>\n*{margin:0;padding:0}html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;line-height:1.6}img{z-index:999;position:relative;max-width:100%;margin:10px 0;}body{letter-spacing:.034em}h1,h2,h3,h4,h5,h6{font-weight:400;font-size:16px}a{color:#576b95;text-decoration:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}td,th{word-wrap:break-word;padding:5px 10px;border:1px solid #DDD;}table{margin-bottom:10px;border-collapse:collapse;display:table;width:100%!important;}.appmsg_skin_default .rich_media_area_primary{background-color:#fff}.appmsg_skin_default .rich_media_area_primary .weui-loadmore_line .weui-loadmore__tips{background-color:#fff}.rich_media_area_primary{padding:20px 16px 12px;background-color:#fafafa}@media (max-width:375px){.rich_media_area_primary{padding:20px 60px 15px 60px}.rich_media_area_extra{padding:0 60px 21px 60px}}@media (min-width:1024px){.rich_media_area_primary_inner,.rich_media_area_extra_inner,body{max-width:677px;margin-left:auto;margin-right:auto}.rich_media_area_primary{padding-top:32px}}.rich_media{padding:20px;overflow:hidden;}.appmsg_skin_default .rich_media_area_primary{background-color:#fff}.appmsg_skin_default .rich_media_area_primary .weui-loadmore_line .weui-loadmore__tips{background-color:#fff}@media screen and (min-width:1024px){.rich_media_area_primary_inner,.rich_media_area_extra_inner{max-width:677px;margin-left:auto;margin-right:auto}.rich_media_area_primary{padding-top:32px}}.rich_media_content{overflow:hidden;color:#333;font-size:17px;word-wrap:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;text-align:justify;position:relative;z-index:0}.rich_media_content *{max-width:100%!important;box-sizing:border-box!important;-webkit-box-sizing:border-box!important;word-wrap:break-word!important}.rich_media_content p{clear:both;min-height:1em}.rich_media_content em{font-style:italic}.rich_media_content fieldset{min-width:0}.rich_media_content .list-paddingleft-1,.rich_media_content .list-paddingleft-2,.rich_media_content .list-paddingleft-3{padding-left:2.2em}.rich_media_content .list-paddingleft-1 .list-paddingleft-2,.rich_media_content .list-paddingleft-2 .list-paddingleft-2,.rich_media_content .list-paddingleft-3 .list-paddingleft-2{padding-left:30px}.rich_media_content .list-paddingleft-1{padding-left:1.2em}.rich_media_content .list-paddingleft-3{padding-left:3.2em}.rich_media_content .code-snippet,.rich_media_content .code-snippet__fix{max-width:1000%!important}.rich_media_content .code-snippet *,.rich_media_content .code-snippet__fix *{max-width:1000%!important}.rich_media_title{font-size:22px;line-height:1.4;margin-bottom:13px;padding-bottom:13px;border-bottom:1px solid #e7e7eb;}@supports(-webkit-overflow-scrolling:touch){.rich_media_title{font-weight:700}}.rich_media_meta{display:inline-block;vertical-align:middle;padding:0 0 10px 0;font-size:15px;-webkit-tap-highlight-color:rgba(0,0,0,0)}.rich_media_meta.icon_appmsg_tag{margin-right:0px}.rich_media_meta.meta_tag_text{margin-right:0}.rich_media_meta_list em{font-style:normal}.rich_media_meta_text{color:#a5a5a5;}p{margin:0;}.msgBox{margin-top:20px;padding-top:20px;padding-left:50px;overflow:hidden;border-top:2px dashed #09a2ff;}.msg{padding-top:7px;clear:both;}.msgBody{float:right;width:100%;margin-left:55px;padding-bottom:15px;border-bottom:1px dashed #e0e0e0;}.userHeadImg{float:left;margin-left:-50px;}.userHeadImg img{width:40px;height:40px;margin-right:10px;border-radius:3px;}.userName{color:#888888;line-height:24px;font-size:14px;margin:5px 0 5px 0;height:24px;}.replyBody,.autherBody{color:#565656;font-size:15px;}.replyIcon{border-left:4px solid #33ab01;margin-right:5px;}.ad{text-decoration:none;color:#d6d4d4;font-size:12px;}.msgBodyReply{padding-top:5px;}.userName span{float:right;color:#afafaf;font-size:14px;}code{text-align:left;font-size:14px;display:block;white-space:pre;display:-webkit-box;display:-webkit-flex;display:flex;position:relative;}.code-snippet__fix{font-size:14px;margin:10px 0;display:block;color:#333;position:relative;background-color:rgba(0,0,0,0.03);border:1px solid #f0f0f0;border-radius:2px;display:-webkit-box;display:-webkit-flex;display:flex;padding-left:25px;line-height:26px}.code-snippet__fix code{text-align:left;font-size:14px;display:block;white-space:pre;display:-webkit-box;display:-webkit-flex;display:flex;position:relative;font-family:Consolas,\"Liberation Mono\",Menlo,Courier,monospace}.code-snippet__comment,.code-snippet__quote{color:#afafaf;font-style:italic}.code-snippet__keyword,.code-snippet__selector-tag,.code-snippet__subst{color:#ca7d37}.code-snippet__number,.code-snippet__literal,.code-snippet__variable,.code-snippet__template-variable,.code-snippet__tag .code-snippet__attr{color:#0e9ce5}.code-snippet__string,.code-snippet__doctag{color:#d14}.code-snippet__title,.code-snippet__section,.code-snippet__selector-id{color:#d14}.code-snippet__subst{font-weight:normal}.code-snippet__type,.code-snippet__class .code-snippet__title{color:#0e9ce5}.code-snippet__tag,.code-snippet__name,.code-snippet__attribute{color:#0e9ce5;font-weight:normal}.code-snippet__regexp,.code-snippet__link{color:#ca7d37}.code-snippet__symbol,.code-snippet__bullet{color:#d14}.code-snippet__built_in,.code-snippet__builtin-name{color:#ca7d37}.code-snippet__meta{color:#afafaf}.code-snippet__deletion{background:#fdd}.code-snippet__addition{background:#dfd}.code-snippet__emphasis{font-style:italic}.code-snippet__strong{font-weight:bold}.account_avatar{width:40px;height:40px;padding:0;}.account_info{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;padding:20px 0;align-items:center}.flex_bd{padding-left:14px;}.account_nickname{display:inline-block;vertical-align:middle;line-height:1.2;color:#576b95;font-size:14px}.account_desc{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;color:rgba(0,0,0,0.3);font-size:14px;line-height:1.2;padding-top:.4em}.msg_source_url{text-align:left;word-break:break-all;margin-top:20px;}.msg_source_url a{padding-right:10px;}.msg_source_url .url_text{color:#a8a8a8;}.video-desc{font-size:14px;margin-top:15px;color:#6c6c6c;}.msg_source_url{text-align:left;}.original_primary_card_tips{color:rgba(0,0,0,0.3);line-height:1.4;font-size:15px;}.weui-flex__item{margin-bottom:20px;padding:20px 16px;margin-top:16px;line-height:1.4;align-items:center;background-color:#f7f7f7;border-radius:8px;position:relative;}.original_primary_desc{color:rgba(0,0,0,0.5);font-size:14px;padding-top:4px;width:auto;overflow:hidden;text-overflow:ellipsis;}.msgBodyReplyList{border-top:1px solid #e1e1e1;margin-top:10px;}.msgBodyReplyListTop{border-top:0;}.reply_like_num{float:right;font-size:14px;color:#c7c7c7;}.msgData{margin-top:20px;color:#626262;}.msgData span{font-size:14px;padding-right:15px;}.msgData .likes{float:right;padding-right:0;}.js_text_content p{font-size:18px;}.rich_media_meta_link{font-size:15px;}blockquote {padding-left: 10px;border-left: 3px solid #dbdbdb;color: rgba(0,0,0,0.5);font-size: 15px;padding-top: 4px;margin: 1em 0;}.video_iframe{width:500px;height:400px;}.blockquote_info{color:#b5b5b5;margin-top:10px;}#copyright_logo{color:#bdbdbd;}.rich_media_meta_list{margin-bottom:10px;}.reprint{background:#efefef;border-radius:5px;padding:8px;color:#1f1f1f;}.reprint a{word-break:break-all;}.topic{color:#8e8e8e;background:#f7f7f7;border-radius:5px;padding:10px 8px;}.topic a{padding-right:5px;}.topic p{margin-bottom:5px;}\n<\/style>\n<link href=\"https:\/\/www.juyifx.cn\/config\/css\/wxArticle.css\" rel=\"stylesheet\"\/>\n<\/head><script>\nvar data={\"mp\":\"\u751f\u4fe1\u679c\",\"title\":\"\u4ecb\u7ecdR\u8bed\u8a00\u5305\u201cleaps\u201d\",\"time\":\"2023-08-16 19:00:43\",\"timeStamp\":\"1692183643\"};\n<\/script><br \/>\n<body><\/p>\n<div class=\"rich_media\">\n<h1 class=\"rich_media_title\" id=\"activity-name\"><a href=\"http:\/\/mp.weixin.qq.com\/s?__biz=Mzg3OTg3MjQyNg==&#038;mid=2247491500&#038;idx=3&#038;sn=013c7e04f5f204a72d29bc7bc25bda78&#038;chksm=cf7c8f69f80b067fea7e01e6c76eeb6a4025005bf8d0fa7c3d2bc54fc1b0f361dbf0bf042d9c#rd\" target=\"_blank\" rel=\"noopener\">\u4ecb\u7ecdR\u8bed\u8a00\u5305\u201cleaps\u201d<\/a><\/h1>\n<div id=\"meta_content\" class=\"rich_media_meta_list\"><span class=\"rich_media_meta rich_media_meta_text\">\u5c0f\u56fe&nbsp;&nbsp;<\/span><span class=\"rich_media_meta rich_media_meta_nickname\" id=\"profileBt\"><a href=\"javascript:void(0);\" class=\"wx_tap_link js_wx_tap_highlight weui-wa-hotarea\" id=\"js_name\">\u751f\u4fe1\u679c&nbsp;&nbsp;<\/a><\/span><em id=\"publish_time\" class=\"rich_media_meta rich_media_meta_text\">2023-08-16 19:00:43<\/em><\/div>\n<p><content><\/p>\n<div class=\"reprint\">\n<p>\u8f6c\u81ea\u516c\u4f17\u53f7\uff1a\u751f\u4fe1\u56fe<br \/><a href=\"http:\/\/mp.weixin.qq.com\/s?__biz=MzkxODUxNDgzNA==&#038;mid=2247484423&#038;idx=1&#038;sn=93b2c79f08c9b6ab1fbc77eb0d354299\" target=\"_blank\" title=\"\u9605\u8bfb\u539f\u6587\" rel=\"noopener\">http:\/\/mp.weixin.qq.com\/s?__biz=MzkxODUxNDgzNA==&#038;mid=2247484423&#038;idx=1&#038;sn=93b2c79f08c9b6ab1fbc77eb0d354299<\/a><\/p>\n<\/div>\n<section style=\"font-size: 16px;margin-bottom: 24px;\">\n<section style=\"display: flex;flex-flow: row;margin: 10px 0%;text-align: left;justify-content: flex-start;\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;vertical-align: bottom;width: 50%;background-color: rgb(242, 183, 183);margin-right: 3px;flex: 0 0 auto;align-self: flex-end;height: auto;padding: 3px 10px;\">\n<section style=\"font-size: 17px;color: rgb(255, 255, 255);text-align: right;letter-spacing: 4px;\" powered-by=\"xiumi.us\">\n<p><strong>\u70b9\u51fb\u84dd\u5b57<\/strong><\/p>\n<\/section>\n<\/section>\n<section style=\"display: inline-block;vertical-align: top;width: auto;border-left: 4px solid rgb(242, 183, 183);border-bottom-left-radius: 0px;flex: 100 100 0%;align-self: stretch;height: auto;padding: 3px 10px;background-color: rgba(254, 245, 240, 0.8);\">\n<section style=\"color: rgb(181, 126, 121);font-size: 17px;letter-spacing: 4px;\" powered-by=\"xiumi.us\">\n<p><strong>\u5173\u6ce8\u5c0f\u56fe<\/strong><\/p>\n<\/section>\n<\/section>\n<\/section>\n<section powered-by=\"xiumi.us\">\n<p style=\"white-space: normal;\">R\u5305&#8221;leaps&#8221;\u662f\u4e00\u4e2a\u7528\u4e8e\u5b50\u96c6\u9009\u62e9\uff08subset selection\uff09\u7684R\u8bed\u8a00\u8f6f\u4ef6\u5305\u3002\u5b50\u96c6\u9009\u62e9\u662f\u6307\u4ece\u7ed9\u5b9a\u7684\u9884\u6d4b\u53d8\u91cf\u96c6\u5408\u4e2d\u9009\u62e9\u51fa\u6700\u4f73\u7684\u9884\u6d4b\u53d8\u91cf\u5b50\u96c6\uff0c\u4ee5\u5efa\u7acb\u4e00\u4e2a\u5177\u6709\u8f83\u597d\u9884\u6d4b\u80fd\u529b\u7684\u6a21\u578b\u3002&#8221;leaps&#8221;\u5305\u63d0\u4f9b\u4e86\u591a\u79cd\u7b97\u6cd5\u548c\u8bc4\u4f30\u6307\u6807\uff0c\u7528\u4e8e\u786e\u5b9a\u6700\u4f73\u7684\u9884\u6d4b\u53d8\u91cf\u5b50\u96c6\u3002<br  \/><\/p>\n<p style=\"white-space: normal;\"><br  \/><\/p>\n<\/section>\n<section style=\"display: flex;flex-flow: row;text-align: center;justify-content: center;margin-top: 10px;margin-bottom: 20px;\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;vertical-align: top;width: auto;flex: 0 0 0%;align-self: stretch;height: auto;background-position: 0% 0%;background-repeat: repeat-y;background-size: 100%;background-attachment: scroll;background-image: url(&quot;https:\/\/mmbiz.qpic.cn\/sz_mmbiz_png\/2wJ7bWfS0QvFUqElClw2rZ4A296CFUomjDcNVDiacSntTHDicUU3LBJunzSFcMJLJUPwvz77ibQWolaCF1ItWxMuw\/640?wx_fmt=png&quot;);\">\n<section style=\"\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: 5px;height: 10px;vertical-align: top;overflow: hidden;\"><svg viewbox=\"0 0 1 1\" style=\"float:left;line-height:0;width:0;vertical-align:top;\"><\/svg><\/section>\n<\/section>\n<\/section>\n<section style=\"display: inline-block;vertical-align: top;width: auto;flex: 0 0 auto;align-self: stretch;min-width: 10%;height: auto;background-color: rgb(254, 227, 229);box-shadow: rgb(0, 0, 0) 0px 0px 0px;\">\n<section style=\"margin-right: 0%;margin-left: 0%;\" powered-by=\"xiumi.us\">\n<section style=\"color: rgb(84, 54, 54);padding-right: 10px;padding-left: 10px;text-align: justify;font-size: 17px;letter-spacing: 3px;\">\n<p style=\"white-space: normal;\"><strong>\u4ee5\u4e0b\u662f\u4e00\u4e9b&#8221;leaps&#8221;\u5305\u7684\u4e3b\u8981\u529f\u80fd\uff1a<\/strong><\/p>\n<\/section>\n<\/section>\n<\/section>\n<section style=\"display: inline-block;vertical-align: top;width: auto;flex: 0 0 0%;align-self: stretch;height: auto;background-position: 0% 0%;background-repeat: repeat-y;background-size: 100%;background-attachment: scroll;background-image: url(&quot;https:\/\/mmbiz.qpic.cn\/sz_mmbiz_png\/2wJ7bWfS0QvFUqElClw2rZ4A296CFUomE90kgynZCsnpmLxlnTmG89bEDRXQe7nUdyH34HsF9cwzjGdicWE19Pg\/640?wx_fmt=png&quot;);\">\n<section style=\"\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: 5px;height: 10px;vertical-align: top;overflow: hidden;\"><svg viewbox=\"0 0 1 1\" style=\"float:left;line-height:0;width:0;vertical-align:top;\"><\/svg><\/section>\n<\/section>\n<\/section>\n<\/section>\n<section powered-by=\"xiumi.us\">\n<p style=\"white-space: normal;\"><span style=\"color: rgb(110, 75, 36);\"><strong>1. \u6b63\u5411\u9009\u62e9\uff08forward selection\uff09\u548c\u9006\u5411\u9009\u62e9\uff08backward selection\uff09\uff1a<\/strong><\/span>&#8220;leaps&#8221;\u5305\u53ef\u4ee5\u4f7f\u7528\u6b63\u5411\u9009\u62e9\u7b97\u6cd5\u4ece\u7a7a\u6a21\u578b\u5f00\u59cb\u9010\u6b65\u6dfb\u52a0\u9884\u6d4b\u53d8\u91cf\uff0c\u6216\u8005\u4f7f\u7528\u9006\u5411\u9009\u62e9\u7b97\u6cd5\u4ece\u5305\u542b\u6240\u6709\u9884\u6d4b\u53d8\u91cf\u7684\u5b8c\u5168\u6a21\u578b\u5f00\u59cb\u9010\u6b65\u5254\u9664\u9884\u6d4b\u53d8\u91cf\u3002<br  \/><\/p>\n<p style=\"white-space: normal;\"><br  \/><\/p>\n<p style=\"white-space: normal;\"><span style=\"color: rgb(110, 75, 36);\"><strong>2. \u5168\u5b50\u96c6\u9009\u62e9\uff08best subset selection\uff09\uff1a<\/strong><\/span>&#8220;leaps&#8221;\u5305\u53ef\u4ee5\u901a\u8fc7\u7a77\u4e3e\u641c\u7d22\u7684\u65b9\u5f0f\u627e\u5230\u6700\u4f73\u7684\u9884\u6d4b\u53d8\u91cf\u5b50\u96c6\u3002\u5b83\u4f1a\u8003\u8651\u6240\u6709\u53ef\u80fd\u7684\u9884\u6d4b\u53d8\u91cf\u7ec4\u5408\uff0c\u5e76\u4f7f\u7528\u6307\u5b9a\u7684\u8bc4\u4f30\u6307\u6807\uff08\u4f8b\u5982AIC\u3001BIC\u7b49\uff09\u6765\u9009\u62e9\u6700\u4f73\u7684\u5b50\u96c6\u3002<\/p>\n<p style=\"white-space: normal;\"><br  \/><\/p>\n<p style=\"white-space: normal;\"><span style=\"color: rgb(110, 75, 36);\"><strong>3. \u4ea4\u53c9\u9a8c\u8bc1\uff1a<\/strong><\/span>&#8220;leaps&#8221;\u5305\u652f\u6301\u4f7f\u7528\u4ea4\u53c9\u9a8c\u8bc1\u6765\u8bc4\u4f30\u4e0d\u540c\u9884\u6d4b\u53d8\u91cf\u5b50\u96c6\u7684\u6027\u80fd\u3002\u901a\u8fc7\u5c06\u6570\u636e\u96c6\u5212\u5206\u4e3a\u8bad\u7ec3\u96c6\u548c\u9a8c\u8bc1\u96c6\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ea4\u53c9\u9a8c\u8bc1\u6765\u4f30\u8ba1\u4e0d\u540c\u5b50\u96c6\u7684\u9884\u6d4b\u8bef\u5dee\uff0c\u5e76\u9009\u62e9\u5177\u6709\u6700\u5c0f\u8bef\u5dee\u7684\u5b50\u96c6\u3002<\/p>\n<p style=\"white-space: normal;\"><br  \/><\/p>\n<p style=\"white-space: normal;\"><span style=\"color: rgb(110, 75, 36);\"><strong>4. \u53ef\u89c6\u5316\uff1a<\/strong><\/span>&#8220;leaps&#8221;\u5305\u63d0\u4f9b\u4e86\u53ef\u89c6\u5316\u5de5\u5177\uff0c\u5982\u5b50\u96c6\u5927\u5c0f\u4e0e\u8bc4\u4f30\u6307\u6807\u4e4b\u95f4\u7684\u56fe\u5f62\u5173\u7cfb\uff0c\u4ee5\u53ca\u6700\u4f73\u5b50\u96c6\u7684\u53d8\u91cf\u914d\u7f6e\u56fe\u3002<\/p>\n<p style=\"white-space: normal;\"><br  \/><\/p>\n<p style=\"white-space: normal;\"><strong>\u8981\u4f7f\u7528leaps\u5305\uff0c\u53ef\u4ee5\u5728R\u4e2d\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\u548c\u52a0\u8f7d\uff1a<\/strong><\/p>\n<\/section>\n<section class=\"code-snippet__fix code-snippet__js\">\n<ul class=\"code-snippet__line-index code-snippet__js\">\n<li><\/li>\n<li><\/li>\n<\/ul>\n<pre class=\"code-snippet__js\" data-lang=\"c\"><code><span class=\"code-snippet_outer\">&gt;install.packages(<span class=\"code-snippet__string\">\"leaps\"<\/span>) &nbsp;# \u5b89\u88c5leaps\u5305<\/span><\/code><code><span class=\"code-snippet_outer\">&gt;library(leaps) &nbsp;# \u52a0\u8f7dleaps\u5305<\/span><\/code><\/pre>\n<\/section>\n<p style=\"white-space: normal;\" powered-by=\"xiumi.us\"><br  \/><\/p>\n<section style=\"font-size: 16px;\">\n<section style=\"display: flex;flex-flow: row;text-align: center;justify-content: center;margin-top: 10px;margin-bottom: 20px;\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;vertical-align: top;width: auto;flex: 0 0 0%;align-self: stretch;height: auto;background-position: 0% 0%;background-repeat: repeat-y;background-size: 100%;background-attachment: scroll;background-image: url(&quot;https:\/\/mmbiz.qpic.cn\/sz_mmbiz_png\/2wJ7bWfS0QvFUqElClw2rZ4A296CFUomjDcNVDiacSntTHDicUU3LBJunzSFcMJLJUPwvz77ibQWolaCF1ItWxMuw\/640?wx_fmt=png&quot;);\">\n<section style=\"\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: 5px;height: 10px;vertical-align: top;overflow: hidden;\"><svg viewbox=\"0 0 1 1\" style=\"float:left;line-height:0;width:0;vertical-align:top;\"><\/svg><\/section>\n<\/section>\n<\/section>\n<section style=\"display: inline-block;vertical-align: top;width: auto;flex: 0 0 auto;align-self: stretch;min-width: 10%;height: auto;background-color: rgb(254, 227, 229);box-shadow: rgb(0, 0, 0) 0px 0px 0px;\">\n<section style=\"margin-right: 0%;margin-left: 0%;\" powered-by=\"xiumi.us\">\n<section style=\"color: rgb(84, 54, 54);padding-right: 10px;padding-left: 10px;text-align: justify;font-size: 17px;letter-spacing: 3px;\">\n<p style=\"white-space: normal;\"><strong>\u793a\u4f8b<\/strong><\/p>\n<\/section>\n<\/section>\n<\/section>\n<section style=\"display: inline-block;vertical-align: top;width: auto;flex: 0 0 0%;align-self: stretch;height: auto;background-position: 0% 0%;background-repeat: repeat-y;background-size: 100%;background-attachment: scroll;background-image: url(&quot;https:\/\/mmbiz.qpic.cn\/sz_mmbiz_png\/2wJ7bWfS0QvFUqElClw2rZ4A296CFUomE90kgynZCsnpmLxlnTmG89bEDRXQe7nUdyH34HsF9cwzjGdicWE19Pg\/640?wx_fmt=png&quot;);\">\n<section powered-by=\"xiumi.us\"><br  \/><\/section>\n<\/section>\n<\/section>\n<\/section>\n<section class=\"code-snippet__fix code-snippet__js\">\n<ul class=\"code-snippet__line-index code-snippet__js\">\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<\/ul>\n<pre class=\"code-snippet__js\" data-lang=\"c\"><code><span class=\"code-snippet_outer\">&gt; library(leaps)<\/span><\/code><code><span class=\"code-snippet_outer\">&gt; data &lt;- data.frame(<\/span><\/code><code><span class=\"code-snippet_outer\"> &nbsp;x1 = rnorm(<span class=\"code-snippet__number\">100<\/span>),<\/span><\/code><code><span class=\"code-snippet_outer\"> &nbsp;x2 = rnorm(<span class=\"code-snippet__number\">100<\/span>),<\/span><\/code><code><span class=\"code-snippet_outer\"> &nbsp;x3 = rnorm(<span class=\"code-snippet__number\">100<\/span>),<\/span><\/code><code><span class=\"code-snippet_outer\"> &nbsp;y = rnorm(<span class=\"code-snippet__number\">100<\/span>)<\/span><\/code><code><span class=\"code-snippet_outer\">)<\/span><\/code><code><span class=\"code-snippet_outer\"><br  \/><\/span><\/code><code><span class=\"code-snippet_outer\">&gt; subset_model &lt;- leaps(x = data[, <span class=\"code-snippet__number\">-4<\/span>], y = data$y)<\/span><\/code><code><span class=\"code-snippet_outer\">&gt; print(subset_model)<\/span><\/code><\/pre>\n<\/section>\n<section style=\"text-align: center;margin-top: 10px;margin-bottom: 10px;line-height: 0;\" powered-by=\"xiumi.us\">\n<section style=\"vertical-align: middle;display: inline-block;line-height: 0;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.5796296296296296\" data-s=\"300,640\" data-type=\"png\" data-w=\"1080\" style=\"vertical-align: middle;width: 100%;height: auto !important;\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/1_dENIEYZ9Ec95f3Vorf1DniafvIBOSw.png?w=640\" onerror=\"this.src='https:\/\/mmbiz.qpic.cn\/sz_mmbiz_png\/2wJ7bWfS0QvFUqElClw2rZ4A296CFUomHWa7XFibFFFw7wibLWTfDeBQnNPdENIEYZ9Ec95f3Vorf1DniafvIBOSw\/640?wx_fmt=png'\"  data-recalc-dims=\"1\" \/><\/section>\n<\/section>\n<p style=\"white-space: normal;\" powered-by=\"xiumi.us\"><br  \/><\/p>\n<section class=\"code-snippet__fix code-snippet__js\">\n<ul class=\"code-snippet__line-index code-snippet__js\">\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<\/ul>\n<pre class=\"code-snippet__js\" data-lang=\"c\"><code><span class=\"code-snippet_outer\">&gt; best_subset &lt;- subset_model$which[which.min(subset_model$bic), ]<\/span><\/code><code><span class=\"code-snippet_outer\">&gt; print(best_subset)<\/span><\/code><code><span class=\"code-snippet_outer\"><br  \/><\/span><\/code><code><span class=\"code-snippet_outer\"> &nbsp;<span class=\"code-snippet__number\">1<\/span> &nbsp;<span class=\"code-snippet__number\">2<\/span> &nbsp;<span class=\"code-snippet__number\">3<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><br  \/><\/span><\/code><code><span class=\"code-snippet_outer\">&gt; model &lt;- lm(y ~ ., data = data)<\/span><\/code><code><span class=\"code-snippet_outer\">&gt; summary(model)<\/span><\/code><\/pre>\n<\/section>\n<section style=\"text-align: center;margin-top: 10px;margin-bottom: 10px;line-height: 0;\" powered-by=\"xiumi.us\">\n<section style=\"vertical-align: middle;display: inline-block;line-height: 0;\"><img decoding=\"async\" data-ratio=\"0.6673866090712743\" data-s=\"300,640\" data-type=\"png\" data-w=\"926\" style=\"vertical-align: middle;width: 100%;height: auto !important;\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/2_NSzibYUjaLWFvzylv4zZqibkaKBpQA.png?w=640\" onerror=\"this.src='https:\/\/mmbiz.qpic.cn\/sz_mmbiz_png\/2wJ7bWfS0QvFUqElClw2rZ4A296CFUom0Jp64C4zDKzgcIShDIdAANa2wibNSzibYUjaLWFvzylv4zZqibkaKBpQA\/640?wx_fmt=png'\"  data-recalc-dims=\"1\" \/><\/section>\n<\/section>\n<section powered-by=\"xiumi.us\">\n<p style=\"white-space: normal;\"><br  \/><\/p>\n<p style=\"white-space: normal;\">\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u9996\u5148\u5b89\u88c5\u5e76\u52a0\u8f7d\u4e86&#8221;leaps&#8221;\u5305\u3002\u7136\u540e\uff0c\u6211\u4eec\u521b\u5efa\u4e86\u4e00\u4e2a\u5305\u542b\u56db\u4e2a\u53d8\u91cf\uff08x1\u3001x2\u3001x3\u548cy\uff09\u7684\u793a\u4f8b\u6570\u636e\u96c6\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u4f7f\u7528&#8221;leaps&#8221;\u51fd\u6570\u6267\u884c\u5168\u5b50\u96c6\u9009\u62e9\u7b97\u6cd5\uff0c\u7136\u540e\uff0c\u6211\u4eec\u6253\u5370\u4e86\u6700\u4f73\u5b50\u96c6\u9009\u62e9\u7684\u7ed3\u679c\uff0c\u5305\u62ec\u6bcf\u4e2a\u5b50\u96c6\u7684\u53d8\u91cf\u7ec4\u5408\u548c\u76f8\u5e94\u7684\u8bc4\u4f30\u6307\u6807\uff08\u5982AIC\u3001BIC\u7b49\uff09\u3002\u6211\u4eec\u9009\u62e9\u5177\u6709\u6700\u5c0fBIC\u503c\u7684\u5b50\u96c6\u4f5c\u4e3a\u6700\u4f73\u5b50\u96c6\u3002\u6700\u540e\uff0c\u6211\u4eec\u4f7f\u7528\u6700\u4f73\u5b50\u96c6\u62df\u5408\u4e86\u4e00\u4e2a\u7ebf\u6027\u56de\u5f52\u6a21\u578b\uff0c\u5e76\u6253\u5370\u4e86\u6a21\u578b\u6458\u8981\u3002<\/p>\n<p style=\"white-space: normal;\"><br  \/><\/p>\n<p style=\"white-space: normal;\">\u4ee5\u4e0a\u5c31\u662f\u5bf9R\u8bed\u8a00\u5305leaps\u7684\u7b80\u5355\u4ecb\u7ecd\u5566\uff0c\u5176\u5b9e\u4f7f\u7528&#8221;leaps&#8221;\u5305\u53ef\u4ee5\u5e2e\u52a9\u7814\u7a76\u4eba\u5458\u548c\u6570\u636e\u79d1\u5b66\u5bb6\u4ece\u5927\u91cf\u7684\u9884\u6d4b\u53d8\u91cf\u4e2d\u9009\u62e9\u51fa\u6700\u5177\u9884\u6d4b\u80fd\u529b\u7684\u5b50\u96c6\uff0c\u4ee5\u5efa\u7acb\u66f4\u7b80\u6d01\u3001\u89e3\u91ca\u6027\u66f4\u597d\u7684\u6a21\u578b\u3002\u5b83\u5728\u7279\u5f81\u9009\u62e9\u3001\u53d8\u91cf\u7b5b\u9009\u548c\u6a21\u578b\u7b80\u5316\u7b49\u5e94\u7528\u4e2d\u975e\u5e38\u6709\u7528\u3002<\/p>\n<p style=\"white-space: normal;\"><br  \/><\/p>\n<\/section>\n<section style=\"text-align: left;justify-content: flex-start;display: flex;flex-flow: row;margin-bottom: 10px;\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: 100%;vertical-align: top;align-self: flex-start;flex: 0 0 auto;border-style: solid;border-width: 1px;border-color: rgb(176, 176, 176);padding: 7px;\">\n<section style=\"justify-content: flex-start;display: flex;flex-flow: row;\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: 100%;vertical-align: top;align-self: flex-start;flex: 0 0 auto;background-color: rgba(249, 238, 237, 0.5);padding: 18px;\">\n<section style=\"\" powered-by=\"xiumi.us\">\n<section style=\"text-align: justify;font-size: 14px;\">\n<p style=\"white-space: normal;\">\u5c0f\u4f19\u4f34\u4eec\uff0c\u4eca\u5929\u6709\u6ca1\u6709\u5b66\u5230\u65b0\u77e5\u8bc6\u5462\uff0c\u60f3\u8981\u7ee7\u7eed\u4e86\u89e3R\u8bed\u8a00\u5185\u5bb9\u53ef\u4ee5\u6301\u7eed\u5173\u6ce8\u5c0f\u56fe\u54e6\uff5e\uff5e\u6216\u8005\u4e5f\u53ef\u4ee5\u5173\u6ce8\u6211\u4eec\u7684\u5b98\u7f51\u4e5f\u4f1a\u6301\u7eed\u66f4\u65b0\u7684\u54e6\uff5e http:\/\/www.biocloudservice.com\/home.html<\/p>\n<p style=\"white-space: normal;\"><br  \/><\/p>\n<p style=\"white-space: normal;\">\u6b22\u8fce\u4f7f\u7528\uff1a\u4e91\u751f\u4fe1\u5e73\u53f0 ( http:\/\/www.biocloudservice.com\/home.html)<\/p>\n<\/section>\n<\/section>\n<section style=\"transform: scale(0.5);transform-origin: center center;margin-top: -65px;margin-bottom: -65px;\" powered-by=\"xiumi.us\">\n<section style=\"text-align: center;margin-top: 10px;margin-bottom: 10px;line-height: 0;\">\n<section style=\"vertical-align: middle;display: inline-block;line-height: 0;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"1\" data-s=\"300,640\" data-type=\"jpeg\" data-w=\"258\" style=\"vertical-align: middle;width: 100%;height: auto !important;\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2024\/06\/3_K5iappeibzCgTsZRGSk8Tb8wcH9NNA.jpg?w=640\" onerror=\"this.src='https:\/\/mmbiz.qpic.cn\/sz_mmbiz_jpg\/2wJ7bWfS0QvFUqElClw2rZ4A296CFUomNVZHmuz4LS2qALhFrsyn0fzBnLK5iappeibzCgTsZRGSk8Tb8wcH9NNA\/640?wx_fmt=jpeg'\"  data-recalc-dims=\"1\" \/><\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<section style=\"min-height: 40px;margin: 10px 0%;\" powered-by=\"xiumi.us\">\n<section style=\"width: 100%;margin-right: auto;margin-bottom: -10px;margin-left: auto;\">\n<table width=\"100%\">\n<tbody>\n<tr opera-tn-ra-comp=\"_$.pages:0.layers:0.comps:14.classicTable1:0\" powered-by=\"xiumi.us\">\n<td colspan=\"1\" rowspan=\"1\" opera-tn-ra-cell=\"_$.pages:0.layers:0.comps:14.classicTable1:0.td@@0\" style=\"border-color: rgb(62, 62, 62);border-style: none;background-color: rgb(249, 174, 165);padding: 10px 0px;\" width=\"96.3700%\">\n<section style=\"line-height: 1;text-align: center;font-size: 17px;color: rgb(255, 255, 255);letter-spacing: 5px;\" powered-by=\"xiumi.us\">\n<p><strong>\u5f80\u671f\u63a8\u8350<\/strong><\/p>\n<\/section>\n<\/td>\n<\/tr>\n<tr opera-tn-ra-comp=\"_$.pages:0.layers:0.comps:14.classicTable1:1\" powered-by=\"xiumi.us\">\n<td colspan=\"1\" rowspan=\"1\" opera-tn-ra-cell=\"_$.pages:0.layers:0.comps:14.classicTable1:1.td@@0\" style=\"border-top: 0px none rgb(62, 62, 62);border-right: 0px none rgb(62, 62, 62);border-left: 0px none rgb(62, 62, 62);border-bottom-color: rgb(202, 198, 198);border-bottom-style: dashed;background-color: rgb(247, 247, 247);padding-right: 5px;padding-left: 5px;\" width=\"96.3700%\">\n<section style=\"text-align: center;justify-content: center;display: flex;flex-flow: row;\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: 100%;vertical-align: middle;border-width: 0px;align-self: center;flex: 0 0 auto;\">\n<p powered-by=\"xiumi.us\"><a target=\"_blank\" href=\"http:\/\/mp.weixin.qq.com\/s?__biz=MzkxODUxNDgzNA==&amp;mid=2247484165&amp;idx=1&amp;sn=16d7fbfe5cae2325ed40866743e29b68&amp;chksm=c1b17ef8f6c6f7eef2965456586028de3f831517953b7f09524dd4020c78aff1fd79b716414b&amp;scene=21#wechat_redirect\" textvalue=\"\u57fa\u56e0\u4e4b\u65c5\uff1aclusterProfiler\u63ed\u793a\u5bcc\u96c6\u5206\u6790\u4e16\u754c\u7684\u5965\u79d8\uff01\" linktype=\"text\" imgurl=\"\" imgdata=\"null\" data-itemshowtype=\"0\" tab=\"innerlink\" data-linktype=\"2\" rel=\"noopener\">\u57fa\u56e0\u4e4b\u65c5\uff1aclusterProfiler\u63ed\u793a\u5bcc\u96c6\u5206\u6790\u4e16\u754c\u7684\u5965\u79d8\uff01<\/a><br  \/><\/p>\n<\/section>\n<\/section>\n<\/td>\n<\/tr>\n<tr opera-tn-ra-comp=\"_$.pages:0.layers:0.comps:14.classicTable1:2\" powered-by=\"xiumi.us\">\n<td colspan=\"1\" rowspan=\"1\" opera-tn-ra-cell=\"_$.pages:0.layers:0.comps:14.classicTable1:2.td@@0\" style=\"border-top: 0px none rgb(62, 62, 62);border-right: 0px none rgb(62, 62, 62);border-left: 0px none rgb(62, 62, 62);border-bottom-color: rgb(202, 198, 198);border-bottom-style: dashed;background-color: rgb(247, 247, 247);padding-right: 5px;padding-left: 5px;\" width=\"96.3700%\">\n<section style=\"text-align: center;justify-content: center;display: flex;flex-flow: row;\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: 100%;vertical-align: middle;border-width: 0px;align-self: center;flex: 0 0 auto;\">\n<p powered-by=\"xiumi.us\"><a target=\"_blank\" href=\"http:\/\/mp.weixin.qq.com\/s?__biz=MzkxODUxNDgzNA==&amp;mid=2247484216&amp;idx=1&amp;sn=a0667398ef93c51a6ff9a112dcd5389d&amp;chksm=c1b17ec5f6c6f7d37b14763e4091fc45ac51692d923adacfc4382dde8b6604e3b0b7940e4440&amp;scene=21#wechat_redirect\" textvalue=\"\u7528ggplot2\u4e00\u5206\u949f\u7ed8\u5236\u597d\u770b\u7684\u6c14\u6ce1\u56fe\" linktype=\"text\" imgurl=\"\" imgdata=\"null\" data-itemshowtype=\"0\" tab=\"innerlink\" data-linktype=\"2\" rel=\"noopener\">\u7528ggplot2\u4e00\u5206\u949f\u7ed8\u5236\u597d\u770b\u7684\u6c14\u6ce1\u56fe<\/a><\/p>\n<\/section>\n<\/section>\n<\/td>\n<\/tr>\n<tr opera-tn-ra-comp=\"_$.pages:0.layers:0.comps:14.classicTable1:3\" powered-by=\"xiumi.us\">\n<td colspan=\"1\" rowspan=\"1\" opera-tn-ra-cell=\"_$.pages:0.layers:0.comps:14.classicTable1:3.td@@0\" style=\"border-top: 0px none rgb(62, 62, 62);border-right: 0px none rgb(62, 62, 62);border-left: 0px none rgb(62, 62, 62);border-bottom-color: rgb(202, 198, 198);border-bottom-style: dashed;background-color: rgb(247, 247, 247);padding-right: 5px;padding-left: 5px;\" width=\"96.3700%\">\n<section style=\"text-align: center;justify-content: center;display: flex;flex-flow: row;\" powered-by=\"xiumi.us\">\n<section style=\"display: inline-block;width: 100%;vertical-align: middle;border-width: 0px;align-self: center;flex: 0 0 auto;\">\n<p powered-by=\"xiumi.us\"><a target=\"_blank\" href=\"http:\/\/mp.weixin.qq.com\/s?__biz=MzkxODUxNDgzNA==&amp;mid=2247484217&amp;idx=1&amp;sn=62510b4fd7bfb2ad30dd5c4cda29f221&amp;chksm=c1b17ec4f6c6f7d23a553830d8cfab5e1cb6dad243398ea0122a70165048163916d2e2b7429f&amp;scene=21#wechat_redirect\" textvalue=\"\u5206\u5b50\u53ef\u89c6\u5316\u5de5\u5177Pymol\u901f\u901a\u6307\u5357\uff08\u4e00\uff09\" linktype=\"text\" imgurl=\"\" imgdata=\"null\" data-itemshowtype=\"0\" tab=\"innerlink\" data-linktype=\"2\" rel=\"noopener\">\u5206\u5b50\u53ef\u89c6\u5316\u5de5\u5177Pymol\u901f\u901a\u6307\u5357\uff08\u4e00\uff09<\/a><\/p>\n<\/section>\n<\/section>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/section>\n<\/section>\n<p style=\"white-space: normal;\" powered-by=\"xiumi.us\"><br  \/><\/p>\n<p style=\"white-space: normal;\" powered-by=\"xiumi.us\">\ud83d\udc47\u70b9\u51fb\u9605\u8bfb\u539f\u6587\u8fdb\u5165\u7f51\u5740<\/p>\n<\/section>\n<p style=\"display: none;margin-bottom: 24px;\"><mp-style-type data-value=\"3\"><\/mp-style-type><\/p>\n<div class=\"msg_source_url\"><a href=\"http:\/\/www.biocloudservice.com\/home.html\" target=\"_blank\" rel=\"noopener\">\u9605\u8bfb\u539f\u6587<\/a><\/div>\n<p><\/content><\/p>\n<div class=\"msg_source_url\"><a href=\"http:\/\/www.biocloudservice.com\/home.html\" target=\"_blank\" rel=\"noopener\">\u9605\u8bfb\u539f\u6587<\/a><\/div>\n<\/div>\n<p><\/body><br \/>\n<\/html><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ecb\u7ecdR\u8bed\u8a00\u5305\u201cleaps\u201d \u5c0f\u56fe&nbsp;&nbsp;\u751f\u4fe1\u679c&nbsp;&nbsp;2023-08-16 1 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":""},"categories":[1],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/55185"}],"collection":[{"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=55185"}],"version-history":[{"count":1,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/55185\/revisions"}],"predecessor-version":[{"id":55189,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/55185\/revisions\/55189"}],"wp:attachment":[{"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=55185"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=55185"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.biocloudservice.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=55185"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}