{"id":1130888,"date":"2025-01-08T20:44:04","date_gmt":"2025-01-08T12:44:04","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1130888.html"},"modified":"2025-01-08T20:44:08","modified_gmt":"2025-01-08T12:44:08","slug":"python%e5%a6%82%e4%bd%95%e5%b0%86%e5%a4%9a%e7%bb%b4%e7%9f%a9%e9%98%b5%e8%bf%9b%e8%a1%8c%e5%bd%92%e4%b8%80%e5%8c%96","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1130888.html","title":{"rendered":"Python\u5982\u4f55\u5c06\u591a\u7ef4\u77e9\u9635\u8fdb\u884c\u5f52\u4e00\u5316"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25100828\/efa1ae32-6eb3-43be-b678-40a0dcb9a561.webp\" alt=\"Python\u5982\u4f55\u5c06\u591a\u7ef4\u77e9\u9635\u8fdb\u884c\u5f52\u4e00\u5316\" \/><\/p>\n<p><p> <strong>Python\u4e2d\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u6cd5\u5c06\u591a\u7ef4\u77e9\u9635\u8fdb\u884c\u5f52\u4e00\u5316\uff0c\u5305\u62ecMin-Max\u5f52\u4e00\u5316\u3001Z-score\u5f52\u4e00\u5316\u548cMaxAbs\u5f52\u4e00\u5316\u7b49\u3002<\/strong> \u5728\u8fd9\u51e0\u79cd\u65b9\u6cd5\u4e2d\uff0cMin-Max\u5f52\u4e00\u5316\u901a\u8fc7\u5c06\u6570\u636e\u7f29\u653e\u5230\u6307\u5b9a\u7684\u8303\u56f4\uff08\u901a\u5e38\u662f0\u52301\uff09\u6765\u5b9e\u73b0\u5f52\u4e00\u5316\uff0c\u8fd9\u79cd\u65b9\u6cd5\u7b80\u5355\u6613\u61c2\u4e14\u9002\u7528\u5e7f\u6cdb\u3002\u4e0b\u9762\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528Python\u5b9e\u73b0\u4e0d\u540c\u7684\u5f52\u4e00\u5316\u65b9\u6cd5\uff0c\u5e76\u63a2\u8ba8\u6bcf\u79cd\u65b9\u6cd5\u7684\u4f18\u7f3a\u70b9\u548c\u9002\u7528\u573a\u666f\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001Min-Max\u5f52\u4e00\u5316<\/h3>\n<\/p>\n<p><p>Min-Max\u5f52\u4e00\u5316\u662f\u4e00\u79cd\u975e\u5e38\u5e38\u89c1\u7684\u5f52\u4e00\u5316\u65b9\u6cd5\u3002\u5b83\u901a\u8fc7\u5c06\u6570\u636e\u6309\u6bd4\u4f8b\u7f29\u653e\u5230\u4e00\u4e2a\u7279\u5b9a\u7684\u8303\u56f4\uff08\u901a\u5e38\u662f0\u52301\uff09\uff0c\u4ece\u800c\u4f7f\u6570\u636e\u7684\u6700\u5c0f\u503c\u53d8\u4e3a0\uff0c\u6700\u5927\u503c\u53d8\u4e3a1\u3002\u5176\u516c\u5f0f\u5982\u4e0b\uff1a<\/p>\n<p>[ X&#39; = \\frac{X &#8211; X_{\\text{min}}}{X_{\\text{max}} &#8211; X_{\\text{min}}} ]<\/p>\n<\/p>\n<p><h4>1\u3001\u7406\u8bba\u80cc\u666f<\/h4>\n<\/p>\n<p><p>Min-Max\u5f52\u4e00\u5316\u7684\u6838\u5fc3\u601d\u60f3\u662f\u901a\u8fc7\u7ebf\u6027\u53d8\u6362\u5c06\u6570\u636e\u6620\u5c04\u5230\u4e00\u4e2a\u56fa\u5b9a\u8303\u56f4\u5185\u3002\u8fd9\u4e2a\u65b9\u6cd5\u7684\u4f18\u70b9\u662f\u7b80\u5355\u6613\u61c2\uff0c\u4e14\u5bf9\u6570\u636e\u7684\u539f\u59cb\u5206\u5e03\u6ca1\u6709\u592a\u591a\u8981\u6c42\u3002\u5b83\u4e3b\u8981\u9002\u7528\u4e8e\u6570\u636e\u5206\u5e03\u8f83\u4e3a\u5747\u5300\u7684\u573a\u666f\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u4ee3\u7801\u5b9e\u73b0<\/h4>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>sklearn.preprocessing<\/code>\u6a21\u5757\u4e2d\u7684<code>MinMaxScaler<\/code>\u6765\u5b9e\u73b0Min-Max\u5f52\u4e00\u5316\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from sklearn.preprocessing import MinMaxScaler<\/p>\n<p>import numpy as np<\/p>\n<h2><strong>\u521b\u5efa\u4e00\u4e2a\u793a\u4f8b\u591a\u7ef4\u77e9\u9635<\/strong><\/h2>\n<p>data = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]])<\/p>\n<h2><strong>\u521d\u59cb\u5316MinMaxScaler<\/strong><\/h2>\n<p>scaler = MinMaxScaler()<\/p>\n<h2><strong>\u5bf9\u6570\u636e\u8fdb\u884c\u5f52\u4e00\u5316<\/strong><\/h2>\n<p>normalized_data = scaler.fit_transform(data)<\/p>\n<p>print(&quot;\u5f52\u4e00\u5316\u540e\u7684\u6570\u636e\uff1a&quot;)<\/p>\n<p>print(normalized_data)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3\u3001\u5e94\u7528\u573a\u666f\u4e0e\u4f18\u7f3a\u70b9<\/h4>\n<\/p>\n<p><p>Min-Max\u5f52\u4e00\u5316\u9002\u7528\u4e8e\u6570\u636e\u5206\u5e03\u5747\u5300\u3001\u6ca1\u6709\u660e\u663e\u5f02\u5e38\u503c\u7684\u573a\u666f\u3002\u5176\u4e3b\u8981\u4f18\u70b9\u662f\u7b80\u5355\u76f4\u63a5\uff0c\u4e14\u5f52\u4e00\u5316\u540e\u7684\u6570\u636e\u8303\u56f4\u56fa\u5b9a\uff0c\u4fbf\u4e8e\u540e\u7eed\u5904\u7406\u3002\u4f46\u5176\u7f3a\u70b9\u5728\u4e8e\u5bf9\u5f02\u5e38\u503c\u654f\u611f\uff0c\u5f02\u5e38\u503c\u4f1a\u5bf9\u5f52\u4e00\u5316\u7ed3\u679c\u4ea7\u751f\u8f83\u5927\u5f71\u54cd\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001Z-score\u5f52\u4e00\u5316<\/h3>\n<\/p>\n<p><p>Z-score\u5f52\u4e00\u5316\uff08\u4e5f\u79f0\u4e3a\u6807\u51c6\u5316\uff09\u662f\u53e6\u4e00\u79cd\u5e38\u89c1\u7684\u5f52\u4e00\u5316\u65b9\u6cd5\u3002\u5b83\u901a\u8fc7\u5c06\u6570\u636e\u7684\u5747\u503c\u8c03\u6574\u4e3a0\uff0c\u6807\u51c6\u5dee\u8c03\u6574\u4e3a1\uff0c\u4ece\u800c\u6d88\u9664\u6570\u636e\u7684\u91cf\u7eb2\u5f71\u54cd\u3002\u5176\u516c\u5f0f\u5982\u4e0b\uff1a<\/p>\n<p>[ X&#39; = \\frac{X &#8211; \\mu}{\\sigma} ]<\/p>\n<p>\u5176\u4e2d\uff0c(\\mu)\u4e3a\u6570\u636e\u7684\u5747\u503c\uff0c(\\sigma)\u4e3a\u6570\u636e\u7684\u6807\u51c6\u5dee\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u7406\u8bba\u80cc\u666f<\/h4>\n<\/p>\n<p><p>Z-score\u5f52\u4e00\u5316\u7684\u6838\u5fc3\u601d\u60f3\u662f\u901a\u8fc7\u6807\u51c6\u5dee\u548c\u5747\u503c\u5bf9\u6570\u636e\u8fdb\u884c\u8c03\u6574\uff0c\u4f7f\u5f97\u5f52\u4e00\u5316\u540e\u7684\u6570\u636e\u5177\u6709\u6807\u51c6\u6b63\u6001\u5206\u5e03\uff08\u5747\u503c\u4e3a0\uff0c\u6807\u51c6\u5dee\u4e3a1\uff09\u3002\u8fd9\u79cd\u65b9\u6cd5\u7279\u522b\u9002\u7528\u4e8e\u6570\u636e\u5177\u6709\u8f83\u5927\u6ce2\u52a8\u6216\u5b58\u5728\u5f02\u5e38\u503c\u7684\u573a\u666f\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u4ee3\u7801\u5b9e\u73b0<\/h4>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>sklearn.preprocessing<\/code>\u6a21\u5757\u4e2d\u7684<code>StandardScaler<\/code>\u6765\u5b9e\u73b0Z-score\u5f52\u4e00\u5316\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from sklearn.preprocessing import StandardScaler<\/p>\n<p>import numpy as np<\/p>\n<h2><strong>\u521b\u5efa\u4e00\u4e2a\u793a\u4f8b\u591a\u7ef4\u77e9\u9635<\/strong><\/h2>\n<p>data = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]])<\/p>\n<h2><strong>\u521d\u59cb\u5316StandardScaler<\/strong><\/h2>\n<p>scaler = StandardScaler()<\/p>\n<h2><strong>\u5bf9\u6570\u636e\u8fdb\u884c\u5f52\u4e00\u5316<\/strong><\/h2>\n<p>normalized_data = scaler.fit_transform(data)<\/p>\n<p>print(&quot;\u5f52\u4e00\u5316\u540e\u7684\u6570\u636e\uff1a&quot;)<\/p>\n<p>print(normalized_data)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3\u3001\u5e94\u7528\u573a\u666f\u4e0e\u4f18\u7f3a\u70b9<\/h4>\n<\/p>\n<p><p>Z-score\u5f52\u4e00\u5316\u9002\u7528\u4e8e\u6570\u636e\u5206\u5e03\u8f83\u4e3a\u590d\u6742\u3001\u5b58\u5728\u5f02\u5e38\u503c\u7684\u573a\u666f\u3002\u5176\u4e3b\u8981\u4f18\u70b9\u662f\u80fd\u591f\u6d88\u9664\u6570\u636e\u7684\u91cf\u7eb2\u5f71\u54cd\uff0c\u4f7f\u5f97\u4e0d\u540c\u7279\u5f81\u7684\u6570\u636e\u80fd\u591f\u5728\u540c\u4e00\u5c3a\u5ea6\u4e0b\u8fdb\u884c\u6bd4\u8f83\u3002\u4f46\u5176\u7f3a\u70b9\u662f\u5bf9\u6570\u636e\u7684\u5206\u5e03\u6709\u4e00\u5b9a\u8981\u6c42\uff0c\u6570\u636e\u5e94\u5f53\u8f83\u4e3a\u63a5\u8fd1\u6b63\u6001\u5206\u5e03\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001MaxAbs\u5f52\u4e00\u5316<\/h3>\n<\/p>\n<p><p>MaxAbs\u5f52\u4e00\u5316\u662f\u4e00\u79cd\u4e13\u95e8\u9488\u5bf9\u7a00\u758f\u6570\u636e\u7684\u5f52\u4e00\u5316\u65b9\u6cd5\u3002\u5b83\u901a\u8fc7\u5c06\u6570\u636e\u6309\u6700\u5927\u7edd\u5bf9\u503c\u8fdb\u884c\u7f29\u653e\uff0c\u4ece\u800c\u4fdd\u6301\u6570\u636e\u7684\u7a00\u758f\u6027\u3002\u5176\u516c\u5f0f\u5982\u4e0b\uff1a<\/p>\n<p>[ X&#39; = \\frac{X}{\\max(|X|)} ]<\/p>\n<\/p>\n<p><h4>1\u3001\u7406\u8bba\u80cc\u666f<\/h4>\n<\/p>\n<p><p>MaxAbs\u5f52\u4e00\u5316\u7684\u6838\u5fc3\u601d\u60f3\u662f\u901a\u8fc7\u6700\u5927\u7edd\u5bf9\u503c\u5bf9\u6570\u636e\u8fdb\u884c\u7f29\u653e\uff0c\u4f7f\u5f97\u6570\u636e\u7684\u8303\u56f4\u5728[-1, 1]\u4e4b\u95f4\u3002\u7531\u4e8e\u8fd9\u79cd\u65b9\u6cd5\u4e0d\u4f1a\u6539\u53d8\u6570\u636e\u7684\u7a00\u758f\u6027\uff0c\u56e0\u6b64\u7279\u522b\u9002\u7528\u4e8e\u7a00\u758f\u77e9\u9635\uff08\u5982\u6587\u672c\u6570\u636e\u3001\u56fe\u50cf\u6570\u636e\u7b49\uff09\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u4ee3\u7801\u5b9e\u73b0<\/h4>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>sklearn.preprocessing<\/code>\u6a21\u5757\u4e2d\u7684<code>MaxAbsScaler<\/code>\u6765\u5b9e\u73b0MaxAbs\u5f52\u4e00\u5316\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from sklearn.preprocessing import MaxAbsScaler<\/p>\n<p>import numpy as np<\/p>\n<h2><strong>\u521b\u5efa\u4e00\u4e2a\u793a\u4f8b\u591a\u7ef4\u77e9\u9635<\/strong><\/h2>\n<p>data = np.array([[1, -2, 3], [4, 0, -6], [7, 8, 9]])<\/p>\n<h2><strong>\u521d\u59cb\u5316MaxAbsScaler<\/strong><\/h2>\n<p>scaler = MaxAbsScaler()<\/p>\n<h2><strong>\u5bf9\u6570\u636e\u8fdb\u884c\u5f52\u4e00\u5316<\/strong><\/h2>\n<p>normalized_data = scaler.fit_transform(data)<\/p>\n<p>print(&quot;\u5f52\u4e00\u5316\u540e\u7684\u6570\u636e\uff1a&quot;)<\/p>\n<p>print(normalized_data)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3\u3001\u5e94\u7528\u573a\u666f\u4e0e\u4f18\u7f3a\u70b9<\/h4>\n<\/p>\n<p><p>MaxAbs\u5f52\u4e00\u5316\u9002\u7528\u4e8e\u7a00\u758f\u6570\u636e\uff0c\u5982\u6587\u672c\u6570\u636e\u3001\u56fe\u50cf\u6570\u636e\u7b49\u3002\u5176\u4e3b\u8981\u4f18\u70b9\u662f\u80fd\u591f\u4fdd\u6301\u6570\u636e\u7684\u7a00\u758f\u6027\uff0c\u4e14\u5bf9\u5f02\u5e38\u503c\u4e0d\u654f\u611f\u3002\u4f46\u5176\u7f3a\u70b9\u662f\u5f52\u4e00\u5316\u540e\u7684\u6570\u636e\u8303\u56f4\u8f83\u5927\uff0c\u4e0d\u4fbf\u4e8e\u67d0\u4e9b\u7b97\u6cd5\u7684\u5904\u7406\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u603b\u7ed3\u4e0e\u63a8\u8350<\/h3>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u9009\u62e9\u5408\u9002\u7684\u5f52\u4e00\u5316\u65b9\u6cd5\u975e\u5e38\u91cd\u8981\u3002<strong>Min-Max\u5f52\u4e00\u5316\u3001Z-score\u5f52\u4e00\u5316\u548cMaxAbs\u5f52\u4e00\u5316<\/strong>\u5404\u6709\u4f18\u7f3a\u70b9\uff0c\u9002\u7528\u4e8e\u4e0d\u540c\u7684\u573a\u666f\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u63a8\u8350\uff1a<\/p>\n<\/p>\n<ol>\n<li><strong>Min-Max\u5f52\u4e00\u5316<\/strong>\uff1a\u9002\u7528\u4e8e\u6570\u636e\u5206\u5e03\u5747\u5300\u3001\u6ca1\u6709\u660e\u663e\u5f02\u5e38\u503c\u7684\u573a\u666f\uff0c\u5e38\u7528\u4e8e\u56fe\u50cf\u5904\u7406\u3001\u6df1\u5ea6\u5b66\u4e60\u7b49\u9886\u57df\u3002<\/li>\n<li><strong>Z-score\u5f52\u4e00\u5316<\/strong>\uff1a\u9002\u7528\u4e8e\u6570\u636e\u5206\u5e03\u590d\u6742\u3001\u5b58\u5728\u5f02\u5e38\u503c\u7684\u573a\u666f\uff0c\u5e38\u7528\u4e8e\u7edf\u8ba1\u5206\u6790\u3001<a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a>\u7b49\u9886\u57df\u3002<\/li>\n<li><strong>MaxAbs\u5f52\u4e00\u5316<\/strong>\uff1a\u9002\u7528\u4e8e\u7a00\u758f\u6570\u636e\uff0c\u5e38\u7528\u4e8e\u6587\u672c\u6570\u636e\u5904\u7406\u3001\u77e9\u9635\u5206\u89e3\u7b49\u9886\u57df\u3002<\/li>\n<\/ol>\n<p><p>\u65e0\u8bba\u9009\u62e9\u54ea\u79cd\u5f52\u4e00\u5316\u65b9\u6cd5\uff0c\u90fd\u9700\u8981\u6839\u636e\u5177\u4f53\u7684\u6570\u636e\u5206\u5e03\u548c\u5e94\u7528\u573a\u666f\u8fdb\u884c\u9009\u62e9\u3002\u540c\u65f6\uff0c\u5f52\u4e00\u5316\u53ea\u662f\u6570\u636e\u9884\u5904\u7406\u7684\u4e00\u90e8\u5206\uff0c\u5b9e\u9645\u5e94\u7528\u4e2d\u8fd8\u9700\u7ed3\u5408\u5176\u4ed6\u65b9\u6cd5\u8fdb\u884c\u7efc\u5408\u5904\u7406\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u5b9e\u73b0\u591a\u7ef4\u77e9\u9635\u7684\u5f52\u4e00\u5316\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528NumPy\u5e93\u8f7b\u677e\u5b9e\u73b0\u591a\u7ef4\u77e9\u9635\u7684\u5f52\u4e00\u5316\u3002\u5f52\u4e00\u5316\u901a\u5e38\u662f\u5c06\u6570\u636e\u7f29\u653e\u5230\u4e00\u4e2a\u7279\u5b9a\u7684\u8303\u56f4\uff0c\u6bd4\u59820\u52301\u4e4b\u95f4\u3002\u53ef\u4ee5\u901a\u8fc7\u8ba1\u7b97\u6bcf\u4e2a\u5143\u7d20\u4e0e\u8be5\u7ef4\u5ea6\u7684\u6700\u5c0f\u503c\u548c\u6700\u5927\u503c\u7684\u5dee\u6765\u5b9e\u73b0\u3002\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">import numpy as np\n\ndef normalize(matrix):\n    min_val = np.min(matrix, axis=0)\n    max_val = np.max(matrix, axis=0)\n    return (matrix - min_val) \/ (max_val - min_val)\n\nmatrix = np.array([[1, 2], [3, 4], [5, 6]])\nnormalized_matrix = normalize(matrix)\nprint(normalized_matrix)\n<\/code><\/pre>\n<p><strong>\u5f52\u4e00\u5316\u4e0e\u6807\u51c6\u5316\u6709\u4ec0\u4e48\u533a\u522b\uff1f<\/strong><br \/>\u5f52\u4e00\u5316\u548c\u6807\u51c6\u5316\u867d\u7136\u90fd\u7528\u4e8e\u6570\u636e\u9884\u5904\u7406\uff0c\u4f46\u5176\u76ee\u7684\u548c\u65b9\u6cd5\u6709\u6240\u4e0d\u540c\u3002\u5f52\u4e00\u5316\u4e3b\u8981\u662f\u5c06\u6570\u636e\u7f29\u653e\u52300\u52301\u7684\u8303\u56f4\u5185\uff0c\u800c\u6807\u51c6\u5316\u5219\u662f\u5c06\u6570\u636e\u8c03\u6574\u4e3a\u5747\u503c\u4e3a0\uff0c\u6807\u51c6\u5dee\u4e3a1\u7684\u5206\u5e03\u3002\u9009\u62e9\u54ea\u79cd\u65b9\u6cd5\u53d6\u51b3\u4e8e\u5177\u4f53\u7684\u673a\u5668\u5b66\u4e60\u6a21\u578b\u548c\u6570\u636e\u7279\u5f81\u7684\u5206\u5e03\u3002<\/p>\n<p><strong>Python\u4e2d\u6709\u54ea\u4e9b\u5e93\u53ef\u4ee5\u7528\u4e8e\u77e9\u9635\u5f52\u4e00\u5316\uff1f<\/strong><br \/>\u9664\u4e86NumPy\uff0cPandas\u548cScikit-learn\u4e5f\u63d0\u4f9b\u4e86\u65b9\u4fbf\u7684\u5de5\u5177\u6765\u8fdb\u884c\u77e9\u9635\u7684\u5f52\u4e00\u5316\u3002Pandas\u4e2d\u7684<code>DataFrame<\/code>\u53ef\u4ee5\u76f4\u63a5\u901a\u8fc7<code>.apply()<\/code>\u65b9\u6cd5\u8fdb\u884c\u5f52\u4e00\u5316\uff0c\u800cScikit-learn\u5219\u63d0\u4f9b\u4e86<code>MinMaxScaler<\/code>\u548c<code>StandardScaler<\/code>\u7b49\u7c7b\uff0c\u53ef\u4ee5\u5feb\u901f\u5b9e\u73b0\u5f52\u4e00\u5316\u548c\u6807\u51c6\u5316\u3002<\/p>\n<p><strong>\u5982\u4f55\u5904\u7406\u5f52\u4e00\u5316\u540e\u7684\u6570\u636e\uff1f<\/strong><br \/>\u5f52\u4e00\u5316\u540e\u7684\u6570\u636e\u53ef\u4ee5\u76f4\u63a5\u7528\u4e8e\u673a\u5668\u5b66\u4e60\u6a21\u578b\u7684\u8bad\u7ec3\u4e0e\u6d4b\u8bd5\u3002\u5728\u4f7f\u7528\u5f52\u4e00\u5316\u6570\u636e\u65f6\uff0c\u786e\u4fdd\u5728\u8bad\u7ec3\u548c\u6d4b\u8bd5\u9636\u6bb5\u4f7f\u7528\u76f8\u540c\u7684\u5f52\u4e00\u5316\u53c2\u6570\uff0c\u4ee5\u907f\u514d\u6570\u636e\u6cc4\u6f0f\u3002\u901a\u5e38\uff0c\u8bad\u7ec3\u96c6\u7684\u6700\u5c0f\u503c\u548c\u6700\u5927\u503c\u4f1a\u88ab\u4fdd\u5b58\uff0c\u5e76\u5728\u6d4b\u8bd5\u96c6\u4e0a\u5e94\u7528\u76f8\u540c\u7684\u8f6c\u6362\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u4e2d\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u6cd5\u5c06\u591a\u7ef4\u77e9\u9635\u8fdb\u884c\u5f52\u4e00\u5316\uff0c\u5305\u62ecMin-Max\u5f52\u4e00\u5316\u3001Z-score\u5f52\u4e00\u5316\u548cMaxAb [&hellip;]","protected":false},"author":3,"featured_media":1130898,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1130888"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1130888"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1130888\/revisions"}],"predecessor-version":[{"id":1130901,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1130888\/revisions\/1130901"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1130898"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1130888"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1130888"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1130888"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}