{"id":937855,"date":"2024-12-26T20:00:07","date_gmt":"2024-12-26T12:00:07","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/937855.html"},"modified":"2024-12-26T20:00:08","modified_gmt":"2024-12-26T12:00:08","slug":"python%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8libsvm","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/937855.html","title":{"rendered":"python\u5982\u4f55\u4f7f\u7528libsvm"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25073518\/a08795dc-d36a-4b91-b9a6-6bc84b2ef3ea.webp\" alt=\"python\u5982\u4f55\u4f7f\u7528libsvm\" \/><\/p>\n<p><p> <strong>\u8981\u5728Python\u4e2d\u4f7f\u7528libsvm\uff0c\u53ef\u4ee5\u901a\u8fc7\u5b89\u88c5Python\u63a5\u53e3\u5e93\u5982<code>libsvm<\/code>\u6216<code>scikit-learn<\/code>\uff0c\u52a0\u8f7d\u6570\u636e\u96c6\u3001\u8fdb\u884c\u6570\u636e\u9884\u5904\u7406\u3001\u9009\u62e9\u9002\u5f53\u7684SVM\u53c2\u6570\u3001\u8bad\u7ec3\u6a21\u578b\u3001\u8bc4\u4f30\u6a21\u578b\u6027\u80fd\u3001\u53ef\u89c6\u5316\u7ed3\u679c\u7b49\u6b65\u9aa4\u6765\u5b9e\u73b0\u3002<\/strong>\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u5728Python\u4e2d\u4f7f\u7528libsvm\u8fdb\u884c<a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a>\u4efb\u52a1\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u5b89\u88c5\u4e0e\u73af\u5883\u51c6\u5907<\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\u4f7f\u7528libsvm\uff0c\u9996\u5148\u9700\u8981\u5b89\u88c5\u76f8\u5173\u7684\u8f6f\u4ef6\u5305\u3002libsvm\u662f\u4e00\u4e2a\u7528\u4e8e\u652f\u6301\u5411\u91cf\u673a\uff08SVM\uff09\u7684\u5e93\uff0c\u800c<code>scikit-learn<\/code>\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u673a\u5668\u5b66\u4e60\u5e93\uff0c\u5b83\u5185\u90e8\u5b9e\u73b0\u4e86libsvm\u7684\u529f\u80fd\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p>\u5b89\u88c5libsvm<\/p>\n<\/p>\n<ul>\n<li>\u53ef\u4ee5\u901a\u8fc7libsvm\u7684\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u6e90\u4ee3\u7801\u5e76\u7f16\u8bd1\u5b89\u88c5\u3002<\/li>\n<li>\u6216\u8005\u4f7f\u7528Python\u63a5\u53e3\u5e93\uff0c\u5982<code>python-libsvm<\/code>\uff0c\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\uff1a\n<pre><code class=\"language-bash\">pip install python-libsvm<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u5b89\u88c5scikit-learn<\/p>\n<\/p>\n<ul>\n<li>\u4f7f\u7528pip\u547d\u4ee4\u5b89\u88c5\uff1a\n<pre><code class=\"language-bash\">pip install scikit-learn<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><p>\u4e8c\u3001\u52a0\u8f7d\u6570\u636e\u4e0e\u9884\u5904\u7406<\/p>\n<\/p>\n<p><p>\u5728\u4f7f\u7528libsvm\u8fdb\u884c\u5efa\u6a21\u4e4b\u524d\uff0c\u9700\u8981\u51c6\u5907\u548c\u9884\u5904\u7406\u6570\u636e\u3002\u6570\u636e\u9884\u5904\u7406\u5305\u62ec\u6570\u636e\u6e05\u6d17\u3001\u7279\u5f81\u9009\u62e9\u548c\u7279\u5f81\u7f29\u653e\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p>\u52a0\u8f7d\u6570\u636e\u96c6<\/p>\n<\/p>\n<ul>\n<li>\u53ef\u4ee5\u4f7f\u7528scikit-learn\u63d0\u4f9b\u7684\u5185\u7f6e\u6570\u636e\u96c6\uff0c\u5982<code>iris<\/code>\u3001<code>digits<\/code>\u7b49\u3002<\/li>\n<li>\u4e5f\u53ef\u4ee5\u4eceCSV\u6587\u4ef6\u6216\u5176\u4ed6\u683c\u5f0f\u6587\u4ef6\u4e2d\u52a0\u8f7d\u6570\u636e\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u6570\u636e\u9884\u5904\u7406<\/p>\n<\/p>\n<ul>\n<li><strong>\u6570\u636e\u6e05\u6d17\uff1a<\/strong>\u53bb\u9664\u7f3a\u5931\u503c\u6216\u5f02\u5e38\u503c\u3002<\/li>\n<li><strong>\u7279\u5f81\u9009\u62e9\uff1a<\/strong>\u9009\u62e9\u4e0e\u76ee\u6807\u53d8\u91cf\u76f8\u5173\u6027\u8f83\u9ad8\u7684\u7279\u5f81\u3002<\/li>\n<li><strong>\u7279\u5f81\u7f29\u653e\uff1a<\/strong>\u5bf9\u4e8eSVM\uff0c\u7279\u5f81\u7f29\u653e\u975e\u5e38\u91cd\u8981\uff0c\u53ef\u4ee5\u4f7f\u7528<code>StandardScaler<\/code>\u8fdb\u884c\u6807\u51c6\u5316\u5904\u7406\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><p>\u4e09\u3001\u9009\u62e9SVM\u53c2\u6570<\/p>\n<\/p>\n<p><p>SVM\u7684\u6027\u80fd\u5f88\u5927\u7a0b\u5ea6\u4e0a\u53d6\u51b3\u4e8e\u53c2\u6570\u7684\u9009\u62e9\uff0c\u4e3b\u8981\u53c2\u6570\u5305\u62ecC\uff08\u60e9\u7f5a\u7cfb\u6570\uff09\u3001kernel\uff08\u6838\u51fd\u6570\u7c7b\u578b\uff09\u548cgamma\uff08\u6838\u51fd\u6570\u53c2\u6570\uff09\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>C\u53c2\u6570\uff1a<\/strong>\u63a7\u5236\u8bef\u5dee\u9879\u7684\u60e9\u7f5a\u529b\u5ea6\u3002\u8f83\u5c0f\u7684C\u503c\u4f1a\u8ba9\u6a21\u578b\u5177\u6709\u8f83\u9ad8\u7684\u504f\u5dee\u548c\u8f83\u4f4e\u7684\u65b9\u5dee\uff0c\u8f83\u5927\u7684C\u503c\u4f1a\u8ba9\u6a21\u578b\u5177\u6709\u8f83\u4f4e\u7684\u504f\u5dee\u548c\u8f83\u9ad8\u7684\u65b9\u5dee\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6838\u51fd\u6570\uff1a<\/strong>\u5e38\u7528\u7684\u6838\u51fd\u6570\u6709\u7ebf\u6027\u6838\u3001\u591a\u9879\u5f0f\u6838\u3001RBF\u6838\u548csigmoid\u6838\u3002\u9009\u62e9\u5408\u9002\u7684\u6838\u51fd\u6570\u53ef\u4ee5\u663e\u8457\u63d0\u9ad8\u6a21\u578b\u6027\u80fd\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>gamma\u53c2\u6570\uff1a<\/strong>\u5728RBF\u6838\u4e2d\uff0cgamma\u503c\u51b3\u5b9a\u4e86\u5355\u4e2a\u8bad\u7ec3\u6837\u672c\u5bf9\u51b3\u7b56\u8fb9\u754c\u7684\u5f71\u54cd\u8303\u56f4\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u56db\u3001\u8bad\u7ec3\u6a21\u578b<\/p>\n<\/p>\n<p><p>\u4f7f\u7528\u9884\u5904\u7406\u540e\u7684\u6570\u636e\u548c\u9009\u62e9\u597d\u7684\u53c2\u6570\u8bad\u7ec3SVM\u6a21\u578b\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from sklearn import datasets<\/p>\n<p>from sklearn.model_selection import tr<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>n_test_split<\/p>\n<p>from sklearn.preprocessing import StandardScaler<\/p>\n<p>from sklearn.svm import SVC<\/p>\n<h2><strong>\u52a0\u8f7d\u6570\u636e\u96c6<\/strong><\/h2>\n<p>iris = datasets.load_iris()<\/p>\n<p>X = iris.data<\/p>\n<p>y = iris.target<\/p>\n<h2><strong>\u5212\u5206\u8bad\u7ec3\u96c6\u548c\u6d4b\u8bd5\u96c6<\/strong><\/h2>\n<p>X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=42)<\/p>\n<h2><strong>\u6570\u636e\u6807\u51c6\u5316<\/strong><\/h2>\n<p>scaler = StandardScaler()<\/p>\n<p>X_train = scaler.fit_transform(X_train)<\/p>\n<p>X_test = scaler.transform(X_test)<\/p>\n<h2><strong>\u8bad\u7ec3SVM\u6a21\u578b<\/strong><\/h2>\n<p>model = SVC(C=1.0, kernel=&#39;rbf&#39;, gamma=&#39;scale&#39;)<\/p>\n<p>model.fit(X_train, y_train)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e94\u3001\u8bc4\u4f30\u6a21\u578b\u6027\u80fd<\/p>\n<\/p>\n<p><p>\u5728\u8bad\u7ec3\u597d\u6a21\u578b\u540e\uff0c\u9700\u8981\u8bc4\u4f30\u6a21\u578b\u7684\u6027\u80fd\u3002\u53ef\u4ee5\u4f7f\u7528\u51c6\u786e\u7387\u3001\u7cbe\u786e\u7387\u3001\u53ec\u56de\u7387\u548cF1\u5206\u6570\u7b49\u6307\u6807\u8fdb\u884c\u8bc4\u4f30\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from sklearn.metrics import accuracy_score, classification_report, confusion_matrix<\/p>\n<h2><strong>\u9884\u6d4b<\/strong><\/h2>\n<p>y_pred = model.predict(X_test)<\/p>\n<h2><strong>\u8bc4\u4f30<\/strong><\/h2>\n<p>accuracy = accuracy_score(y_test, y_pred)<\/p>\n<p>print(f&quot;Accuracy: {accuracy:.2f}&quot;)<\/p>\n<p>print(&quot;Classification Report:&quot;)<\/p>\n<p>print(classification_report(y_test, y_pred))<\/p>\n<p>print(&quot;Confusion Matrix:&quot;)<\/p>\n<p>print(confusion_matrix(y_test, y_pred))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u516d\u3001\u6a21\u578b\u8c03\u4f18\u4e0e\u53ef\u89c6\u5316<\/p>\n<\/p>\n<p><p>\u53ef\u4ee5\u901a\u8fc7\u8c03\u6574\u53c2\u6570\uff08\u4f8b\u5982\u4f7f\u7528\u7f51\u683c\u641c\u7d22\uff09\u6765\u4f18\u5316\u6a21\u578b\u6027\u80fd\uff0c\u5e76\u901a\u8fc7\u53ef\u89c6\u5316\u5de5\u5177\u6765\u5c55\u793a\u7ed3\u679c\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u6a21\u578b\u8c03\u4f18\uff1a<\/strong>\u4f7f\u7528<code>GridSearchCV<\/code>\u6216<code>RandomizedSearchCV<\/code>\u8fdb\u884c\u8d85\u53c2\u6570\u641c\u7d22\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u53ef\u89c6\u5316\uff1a<\/strong>\u53ef\u4ee5\u901a\u8fc7matplotlib\u7b49\u5e93\u7ed8\u5236\u51b3\u7b56\u8fb9\u754c\u548c\u652f\u6301\u5411\u91cf\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><pre><code class=\"language-python\">from sklearn.model_selection import GridSearchCV<\/p>\n<h2><strong>\u5b9a\u4e49\u53c2\u6570\u7f51\u683c<\/strong><\/h2>\n<p>param_grid = {&#39;C&#39;: [0.1, 1, 10, 100], &#39;gamma&#39;: [1, 0.1, 0.01, 0.001], &#39;kernel&#39;: [&#39;rbf&#39;]}<\/p>\n<h2><strong>\u7f51\u683c\u641c\u7d22<\/strong><\/h2>\n<p>grid = GridSearchCV(SVC(), param_grid, refit=True, verbose=2)<\/p>\n<p>grid.fit(X_train, y_train)<\/p>\n<h2><strong>\u8f93\u51fa\u6700\u4f73\u53c2\u6570<\/strong><\/h2>\n<p>print(f&quot;Best Parameters: {grid.best_params_}&quot;)<\/p>\n<h2><strong>\u53ef\u89c6\u5316<\/strong><\/h2>\n<p>import matplotlib.pyplot as plt<\/p>\n<p>import numpy as np<\/p>\n<p>def plot_decision_boundary(model, X, y):<\/p>\n<p>    h = .02  # step size in the mesh<\/p>\n<p>    x_min, x_max = X[:, 0].min() - 1, X[:, 0].max() + 1<\/p>\n<p>    y_min, y_max = X[:, 1].min() - 1, X[:, 1].max() + 1<\/p>\n<p>    xx, yy = np.meshgrid(np.arange(x_min, x_max, h),<\/p>\n<p>                         np.arange(y_min, y_max, h))<\/p>\n<p>    Z = model.predict(np.c_[xx.ravel(), yy.ravel()])<\/p>\n<p>    Z = Z.reshape(xx.shape)<\/p>\n<p>    plt.contourf(xx, yy, Z, alpha=0.8)<\/p>\n<p>    plt.scatter(X[:, 0], X[:, 1], c=y, edgecolors=&#39;k&#39;, marker=&#39;o&#39;)<\/p>\n<p>    plt.xlim(xx.min(), xx.max())<\/p>\n<p>    plt.ylim(yy.min(), yy.max())<\/p>\n<p>    plt.xlabel(&#39;Feature 1&#39;)<\/p>\n<p>    plt.ylabel(&#39;Feature 2&#39;)<\/p>\n<p>    plt.title(&#39;SVM Decision Boundary&#39;)<\/p>\n<p>    plt.show()<\/p>\n<h2><strong>\u4f7f\u7528\u6700\u4f73\u53c2\u6570\u7684\u6a21\u578b\u91cd\u65b0\u8bad\u7ec3<\/strong><\/h2>\n<p>best_model = SVC(C=grid.best_params_[&#39;C&#39;], gamma=grid.best_params_[&#39;gamma&#39;], kernel=&#39;rbf&#39;)<\/p>\n<p>best_model.fit(X_train, y_train)<\/p>\n<h2><strong>\u53ef\u89c6\u5316\u51b3\u7b56\u8fb9\u754c<\/strong><\/h2>\n<p>plot_decision_boundary(best_model, X_train, y_train)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u603b\u7ed3\uff1a\u5728Python\u4e2d\u4f7f\u7528libsvm\u8fdb\u884cSVM\u6a21\u578b\u7684\u6784\u5efa\u6d89\u53ca\u591a\u4e2a\u6b65\u9aa4\uff0c\u4ece\u5b89\u88c5\u5e93\u3001\u6570\u636e\u9884\u5904\u7406\u3001\u53c2\u6570\u9009\u62e9\u3001\u6a21\u578b\u8bad\u7ec3\u3001\u6027\u80fd\u8bc4\u4f30\u5230\u6a21\u578b\u8c03\u4f18\u4e0e\u53ef\u89c6\u5316\u3002\u901a\u8fc7\u5408\u7406\u7684\u53c2\u6570\u9009\u62e9\u548c\u6570\u636e\u5904\u7406\uff0cSVM\u53ef\u4ee5\u5728\u8bb8\u591a\u5206\u7c7b\u95ee\u9898\u4e2d\u63d0\u4f9b\u4f18\u826f\u7684\u6027\u80fd\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>Python\u4e2d\u5982\u4f55\u5b89\u88c5libsvm\u5e93\uff1f<\/strong><br \/>\u8981\u5728Python\u4e2d\u4f7f\u7528libsvm\uff0c\u9996\u5148\u9700\u8981\u5b89\u88c5\u8be5\u5e93\u3002\u53ef\u4ee5\u901a\u8fc7pip\u547d\u4ee4\u8f7b\u677e\u5b8c\u6210\u5b89\u88c5\u3002\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165<code>pip install libsvm<\/code>\uff0c\u5373\u53ef\u81ea\u52a8\u4e0b\u8f7d\u5e76\u5b89\u88c5\u6700\u65b0\u7248\u672c\u7684libsvm\u3002\u6b64\u5916\uff0c\u786e\u4fdd\u60a8\u7684Python\u73af\u5883\u5df2\u8bbe\u7f6e\u597d\uff0c\u4ee5\u907f\u514d\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u51fa\u73b0\u517c\u5bb9\u6027\u95ee\u9898\u3002<\/p>\n<p><strong>libsvm\u5728Python\u4e2d\u7684\u57fa\u672c\u7528\u6cd5\u662f\u4ec0\u4e48\uff1f<\/strong><br \/>\u4f7f\u7528libsvm\u8fdb\u884c\u652f\u6301\u5411\u91cf\u673a\uff08SVM\uff09\u5efa\u6a21\u65f6\uff0c\u901a\u5e38\u9700\u8981\u51c6\u5907\u8f93\u5165\u6570\u636e\u548c\u6807\u7b7e\u3002\u53ef\u4ee5\u4f7f\u7528<code>svm_train<\/code>\u51fd\u6570\u8fdb\u884c\u6a21\u578b\u8bad\u7ec3\uff0c<code>svm_predict<\/code>\u51fd\u6570\u8fdb\u884c\u9884\u6d4b\u3002\u5728\u8bad\u7ec3\u4e4b\u524d\uff0c\u786e\u4fdd\u5c06\u6570\u636e\u8f6c\u6362\u4e3alibsvm\u683c\u5f0f\uff0c\u8fd9\u901a\u5e38\u6d89\u53ca\u5230\u5c06\u7a00\u758f\u7279\u5f81\u8f6c\u6362\u4e3a\u7b26\u5408\u8981\u6c42\u7684\u683c\u5f0f\u3002\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"language-python\">from svmutil import *\ny, x = svm_read_problem(&#39;data.txt&#39;)\nmodel = svm_train(y, x)\np_label, p_acc, p_val = svm_predict(y, x, model)\n<\/code><\/pre>\n<p><strong>libsvm\u652f\u6301\u54ea\u4e9b\u7c7b\u578b\u7684\u4efb\u52a1\uff1f<\/strong><br \/>libsvm\u652f\u6301\u591a\u79cd\u673a\u5668\u5b66\u4e60\u4efb\u52a1\uff0c\u5305\u62ec\u5206\u7c7b\u3001\u56de\u5f52\u548c\u6982\u7387\u4f30\u8ba1\u3002\u7528\u6237\u53ef\u4ee5\u6839\u636e\u6570\u636e\u7684\u6027\u8d28\u9009\u62e9\u5408\u9002\u7684\u6a21\u578b\u3002\u4f8b\u5982\uff0c\u5bf9\u4e8e\u4e8c\u5206\u7c7b\u6216\u591a\u5206\u7c7b\u95ee\u9898\uff0clibsvm\u63d0\u4f9b\u4e86\u591a\u7c7b\u652f\u6301\uff0c\u800c\u5bf9\u4e8e\u56de\u5f52\u4efb\u52a1\uff0clibsvm\u4e5f\u6709\u76f8\u5e94\u7684\u56de\u5f52\u7b97\u6cd5\u3002\u6b64\u5916\uff0clibsvm\u8fd8\u652f\u6301\u81ea\u5b9a\u4e49\u6838\u51fd\u6570\uff0c\u7528\u6237\u53ef\u4ee5\u6839\u636e\u9700\u8981\u521b\u5efa\u7279\u5b9a\u7684\u6838\u51fd\u6570\u4ee5\u63d0\u5347\u6a21\u578b\u7684\u6027\u80fd\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u5728Python\u4e2d\u4f7f\u7528libsvm\uff0c\u53ef\u4ee5\u901a\u8fc7\u5b89\u88c5Python\u63a5\u53e3\u5e93\u5982libsvm\u6216scikit-learn\uff0c\u52a0 [&hellip;]","protected":false},"author":3,"featured_media":937856,"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\/937855"}],"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=937855"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/937855\/revisions"}],"predecessor-version":[{"id":937857,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/937855\/revisions\/937857"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/937856"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=937855"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=937855"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=937855"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}