{"id":139,"date":"2018-06-09T08:51:37","date_gmt":"2018-06-09T00:51:37","guid":{"rendered":"http:\/\/www.sniper97.cn\/?p=139"},"modified":"2018-06-09T08:51:37","modified_gmt":"2018-06-09T00:51:37","slug":"%e5%86%b3%e7%ad%96%e6%a0%91","status":"publish","type":"post","link":"http:\/\/www.sniper97.cn\/index.php\/note\/machine-learning-in-action\/139\/","title":{"rendered":"\u51b3\u7b56\u6811"},"content":{"rendered":"<h1><strong>\u51b3\u7b56\u6811(Decision Tree\uff09<\/strong><\/h1>\n<p>\u51b3\u7b56\u6811\u7684\u4e00\u4e2a\u91cd\u8981\u4efb\u52a1\u662f\u4e3a\u4e86\u7406\u89e3\u6570\u636e\u4e2d\u6240\u8574\u542b\u7684\u77e5\u8bc6\u4fe1\u606f\uff0c\u56e0\u6b64\u51b3\u7b56\u6811\u53ef\u4ee5\u4f7f\u7528\u4e0d\u719f\u6089\u7684\u6570\u636e\u96c6\u5408\uff0c\u5e76\u4ece\u4e2d\u63d0\u53d6\u51fa\u4e00\u7cfb\u5217\u89c4\u5219\uff0c\u8fd9\u4e9b\u673a\u5668\u6839\u636e\u6570\u636e\u96c6\u521b\u5efa\u89c4\u5219\u7684\u8fc7\u7a0b\uff0c\u5c31\u662f\u673a\u5668\u5b66\u4e60\u7684\u8fc7\u7a0b\u3002\u4e13\u5bb6\u7cfb\u7edf\u4e2d\u7ecf\u5e38\u4f7f\u7528\u51b3\u7b56\u6811\uff0c\u800c\u4e14\u51b3\u7b56\u6811\u7ed9\u51fa\u7ed3\u679c\u5f80\u5f80\u53ef\u4ee5\u5339\u654c\u5728\u5f53\u524d\u9886\u57df\u5177\u6709\u51e0\u5341\u5e74\u5de5\u4f5c\u7ecf\u9a8c\u7684\u4eba\u7c7b\u4e13\u5bb6\u3002<br \/>\n&nbsp;<br \/>\n\u4f18\u70b9\uff1a\u8ba1\u7b97\u590d\u6742\u5ea6\u4e0d\u9ad8\uff0c\u8f93\u51fa\u7ed3\u679c\u6613\u4e8e\u7406\u89e3\uff0c\u5bf9\u4e2d\u95f4\u503c\u7684\u7f3a\u5931\u4e0d\u654f\u611f\uff0c\u53ef\u4ee5\u5904\u7406\u4e0d\u76f8\u5173\u7279\u5f81\u6570\u636e\u3002<br \/>\n\u7f3a\u70b9\uff1a\u53ef\u80fd\u4f1a\u4ea7\u751f\u8fc7\u5ea6\u5339\u914d\u4e3a\u95ee\u9898\u3002<br \/>\n\u9002\u7528\u6570\u636e\u7c7b\uff1a\u6570\u503c\u578b\u548c\u6807\u79f0\u578b\u3002<br \/>\n\u51b3\u7b56\u6811\u7684\u4e00\u822c\u6d41\u7a0b\uff1a<br \/>\n\uff081\uff09\u6536\u96c6\u6570\u636e\uff1a\u53ef\u4ee5\u4f7f\u7528\u4efb\u4f55\u65b9\u6cd5\u3002<br \/>\n\uff082\uff09\u51c6\u5907\u6570\u636e\uff1a\u6811\u6784\u9020\u7b97\u6cd5\u53ea\u9002\u7528\u4e8e\u6807\u79f0\u578b\u6570\u636e\uff0c\u56e0\u6b64\u6570\u503c\u578b\u6570\u636e\u5fc5\u987b\u79bb\u6563\u5316\u3002<br \/>\n\uff083\uff09\u5206\u6790\u6570\u636e\uff1a\u53ef\u4ee5\u4f7f\u7528\u4efb\u4f55\u65b9\u6cd5\uff0c\u6784\u9020\u6811\u5b8c\u6210\u4e4b\u540e\uff0c\u6211\u4eec\u5e94\u8be5\u68c0\u67e5\u56fe\u5f62\u662f\u5426\u7b26\u5408\u9884\u671f\u3002<br \/>\n\uff084\uff09\u8bad\u7ec3\u7b97\u6cd5\uff1a\u6784\u9020\u6811\u7684\u6570\u636e\u7ed3\u6784\u3002<br \/>\n\uff085\uff09\u6d4b\u8bd5\u7b97\u6cd5\uff1a\u4f7f\u7528\u7ecf\u9a8c\u6811\u8ba1\u7b97\u9519\u8bef\u7387\u3002<br \/>\n\uff086\uff09\u4f7f\u7528\u7b97\u6cd5\uff1a\u6b64\u6b65\u9aa4\u53ef\u4ee5\u9002\u7528\u4e8e\u4efb\u4f55\u76d1\u7763\u5b66\u4e60\u7b97\u6cd5\uff0c\u800c\u4f7f\u7528\u51b3\u7b56\u6811\u53ef\u4ee5\u66f4\u597d\u5730\u7406\u89e3\u6570\u636e\u7684\u5185\u5728\u542b\u4e49\u3002<br \/>\n&nbsp;<br \/>\n\u96c6\u5408\u4fe1\u606f\u7684\u5ea6\u91cf\u65b9\u5f0f\u6210\u4e3a\u9999\u519c\u71b5\u6216\u8005\u7b80\u79f0\u4e3a\u71b5<br \/>\n\u8ba1\u7b97\u71b5\u7684\u516c\u5f0f\uff1a-\u2211p(x\u2081)log\u2082p(x\u2081)<br \/>\n\u71b5\u8d8a\u9ad8\uff0c\u5219\u6df7\u5408\u7684\u6570\u636e\u4e5f\u8d8a\u591a\u3002<br \/>\ntree.py<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\"># -*- coding:utf-8 -*-\nimport operator\nfrom math import log\n# \u8ba1\u7b97\u71b5\u503c\ndef calcShannonEnt(dataSet):\n    numberEntries = len(dataSet)\n    labelCounts = {}\n    for featVec in dataSet:\n        currentLabel = featVec[-1]  # \u8bfb\u53d6\u7ed3\u679c\u4f4d\u6570\u636e\n        if currentLabel not in labelCounts.keys():\n            labelCounts[currentLabel] = 0\n        labelCounts[currentLabel] += 1\n    shannonEnt = 0.0\n    for key in labelCounts:\n        # \u516c\u5f0f\uff1a-\u2211p(x\u2081)log\u2082p(x\u2081)\n        prob = float(labelCounts[key]) \/ numberEntries\n        shannonEnt -= prob * log(prob, 2)\n    return shannonEnt\n# \u8ba1\u7b97\u71b5\u503c\u6d4b\u8bd5\u6570\u636e\ndef createDataSet():\n    dataSet = [[1, 1, 'yes'],\n               [1, 1, 'yes'],\n               [1, 0, 'no'],\n               [0, 1, 'no'],\n               [0, 1, 'no']]\n    labels = ['no surfacing', 'flippers']\n    return dataSet, labels\n# \u6570\u636e\uff0c\u5212\u5206\u7279\u5f81\uff0c\u8fd4\u56de\u7279\u5f81\n# \u5c31\u662f\u8fd4\u56de \u7b2c\uff08\u5212\u5206\u7279\u6027\uff09\u7279\u5f81\u4e3a\uff08\u8fd4\u56de\u7279\u5f81\uff09\u7684\u6570\u636e\u96c6\ndef splitDataSet(dataSet, axis, value):\n    retDataSet = []\n    for featVec in dataSet:\n        if featVec[axis] == value:\n            reducedFeatVec = featVec[:axis]\n            # \u8fd9\u91cc\u5e94\u8be5\u662f\u5bf9\u6570\u636e\u8fdb\u884c\u9488\u5bf9\uff0c\u53ea\u8df3\u8fc7\u4e0b\u4e00\u4f4d\u6570\u636e\uff08\u56e0\u4e3a\u53ea\u6709\u4e09\u4f4d\uff09\n            # \u6b63\u5e38\u6211\u5206\u6790\u5e94\u8be5\u662f \u76f4\u63a5\u5230\u7ed3\u679c\u4e00\u680f\n            reducedFeatVec.extend(featVec[axis + 1:])\n            retDataSet.append(reducedFeatVec)\n    return retDataSet\n# \u9009\u62e9\u4fe1\u606f\u589e\u76ca\u503c\u6700\u5927\u7684\u7279\u5f81\u70b9\uff0c\u8fd4\u56de\u7279\u5f81\u70b9\u7d22\u5f15\n#\n# \u904d\u5386\u6bcf\u4e2a\u7279\u5f81\u70b9\uff0c\u5bf9\u6bcf\u4e2a\u7279\u5f81\u70b9\u6c42\u71b5\u503c\u52a0\u6743\u5e73\u5747\u6570\uff0c\u8fd4\u56de\u4fe1\u606f\u589e\u76ca\u6700\u5927\u7684\u7d22\u5f15\ndef chooseBestFeatureToSplit(dataSet):\n    numFeatures = len(dataSet[0]) - 1\n    baseEntropy = calcShannonEnt(dataSet)  # \u8ba1\u7b97\u71b5\u503c\n    bestInfoGain = 0.0  # \u6700\u5927\u4fe1\u606f\u589e\u76ca\u503c\n    bestFeature = -1  # \u6700\u4f18\u7279\u5f81\u70b9\u7d22\u5f15\n    for i in range(numFeatures):  # \u904d\u5386\u6bcf\u4e2a\u7279\u5f81\n        # example \u53ef\u4ee5\u63d0\u53d6\u51fa\u5217\u8868\u7b2c\u51e0\u4e2a\u5143\u7d20\uff0c\u8fd4\u56de\u4e00\u4e2a\u65b0\u96c6\u5408\n        featList = [example[i] for example in dataSet]\n        # print(featList)\n        uniqueVals = set(featList)  # \u8bbe\u7f6eset\u96c6\u5408\uff0c\u91cc\u9762\u7684\u6bcf\u4e00\u4e2a\u5143\u7d20 \u90fd\u662f\u96c6\u5408\u4e2d\u7684\u4e00\u9879\n        # \u8fd9\u91cc\u4e5f\u5c31\u662f\u628a\u5f53\u524d\u7279\u5f81\u70b9\u6240\u6709\u7279\u5f81\u503c\u63d0\u53d6\u51fa\u6765\n        # print(uniqueVals)\n        newEntropy = 0.0  # \u4e2d\u95f4\u53d8\u91cf\uff0c\u65b0\u7684\u71b5\u503c\n        for value in uniqueVals:\n            subDataSet = splitDataSet(dataSet, i, value)  # \u8fd4\u56de\u7b26\u5408\u5f53\u524d\u7279\u5f81\u70b9\u3001\u7279\u5f81\u503c\u7684\u6570\u636e\n            prob = len(subDataSet) \/ float(len(dataSet))  # \u8ba1\u7b97\u6570\u636e\u6240\u5360\u767e\u5206\u6bd4\n            newEntropy += prob * calcShannonEnt(subDataSet)  # \u8ba1\u7b97\u5f53\u524d\u7279\u5f81\u70b9\u71b5\u503c\u7684\u52a0\u6743\u5e73\u5747\u6570\n        infoGain = baseEntropy - newEntropy  # \u8ba1\u7b97\u4fe1\u606f\u589e\u76ca\n        if (infoGain &gt; bestInfoGain):\n            bestInfoGain = infoGain\n            bestFeature = i\n    return bestFeature\ndef majorityCnt(classList):\n    classCount = {}\n    for vote in classList:\n        if vote not in classCount.keys(): classCount[vote] = 0\n        classCount[vote] += 1\n    sortedClassCount = sorted(classCount.iteritems(), key=operator.itemgetter(1), reverse=True)\n    return sortedClassCount[0][0]\ndef createTree(dataSet, labels):\n    classList = [example[-1] for example in dataSet]\n    if classList.count(classList[0]) == len(classList):  # \u4e24\u4e2a\u5224\u65ad\u7ed3\u675f\u7684\u6807\u5fd7 \u6570\u91cf\u76f8\u7b49||\u6570\u636e\u4e2a\u6570\u4e3a1\n        # print('in flag one      ', classList[0])\n        return classList[0]\n    if len(dataSet[0]) == 1:\n        # print('in flag two      ', majorityCnt(classList))\n        return majorityCnt(classList)\n    bestFeat = chooseBestFeatureToSplit(dataSet)  # \u9009\u62e9\u4fe1\u606f\u589e\u76ca\u503c\u6700\u5927\u7684\u7279\u5f81\u70b9\uff0c\u8fd4\u56de\u7279\u5f81\u70b9\u7d22\u5f15\n    bestFeatLabel = labels[bestFeat]\n    myTree = {bestFeatLabel: {}}\n    # print('out of for   ', myTree)\n    del (labels[bestFeat])\n    featValues = [example[bestFeat] for example in dataSet]\n    uniqueVals = set(featValues)\n    for value in uniqueVals:\n        subLabels = labels[:]\n        # myTree\u4e2d bestFeatLabel\u4e2d\u503c\u4e3avalue\u7684\u503c\u662f \u8fd4\u56de\u503c\n        # \u8fd9\u6837\u5c31\u505a\u5230\u4e86 {'no surfacing': {0: 'no'}} \u7c7b\u4f3c\n        myTree[bestFeatLabel][value] = createTree(splitDataSet(dataSet, bestFeat, value), subLabels)\n        # print('inner for    ', myTree)\n    return myTree\nif __name__ == '__main__':\n    dataSet, labels = createDataSet()\n    print(dataSet)\n    print()\n    # print(chooseBestFeatureToSplit(dataSet))\n    print('result', createTree(dataSet, labels))\n<\/pre>\n<p>&nbsp;<br \/>\n&nbsp;<br \/>\ntreePlotter.py<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\"># -*- coding:utf-8 -*-\nimport operator\nimport matplotlib.pyplot as plt\n# \u7ed8\u5236\u5c5e\u6027\u56fe\ndecisionNode = dict(boxstyle=\"sawtooth\", fc=\"0.8\")\nleafNode = dict(boxstyle=\"round4\", fc=\"0.8\")  # \u89c4\u5b9a\u5c5e\u6027\u5f85\u5927\u5c0f\narrow_args = dict(arrowstyle=\"&lt;-\")  # \u89c4\u5b9a\u7bad\u5934\u65b9\u5411\ndef plotNode(nodeTxt, centerPt, parentPt, nodeType):\n    # \u5728\u5168\u5c40\u53d8\u91cfcreatePlot.ax1\u4e2d\u7ed8\u56fe\n    createPlot.ax1.annotate(nodeTxt, xy=parentPt, xycoords='axes fraction',\n                            xytext=centerPt, textcoords='axes fraction',\n                            va=\"center\", ha=\"center\", bbox=nodeType, arrowprops=arrow_args)\ndef createPlot1():\n    # \u521b\u5efa\u4e00\u4e2a\u65b0\u56fe\u5f62\n    fig = plt.figure(1, facecolor='white')\n    # \u6e05\u7a7a\u7ed8\u56fe\u533a\n    fig.clf()\n    # \u7ed9\u5168\u5c40\u53d8\u91cfcreatePlot.ax1\u8d4b\u503c\n    createPlot.ax1 = plt.subplot(111, frameon=False)\n    # \u8bbe\u7f6e\u8d77\u70b9\u503c\n    plotNode('a decision node', (0.5, 0.1), (0.1, 0.5), decisionNode)\n    plotNode('a leaf node', (0.8, 0.1), (0.3, 0.8), leafNode)\n    plt.show()\ndef getNumLeafs(myTree):\n    numLeafs = 0\n    # \u8fd9\u91cc\u56e0\u4e3apython2 \u548cpython3 \u5bf9keys \u8fd4\u56de\u7c7b\u578b\u7684\u66f4\u6539\uff0cpython2 \u8fd4\u56de\u7684\u662f\u4e00\u4e2a\u5217\u8868\n    # python3 \u8fd4\u56de\u7684\u662f\u4e00\u4e2a\u5bf9\u8c61 \u66f4\u50cf\u4e00\u4e2a\u96c6\u5408\n    # \u6240\u4ee5\u8fd9\u91cc\u9700\u8981\u4f20\u7ed9list\u7136\u540e\u518d\u7d22\u5f15\n    firstStr = list(myTree.keys())[0]\n    # \u83b7\u5f97\u5173\u952e\u5b57\u4e0b\u7684\u6570\u636e \u5373\u5f53\u524d\u7ed3\u70b9\u4e0b\u7684\u5b50\u6811\n    secondDict = myTree[firstStr]\n    # \u904d\u5386\u5b50\u6811\n    for key in secondDict.keys():\n        # \u8fd0\u7528\u81ea\u5e26\u7684\u65b9\u6cd5\u5224\u65ad\u662f\u4e0d\u662f\u5b57\u5178 \u5982\u679c\u662f\u5219\u9012\u5f52 \u5982\u679c\u4e0d\u662f\u5219\u53f6\u5b50\u6570+1\n        if type(secondDict[key]).__name__ == 'dict':\n            numLeafs += getNumLeafs(secondDict[key])\n        else:\n            numLeafs += 1\n    return numLeafs\ndef getTreeDepth(myTree):\n    maxDepth = 0\n    firstStr = list(myTree.keys())[0]\n    secondDict = myTree[firstStr]\n    for key in secondDict.keys():\n        # \u5982\u679c\u662f\u5b57\u5178 \u5219\u7ee7\u7eed\u5411\u4e0b\u9012\u5f52\n        if type(secondDict[key]).__name__ == 'dict':\n            thisDepth = 1 + getTreeDepth(secondDict[key])\n        else:\n            thisDepth = 1\n            # \u627e\u51fa\u6700\u5927\u6df1\u5ea6\u4f5c\u4e3a\u8fd9\u68f5\u6811\u7684\u6df1\u5ea6\n        if thisDepth &gt; maxDepth:\n            maxDepth = thisDepth\n    return maxDepth\ndef retrieveTree(i):\n    listOfTrees = [{'no surfacing': {0: 'no', 1: {'flippers': {0: 'no', 1: 'yes'}}}},\n                   {'no surfacing': {0: 'no', 1: {'flippers': {0: {'head': {0: 'no', 1: 'yes'}}, 3: 'maybe'}}}},\n                   {'no surfacing': {0: 'no', 1: {'flippers': {0: {'head': {0: 'no', 1: 'yes'}}, 1: 'no'}}}}\n                   ]\n    return listOfTrees[i]\n# \u8ba1\u7b97\u7236\u8282\u70b9\u548c\u5b50\u8282\u70b9\u7684\u4e2d\u95f4\u4f4d\u7f6e \u5e76\u5728\u6b64\u5904\u6dfb\u52a0\u7b80\u5355\u7684\u6587\u672c\u4fe1\u606f\ndef plotMidText(cntrPt, parentPt, txtString):\n    xMid = (parentPt[0] - cntrPt[0]) \/ 2.0 + cntrPt[0]\n    yMid = (parentPt[1] - cntrPt[1]) \/ 2.0 + cntrPt[1]\n    createPlot.ax1.text(xMid, yMid, txtString, va=\"center\", ha=\"center\", rotation=30)\ndef plotTree(myTree, parentPt, nodeTxt):\n    # \u8ba1\u7b97\u6811\u7684\u5bbd\n    # \u56e0\u4e3a\u8fd9\u4e2a\u51fd\u6570\u9700\u8981\u88ab\u7528\u6765\u9012\u5f52 \u6240\u4ee5\u5168\u5c40\u7684\u4e24\u4e2a\u6df1\u5ea6\u548c\u53f6\u5b50\u8282\u70b9\u4e2a\u6570\u4e0d\u80fd\u88ab\u91cd\u590d\u4f7f\u7528\n    # \u9700\u8981\u91cd\u65b0\u88ab\u5b9a\u4e49\n    numLeafs = getNumLeafs(myTree)\n    # \u8ba1\u7b97\u6811\u7684\u9ad8\n    depth = getTreeDepth(myTree)\n    firstStr = list(myTree.keys())[0]\n    # \u4e0b\u4e00\u4e2a\u8282\u70b9\u7684\u4f4d\u7f6e\n    cntrPt = (plotTree.xOff + (1.0 + float(numLeafs)) \/ 2.0 \/ plotTree.totalW, plotTree.yOff)\n    # \u8ba1\u7b97\u7236\u8282\u70b9\u548c\u5b50\u8282\u70b9\u7684\u4e2d\u95f4\u4f4d\u7f6e\uff0c\u5e76\u5728\u6b64\u5904\u6dfb\u52a0\u7b80\u5355\u7684\u6587\u672c\u4fe1\u606f\n    plotMidText(cntrPt, parentPt, nodeTxt)\n    # \u7ed8\u5236\u6b64\u8282\u70b9\u5e26\u7bad\u5934\u7684\u6ce8\u89e3\n    plotNode(firstStr, cntrPt, parentPt, decisionNode)\n    # \u65b0\u7684\u6811\uff0c\u5373\u5f53\u524d\u7ed3\u70b9\u7684\u5b50\u6811\n    secondDict = myTree[firstStr]\n    # \u6309\u6bd4\u4f8b\u51cf\u5c11\u5168\u5c40\u53d8\u91cfplotTree.yOff\n    plotTree.yOff = plotTree.yOff - 1.0 \/ plotTree.totalD\n    for key in secondDict.keys():\n        # \u5224\u65ad\u5b50\u8282\u70b9\u662f\u5426\u4e3a\u5b57\u5178\u7c7b\u578b\n        if type(secondDict[key]).__name__ == 'dict':\n            # \u662f\u7684\u8bdd\u8868\u660e\u8be5\u8282\u70b9\u4e5f\u662f\u4e00\u4e2a\u5224\u65ad\u8282\u70b9\uff0c\u9012\u5f52\u8c03\u7528plotTree()\u51fd\u6570\n            plotTree(secondDict[key], cntrPt, str(key))\n        else:\n            # \u4e0d\u662f\u7684\u8bdd\u66f4\u65b0x\u5750\u6807\u503c\n            plotTree.xOff = plotTree.xOff + 1.0 \/ plotTree.totalW\n            # \u7ed8\u5236\u6b64\u8282\u70b9\u5e26\u7bad\u5934\u7684\u6ce8\u89e3\n            plotNode(secondDict[key], (plotTree.xOff, plotTree.yOff), cntrPt, leafNode)\n            # \u7ed8\u5236\u6b64\u8282\u70b9\u5e26\u7bad\u5934\u7684\u6ce8\u89e3\n            plotMidText((plotTree.xOff, plotTree.yOff), cntrPt, str(key))\n    # \u6309\u6bd4\u4f8b\u589e\u52a0\u5168\u5c40\u53d8\u91cfplotTree.yOff\n    plotTree.yOff = plotTree.yOff + 1.0 \/ plotTree.totalD\ndef createPlot(inTree):\n    # \u521b\u5efa\u4e00\u4e2a\u65b0\u56fe\u5f62\n    fig = plt.figure(1, facecolor='white')\n    # \u6e05\u7a7a\u7ed8\u56fe\u533a\n    fig.clf()\n    # \u521b\u5efa\u4e00\u4e2a\u5b57\u5178\n    axprops = dict(xticks=[], yticks=[])\n    # \u7ed9\u5168\u5c40\u53d8\u91cfcreatePlot.ax1\u8d4b\u503c\n    createPlot.ax1 = plt.subplot(111, frameon=False, **axprops)\n    plotTree.totalW = float(getNumLeafs(inTree))\n    plotTree.totalD = float(getTreeDepth(inTree))\n    # \u8bbe\u7f6e\u8d77\u70b9\u503c\n    plotTree.xOff = -0.5 \/ plotTree.totalW\n    plotTree.yOff = 1.0\n    # \u7ed8\u5236\u6570\n    plotTree(inTree, (0.5, 1.0), '')\n    plt.show()\nif __name__ == '__main__':\n    tree = retrieveTree(0)\n    tree1 = retrieveTree(1)\n    tree2 = retrieveTree(2)\n    createPlot(tree2)\n<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u51b3\u7b56\u6811(Decision Tree\uff09 \u51b3\u7b56\u6811\u7684\u4e00\u4e2a\u91cd\u8981\u4efb\u52a1\u662f\u4e3a\u4e86\u7406\u89e3\u6570\u636e\u4e2d\u6240\u8574\u542b\u7684\u77e5\u8bc6\u4fe1\u606f\uff0c\u56e0\u6b64\u51b3\u7b56 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[6,10],"tags":[],"views":4126,"_links":{"self":[{"href":"http:\/\/www.sniper97.cn\/index.php\/wp-json\/wp\/v2\/posts\/139"}],"collection":[{"href":"http:\/\/www.sniper97.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.sniper97.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.sniper97.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.sniper97.cn\/index.php\/wp-json\/wp\/v2\/comments?post=139"}],"version-history":[{"count":0,"href":"http:\/\/www.sniper97.cn\/index.php\/wp-json\/wp\/v2\/posts\/139\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.sniper97.cn\/index.php\/wp-json\/wp\/v2\/media?parent=139"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.sniper97.cn\/index.php\/wp-json\/wp\/v2\/categories?post=139"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.sniper97.cn\/index.php\/wp-json\/wp\/v2\/tags?post=139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}