{"id":1157,"date":"2023-07-27T11:31:28","date_gmt":"2023-07-27T11:31:28","guid":{"rendered":"https:\/\/statorials.org\/cn\/%e9%80%bb%e8%be%91%e5%9b%9e%e5%bd%92-python\/"},"modified":"2023-07-27T11:31:28","modified_gmt":"2023-07-27T11:31:28","slug":"%e9%80%bb%e8%be%91%e5%9b%9e%e5%bd%92-python","status":"publish","type":"post","link":"https:\/\/statorials.org\/cn\/%e9%80%bb%e8%be%91%e5%9b%9e%e5%bd%92-python\/","title":{"rendered":"\u5982\u4f55\u5728 python \u4e2d\u6267\u884c\u903b\u8f91\u56de\u5f52\uff08\u9010\u6b65\uff09"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\">\u5f53<a href=\"https:\/\/statorials.org\/cn\/\u53d8\u91cf\u89e3\u91ca\u6027\u53cd\u5e94\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u54cd\u5e94\u53d8\u91cf<\/a>\u662f\u4e8c\u5143\u65f6\uff0c<a href=\"https:\/\/statorials.org\/cn\/\u903b\u8f91\u56de\u5f521\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u903b\u8f91\u56de\u5f52<\/a>\u662f\u6211\u4eec\u53ef\u4ee5\u7528\u6765\u62df\u5408\u56de\u5f52\u6a21\u578b\u7684\u65b9\u6cd5\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u903b\u8f91\u56de\u5f52\u4f7f\u7528\u79f0\u4e3a<em>\u6700\u5927\u4f3c\u7136\u4f30\u8ba1\u7684<\/em>\u65b9\u6cd5\u6765\u67e5\u627e\u4ee5\u4e0b\u5f62\u5f0f\u7684\u65b9\u7a0b\uff1a<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>log[p(X) \/ ( <sub>1<\/sub> -p(X))] = \u03b2 <sub>0<\/sub> + \u03b2 <sub>1<\/sub> X <sub>1<\/sub> + \u03b2 <sub>2<\/sub> X <sub>2<\/sub> + \u2026 + \u03b2 <sub>p<\/sub><\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">\u91d1\u5b50\uff1a<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\"><strong>X <sub>j<\/sub><\/strong> \uff1a\u7b2c j<sup>\u4e2a<\/sup>\u9884\u6d4b\u53d8\u91cf<\/span><\/li>\n<li><span style=\"color: #000000;\"><strong>\u03b2 <sub>j<\/sub><\/strong> \uff1a\u7b2c j<sup>\u4e2a<\/sup>\u9884\u6d4b\u53d8\u91cf\u7684\u7cfb\u6570\u4f30\u8ba1<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\">\u65b9\u7a0b\u53f3\u4fa7\u7684\u516c\u5f0f\u9884\u6d4b\u54cd\u5e94\u53d8\u91cf\u53d6\u503c 1 \u7684\u5bf9<strong>\u6570\u51e0\u7387<\/strong>\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u56e0\u6b64\uff0c\u5f53\u6211\u4eec\u62df\u5408\u903b\u8f91\u56de\u5f52\u6a21\u578b\u65f6\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u65b9\u7a0b\u6765\u8ba1\u7b97\u7ed9\u5b9a\u89c2\u6d4b\u503c\u4e3a 1 \u7684\u6982\u7387\uff1a<\/span><\/p>\n<p> <span style=\"color: #000000;\">p(X) = e <sup>\u03b2 <sub>0<\/sub> + <sub>\u03b2<\/sub> <sub>1<\/sub> <sub>X<\/sub> <sub>1<\/sub> <sub>+<\/sub> <sub>\u03b2<\/sub><\/sup> <sup><sub>2<\/sub> <sub>X<\/sub> <sub>2<\/sub> <sub>+<\/sub> <sub>\u2026<\/sub> <sub>+<\/sub> <sub>\u03b2<\/sub><\/sup> p<\/span><\/p>\n<p><span style=\"color: #000000;\">\u7136\u540e\u6211\u4eec\u4f7f\u7528\u4e00\u5b9a\u7684\u6982\u7387\u9608\u503c\u5c06\u89c2\u5bdf\u7ed3\u679c\u5206\u7c7b\u4e3a 1 \u6216 0\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u4ee5\u8bf4\u6982\u7387\u5927\u4e8e\u6216\u7b49\u4e8e 0.5 \u7684\u89c2\u6d4b\u503c\u5c06\u88ab\u5206\u7c7b\u4e3a\u201c1\u201d\uff0c\u6240\u6709\u5176\u4ed6\u89c2\u6d4b\u503c\u5c06\u88ab\u5206\u7c7b\u4e3a\u201c0\u201d\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u672c\u6559\u7a0b\u63d0\u4f9b\u4e86\u5982\u4f55\u5728 R \u4e2d\u6267\u884c\u903b\u8f91\u56de\u5f52\u7684\u5206\u6b65\u793a\u4f8b\u3002<\/span><\/p>\n<h3><span style=\"color: #000000;\"><strong>\u7b2c1\u6b65\uff1a\u5bfc\u5165\u5fc5\u8981\u7684\u5305<\/strong><\/span><\/h3>\n<p><span style=\"color: #000000;\">\u9996\u5148\uff0c\u6211\u4eec\u5c06\u5bfc\u5165\u5fc5\u8981\u7684\u5305\u4ee5\u5728 Python \u4e2d\u6267\u884c\u903b\u8f91\u56de\u5f52\uff1a<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008000;\">import<\/span> pandas <span style=\"color: #008000;\">as<\/span> pd\n<span style=\"color: #008000;\">import<\/span> numpy <span style=\"color: #008000;\">as<\/span> np\n<span style=\"color: #008000;\">from<\/span> sklearn. <span style=\"color: #3366ff;\">model_selection<\/span> <span style=\"color: #008000;\">import<\/span> train_test_split\n<span style=\"color: #008000;\">from<\/span> sklearn. <span style=\"color: #3366ff;\">linear_model<\/span> <span style=\"color: #008000;\">import<\/span> LogisticRegression\n<span style=\"color: #008000;\">from<\/span> sklearn <span style=\"color: #008000;\">import<\/span> metrics\n<span style=\"color: #008000;\">import<\/span> matplotlib. <span style=\"color: #3366ff;\">pyplot<\/span> <span style=\"color: #008000;\">as<\/span> plt\n<\/strong><\/pre>\n<h3><span style=\"color: #000000;\"><strong>\u7b2c2\u6b65\uff1a\u52a0\u8f7d\u6570\u636e<\/strong><\/span><\/h3>\n<p><span style=\"color: #000000;\">\u5bf9\u4e8e\u6b64\u793a\u4f8b\uff0c\u6211\u4eec\u5c06\u4f7f\u7528<a href=\"https:\/\/www.ime.unicamp.br\/~dias\/Intoduction%20to%20Statistical%20Learning.pdf\" target=\"_blank\" rel=\"noopener noreferrer\">\u300a\u7edf\u8ba1\u5b66\u4e60\u7b80\u4ecb\u300b\u4e00\u4e66\u4e2d<\/a>\u7684<strong>\u9ed8\u8ba4<\/strong>\u6570\u636e\u96c6\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\u6765\u52a0\u8f7d\u5e76\u663e\u793a\u6570\u636e\u96c6\u7684\u6458\u8981\uff1a<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#import dataset from CSV file on Github\n<span style=\"color: #000000;\">url = \"https:\/\/raw.githubusercontent.com\/Statorials\/Python-Guides\/main\/default.csv\"\ndata = pd. <span style=\"color: #3366ff;\">read_csv<\/span> (url)\n<\/span><\/span>\n<span style=\"color: #008080;\">#view first six rows of dataset\n<\/span>data[0:6]\n\n        default student balance income\n0 0 0 729.526495 44361.625074\n1 0 1 817.180407 12106.134700\n2 0 0 1073.549164 31767.138947\n3 0 0 529.250605 35704.493935\n4 0 0 785.655883 38463.495879\n5 0 1 919.588530 7491.558572  \n\n<span style=\"color: #008080;\">#find total observations in dataset<\/span>\nlen( <span style=\"color: #3366ff;\">data.index<\/span> )\n\n10000\n<\/strong><\/pre>\n<p><span style=\"color: #000000;\">\u8be5\u6570\u636e\u96c6\u5305\u542b 10,000 \u4eba\u7684\u4ee5\u4e0b\u4fe1\u606f\uff1a<\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\"><strong>\u8fdd\u7ea6\uff1a<\/strong>\u8868\u660e\u4e2a\u4eba\u662f\u5426\u8fdd\u7ea6\u3002<\/span><\/li>\n<li><span style=\"color: #000000;\"><strong>\u5b66\u751f\uff1a<\/strong>\u8868\u660e\u4e2a\u4eba\u662f\u5426\u662f\u5b66\u751f\u3002<\/span><\/li>\n<li><span style=\"color: #000000;\"><strong>\u4f59\u989d\uff1a<\/strong>\u4e2a\u4eba\u6301\u6709\u7684\u5e73\u5747\u4f59\u989d\u3002<\/span><\/li>\n<li><span style=\"color: #000000;\"><strong>\u6536\u5165\uff1a<\/strong>\u4e2a\u4eba\u7684\u6536\u5165\u3002<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\">\u6211\u4eec\u5c06\u4f7f\u7528\u5b66\u751f\u8eab\u4efd\u3001\u94f6\u884c\u4f59\u989d\u548c\u6536\u5165\u6784\u5efa\u903b\u8f91\u56de\u5f52\u6a21\u578b\uff0c\u9884\u6d4b\u7ed9\u5b9a\u4e2a\u4eba\u8fdd\u7ea6\u7684\u6982\u7387\u3002<\/span><\/p>\n<h3><span style=\"color: #000000;\"><strong>\u7b2c 3 \u6b65\uff1a\u521b\u5efa\u8bad\u7ec3\u548c\u6d4b\u8bd5\u6837\u672c<\/strong><\/span><\/h3>\n<p><span style=\"color: #000000;\">\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u6570\u636e\u96c6\u5206\u4e3a\u7528\u4e8e<em>\u8bad\u7ec3<\/em>\u6a21\u578b\u7684\u8bad\u7ec3\u96c6\u548c<em>\u7528\u4e8e\u6d4b\u8bd5<\/em>\u6a21\u578b\u7684\u6d4b\u8bd5\u96c6\u3002<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#define the predictor variables and the response variable\n<\/span>X = data[[' <span style=\"color: #008000;\">student<\/span> ',' <span style=\"color: #008000;\">balance<\/span> ',' <span style=\"color: #008000;\">income<\/span> ']]\ny = data[' <span style=\"color: #008000;\">default<\/span> ']\n\n<span style=\"color: #008080;\">#split the dataset into training (70%) and testing (30%) sets\n<\/span>X_train,X_test,y_train,y_test = <span style=\"color: #3366ff;\">train_test_split<\/span> (X,y,test_size=0.3,random_state=0)<\/strong><\/pre>\n<h3><span style=\"color: #000000;\"><strong>\u6b65\u9aa4 4\uff1a\u62df\u5408\u903b\u8f91\u56de\u5f52\u6a21\u578b<\/strong><\/span><\/h3>\n<p><span style=\"color: #000000;\">\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u4f7f\u7528<b>LogisticRegression()<\/b>\u51fd\u6570\u5c06\u903b\u8f91\u56de\u5f52\u6a21\u578b\u62df\u5408\u5230\u6570\u636e\u96c6\uff1a<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#instantiate the model\n<\/span>log_regression = LogisticRegression()\n\n<span style=\"color: #008080;\">#fit the model using the training data\n<\/span>log_regression. <span style=\"color: #3366ff;\">fit<\/span> (X_train,y_train)\n\n<span style=\"color: #008080;\">#use model to make predictions on test data\n<\/span>y_pred = log_regression. <span style=\"color: #3366ff;\">predict<\/span> (X_test)\n<\/strong><\/pre>\n<h3><span style=\"color: #000000;\"><strong>\u7b2c 5 \u6b65\uff1a\u6a21\u578b\u8bca\u65ad<\/strong><\/span><\/h3>\n<p><span style=\"color: #000000;\">\u4e00\u65e6\u6211\u4eec\u62df\u5408\u4e86\u56de\u5f52\u6a21\u578b\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u5206\u6790\u6a21\u578b\u5728\u6d4b\u8bd5\u6570\u636e\u96c6\u4e0a\u7684\u6027\u80fd\u3002<\/span><\/p>\n<p>\u9996\u5148\uff0c\u6211\u4eec\u5c06\u4e3a<span style=\"color: #000000;\">\u6a21\u578b<\/span><span style=\"color: #000000;\">\u521b\u5efa\u6df7\u6dc6\u77e9\u9635<\/span>\uff1a<\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong>cnf_matrix = metrics. <span style=\"color: #3366ff;\">confusion_matrix<\/span> (y_test, y_pred)\ncnf_matrix\n\narray([[2886, 1],\n       [113,0]])\n<\/strong><\/span><\/pre>\n<p><span style=\"color: #000000;\">\u4ece\u6df7\u6dc6\u77e9\u9635\u6211\u4eec\u53ef\u4ee5\u770b\u51fa\uff1a<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\">#\u771f\u5b9e\u9633\u6027\u9884\u6d4b\uff1a2886<\/span><\/li>\n<li> <span style=\"color: #000000;\">#\u771f\u5b9e\u7684\u8d1f\u9762\u9884\u6d4b\uff1a0<\/span><\/li>\n<li> <span style=\"color: #000000;\">#\u8bef\u62a5\u9884\u6d4b\uff1a113<\/span><\/li>\n<li> <span style=\"color: #000000;\">#\u5047\u9634\u6027\u9884\u6d4b\uff1a1<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\">\u6211\u4eec\u8fd8\u53ef\u4ee5\u83b7\u5f97\u51c6\u786e\u7387\u6a21\u578b\uff0c\u5b83\u544a\u8bc9\u6211\u4eec\u6a21\u578b\u505a\u51fa\u7684\u6821\u6b63\u9884\u6d4b\u7684\u767e\u5206\u6bd4\uff1a<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong>print(\" <span style=\"color: #008000;\">Accuracy:<\/span> \", <span style=\"color: #3366ff;\">metrics.accuracy_score<\/span> (y_test, y_pred))l\n\nAccuracy: 0.962\n<\/strong><\/pre>\n<p><span style=\"color: #000000;\">\u8fd9\u544a\u8bc9\u6211\u4eec\uff0c\u8be5\u6a21\u578b\u5728<strong>96.2%<\/strong>\u7684\u60c5\u51b5\u4e0b\u5bf9\u4e2a\u4eba\u662f\u5426\u4f1a\u8fdd\u7ea6\u505a\u51fa\u4e86\u6b63\u786e\u7684\u9884\u6d4b\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u6700\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u7ed8\u5236\u63a5\u6536\u8005\u64cd\u4f5c\u7279\u5f81\uff08ROC\uff09\u66f2\u7ebf\uff0c\u8be5\u66f2\u7ebf\u663e\u793a\u5f53\u9884\u6d4b\u6982\u7387\u9608\u503c\u4ece 1 \u964d\u4f4e\u5230 0 \u65f6\u6a21\u578b\u9884\u6d4b\u7684\u771f\u9633\u6027\u767e\u5206\u6bd4\u3002<\/span><\/p>\n<p> <span style=\"color: #000000;\">AUC\uff08\u66f2\u7ebf\u4e0b\u9762\u79ef\uff09\u8d8a\u9ad8\uff0c\u6211\u4eec\u7684\u6a21\u578b\u9884\u6d4b\u7ed3\u679c\u5c31\u8d8a\u51c6\u786e\uff1a<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #008080;\">#define metrics<\/span>\ny_pred_proba = log_regression. <span style=\"color: #3366ff;\">predict_proba<\/span> (X_test)[::,1]\nfpr, tpr, _ = metrics. <span style=\"color: #3366ff;\">roc_curve<\/span> (y_test, y_pred_proba)\nauc = metrics. <span style=\"color: #3366ff;\">roc_auc_score<\/span> (y_test, y_pred_proba)\n\n<span style=\"color: #008080;\">#create ROC curve\n<\/span>plt. <span style=\"color: #3366ff;\">plot<\/span> (fpr,tpr,label=\" <span style=\"color: #008000;\">AUC=<\/span> \"+str(auc))\nplt. <span style=\"color: #3366ff;\">legend<\/span> (loc=4)\nplt. <span style=\"color: #3366ff;\">show<\/span> ()\n<\/strong><\/span><\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-11591 \" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/auc1.png\" alt=\"Python \u4e2d\u7684 ROC \u66f2\u7ebf\" width=\"389\" height=\"262\" srcset=\"\" sizes=\"auto, \"><\/p>\n<div class=\"entry-content entry-content-single\" data-content-ads-inserted=\"true\">\n<p><em><span style=\"color: #000000;\">\u672c\u6559\u7a0b\u4e2d\u4f7f\u7528\u7684\u5b8c\u6574 Python \u4ee3\u7801\u53ef\u4ee5<a href=\"https:\/\/github.com\/Statorials\/Python-Guides\/blob\/main\/logistic_regression.py\" target=\"_blank\" rel=\"noopener noreferrer\">\u5728\u6b64\u5904<\/a>\u627e\u5230\u3002<\/span><\/em><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u5f53\u54cd\u5e94\u53d8\u91cf\u662f\u4e8c\u5143\u65f6\uff0c\u903b\u8f91\u56de\u5f52\u662f\u6211\u4eec\u53ef\u4ee5\u7528\u6765\u62df\u5408\u56de\u5f52\u6a21\u578b\u7684\u65b9\u6cd5\u3002 \u903b\u8f91\u56de\u5f52\u4f7f\u7528\u79f0\u4e3a\u6700\u5927\u4f3c\u7136\u4f30\u8ba1\u7684\u65b9\u6cd5\u6765\u67e5\u627e\u4ee5\u4e0b\u5f62 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-1157","post","type-post","status-publish","format-standard","hentry","category-11"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5982\u4f55\u5728 Python \u4e2d\u6267\u884c\u903b\u8f91\u56de\u5f52\uff08\u4e00\u6b65\u4e00\u6b65\uff09 - Statorials<\/title>\n<meta name=\"description\" content=\"\u672c\u6559\u7a0b\u4ecb\u7ecd\u5982\u4f55\u5728 Python \u4e2d\u6267\u884c\u903b\u8f91\u56de\u5f52\uff0c\u5305\u62ec\u5206\u6b65\u793a\u4f8b\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/statorials.org\/cn\/\u903b\u8f91\u56de\u5f52-python\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5982\u4f55\u5728 Python \u4e2d\u6267\u884c\u903b\u8f91\u56de\u5f52\uff08\u4e00\u6b65\u4e00\u6b65\uff09 - Statorials\" \/>\n<meta property=\"og:description\" content=\"\u672c\u6559\u7a0b\u4ecb\u7ecd\u5982\u4f55\u5728 Python \u4e2d\u6267\u884c\u903b\u8f91\u56de\u5f52\uff0c\u5305\u62ec\u5206\u6b65\u793a\u4f8b\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/cn\/\u903b\u8f91\u56de\u5f52-python\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-27T11:31:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/auc1.png\" \/>\n<meta name=\"author\" content=\"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/statorials.org\/cn\/%e9%80%bb%e8%be%91%e5%9b%9e%e5%bd%92-python\/\",\"url\":\"https:\/\/statorials.org\/cn\/%e9%80%bb%e8%be%91%e5%9b%9e%e5%bd%92-python\/\",\"name\":\"\u5982\u4f55\u5728 Python \u4e2d\u6267\u884c\u903b\u8f91\u56de\u5f52\uff08\u4e00\u6b65\u4e00\u6b65\uff09 - Statorials\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/cn\/#website\"},\"datePublished\":\"2023-07-27T11:31:28+00:00\",\"dateModified\":\"2023-07-27T11:31:28+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/cn\/#\/schema\/person\/124e4e5b7c9f8dc0f1f95cc8c1db3261\"},\"description\":\"\u672c\u6559\u7a0b\u4ecb\u7ecd\u5982\u4f55\u5728 Python \u4e2d\u6267\u884c\u903b\u8f91\u56de\u5f52\uff0c\u5305\u62ec\u5206\u6b65\u793a\u4f8b\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/cn\/%e9%80%bb%e8%be%91%e5%9b%9e%e5%bd%92-python\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/cn\/%e9%80%bb%e8%be%91%e5%9b%9e%e5%bd%92-python\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/cn\/%e9%80%bb%e8%be%91%e5%9b%9e%e5%bd%92-python\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u5bb6\",\"item\":\"https:\/\/statorials.org\/cn\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5982\u4f55\u5728 python \u4e2d\u6267\u884c\u903b\u8f91\u56de\u5f52\uff08\u9010\u6b65\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/statorials.org\/cn\/#website\",\"url\":\"https:\/\/statorials.org\/cn\/\",\"name\":\"Statorials\",\"description\":\"\u60a8\u7684\u7edf\u8ba1\u7d20\u517b\u6307\u5357\uff01\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/statorials.org\/cn\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/statorials.org\/cn\/#\/schema\/person\/124e4e5b7c9f8dc0f1f95cc8c1db3261\",\"name\":\"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/statorials.org\/cn\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/statorials.org\/cn\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"contentUrl\":\"https:\/\/statorials.org\/cn\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"caption\":\"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a\"},\"description\":\"\u5927\u5bb6\u597d\uff0c\u6211\u662f\u672c\u6770\u660e\uff0c\u4e00\u4f4d\u9000\u4f11\u7684\u7edf\u8ba1\u5b66\u6559\u6388\uff0c\u540e\u6765\u6210\u4e3a Statorials \u7684\u70ed\u5fc3\u6559\u5e08\u3002 \u51ed\u501f\u5728\u7edf\u8ba1\u9886\u57df\u7684\u4e30\u5bcc\u7ecf\u9a8c\u548c\u4e13\u4e1a\u77e5\u8bc6\uff0c\u6211\u6e34\u671b\u5206\u4eab\u6211\u7684\u77e5\u8bc6\uff0c\u901a\u8fc7 Statorials \u589e\u5f3a\u5b66\u751f\u7684\u80fd\u529b\u3002\u4e86\u89e3\u66f4\u591a\",\"sameAs\":[\"https:\/\/statorials.org\/cn\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u5982\u4f55\u5728 Python \u4e2d\u6267\u884c\u903b\u8f91\u56de\u5f52\uff08\u4e00\u6b65\u4e00\u6b65\uff09 - Statorials","description":"\u672c\u6559\u7a0b\u4ecb\u7ecd\u5982\u4f55\u5728 Python \u4e2d\u6267\u884c\u903b\u8f91\u56de\u5f52\uff0c\u5305\u62ec\u5206\u6b65\u793a\u4f8b\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/statorials.org\/cn\/\u903b\u8f91\u56de\u5f52-python\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5982\u4f55\u5728 Python \u4e2d\u6267\u884c\u903b\u8f91\u56de\u5f52\uff08\u4e00\u6b65\u4e00\u6b65\uff09 - Statorials","og_description":"\u672c\u6559\u7a0b\u4ecb\u7ecd\u5982\u4f55\u5728 Python \u4e2d\u6267\u884c\u903b\u8f91\u56de\u5f52\uff0c\u5305\u62ec\u5206\u6b65\u793a\u4f8b\u3002","og_url":"https:\/\/statorials.org\/cn\/\u903b\u8f91\u56de\u5f52-python\/","og_site_name":"Statorials","article_published_time":"2023-07-27T11:31:28+00:00","og_image":[{"url":"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/auc1.png"}],"author":"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/statorials.org\/cn\/%e9%80%bb%e8%be%91%e5%9b%9e%e5%bd%92-python\/","url":"https:\/\/statorials.org\/cn\/%e9%80%bb%e8%be%91%e5%9b%9e%e5%bd%92-python\/","name":"\u5982\u4f55\u5728 Python \u4e2d\u6267\u884c\u903b\u8f91\u56de\u5f52\uff08\u4e00\u6b65\u4e00\u6b65\uff09 - Statorials","isPartOf":{"@id":"https:\/\/statorials.org\/cn\/#website"},"datePublished":"2023-07-27T11:31:28+00:00","dateModified":"2023-07-27T11:31:28+00:00","author":{"@id":"https:\/\/statorials.org\/cn\/#\/schema\/person\/124e4e5b7c9f8dc0f1f95cc8c1db3261"},"description":"\u672c\u6559\u7a0b\u4ecb\u7ecd\u5982\u4f55\u5728 Python \u4e2d\u6267\u884c\u903b\u8f91\u56de\u5f52\uff0c\u5305\u62ec\u5206\u6b65\u793a\u4f8b\u3002","breadcrumb":{"@id":"https:\/\/statorials.org\/cn\/%e9%80%bb%e8%be%91%e5%9b%9e%e5%bd%92-python\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/cn\/%e9%80%bb%e8%be%91%e5%9b%9e%e5%bd%92-python\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/cn\/%e9%80%bb%e8%be%91%e5%9b%9e%e5%bd%92-python\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u5bb6","item":"https:\/\/statorials.org\/cn\/"},{"@type":"ListItem","position":2,"name":"\u5982\u4f55\u5728 python \u4e2d\u6267\u884c\u903b\u8f91\u56de\u5f52\uff08\u9010\u6b65\uff09"}]},{"@type":"WebSite","@id":"https:\/\/statorials.org\/cn\/#website","url":"https:\/\/statorials.org\/cn\/","name":"Statorials","description":"\u60a8\u7684\u7edf\u8ba1\u7d20\u517b\u6307\u5357\uff01","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/statorials.org\/cn\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/statorials.org\/cn\/#\/schema\/person\/124e4e5b7c9f8dc0f1f95cc8c1db3261","name":"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/statorials.org\/cn\/#\/schema\/person\/image\/","url":"https:\/\/statorials.org\/cn\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","contentUrl":"https:\/\/statorials.org\/cn\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","caption":"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a"},"description":"\u5927\u5bb6\u597d\uff0c\u6211\u662f\u672c\u6770\u660e\uff0c\u4e00\u4f4d\u9000\u4f11\u7684\u7edf\u8ba1\u5b66\u6559\u6388\uff0c\u540e\u6765\u6210\u4e3a Statorials \u7684\u70ed\u5fc3\u6559\u5e08\u3002 \u51ed\u501f\u5728\u7edf\u8ba1\u9886\u57df\u7684\u4e30\u5bcc\u7ecf\u9a8c\u548c\u4e13\u4e1a\u77e5\u8bc6\uff0c\u6211\u6e34\u671b\u5206\u4eab\u6211\u7684\u77e5\u8bc6\uff0c\u901a\u8fc7 Statorials \u589e\u5f3a\u5b66\u751f\u7684\u80fd\u529b\u3002\u4e86\u89e3\u66f4\u591a","sameAs":["https:\/\/statorials.org\/cn"]}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"_links":{"self":[{"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/posts\/1157","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/comments?post=1157"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/posts\/1157\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/media?parent=1157"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/categories?post=1157"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/tags?post=1157"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}