{"id":103815,"date":"2022-05-14T17:13:47","date_gmt":"2022-05-14T09:13:47","guid":{"rendered":"http:\/\/www.zhushiyao.com\/?p=103815"},"modified":"2022-05-14T17:14:36","modified_gmt":"2022-05-14T09:14:36","slug":"be8707652d","status":"publish","type":"post","link":"http:\/\/www.zhushiyao.com\/?p=103815","title":{"rendered":"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09"},"content":{"rendered":"<div class=\"bpp-post-content\">\n<section class=\"mp_profile_iframe_wrp\"><\/section>\n<section style=\"margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 14px; font-family: mp-quote, -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\">\u5728Graph\u9886\u57df\uff0c\u793e\u533a\u53d1\u73b0\uff08<\/span><span style=\"font-size: 14px;\">Community detection\uff09\u662f\u4e00\u4e2a\u975e\u5e38\u70ed\u95e8\u4e14\u5e7f\u6cdb\u7684\u8bdd\u9898\uff0c\u540e\u9762\u4f1a\u5199\u4e00\u4e2a\u7cfb\u5217\uff0c\u8be5\u95ee\u9898\u5b9e\u9645\u4e0a\u662f\u4ece\u5b50\u56fe\u5206\u5272\u7684\u95ee\u9898\u6f14\u53d8\u800c\u6765\uff0c\u5728\u771f\u5b9e\u7684\u793e\u4ea4\u7f51\u7edc\u4e2d\uff0c\u6709\u4e9b\u7528\u6237\u4e4b\u95f4\u8fde\u63a5\u975e\u5e38\u7d27\u5bc6\uff0c\u6709\u4e9b\u7528\u6237\u4e4b\u95f4\u7684\u8fde\u63a5\u8f83\u4e3a\u7a00\u758f\uff0c\u8fde\u63a5\u7d27\u5bc6\u7684\u7528\u6237\u7fa4\u4f53\u53ef\u4ee5\u770b\u505a\u4e00\u4e2a\u793e\u533a\uff0c\u5728\u98ce\u63a7\u95ee\u9898\u4e2d\uff0c\u53ef\u4ee5\u7b80\u5355\u7684\u7406\u89e3\u4e3a\u56e2\u4f19\u6316\u6398\u3002<\/span><\/section>\n<h1><\/h1>\n<section style=\"min-height: 24px; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 14px;\">\u76ee\u524d\u7684\u793e\u533a\u53d1\u73b0\u95ee\u9898\u5206\u4e3a\u4e24\u5927\u7c7b\uff1a<strong>\u975e\u91cd\u53e0\u793e\u533a\u53d1\u73b0\u548c\u91cd\u53e0\u793e\u533a\u53d1\u73b0<\/strong>\u3002\u975e\u91cd\u53e0\u793e\u533a\u53d1\u73b0\u95ee\u9898\u63cf\u8ff0\u7684\u662f\uff1a\u4e00\u4e2a\u7f51\u7edc\u4e2d\uff0c\u6bcf\u4e2a\u8282\u70b9\u5747\u53ea\u80fd\u5c5e\u4e8e\u540c\u4e00\u4e2a\u793e\u533a\uff0c\u8fd9\u610f\u5473\u8fd9\u793e\u533a\u548c\u793e\u533a\u4e4b\u95f4\u662f\u6ca1\u6709\u4ea4\u96c6\u7684\u3002\u5728\u975e\u91cd\u53e0\u793e\u533a\u53d1\u73b0\u7b97\u6cd5\u4e2d\uff0c\u6709\u4e0d\u540c\u79cd\u7c7b\u7684\u89e3\u6cd5\uff1a<\/span><\/section>\n<section style=\"min-height: 24px; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 14px;\"><strong>1\uff09\u57fa\u4e8e\u6a21\u5757\u5ea6\u7684\u793e\u533a\u53d1\u73b0\u7b97\u6cd5\uff1a<\/strong>\u57fa\u672c\u601d\u60f3\u662f\u901a\u8fc7\u5b9a\u4e49\u6a21\u5757\u5ea6\uff08Modularity\uff09\u6765\u8861\u91cf\u4e00\u4e2a\u793e\u533a\u7684\u5212\u5206\u662f\u4e0d\u662f\u76f8\u5bf9\u6bd4\u8f83\u597d\u7684\u7ed3\u679c\uff0c\u4ece\u800c\u5c06\u793e\u533a\u53d1\u73b0\u95ee\u9898\u8f6c\u5316\u4e3a\u6700\u5927\u5316\u6a21\u5757\u5ea6\u7684\u95ee\u9898\u8fdb\u884c\u6c42\u89e3\uff0c\u540e\u7eed\u7684Louvain\u7b97\u6cd5\u4f1a\u8bb2\u5230\u3002<\/span><\/section>\n<section style=\"min-height: 24px; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 14px;\"><strong>2\uff09\u57fa\u4e8e\u6807\u7b7e\u4f20\u64ad\u7684\u793e\u533a\u53d1\u73b0\u7b97\u6cd5\uff1a<\/strong>\u57fa\u672c\u601d\u60f3\u662f\u901a\u8fc7\u6807\u8bb0\u8282\u70b9\u7684\u6807\u7b7e\u4fe1\u606f\u6765\u66f4\u65b0\u672a\u6807\u8bb0\u8282\u70b9\u7684\u6807\u7b7e\u4fe1\u606f\uff0c\u5728\u6574\u4e2a\u7f51\u7edc\u4e2d\u8fdb\u884c\u4f20\u64ad\uff0c\u76f4\u81f3\u6536\u655b\uff0c\u5176\u4e2d\u6700\u5177\u4ee3\u8868\u6027\u7684\u5c31\u662f\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA,Label Propagation Algorithm\uff09\uff0c\u4e5f\u662f\u672c\u6587\u8981\u8ba8\u8bba\u7684\u7b97\u6cd5\u3002<\/span><\/section>\n<section style=\"min-height: 24px; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><strong><span style=\"font-size: 14px; color: #d84fa9;\">\u6ce8\u610f\uff1a\u5728\u56e2\u4f19\u6316\u6398\u7684\u5b9e\u9645\u5e94\u7528\u7684\u8fc7\u7a0b\u4e2d\uff0c\u4e0d\u8981\u5bc4\u5e0c\u671b\u4e8e\u4f18\u5316\u793e\u533a\u53d1\u73b0\u7b97\u6cd5\u63d0\u9ad8\u51c6\u786e\u6027\uff0c\u53ef\u80fd\u6c38\u8fdc\u90fd\u89e3\u51b3\u4e0d\u4e86\u95ee\u9898\uff0c\u56e0\u4e3a\u5173\u7cfb\u7684\u5f62\u6210\u5728\u5b9e\u9645\u4e2d\u592a\u8fc7\u4e8e\u590d\u6742\uff0c\u6211\u4eec\u66f4\u591a\u7684\u5173\u6ce8\u6784\u56fe\u5173\u7cfb\u7684\u7b5b\u9009\u3001\u6e05\u6d17\u3001\u63d0\u7eaf\uff0c\u4ee5\u53ca\u5206\u7fa4\u540e\u8fdb\u4e00\u6b65\u52a0\u5de5\u5904\u7406<\/span><\/strong><\/section>\n<section style=\"min-height: 24px; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 14px;\">\u00a0<\/span><\/section>\n<h1 style=\"line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"color: #ff2941;\"><strong><span style=\"color: #ff2941; font-size: 20px;\">\u4e00\u3001LPA\u6982\u8ff0<\/span><\/strong><\/span><\/h1>\n<section style=\"min-height: 24px; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 14px;\"><span style=\"color: #222222;\">Label Propagation Algorithm<\/span>\uff0c\u4e5f\u79f0\u4f5c\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\uff0c<span style=\"color: #222222;\">\u662f\u4e00\u4e2a\u5728\u56fe\u4e2d\u5feb\u901f\u53d1\u73b0\u793e\u7fa4\u7684\u7b97\u6cd5<\/span>\uff0c\u7531Raghavan\u7b49\u4eba\u57282007\u5e74\u4e8e\u8bba\u6587\u300aNear linear time algorithm to detect community structures in large-scale networks\u300b\u4e2d\u63d0\u51fa\u3002<span style=\"color: #222222;\">\u5728 LPA \u7b97\u6cd5\u4e2d\uff0c\u8282\u70b9\u7684\u6807\u7b7e\u5b8c\u5168\u7531\u5b83\u7684\u76f4\u63a5\u90bb\u5c45\u51b3\u5b9a<\/span>\u3002\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\u662f\u4e00\u79cd\u57fa\u4e8e\u6807\u7b7e\u4f20\u64ad\u7684\u5c40\u90e8\u793e\u533a\u53d1\u73b0\u7b97\u6cd5\uff0c\u5176\u57fa\u672c\u601d\u60f3\u662f\u8282\u70b9\u7684\u6807\u7b7e\uff08community\uff09\u4f9d\u8d56\u5176\u90bb\u5c45\u8282\u70b9\u7684\u6807\u7b7e\u4fe1\u606f\uff0c\u5f71\u54cd\u7a0b\u5ea6\u7531\u8282\u70b9\u76f8\u4f3c\u5ea6\u51b3\u5b9a\uff0c\u5e76\u901a\u8fc7\u4f20\u64ad\u8fed\u4ee3\u66f4\u65b0\u8fbe\u5230\u7a33\u5b9a\u3002<\/span><\/section>\n<h2 style=\"line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><strong><span style=\"color: #ff2941;\">1\u3001\u7b97\u6cd5\u7684\u601d\u60f3<\/span><\/strong><\/h2>\n<section style=\"min-height: 24px; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"color: #494949; font-size: 14px;\">\u5728\u7528\u4e00\u4e2a\u552f\u4e00\u7684\u6807\u7b7e\u521d\u59cb\u5316\u6bcf\u4e2a\u8282\u70b9\u4e4b\u540e\uff0c\u8be5\u7b97\u6cd5\u4f1a\u91cd\u590d\u5730\u5c06\u4e00\u4e2a\u8282\u70b9\u7684\u6807\u7b7e\u793e\u7fa4\u5316\u4e3a\u8be5\u8282\u70b9\u7684\u76f8\u90bb\u8282\u70b9\u4e2d\u51fa\u73b0\u9891\u7387\u6700\u9ad8\u7684\u6807\u7b7e\u3002\u5f53\u6bcf\u4e2a\u8282\u70b9\u7684\u6807\u7b7e\u5728\u5176\u76f8\u90bb\u8282\u70b9\u4e2d\u51fa\u73b0\u5f97\u6700\u9891\u7e41\u65f6\uff0c\u7b97\u6cd5\u5c31\u4f1a\u505c\u6b62\u3002\u8be5\u7b97\u6cd5\u662f\u5f02\u6b65\u7684\uff0c\u56e0\u4e3a\u6bcf\u4e2a\u8282\u70b9\u90fd\u4f1a\u5728\u4e0d\u7b49\u5f85\u5176\u4f59\u8282\u70b9\u66f4\u65b0\u7684\u60c5\u51b5\u4e0b\u8fdb\u884c\u66f4\u65b0\u3002<\/span><\/section>\n<section style=\"min-height: 24px; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 14px;\"><strong><span style=\"color: #494949;\">\u8be5\u7b97\u6cd5\u67095\u4e2a\u6b65\u9aa4\uff1a<\/span><\/strong><\/span><\/section>\n<section style=\"line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"color: #494949; font-size: 14px;\">1\uff09\u521d\u59cb\u5316\u7f51\u7edc\u4e2d\u6240\u6709\u8282\u70b9\u7684\u6807\u7b7e\uff0c\u5bf9\u4e8e\u7ed9\u5b9a\u8282\u70b9x\uff0cCx(0)=x\u3002<\/span><\/section>\n<section style=\"line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"color: #494949; font-size: 14px;\">2\uff09\u8bbe\u7f6e t=1\u3002<\/span><\/section>\n<section style=\"line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"color: #494949; font-size: 14px;\">3\uff09\u4ee5\u968f\u673a\u987a\u5e8f\u6392\u5217\u7f51\u7edc\u4e2d\u7684\u8282\u70b9\uff0c\u5e76\u5c06\u5176\u8bbe\u7f6e\u4e3ax\u3002<\/span><\/section>\n<section style=\"line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"color: #494949; font-size: 14px;\">4\uff09\u5bf9\u4e8e\u7279\u5b9a\u987a\u5e8f\u9009\u62e9\u7684\u6bcf\u4e2ax\u2208X\uff0c\u8ba9Cx(t)=f(Cxi1(t)\uff0c&#8230;\uff0cCxim(t)\uff0c&#8230;\u3002f\u8fd9\u91cc\u8fd4\u56de\u76f8\u90bb\u6807\u7b7e\u4e2d\u51fa\u73b0\u9891\u7387\u6700\u9ad8\u7684\u6807\u7b7e\u3002\u5982\u679c\u6709\u591a\u4e2a\u6700\u9ad8\u9891\u7387\u7684\u6807\u7b7e\uff0c\u5c31\u968f\u673a\u9009\u62e9\u4e00\u4e2a\u6807\u7b7e\u3002<\/span><\/section>\n<section style=\"line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"color: #494949; font-size: 14px;\">5\uff09\u5982\u679c\u6bcf\u4e2a\u8282\u70b9\u90fd\u6709\u5176\u90bb\u5c45\u8282\u70b9\u4e2d\u6570\u91cf\u6700\u591a\u7684\u6807\u7b7e\uff0c\u5219\u505c\u6b62\u7b97\u6cd5\uff0c\u5426\u5219\uff0c\u8bbe\u7f6et=t+1\u5e76\u8f6c\u52303\u3002<\/span><\/section>\n<section style=\"min-height: 24px; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 14px;\">\u8fd9\u662f\u4e00\u4e2a\u8fed\u4ee3\u7684\u8ba1\u7b97\u8fc7\u7a0b\u4e14\u4e0d\u4fdd\u8bc1\u6536\u655b\uff0c\u5927\u4f53\u7684\u601d\u8def\u5c31\u662f\u6bcf\u4e2a\u4eba\u90fd\u770b\u770b\u81ea\u5df1\u7684\u90bb\u5c45\u90fd\u5728\u4ec0\u4e48\u793e\u533a\u5185\uff0c\u770b\u770b\u9891\u7387\u6700\u9ad8\u7684\u793e\u533a\u662f\u5565\uff0c\u5982\u679c\u548c\u81ea\u5df1\u5f53\u524d\u7684\u793e\u533a\u4e0d\u4e00\u6837\uff0c\u5c31\u628a\u8fd9\u4e2a\u6700\u9ad8\u9891\u793e\u533a\u5f53\u6210\u662f\u81ea\u5df1\u7684\u793e\u533a\uff0c\u7136\u540e\u544a\u8bc9\u90bb\u5c45\uff0c\u5468\u800c\u590d\u59cb\uff0c\u76f4\u5230\u5bf9\u4e8e\u6240\u6709\u4eba\uff0c\u90bb\u5c45\u4eec\u544a\u8bc9\u81ea\u5df1\u7684\u9ad8\u9891\u793e\u533a\u548c\u81ea\u5df1\u5f53\u524d\u7684\u793e\u533a\u662f\u4e00\u6837\u7684\uff0c\u7b97\u6cd5\u7ed3\u675f\u3002\u6240\u4ee5\u8bf4\u5bf9\u4e8e\u8fd9\u4e2a\u7b97\u6cd5\uff0c\u8ba1\u7b97\u590d\u6742\u5ea6\u662fO(kE)\uff0ck\u662f\u8fed\u4ee3\u7684\u6b21\u6570\uff0cE\u662f\u8fb9\u7684\u6570\u91cf\u3002\u5927\u5bb6\u7684\u7ecf\u9a8c\u662f\u8fd9\u4e2a\u8fed\u4ee3\u7684\u6b21\u6570\u5927\u6982\u662f5\u6b21\u5c31\u80fd\u8fd1\u4f3c\u6536\u655b\uff0c\u4ee5\u5b9e\u73b0\u7cbe\u5ea6\u548c\u6027\u80fd\u7684\u5e73\u8861\uff0c\u80fd\u53d1\u73b0\u8fd9\u4e2a\u6570\u5b57\u548c\u516d\u5ea6\u5206\u9694\u7406\u8bba\u91cc\u9762\u7684\u6570\u5b57\u4e5f\u5dee\u4e0d\u591a\u3002<\/span><\/section>\n<section style=\"min-height: 24px; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"color: #222222; font-size: 14px;\">\u6211\u4eec\u53ef\u4ee5\u5f88\u5f62\u8c61\u5730\u7406\u89e3\u7b97\u6cd5\u7684\u4f20\u64ad\u8fc7\u7a0b\uff0c\u5f53\u6807\u7b7e\u5728\u7d27\u5bc6\u8054\u7cfb\u7684\u533a\u57df\uff0c\u4f20\u64ad\u975e\u5e38\u5feb\uff0c\u4f46\u5230\u4e86\u7a00\u758f\u8fde\u63a5\u7684\u533a\u57df\uff0c\u4f20\u64ad\u901f\u5ea6\u5c31\u4f1a\u4e0b\u964d\u3002\u5f53\u51fa\u73b0\u4e00\u4e2a\u8282\u70b9\u5c5e\u4e8e\u591a\u4e2a\u793e\u7fa4\u65f6\uff0c\u7b97\u6cd5\u4f1a\u4f7f\u7528\u8be5\u8282\u70b9\u90bb\u5c45\u7684\u6807\u7b7e\u4e0e\u6743\u91cd\uff0c\u51b3\u5b9a\u6700\u7ec8\u7684\u6807\u7b7e\uff0c\u4f20\u64ad\u7ed3\u675f\u540e\uff0c\u62e5\u6709\u540c\u6837\u6807\u7b7e\u7684\u8282\u70b9\u88ab\u89c6\u4e3a\u5728\u540c\u4e00\u7fa4\u7ec4\u4e2d\u3002<\/span><\/section>\n<section style=\"min-height: 24px; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"color: #222222; font-size: 14px;\">\u4e0b\u56fe\u5c55\u793a\u4e86\u7b97\u6cd5\u7684\u4e24\u4e2a\u53d8\u79cd\uff1aPush \u548c Pull\u3002\u5176\u4e2d Pull \u7b97\u6cd5\u66f4\u4e3a\u5178\u578b\uff0c\u5e76\u4e14\u53ef\u4ee5\u5f88\u597d\u5730\u5e76\u884c\u8ba1\u7b97\uff1a<\/span><\/section>\n<section style=\"min-height: 24px; text-align: center; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" style=\"color: #222222;\" title=\"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2022\/05\/8-1652519627.jpeg\" alt=\"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\" width=\"1080\" \/><\/section>\n<section style=\"min-height: 24px; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"color: #222222; font-size: 14px;\">\u6211\u4eec\u4e0d\u518d\u7ee7\u7eed\u6df1\u5165\uff0c\u770b\u5b8c\u4e0a\u56fe\uff0c\u4f60\u5e94\u8be5\u5df2\u7ecf\u7406\u89e3\u4e86\u7b97\u6cd5\u7684\u5927\u6982\u8fc7\u7a0b\u3002\u5176\u5b9e\uff0c\u505a\u8fc7\u56fe\u50cf\u5904\u7406\u7684\u4eba\u5f88\u5bb9\u6613\u660e\u767d\uff0c\u6240\u8c13\u7684\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff0c\u4e0d\u8fc7\u662f\u56fe\u50cf\u5206\u5272\u7b97\u6cd5\u7684\u53d8\u79cd\uff0cPush \u7b97\u6cd5\u662f\u533a\u57df\u751f\u957f\u6cd5\uff08Region Growing\uff09\u7684\u7b80\u5316\u7248\uff0c\u800c Pull \u66f4\u50cf\u662f\u5206\u5272\u548c\u5408\u5e76\uff08divide-and-merge\uff0c\u4e5f\u6709\u4eba\u79f0 split-merge\uff09\u7b97\u6cd5\u3002\u786e\u5b9e\uff0c\u56fe\u50cf\uff08image\uff09\u7684\u50cf\u7d20\u548c\u56fe\uff08graph\uff09\u7684\u8282\u70b9\u662f\u5341\u5206\u7c7b\u4f3c\u7684\u3002<\/span><\/section>\n<h2 style=\"line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"color: #ff2941;\"><strong>2\u3001\u7528\u4e8e\u56fe\u805a\u7c7b<\/strong><\/span><\/h2>\n<section style=\"min-height: 24px; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"color: #494949; font-size: 14px;\">\u56fe\u805a\u7c7b\u662f\u6839\u636e\u56fe\u7684\u62d3\u6251\u7ed3\u6784\uff0c\u8fdb\u884c\u5b50\u56fe\u7684\u5212\u5206\uff0c\u4f7f\u5f97\u5b50\u56fe\u5185\u90e8\u8282\u70b9\u7684\u94fe\u63a5\u8f83\u591a\uff0c\u5b50\u56fe\u4e4b\u95f4\u7684\u8fde\u63a5\u8f83\u5c11\u3002\u4f9d\u8d56\u5176\u90bb\u5c45\u8282\u70b9\u7684\u6807\u7b7e\u4fe1\u606f\uff0c\u5f71\u54cd\u7a0b\u5ea6\u7531\u8282\u70b9\u76f8\u4f3c\u5ea6\u51b3\u5b9a\uff0c\u5e76\u901a\u8fc7\u4f20\u64ad\u8fed\u4ee3\u66f4\u65b0\u8fbe\u5230\u7a33\u5b9a\u3002<\/span><\/section>\n<blockquote class=\"js_blockquote_wrap\">\n<section class=\"js_blockquote_digest\">\n<section>\n<section style=\"min-height: 24px; line-height: normal; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 14px; color: #407600;\">\u53c2\u8003\u539f\u59cb\u8bba\u6587<\/span><\/section>\n<section style=\"min-height: 24px; line-height: normal; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 14px; color: #407600;\">https:\/\/arxiv.org\/abs\/0709.2938<\/span><\/section>\n<section style=\"min-height: 24px; line-height: normal; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 14px; color: #407600;\">https:\/\/arxiv.org\/pdf\/0709.2938.pdf<\/span><\/section>\n<\/section>\n<\/section>\n<\/blockquote>\n<section style=\"min-height: 24px; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 14px;\">\u5728\u7b97\u6cd5\u5f00\u59cb\u4e4b\u524d\u4e3a\u6bcf\u4e2a\u8282\u70b9\u6253\u4e0a\u4e0d\u540c\u7684\u6807\u7b7e\uff0c\u6bcf\u4e00\u4e2a\u8f6e\u6b21\u968f\u673a\u627e\u5230\u4e00\u4e2a\u8282\u70b9\uff0c\u67e5\u770b\u5176\u90bb\u5c45\u8282\u70b9\u7684\u6807\u7b7e\uff0c\u627e\u5230\u51fa\u73b0\u6b21\u6570\u6700\u591a\u7684\u6807\u7b7e\uff0c\u968f\u540e\u5c06\u8be5\u8282\u70b9\u6539\u6210\u8be5\u6807\u7b7e\u3002\u5f53\u76f8\u90bb\u4e24\u6b21\u8fed\u4ee3\u540e\u793e\u533a\u6570\u91cf\u4e0d\u53d8\u6216\u793e\u533a\u5185\u8282\u70b9\u6570\u91cf\u4e0d\u53d8\u65f6\u5219\u505c\u6b62\u8fed\u4ee3\uff0c\u4e0b\u9762\u770b\u56fe\u89e3\u8fc7\u7a0b<\/span><\/section>\n<section style=\"min-height: 24px; text-align: left; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><strong><span style=\"font-size: 14px;\">\u521d\u59cb\u5316<\/span><\/strong><\/section>\n<section style=\"min-height: 24px; text-align: center; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" style=\"width: 386px; height: 176px;\" title=\"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2022\/05\/3-1652519627.png\" alt=\"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\" width=\"489\" \/><\/section>\n<section style=\"min-height: 24px; text-align: left; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><strong><span style=\"color: #4f4f4f; font-size: 14px;\">\u7b2c\u4e00\u8f6e\u8fed\u4ee3<\/span><\/strong><\/section>\n<section style=\"min-height: 24px; text-align: left; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"color: #4f4f4f; font-size: 14px;\">\u968f\u673a\u6311\u9009\u4e00\u4e2a\u8282\u70b9\uff08\u5982c\uff09\uff0c\u53d1\u73b0\u5176\u76f8\u90bb\u8282\u70b9\u6709abe\uff0c\u4e09\u8005\u51fa\u73b0\u6b21\u6570\u76f8\u540c\uff0c\u6545\u968f\u673a\u9009\u4e00\u4e2a\uff08\u5982a\uff09\uff0c\u90a3\u4e48c\u70b9\u7684\u6807\u7b7e\u88aba\u66ff\u4ee3\u3002<\/span><\/section>\n<section style=\"min-height: 24px; text-align: center; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" style=\"color: #4f4f4f; width: 434px; height: 201px;\" title=\"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2022\/05\/9-1652519627.png\" alt=\"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\" width=\"490\" \/><\/section>\n<section style=\"min-height: 24px; text-align: left; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><strong><span style=\"color: #4f4f4f; font-size: 14px;\"><strong style=\"text-align: left; white-space: normal;\"><span style=\"color: #4f4f4f;\">\u7b2c\u4e8c<\/span><\/strong>\u8f6e\u8fed\u4ee3<\/span><\/strong><\/section>\n<section style=\"min-height: 24px; text-align: left; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"color: #4f4f4f; font-size: 14px;\">\u968f\u673a\u6311\u9009\u4e00\u4e2a\u8282\u70b9\uff08\u5982b\uff09\uff0c\u53d1\u73b0\u5176\u76f8\u90bb\u8282\u70b9\u5747\u4e3aa\uff0c\u6545\u5c06b\u6362\u6210a\uff0c\u91cd\u590d\u6570\u6b21\uff0c\u6700\u7ec8\u7684\u7ed3\u679c\u5982\u56fe\u6240\u793a<\/span><\/section>\n<section style=\"min-height: 24px; text-align: center; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" style=\"color: #4f4f4f; width: 440px; height: 202px;\" title=\"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2022\/05\/3-1652519627-1.png\" alt=\"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\" width=\"505\" \/><\/section>\n<section style=\"min-height: 24px; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 14px;\">\u6211\u4eec\u518d\u770b\u4e00\u4e2a\u4f8b\u5b50\uff0c\u6bd4\u5982\u4e0b\u56fe\uff1a<\/span><\/section>\n<section style=\"min-height: 24px; text-align: center; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" style=\"color: #494949;\" title=\"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2022\/05\/9-1652519627-1.png\" alt=\"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\" width=\"590\" \/><\/section>\n<section style=\"min-height: 24px; text-align: left; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 14px;\">\u5206\u7ec4\u540e\u7684\u7ed3\u679c\u5982\u4e0b\uff0c\u6211\u4eec\u5f97\u5230\u4e86\u72ec\u7acb\u975e\u91cd\u7684groupid\uff0c\u8fd9\u4e2a\u7ed3\u679c\u5176\u5b9e\u662f\u5f88\u96be\u5728\u5b9e\u9645\u573a\u666f\u4e2d\u5e94\u7528\u7684\uff0c\u90a3\u4e48\u6211\u4eec\u5c31\u7684\u7ed3\u679c\u5c31\u6ca1\u6709\u610f\u4e49\u4e86\u4e48\uff1f\u8fd9\u4e2a\u53ef\u4ee5\u5e2e\u6211\u4eec\u5b9a\u4f4d\u5230\u6d53\u5ea6\u5f88\u9ad8\u7684\u7fa4\u4f53\uff0c\u7136\u540e\u518d\u52a0\u4e0a\u90e8\u5206\u5c5e\u6027\u6807\u7b7e\uff0c\u5c31\u80fd\u8f7b\u800c\u6613\u4e3e\u7684\u8bc6\u522b\u51fa\u95ee\u9898\u9ed1\u4ea7\u4e86\u3002<\/span><\/section>\n<section style=\"min-height: 24px; text-align: center; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" style=\"width: 359px; height: 192px;\" title=\"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2022\/05\/3-1652519627-2.png\" alt=\"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\" width=\"566\" \/><\/section>\n<h2 style=\"line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"color: #ff2941;\"><strong>3\u3001\u7528\u4e8e\u534a\u76d1\u7763<\/strong><\/span><\/h2>\n<section style=\"margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"color: #494949; font-size: 14px;\">\u8be5\u7b97\u6cd5\u4e5f\u53ef\u4ee5\u4f5c\u4e3a\u534a\u76d1\u7763\u7684\u5206\u7c7b\u7b97\u6cd5\uff0c<span style=\"color: #494949;\">\u6807\u7b7e\u4f20\u64ad\u65f6\u4e00\u79cd\u534a\u76d1\u7763\u673a\u5668\u5b66\u4e60\u7b97\u6cd5\uff0c\u5b83\u5c06\u6807\u7b7e\u5206\u914d\u7ed9\u4ee5\u524d\u672a\u6807\u8bb0\u7684\u6570\u636e\u70b9\u3002\u5728\u7b97\u6cd5\u5f00\u59cb\u65f6\uff0c\u6570\u636e\u70b9\u7684\u5b50\u96c6\uff08\u901a\u5e38\u53ea\u5360\u5f88\u5c0f\u4e00\u90e8\u5206\uff09\u6709\u6807\u7b7e\uff08\u6216\u5206\u7c7b\uff09\u3002\u5728\u6574\u4e2a\u7b97\u6cd5\u8fc7\u7a0b\u4e2d\uff0c\u8fd9\u4e9b\u6807\u7b7e\u4f1a\u4f20\u64ad\u5230\u672a\u6807\u8bb0\u7684\u70b9\u3002<\/span>\u5728\u6807\u7b7e\u4f20\u64ad\u8fc7\u7a0b\u4e2d\uff0c\u4fdd\u6301\u5df2\u6807\u6ce8\u6570\u636e\u7684\u6807\u7b7e\u4e0d\u53d8\uff0c\u4f7f\u5176\u50cf\u4e00\u4e2a\u6e90\u5934\u628a\u6807\u7b7e\u4f20\u5411\u672a\u6807\u6ce8\u6570\u636e\u3002<\/span><\/section>\n<section style=\"min-height: 24px; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"color: #494949; font-size: 14px;\">\u6700\u7ec8\uff0c\u5f53\u8fed\u4ee3\u8fc7\u7a0b\u7ed3\u675f\u65f6\uff0c\u76f8\u4f3c\u8282\u70b9\u7684\u6982\u7387\u5206\u5e03\u4e5f\u8d8b\u4e8e\u76f8\u4f3c\uff0c\u53ef\u4ee5\u5212\u5206\u5230\u540c\u4e00\u4e2a\u7c7b\u522b\u4e2d\uff0c\u4ece\u800c\u5b8c\u6210\u6807\u7b7e\u4f20\u64ad\u8fc7\u7a0b\uff0c<\/span><span style=\"background-color: #fefefe; font-size: 14px;\">\u8fb9\u7684\u6743\u91cd\u8d8a\u5927\uff0c\u8868\u793a\u4e24\u4e2a\u8282\u70b9\u8d8a\u76f8\u4f3c\uff0c\u90a3\u4e48label\u8d8a\u5bb9\u6613\u4f20\u64ad\u8fc7\u53bb\u3002\u6211\u4eec\u5b9a\u4e49\u4e00\u4e2aNxN\u7684\u6982\u7387\u8f6c\u79fb\u77e9\u9635P\uff1a<\/span><\/section>\n<section style=\"min-height: 24px; text-align: center; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" style=\"width: 332px; height: 78px;\" title=\"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2022\/05\/5-1652519627-1.jpeg\" alt=\"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\" width=\"384\" \/><\/section>\n<section style=\"min-height: 24px; text-align: left; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 14px;\">\u4e0b\u9762\u7684\u56fe\u6765\u770b\u770b\u4f20\u64ad\u8fc7\u7a0b<\/span><\/section>\n<section style=\"min-height: 24px; text-align: center; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" style=\"color: #494949; width: 545px; height: 155px;\" title=\"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2022\/05\/6-1652519627.png\" alt=\"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\" width=\"431\" \/><\/section>\n<section style=\"min-height: 24px; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 14px;\">\u4f20\u64ad\u7ed3\u675f\u540e\u7684\u7ed3\u679c\u5982\u4e0b\uff1a<\/span><\/section>\n<section style=\"min-height: 24px; text-align: center; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" title=\"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2022\/05\/1-1652519627.png\" alt=\"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\" width=\"621\" \/><\/section>\n<section style=\"min-height: 24px; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 14px;\">LPA\u4f7f\u7528\u5df2\u6807\u8bb0\u8282\u70b9\u7684\u6807\u7b7e\u4f5c\u4e3a\u57fa\u7840\uff0c\u5e76\u5c1d\u8bd5\u9884\u6d4b\u672a\u6807\u8bb0\u8282\u70b9\u7684\u6807\u7b7e\u3002\u7136\u800c\uff0c\u5982\u679c\u6700\u521d\u7684\u6807\u7b7e\u662f\u9519\u8bef\u7684\uff0c\u8fd9\u53ef\u80fd\u4f1a\u5f71\u54cd\u6807\u7b7e\u7684\u4f20\u64ad\u8fc7\u7a0b\uff0c\u9519\u8bef\u7684\u6807\u7b7e\u53ef\u80fd\u4f1a\u88ab\u4f20\u64ad\u3002<\/span><strong style=\"color: #d84fa9; font-size: 14px;\">\u8be5\u7b97\u6cd5\u662f\u6982\u7387\u6027\u7684\uff0c\u5e76\u4e14\u53d1\u73b0\u7684\u793e\u533a\u53ef\u80fd\u56e0\u6267\u884c\u7684\u4e0d\u540c\u800c\u4e0d\u540c\u3002<\/strong><\/section>\n<section style=\"min-height: 24px; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><strong style=\"color: #d84fa9; font-size: 14px;\">\u00a0<\/strong><\/section>\n<h1 style=\"line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><strong><span style=\"color: #ff2941; font-size: 20px;\">\u4e8c\u3001\u7b97\u6cd5\u4ee3\u7801\u5b9e\u73b0<\/span><\/strong><\/h1>\n<section style=\"min-height: 24px; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 14px;\">\u8fd9\u4e2a\u7b97\u6cd5\u6bd4\u8f83\u7b80\u5355\uff0c\u6709\u6bd4\u8f83\u591a\u7684\u5b9e\u73b0\u65b9\u5f0f\uff0c\u6700\u65b9\u4fbf\u7684\u8fd8\u662fnetworkx\u8fd9\u4e2a\u5e93\uff0c\u5e76\u7528\u91cc\u9762\u7684\u4e00\u4e2a\u7b80\u5355\u7684\u6570\u636e\u96c6\u8fdb\u884c\u8bd5\u9a8c\u3002<\/span><\/section>\n<h2 style=\"line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><strong><span style=\"color: #ff2941;\">1\u3001\u6570\u636e\u96c6\u4ecb\u7ecd<\/span><\/strong><\/h2>\n<section style=\"margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 14px;\">\u7a7a\u624b\u9053\u6570\u636e\u96c6\u662f\u4e00\u4e2a\u6bd4\u8f83\u7b80\u5355\u7684\u56fe\u6570\u636e\u96c6\uff0c\u4e0b\u9762\u6211\u4eec\u770b\u770b\u5176\u4e2d\u7684\u8fb9\u548c\u8282\u70b9\uff0c\u540e\u9762\u5e94\u7528\u8fd9\u4e2a\u6570\u636e\u96c6\u8fdb\u884c\u8bd5\u9a8c\u3002<\/span><\/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<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<section style=\"margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><code><span class=\"code-snippet_outer\">import networkx as nx<\/span><\/code><code><span class=\"code-snippet_outer\">G = nx.karate_club_graph() <span class=\"code-snippet__comment\"># \u7a7a\u624b\u9053<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">G.nodes()<\/span><\/code><code><span class=\"code-snippet_outer\">NodeView((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,<\/span><\/code><code><span class=\"code-snippet_outer\"> 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33))<\/span><\/code><code><span class=\"code-snippet_outer\"><br \/>\n<\/span><\/code><code><span class=\"code-snippet_outer\">G.edges() <\/span><\/code><code><span class=\"code-snippet_outer\">EdgeView([(0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (0, 6), (0, 7), (0, 8),<\/span><\/code><code><span class=\"code-snippet_outer\">(0, 10), (0, 11), (0, 12), (0, 13), (0, 17), (0, 19), (0, 21), (0, 31), <\/span><\/code><code><span class=\"code-snippet_outer\">(1, 2), (1, 3), (1, 7), (1, 13), (1, 17), (1, 19), (1, 21), (1, 30), <\/span><\/code><code><span class=\"code-snippet_outer\">(2, 3), (2, 7), (2, 8), (2, 9), (2, 13), (2, 27), (2, 28), (2, 32), <\/span><\/code><code><span class=\"code-snippet_outer\">(3, 7), (3, 12), (3, 13), (4, 6), (4, 10), (5, 6), (5, 10), (5, 16), <\/span><\/code><code><span class=\"code-snippet_outer\">(6, 16), (8, 30), (8, 32), (8, 33), (9, 33), (13, 33), (14, 32), <\/span><\/code><code><span class=\"code-snippet_outer\">(14, 33), (15, 32), (15, 33), (18, 32), (18, 33), (19, 33), (20, 32), <\/span><\/code><code><span class=\"code-snippet_outer\">(20, 33), (22, 32), (22, 33), (23, 25), (23, 27), (23, 29), (23, 32), <\/span><\/code><code><span class=\"code-snippet_outer\">(23, 33), (24, 25), (24, 27), (24, 31), (25, 31), (26, 29), (26, 33),<\/span><\/code><code><span class=\"code-snippet_outer\">(27, 33), (28, 31), (28, 33), (29, 32), (29, 33), (30, 32), (30, 33),<\/span><\/code><code><span class=\"code-snippet_outer\">(31, 32), (31, 33), (32, 33)])<\/span><\/code><\/section>\n<\/section>\n<h2 style=\"line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><strong><span style=\"color: #ff2941;\">2\u3001\u81ea\u5df1\u5b9e\u73b0LPA\u7b97\u6cd5<\/span><\/strong><\/h2>\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<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<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<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<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<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<li><\/li>\n<li><\/li>\n<\/ul>\n<section style=\"margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__keyword\">import<\/span> random<\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__keyword\">import<\/span>\u00a0networkx\u00a0<span class=\"code-snippet__keyword\">as<\/span>\u00a0nx<\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__keyword\">import<\/span>\u00a0matplotlib.pyplot\u00a0<span class=\"code-snippet__keyword\">as<\/span>\u00a0plt<\/span><\/code><code>  <\/code><code><span class=\"code-snippet_outer\">  <span class=\"code-snippet__comment\"># \u5e94\u8be5\u5c01\u88c5\u6210\u7c7b\u7684\u5f62\u5f0f<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">  <span class=\"code-snippet__function\"><span class=\"code-snippet__keyword\">def<\/span> <span class=\"code-snippet__title\">lpa<\/span><span class=\"code-snippet__params\">(G)<\/span>:<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">      <span class=\"code-snippet__string\">'''<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">      \u5f02\u6b65\u66f4\u65b0\u65b9\u5f0f<\/span><\/code><code><span class=\"code-snippet_outer\">      G\uff1a\u56fe<\/span><\/code><code><span class=\"code-snippet_outer\">      return\uff1aNone<\/span><\/code><code><span class=\"code-snippet_outer\">      \u901a\u8fc7\u6539\u53d8\u8282\u70b9\u7684\u6807\u7b7e\uff0c\u6700\u540e\u901a\u8fc7\u6807\u7b7e\u6765\u5212\u5206\u793e\u533a<\/span><\/code><code><span class=\"code-snippet_outer\">      \u7b97\u6cd5\u7ec8\u6b62\u6761\u4ef6\uff1a\u8fed\u4ee3\u6b21\u6570\u8d85\u8fc7\u8bbe\u5b9a\u503c<\/span><\/code><code><span class=\"code-snippet_outer\">      '''<\/span><\/code><code><span class=\"code-snippet_outer\">      max_iter_num = <span class=\"code-snippet__number\">0<\/span> <span class=\"code-snippet__comment\"># \u8fed\u4ee3\u6b21\u6570<\/span><\/span><\/code><code>  <\/code><code><span class=\"code-snippet_outer\">      <span class=\"code-snippet__keyword\">while<\/span> max_iter_num &lt; <span class=\"code-snippet__number\">10<\/span>:<\/span><\/code><code><span class=\"code-snippet_outer\">          max_iter_num += <span class=\"code-snippet__number\">1<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">          print(<span class=\"code-snippet__string\">'\u8fed\u4ee3\u6b21\u6570'<\/span>,max_iter_num)<\/span><\/code><code>      <\/code><code><span class=\"code-snippet_outer\">          <span class=\"code-snippet__keyword\">for<\/span> node <span class=\"code-snippet__keyword\">in<\/span> G:<\/span><\/code><code><span class=\"code-snippet_outer\">              count = {} <span class=\"code-snippet__comment\"># \u8bb0\u5f55\u90bb\u5c45\u8282\u70b9\u53ca\u5176\u6807\u7b7e<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">              <span class=\"code-snippet__keyword\">for<\/span> nbr <span class=\"code-snippet__keyword\">in<\/span> G.neighbors(node): <span class=\"code-snippet__comment\"># node\u7684\u90bb\u5c45\u8282\u70b9<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">                  label = G.nodes[nbr][<span class=\"code-snippet__string\">'labels'<\/span>] <\/span><\/code><code><span class=\"code-snippet_outer\">                  count[label] = count.setdefault(label,<span class=\"code-snippet__number\">0<\/span>) + <span class=\"code-snippet__number\">1<\/span><\/span><\/code><code>              <\/code><code><span class=\"code-snippet_outer\">              <span class=\"code-snippet__comment\">#\u627e\u5230\u51fa\u73b0\u6b21\u6570\u6700\u591a\u7684\u6807\u7b7e<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">              count_items = sorted(count.items(),key=<span class=\"code-snippet__keyword\">lambda<\/span> x:-x[<span class=\"code-snippet__number\">-1<\/span>])<\/span><\/code><code><span class=\"code-snippet_outer\">              best_labels = [k <span class=\"code-snippet__keyword\">for<\/span> k,v <span class=\"code-snippet__keyword\">in<\/span> count_items <span class=\"code-snippet__keyword\">if<\/span> v == count_items[<span class=\"code-snippet__number\">0<\/span>][<span class=\"code-snippet__number\">1<\/span>]]<\/span><\/code><code><span class=\"code-snippet_outer\">              <span class=\"code-snippet__comment\">#\u5f53\u591a\u4e2a\u6807\u7b7e\u6700\u5927\u6280\u672f\u503c\u76f8\u540c\u65f6\u968f\u673a\u9009\u53d6\u4e00\u4e2a\u6807\u7b7e<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">              label = random.sample(best_labels,<span class=\"code-snippet__number\">1<\/span>)[<span class=\"code-snippet__number\">0<\/span>] <span class=\"code-snippet__comment\"># \u8fd4\u56de\u7684\u662f\u5217\u8868\uff0c\u6240\u4ee5\u9700\u8981[0]<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">              G.nodes[node][<span class=\"code-snippet__string\">'labels'<\/span>] = label <span class=\"code-snippet__comment\"># \u66f4\u65b0\u6807\u7b7e<\/span><\/span><\/code><code>  <\/code><code>  <\/code><code><span class=\"code-snippet_outer\">  <span class=\"code-snippet__function\"><span class=\"code-snippet__keyword\">def<\/span> <span class=\"code-snippet__title\">draw_picture<\/span><span class=\"code-snippet__params\">(G)<\/span>:<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">      <span class=\"code-snippet__comment\"># \u753b\u56fe<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">      node_color = [float(G.nodes[v][<span class=\"code-snippet__string\">'labels'<\/span>]) <span class=\"code-snippet__keyword\">for<\/span> v <span class=\"code-snippet__keyword\">in<\/span> G]<\/span><\/code><code><span class=\"code-snippet_outer\">      pos = nx.spring_layout(G) <span class=\"code-snippet__comment\"># \u8282\u70b9\u7684\u5e03\u5c40\u4e3aspring\u578b<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">      plt.figure(figsize = (<span class=\"code-snippet__number\">8<\/span>,<span class=\"code-snippet__number\">6<\/span>)) <span class=\"code-snippet__comment\"># \u56fe\u7247\u5927\u5c0f<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">      nx.draw_networkx(G,pos=pos,node_color=node_color)<\/span><\/code><code><span class=\"code-snippet_outer\">      plt.show()<\/span><\/code><code>  <\/code><code><span class=\"code-snippet_outer\">  <span class=\"code-snippet__keyword\">if<\/span> __name__ == <span class=\"code-snippet__string\">\"__main__\"<\/span>:<\/span><\/code><code><span class=\"code-snippet_outer\">      G = nx.karate_club_graph() <span class=\"code-snippet__comment\">#\u7a7a\u624b\u9053\u6570\u636e\u96c6<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">      <span class=\"code-snippet__comment\"># \u7ed9\u8282\u70b9\u6dfb\u52a0\u6807\u7b7e<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">      <span class=\"code-snippet__keyword\">for<\/span> node <span class=\"code-snippet__keyword\">in<\/span> G:<\/span><\/code><code><span class=\"code-snippet_outer\">          G.add_node(node, labels = node) <span class=\"code-snippet__comment\">#\u7528labels\u7684\u72b6\u6001<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">      lpa(G)<\/span><\/code><code><span class=\"code-snippet_outer\">      com = set([G.nodes[node][<span class=\"code-snippet__string\">'labels'<\/span>] <span class=\"code-snippet__keyword\">for<\/span> node inG])<\/span><\/code><code><span class=\"code-snippet_outer\">      print(<span class=\"code-snippet__string\">'\u793e\u533a\u6570\u91cf'<\/span>,len(com))<\/span><\/code><code><span class=\"code-snippet_outer\">      draw_picture(G)<\/span><\/code><code><span class=\"code-snippet_outer\"><br \/>\n<\/span><\/code><code><span class=\"code-snippet_outer\">\u8fed\u4ee3\u6b21\u6570 <span class=\"code-snippet__number\">1<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">\u8fed\u4ee3\u6b21\u6570 <span class=\"code-snippet__number\">2<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">\u8fed\u4ee3\u6b21\u6570 <span class=\"code-snippet__number\">3<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">\u8fed\u4ee3\u6b21\u6570 <span class=\"code-snippet__number\">4<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">\u8fed\u4ee3\u6b21\u6570 <span class=\"code-snippet__number\">5<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">\u8fed\u4ee3\u6b21\u6570 <span class=\"code-snippet__number\">6<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">\u8fed\u4ee3\u6b21\u6570 <span class=\"code-snippet__number\">7<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">\u8fed\u4ee3\u6b21\u6570 <span class=\"code-snippet__number\">8<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">\u8fed\u4ee3\u6b21\u6570 <span class=\"code-snippet__number\">9<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">\u8fed\u4ee3\u6b21\u6570 <span class=\"code-snippet__number\">10<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">\u793e\u533a\u6570\u91cf <span class=\"code-snippet__number\">3<\/span><\/span><\/code><\/section>\n<\/section>\n<section style=\"min-height: 24px; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"color: #494949; font-size: 14px;\">\u4ee3\u7801\u8fd0\u884c\u7ed3\u679c\uff1a<\/span><\/section>\n<section style=\"min-height: 24px; text-align: center; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" style=\"color: #494949; width: 368px; height: 272px;\" title=\"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2022\/05\/0-1652519627.png\" alt=\"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\" width=\"407\" \/><\/section>\n<h2 style=\"line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><strong><span style=\"color: #ff2941;\">3\u3001\u8c03\u5305\u5b9e\u73b0LPA\u7b97\u6cd5<\/span><\/strong><\/h2>\n<section style=\"min-height: 24px; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 14px;\">networkx\u96c6\u6210\u4e86\u8fd9\u4e2a\u7b97\u6cd5\uff0c\u53ef\u4ee5\u76f4\u63a5\u8c03\u7528<\/span><\/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<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<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<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<li><\/li>\n<\/ul>\n<section style=\"margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__keyword\">import<\/span> matplotlib.pyplot <span class=\"code-snippet__keyword\">as<\/span> plt<\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__keyword\">import<\/span> networkx <span class=\"code-snippet__keyword\">as<\/span> nx<\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__keyword\">from<\/span> networkx.algorithms.community <span class=\"code-snippet__keyword\">import<\/span> asyn_lpa_communities <span class=\"code-snippet__keyword\">as<\/span> lpa<\/span><\/code><code><span class=\"code-snippet_outer\"><br \/>\n<\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__comment\"># \u7a7a\u624b\u9053\u4ff1\u4e50\u90e8<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">G   = nx.karate_club_graph()<\/span><\/code><code><span class=\"code-snippet_outer\">com = list(lpa(G))<\/span><\/code><code><span class=\"code-snippet_outer\">print(<span class=\"code-snippet__string\">'\u793e\u533a\u6570\u91cf'<\/span>,len(com))<\/span><\/code><code><span class=\"code-snippet_outer\"><br \/>\n<\/span><\/code><code><span class=\"code-snippet_outer\">com <\/span><\/code><code><span class=\"code-snippet_outer\">[{<span class=\"code-snippet__number\">0<\/span>, <span class=\"code-snippet__number\">1<\/span>, <span class=\"code-snippet__number\">2<\/span>, <span class=\"code-snippet__number\">3<\/span>, <span class=\"code-snippet__number\">7<\/span>, <span class=\"code-snippet__number\">8<\/span>, <span class=\"code-snippet__number\">9<\/span>, <span class=\"code-snippet__number\">11<\/span>, <span class=\"code-snippet__number\">12<\/span>, <span class=\"code-snippet__number\">13<\/span>, <span class=\"code-snippet__number\">17<\/span>, <span class=\"code-snippet__number\">19<\/span>, <span class=\"code-snippet__number\">21<\/span>, <span class=\"code-snippet__number\">30<\/span>},<\/span><\/code><code><span class=\"code-snippet_outer\">{<span class=\"code-snippet__number\">4<\/span>, <span class=\"code-snippet__number\">5<\/span>, <span class=\"code-snippet__number\">6<\/span>, <span class=\"code-snippet__number\">10<\/span>, <span class=\"code-snippet__number\">16<\/span>},<\/span><\/code><code><span class=\"code-snippet_outer\">{<span class=\"code-snippet__number\">14<\/span>, <span class=\"code-snippet__number\">15<\/span>, <span class=\"code-snippet__number\">18<\/span>, <span class=\"code-snippet__number\">20<\/span>, <span class=\"code-snippet__number\">22<\/span>, <span class=\"code-snippet__number\">23<\/span>, <span class=\"code-snippet__number\">24<\/span>, <span class=\"code-snippet__number\">25<\/span>, <span class=\"code-snippet__number\">26<\/span>, <span class=\"code-snippet__number\">27<\/span>, <span class=\"code-snippet__number\">28<\/span>, <span class=\"code-snippet__number\">29<\/span>, <span class=\"code-snippet__number\">31<\/span>, <span class=\"code-snippet__number\">32<\/span>, <span class=\"code-snippet__number\">33<\/span>}]<\/span><\/code><code><span class=\"code-snippet_outer\"><br \/>\n<\/span><\/code><code><span class=\"code-snippet_outer\"><br \/>\n<\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__comment\"># \u4e0b\u9762\u662f\u753b\u56fe<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">pos = nx.spring_layout(G) <span class=\"code-snippet__comment\"># \u8282\u70b9\u7684\u5e03\u5c40\u4e3aspring\u578b<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">NodeId    = list(G.nodes())<\/span><\/code><code><span class=\"code-snippet_outer\">node_size = [G.degree(i)**<span class=\"code-snippet__number\">1.2<\/span>*<span class=\"code-snippet__number\">90<\/span> <span class=\"code-snippet__keyword\">for<\/span> i <span class=\"code-snippet__keyword\">in<\/span> NodeId] <span class=\"code-snippet__comment\"># \u8282\u70b9\u5927\u5c0f<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><br \/>\n<\/span><\/code><code><span class=\"code-snippet_outer\">plt.figure(figsize = (<span class=\"code-snippet__number\">8<\/span>,<span class=\"code-snippet__number\">6<\/span>)) <span class=\"code-snippet__comment\"># \u8bbe\u7f6e\u56fe\u7247\u5927\u5c0f<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">nx.draw(G,pos, <\/span><\/code><code><span class=\"code-snippet_outer\">        with_labels=<span class=\"code-snippet__keyword\">True<\/span>, <\/span><\/code><code><span class=\"code-snippet_outer\">        node_size =node_size, <\/span><\/code><code><span class=\"code-snippet_outer\">        node_color=<span class=\"code-snippet__string\">'w'<\/span>, <\/span><\/code><code><span class=\"code-snippet_outer\">        node_shape = <span class=\"code-snippet__string\">'.'<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">       )<\/span><\/code><code><span class=\"code-snippet_outer\"><br \/>\n<\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__string\">'''<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">node_size\u8868\u793a\u8282\u70b9\u5927\u5c0f<\/span><\/code><code><span class=\"code-snippet_outer\">node_color\u8868\u793a\u8282\u70b9\u989c\u8272<\/span><\/code><code><span class=\"code-snippet_outer\">with_labels=True\u8868\u793a\u8282\u70b9\u662f\u5426\u5e26\u6807\u7b7e<\/span><\/code><code><span class=\"code-snippet_outer\">'''<\/span><\/code><code><span class=\"code-snippet_outer\">color_list = [<span class=\"code-snippet__string\">'pink'<\/span>,<span class=\"code-snippet__string\">'orange'<\/span>,<span class=\"code-snippet__string\">'r'<\/span>,<span class=\"code-snippet__string\">'g'<\/span>,<span class=\"code-snippet__string\">'b'<\/span>,<span class=\"code-snippet__string\">'y'<\/span>,<span class=\"code-snippet__string\">'m'<\/span>,<span class=\"code-snippet__string\">'gray'<\/span>,<span class=\"code-snippet__string\">'black'<\/span>,<span class=\"code-snippet__string\">'c'<\/span>,<span class=\"code-snippet__string\">'brown'<\/span>]<\/span><\/code><code><span class=\"code-snippet_outer\"><br \/>\n<\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__keyword\">for<\/span> i <span class=\"code-snippet__keyword\">in<\/span> range(len(com)):<\/span><\/code><code><span class=\"code-snippet_outer\">    nx.draw_networkx_nodes(G, pos, <\/span><\/code><code><span class=\"code-snippet_outer\">                           nodelist=com[i], <\/span><\/code><code><span class=\"code-snippet_outer\">                           node_color = color_list[i+<span class=\"code-snippet__number\">2<\/span>],  <\/span><\/code><code><span class=\"code-snippet_outer\">                           label=<span class=\"code-snippet__keyword\">True<\/span>)<\/span><\/code><code><span class=\"code-snippet_outer\">plt.show()<\/span><\/code><\/section>\n<\/section>\n<section style=\"min-height: 24px; text-align: center; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><\/section>\n<section style=\"min-height: 24px; text-align: center; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" title=\"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2022\/05\/4-1652519628.png\" alt=\"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\" width=\"656\" \/><\/section>\n<section style=\"min-height: 24px; text-align: center; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><\/section>\n<h1 style=\"line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><strong><span style=\"font-size: 20px; color: #ff2941;\">\u4e09\u3001\u5206\u7fa4\u7ed3\u679c\u53ef\u89c6\u5316<\/span><\/strong><\/h1>\n<section style=\"min-height: 24px; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 14px;\">\u5728\u53ef\u89c6\u5316\u65b9\u9762\uff0c\u786e\u5b9eR\u8bed\u8a00\u8981\u5f3a\uff0c\u5927\u5bb6\u6709\u65f6\u95f4\u53ef\u4ee5\u5b66\u4e60\u4e0b\uff0c\u6d3b\u513f\u5168\u8fd8\u662f\u6709\u70b9\u7528\u5904\u7684\uff0c\u6211\u4eec\u8fd9\u91cc\u7528R\u7684igraph\u5305\u6765\u5c55\u73b0\u4e00\u4e9b\u793e\u533a\u53d1\u73b0\u7684\u7ed3\u679c\u3002<\/span><\/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<li><\/li>\n<li><\/li>\n<\/ul>\n<section style=\"margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><code><span class=\"code-snippet_outer\">library('igraph')<\/span><\/code><code><span class=\"code-snippet_outer\">karate    &lt;-  graph.famous(\"Zachary\")<\/span><\/code><code><span class=\"code-snippet_outer\">community &lt;- label.propagation.community(karate)<\/span><\/code><code><span class=\"code-snippet_outer\"># \u8ba1\u7b97\u6a21\u5757\u5ea6<\/span><\/code><code><span class=\"code-snippet_outer\">modularity(community)<\/span><\/code><code><span class=\"code-snippet_outer\">0.3717949<\/span><\/code><code><span class=\"code-snippet_outer\"><br \/>\n<\/span><\/code><code><span class=\"code-snippet_outer\">#membership\u67e5\u770b\u6bcf\u4e2a\u70b9\u7684\u5404\u81ea\u5206\u7ec4\u60c5\u51b5\u3002<\/span><\/code><code><span class=\"code-snippet_outer\">membership(community)<\/span><\/code><code><span class=\"code-snippet_outer\">1 1 1 1 1 1 1 1 2 1 1 1 1 1 2 2 1 1 2 1 2 1 2 2 2 2 2 2 2 2 2 2 2 2<\/span><\/code><code><span class=\"code-snippet_outer\"><br \/>\n<\/span><\/code><code><span class=\"code-snippet_outer\">plot(community,karate)<\/span><\/code><\/section>\n<\/section>\n<section style=\"min-height: 24px; text-align: left; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 14px;\">\u4e0b\u9762\u4e3a\u4e24\u6b21\u8dd1\u7684\u7ed3\u679c\uff0c\u53ef\u4ee5\u770b\u5230\uff0c\u4e24\u6b21\u7684\u7ed3\u679c\u5e76\u4e0d\u4e00\u6837\uff0c\u8fd9\u4e2a\u5c31\u662f\u9707\u8361\u6548\u5e94\u5bfc\u81f4\u7684\u7ed3\u679c<\/span><\/section>\n<section style=\"min-height: 24px; text-align: center; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" title=\"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2022\/05\/2-1652519628.png\" alt=\"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\" width=\"604\" \/><\/section>\n<section style=\"min-height: 24px; text-align: left; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 14px;\">\u6362\u4e00\u4e2a\u5bf9\u6bd4\u4e0b\u770b\u770b<\/span><\/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<\/ul>\n<section style=\"margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">community<\/span> <span class=\"code-snippet__string\">&lt;- walktrap.community(karate,<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">                                <span class=\"code-snippet__attr\">weights<\/span> = <span class=\"code-snippet__string\">E(karate)$weight, <\/span><\/span><\/code><code><span class=\"code-snippet_outer\">                                <span class=\"code-snippet__attr\">steps<\/span> = <span class=\"code-snippet__string\">8, <\/span><\/span><\/code><code><span class=\"code-snippet_outer\">                                <span class=\"code-snippet__attr\">merges<\/span> =<span class=\"code-snippet__string\">TRUE, <\/span><\/span><\/code><code><span class=\"code-snippet_outer\">                                <span class=\"code-snippet__attr\">modularity<\/span> = <span class=\"code-snippet__string\">TRUE)<\/span><\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__attr\">plot(community,karate)<\/span><\/span><\/code><\/section>\n<\/section>\n<section style=\"text-align: center; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" style=\"width: 375px; height: 327px;\" title=\"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2022\/05\/2-1652519628.jpeg\" alt=\"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\" \/><\/section>\n<section style=\"min-height: 24px; text-align: left; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 14px;\">\u53ef\u4ee5\u7528\u66f4\u590d\u6742\u7684\u6570\u636e\uff0c\u753b\u51fa\u6765\u8fd8\u633a\u597d\u770b\u7684\uff0c\u6570\u636e\u96c6\u7684\u4e0b\u8f7d\u5730\u5740\uff1ahttp:\/\/snap.stanford.edu\/data\/egonets-Facebook.html<\/span><\/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<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<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<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<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<\/ul>\n<section style=\"margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><code><span class=\"code-snippet_outer\">library(igraph)<\/span><\/code><code><span class=\"code-snippet_outer\">library(d3Network)<\/span><\/code><code><span class=\"code-snippet_outer\">igraphDat &lt;- read.graph(file = <span class=\"code-snippet__string\">\"\/Users\/wuzhengxiang\/Documents\/PPT\u6a21\u677f\/0.edges\"<\/span>, directed = <span class=\"code-snippet__keyword\">FALSE<\/span>)<\/span><\/code><code><span class=\"code-snippet_outer\"><br \/>\n<\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__comment\">## Simplify to remove duplications and from-self-to-self loops<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">igraphDat &lt;- simplify(igraphDat, <\/span><\/code><code><span class=\"code-snippet_outer\">             remove.multiple = <span class=\"code-snippet__keyword\">TRUE<\/span>, <\/span><\/code><code><span class=\"code-snippet_outer\">             remove.loops = <span class=\"code-snippet__keyword\">TRUE<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">             )<\/span><\/code><code><span class=\"code-snippet_outer\"><br \/>\n<\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__comment\">## Give numbers<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">V(igraphDat)$label &lt;- seq_along(V(igraphDat))<\/span><\/code><code><span class=\"code-snippet_outer\"><br \/>\n<\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__comment\">## Average path length between any two given nodes<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">(averagePathLength &lt;- average.path.length(igraphDat))<\/span><\/code><code><span class=\"code-snippet_outer\"><br \/>\n<\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__comment\">## Community structure detection based on edge betweenness<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">communityEdgeBetwn &lt;- edge.betweenness.community(igraphDat)<\/span><\/code><code><span class=\"code-snippet_outer\"><br \/>\n<\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__comment\">## Check the transitivity of a graph (probability that the adjacent vertices of a vertex are connected)<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">(transitivityDat &lt;- transitivity(igraphDat, <\/span><\/code><code><span class=\"code-snippet_outer\">             type = <span class=\"code-snippet__string\">\"localaverage\"<\/span>,<\/span><\/code><code><span class=\"code-snippet_outer\">             isolates = <span class=\"code-snippet__string\">\"zero\"<\/span>)<\/span><\/code><code><span class=\"code-snippet_outer\">             )<\/span><\/code><code><span class=\"code-snippet_outer\"><br \/>\n<\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__comment\">## Set the seed to get the same result<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">set.seed(<span class=\"code-snippet__string\">\"20200513\"<\/span>)<\/span><\/code><code><span class=\"code-snippet_outer\"><br \/>\n<\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__comment\">## Add community indicating background colors<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">plot(igraphDat,<\/span><\/code><code><span class=\"code-snippet_outer\">vertex.color = communityEdgeBetwn$membership, <\/span><\/code><code><span class=\"code-snippet_outer\">vertex.size = log(degree(igraphDat) + <span class=\"code-snippet__number\">1<\/span>),<\/span><\/code><code><span class=\"code-snippet_outer\">mark.groups = by(seq_along(communityEdgeBetwn$membership), <\/span><\/code><code><span class=\"code-snippet_outer\">communityEdgeBetwn$membership, invisible)<\/span><\/code><code><span class=\"code-snippet_outer\">    )<\/span><\/code><code><span class=\"code-snippet_outer\"><br \/>\n<\/span><\/code><code><span class=\"code-snippet_outer\"><span class=\"code-snippet__comment\">## Annotate<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">title(<span class=\"code-snippet__string\">\"Stanford Facebook data\"<\/span>, <\/span><\/code><code><span class=\"code-snippet_outer\">      sub = <span class=\"code-snippet__string\">\"http:\/\/snap.stanford.edu\/data\/egonets-Facebook.html\"<\/span><\/span><\/code><code><span class=\"code-snippet_outer\">     )<\/span><\/code><code><span class=\"code-snippet_outer\">text(x = <span class=\"code-snippet__number\">-1<\/span>, y = <span class=\"code-snippet__number\">-1<\/span>, <\/span><\/code><code><span class=\"code-snippet_outer\">     labels = sprintf(<span class=\"code-snippet__string\">\"Average path length: %.2fnTransitivity: %.2f\"<\/span>,<\/span><\/code><code><span class=\"code-snippet_outer\">                      averagePathLength, <\/span><\/code><code><span class=\"code-snippet_outer\">                      transitivityDat)<\/span><\/code><code><span class=\"code-snippet_outer\">    )<\/span><\/code><\/section>\n<\/section>\n<section style=\"min-height: 24px; text-align: center; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" title=\"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2022\/05\/6-1652519628.png\" alt=\"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\" width=\"840\" \/><\/section>\n<section style=\"min-height: 24px; text-align: center; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" style=\"width: 313px; height: 294px;\" title=\"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2022\/05\/1-1652519628.png\" alt=\"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\" width=\"472\" \/><\/section>\n<section style=\"min-height: 24px; text-align: center; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" style=\"color: #494949; width: 324px; height: 266px;\" title=\"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2022\/05\/9-1652519628.png\" alt=\"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\" width=\"529\" \/><\/section>\n<section style=\"min-height: 24px; text-align: center; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><\/section>\n<h1 style=\"line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><strong><span style=\"font-size: 20px; color: #ff2941;\">\u56db\u3001\u7b97\u6cd5\u4f18\u7f3a\u70b9<\/span><\/strong><\/h1>\n<section style=\"min-height: 24px; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 14px;\">\u4f5c\u4e3a\u4e00\u4e2a\u6bd4\u8f83\u7b80\u5355\u7684\u7b97\u6cd5\uff0c\u5176\u4f18\u7f3a\u70b9\u4e5f\u662f\u7279\u522b\u7684\u660e\u663e\u3002<\/span><\/section>\n<h2 style=\"margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><strong><span style=\"color: #ff2941;\">1\u3001\u7b97\u6cd5\u4f18\u70b9<\/span><\/strong><\/h2>\n<section style=\"min-height: 24px; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 14px;\">\u7b97\u6cd5\u903b\u8f91\u7b80\u5355\uff0c\u65f6\u95f4\u590d\u6742\u5ea6\u4f4e\uff0c\u63a5\u8fd1\u7ebf\u6027\u590d\u6742\u5ea6\uff0c\u5728\u8d85\u5927\u89c4\u6a21\u7f51\u7edc\u4e0b\u4f1a\u6709\u4f18\u5f02\u7684\u6027\u80fd\uff0c\u9002\u5408\u505a\u793e\u533a\u53d1\u73b0\u7684baseline\u3002<br \/>\n\u65e0\u987b\u5b9a\u4e49\u4f18\u5316\u51fd\u6570\uff0c\u65e0\u987b\u4e8b\u5148\u6307\u5b9a\u793e\u533a\u4e2a\u6570\uff0c\u7b97\u6cd5\u4f1a\u5229\u7528\u81ea\u8eab\u7684\u7f51\u7edc\u7ed3\u6784\u6765\u6307\u5bfc\u6807\u7b7e\u4f20\u64ad\u3002<\/span><\/section>\n<h2 style=\"margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><strong><span style=\"color: #ff2941;\">2\u3001\u7b97\u6cd5\u7f3a\u70b9<\/span><\/strong><\/h2>\n<section style=\"min-height: 24px; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 14px;\"><strong>\u96ea\u5d29\u6548\u5e94\uff1a<\/strong>\u793e\u533a\u7ed3\u679c\u4e0d\u7a33\u5b9a\uff0c\u968f\u673a\u6027\u5f3a\u3002\u7531\u4e8e\u5f53\u90bb\u5c45\u8282\u70b9\u7684\u793e\u533a\u6807\u7b7e\u6743\u91cd\u76f8\u540c\u65f6\uff0c\u4f1a\u968f\u673a\u53d6\u4e00\u4e2a\u3002\u5bfc\u81f4\u4f20\u64ad\u521d\u671f\u4e00\u4e2a\u5c0f\u7684\u9519\u8bef\u88ab\u4e0d\u65ad\u653e\u5927\uff0c\u6700\u7ec8\u6ca1\u6709\u5f97\u5230\u5408\u9002\u7684\u7ed3\u679c\u3002\u5c24\u5176\u662f\u5f02\u6b65\u66f4\u65b0\u65f6\uff0c\u66f4\u65b0\u987a\u5e8f\u7684\u4e0d\u540c\u4e5f\u4f1a\u5bfc\u81f4\u6700\u7ec8\u793e\u533a\u5212\u5206\u7ed3\u679c\u4e0d\u540c\u3002<\/span><\/section>\n<section style=\"min-height: 24px; text-align: center; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" style=\"width: 578px; height: 127px;\" title=\"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2022\/05\/6-1652519628-1.png\" alt=\"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\" width=\"671\" \/><\/section>\n<section style=\"min-height: 24px; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 14px;\">\u4e0a\u56fe\u4e2d\u5c55\u793a\u4e86\u4e00\u6b21\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\u7684\u6d41\u7a0b\uff1a\u521d\u59cb\u5316\u9636\u6bb5\uff0c\u6bcf\u4e2a\u8282\u70b9\u90fd\u4ee5\u81ea\u5df1\u4f5c\u4e3a\u793e\u533a\u6807\u7b7e\u3002\u6bd4\u5982a\u7684\u793e\u533a\u5c31\u662fa\uff0cc\u7684\u793e\u533a\u5c31\u662fc\u3002\u5f53\u8fdb\u5165\u4f20\u64ad\u9636\u6bb5\uff0c\u8282\u70b9c\u7684\u90bb\u5c45\u8282\u70b9\u51714\u4e2a\uff1aa\uff0cb\uff0cc\uff0cd\u3002\u800c\u793e\u533a\u6807\u7b7e\u4e5f\u662f4\u4e2a\uff1aa\uff0cb\uff0cc\uff0cd\uff0c\u5047\u8bbe\u968f\u673a\u53d6\u4e86\u4e00\u4e2aa\u3002<\/span><\/section>\n<section style=\"min-height: 24px; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 14px;\">\u5982\u679c\u662f\u5f02\u6b65\u66f4\u65b0\uff0c\u6b64\u65f6b\uff0cd\uff0ce\u4e09\u4e2a\u8282\u70b9\u7684\u90bb\u5c45\u8282\u70b9\u4e2d\u793e\u533a\u6807\u7b7e\u5747\u5b58\u57282\u4e2aa\uff0c\u6240\u4ee5\u4ed6\u4eec\u90fd\u4f1a\u7acb\u9a6c\u66f4\u65b0\u6210a\u3002\u5982\u679cc\u5f53\u65f6\u968f\u673a\u9009\u62e9\u7684\u662fb\uff0c\u90a3\u4e48d,e\u5c31\u4f1a\u66f4\u65b0\u6210b\uff0c\u4ece\u800c\u5bfc\u81f4b\u793e\u533a\u6807\u7b7e\u5360\u4f18\uff0c\u800c\u6700\u7ec8\u7684\u793e\u533a\u5212\u5206\u4e5f\u5c31\u6210b\u4e86\u3002<\/span><\/section>\n<section style=\"min-height: 24px; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 14px;\"><strong>\u9707\u8361\u6548\u5e94\uff1a<\/strong>\u793e\u533a\u7ed3\u679c\u6765\u56de\u9707\u8361\uff0c\u4e0d\u6536\u655b\uff0c\u5f53\u4f20\u64ad\u65b9\u5f0f\u5904\u4e8e\u540c\u6b65\u66f4\u65b0\u7684\u65f6\u5019\uff0c\u5c24\u5176\u5bf9\u4e8e\u4e8c\u5206\u56fe\u6216\u5b50\u56fe\u5b58\u5728\u4e8c\u5206\u56fe\u7684\u7ed3\u6784\u800c\u8a00\uff0c\u6781\u6613\u53d1\u751f\u3002<\/span><\/section>\n<section style=\"min-height: 24px; text-align: center; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><img decoding=\"async\" class=\"rich_pages wxw-img\" style=\"width: 541px; height: 197px;\" title=\"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2022\/05\/3-1652519628.png\" alt=\"\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\" width=\"612\" \/><\/section>\n<section style=\"min-height: 24px; line-height: 1.75em; margin-bottom: 0.75em; margin-left: 8px; margin-right: 8px;\"><span style=\"font-size: 14px;\">\u4e0a\u56fe\u4e2d\u5c55\u793a\u4e86\u4e00\u6b21\u4e8c\u5206\u56fe\u4e2d\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\u7684\u6d41\u7a0b\uff0c\u5728\u540c\u6b65\u66f4\u65b0\u7684\u65f6\u5019\uff0c\u6bcf\u4e2a\u8282\u70b9\u4f9d\u8d56\u7684\u90fd\u662f\u4e0a\u4e00\u8f6e\u8fed\u4ee3\u7684\u793e\u533a\u6807\u7b7e\u3002\u5f53\u4e8c\u5206\u56fe\u5de6\u8fb9\u90fd\u662fa\uff0c\u53f3\u8fb9\u90fd\u662fb\u65f6\uff0ca\u793e\u533a\u7684\u8282\u70b9\u6b64\u65f6\u90bb\u5c45\u8282\u70b9\u90fd\u662fb\uff0cb\u793e\u533a\u7684\u8282\u70b9\u6b64\u65f6\u90bb\u5c45\u8282\u70b9\u90fd\u662fa\uff0c\u6839\u636e\u66f4\u65b0\u89c4\u5219\uff0c\u6b64\u65f6a\u793e\u533a\u7684\u8282\u70b9\u5c06\u5168\u90e8\u66f4\u65b0\u4e3ab\uff0cb\u793e\u533a\u7684\u8282\u70b9\u5c06\u5168\u90e8\u66f4\u65b0\u4e3aa\u3002\u6b64\u65f6\u7b97\u6cd5\u65e0\u6cd5\u6536\u655b\uff0c\u4f7f\u5f97\u6574\u4e2a\u7f51\u7edc\u5904\u4e8e\u9707\u8361\u4e2d\u3002<\/span><\/section>\n<section class=\"mp_profile_iframe_wrp\"><\/section>\n<section style=\"margin: 1em 8px 0em; outline: 0px; color: #222222; font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; letter-spacing: 0.544px; white-space: normal; background-color: #ffffff;\"><strong style=\"outline: 0px; caret-color: #1a1a1a; font-size: 16px; color: #282828; word-spacing: 2px; font-family: -apple-system, system-ui, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif; letter-spacing: 0.5px;\">\u8f6c\u81ea\uff1ahttps:\/\/mp.weixin.qq.com\/s\/DgCK9Ea-Qf00KyB1W8x8Iw<br \/>\n<\/strong><\/section>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u5728Graph\u9886\u57df\uff0c\u793e\u533a\u53d1\u73b0\uff08Community detection\uff09\u662f\u4e00\u4e2a\u975e\u5e38\u70ed\u95e8\u4e14\u5e7f\u6cdb\u7684\u8bdd\u9898\uff0c\u540e\u9762\u4f1a\u5199\u4e00\u4e2a\u7cfb &hellip; <a href=\"http:\/\/www.zhushiyao.com\/?p=103815\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u201c\u793e\u533a\u53d1\u73b0\u4e4b\u6807\u7b7e\u4f20\u64ad\u7b97\u6cd5\uff08LPA\uff09\u201d<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[8,724],"_links":{"self":[{"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=\/wp\/v2\/posts\/103815"}],"collection":[{"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=103815"}],"version-history":[{"count":2,"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=\/wp\/v2\/posts\/103815\/revisions"}],"predecessor-version":[{"id":103836,"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=\/wp\/v2\/posts\/103815\/revisions\/103836"}],"wp:attachment":[{"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=103815"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=103815"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=103815"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}