{"id":1786,"date":"2025-02-14T23:49:37","date_gmt":"2025-02-14T15:49:37","guid":{"rendered":"https:\/\/www.forillusion.com\/?p=1786"},"modified":"2025-02-14T23:49:38","modified_gmt":"2025-02-14T15:49:38","slug":"3-16-kaggle-house-price","status":"publish","type":"post","link":"https:\/\/www.forillusion.com\/index.php\/3-16-kaggle-house-price\/","title":{"rendered":"3.16 \u5b9e\u6218Kaggle\u6bd4\u8d5b\uff1a\u623f\u4ef7\u9884\u6d4b"},"content":{"rendered":"\n<p><div class=\"has-toc have-toc\"><\/div><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u83b7\u53d6\u548c\u8bfb\u53d6\u6570\u636e\u96c6<\/h2>\n\n\n\n<p>\u6bd4\u8d5b\u6570\u636e\u5206\u4e3a\u8bad\u7ec3\u6570\u636e\u96c6\u548c\u6d4b\u8bd5\u6570\u636e\u96c6\u3002\u4e24\u4e2a\u6570\u636e\u96c6\u7684\u7279\u5f81\u503c\u6709\u8fde\u7eed\u7684\u6570\u5b57\u3001\u79bb\u6563\u7684\u6807\u7b7e\u751a\u81f3\u662f\u7f3a\u5931\u503c\u201cna\u201d\u3002\u53ea\u6709\u8bad\u7ec3\u6570\u636e\u96c6\u5305\u62ec\u4e86\u6bcf\u680b\u623f\u5b50\u7684\u4ef7\u683c\uff0c\u4e5f\u5c31\u662f\u6807\u7b7e\u3002<\/p>\n\n\n\n<p>\u901a\u8fc7<code>pandas<\/code>\u5e93\u8bfb\u5165\u5e76\u5904\u7406\u6570\u636e\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from torch import nn\nfrom torch.nn import init\nimport torch\nimport numpy as np\nimport sys\nimport torchvision\nfrom torch.utils import data\nfrom torchvision import transforms\nimport pandas as pd\nimport matplotlib.pyplot as plt\nfrom IPython import display\ntorch.set_default_tensor_type(torch.FloatTensor) # \u8bbe\u7f6e\u9ed8\u8ba4tensor\u7c7b\u578b<\/code><\/pre>\n\n\n\n<p>\u4f7f\u7528<code>pandas<\/code>\u8bfb\u53d6\u8fd9\u4e24\u4e2a\u6587\u4ef6\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')\nbashPath = r\".\\house-price\"\ntestPath = bashPath + \"\/test.csv\"\ntrainPath = bashPath + \"\/train.csv\"\n\n# \u8bfb\u53d6\u6570\u636e\ntrain_data = pd.read_csv(trainPath)\ntest_data = pd.read_csv(testPath)<\/code><\/pre>\n\n\n\n<p>\u6837\u672c\u7684\u7b2c\u4e00\u4e2a\u7279\u5f81\u662fId\uff0c\u4e0d\u4f7f\u7528\u5b83\u6765\u8bad\u7ec3\u3002\u5c06\u6240\u6709\u7684\u8bad\u7ec3\u6570\u636e\u548c\u6d4b\u8bd5\u6570\u636e\u768479\u4e2a\u7279\u5f81\u6309\u6837\u672c\u8fde\u7ed3\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>all_features = pd.concat((train_data.iloc&#91;:, 1:-1], test_data.iloc&#91;:, 1:]))<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u9884\u5904\u7406\u6570\u636e<\/h2>\n\n\n\n<p>\u5bf9\u8fde\u7eed\u6570\u503c\u7684\u7279\u5f81\u505a\u6807\u51c6\u5316\uff08standardization\uff09\uff1a\u8bbe\u8be5\u7279\u5f81\u5728\u6574\u4e2a\u6570\u636e\u96c6\u4e0a\u7684\u5747\u503c\u4e3a$\\mu$\uff0c\u6807\u51c6\u5dee\u4e3a$\\sigma$\u3002\u90a3\u4e48\u5c06\u8be5\u7279\u5f81\u7684\u6bcf\u4e2a\u503c\u5148\u51cf\u53bb$\\mu$\u518d\u9664\u4ee5$\\sigma$\u5f97\u5230\u6807\u51c6\u5316\u540e\u7684\u6bcf\u4e2a\u7279\u5f81\u503c\u3002\u5bf9\u4e8e\u7f3a\u5931\u7684\u7279\u5f81\u503c\uff0c\u5c06\u5176\u66ff\u6362\u6210\u8be5\u7279\u5f81\u7684\u5747\u503c\uff0c\u5373\u4e3a0\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>numeric_features = all_features.dtypes&#91;all_features.dtypes != 'object'].index # \u53d6\u51fa\u6570\u503c\u7279\u5f81\u7684\u7d22\u5f15\nall_features&#91;numeric_features] = all_features&#91;numeric_features].apply(  # apply\u51fd\u6570\u5bf9\u6bcf\u4e2a\u7279\u5f81\u8fdb\u884c\u64cd\u4f5c\n    lambda x: (x - x.mean()) \/ (x.std()))  # x.std()\u8868\u793a\u6807\u51c6\u5dee\uff0cx.mean()\u8868\u793a\u5747\u503c\uff0cx\u8868\u793a\u6bcf\u4e2a\u7279\u5f81\u7684\u503c\nall_features&#91;numeric_features] = all_features&#91;numeric_features].fillna(0) # \u6807\u51c6\u5316\u540e\uff0c\u6bcf\u4e2a\u6570\u503c\u7279\u5f81\u7684\u5747\u503c\u53d8\u4e3a0\uff0c\u6240\u4ee5\u53ef\u4ee5\u76f4\u63a5\u75280\u6765\u66ff\u6362\u7f3a\u5931\u503c<\/code><\/pre>\n\n\n\n<p>\u63a5\u4e0b\u6765\u5c06\u79bb\u6563\u6570\u503c\u8f6c\u6210\u6307\u793a\u7279\u5f81\u3002\u4e3e\u4e2a\u4f8b\u5b50\uff0c\u5047\u8bbe\u7279\u5f81MSZoning\u91cc\u9762\u6709\u4e24\u4e2a\u4e0d\u540c\u7684\u79bb\u6563\u503cRL\u548cRM\uff0c\u90a3\u4e48\u8fd9\u4e00\u6b65\u8f6c\u6362\u5c06\u53bb\u6389MSZoning\u7279\u5f81\uff0c\u5e76\u65b0\u52a0\u4e24\u4e2a\u7279\u5f81MSZoning_RL\u548cMSZoning_RM\uff0c\u5176\u503c\u4e3a0\u62161\u3002\u5982\u679c\u4e00\u4e2a\u6837\u672c\u539f\u6765\u5728MSZoning\u91cc\u7684\u503c\u4e3aRL\uff0c\u90a3\u4e48\u6709MSZoning_RL=1\u4e14MSZoning_RM=0\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># dummy_na=True\u5c06\u7f3a\u5931\u503c\u4e5f\u5f53\u4f5c\u5408\u6cd5\u7684\u7279\u5f81\u503c\u5e76\u4e3a\u5176\u521b\u5efa\u6307\u793a\u7279\u5f81\nall_features = pd.get_dummies(all_features, dummy_na=True) # one-hot\u7f16\u7801\uff0cget_dummies\u51fd\u6570\u5c06\u7c7b\u522b\u7279\u5f81\u8f6c\u6362\u4e3a\u6307\u793a\u7279\u5f81\n# \u5c06True\u548cFalse\u8f6c\u6362\u4e3a1\u548c0\nall_features = all_features.astype(np.float32)\nprint(all_features.shape) # (2919, 331)<\/code><\/pre>\n\n\n\n<p>\u53ef\u4ee5\u770b\u5230\u8fd9\u4e00\u6b65\u8f6c\u6362\u5c06\u7279\u5f81\u6570\u4ece79\u589e\u52a0\u5230\u4e86331\u3002<\/p>\n\n\n\n<p>\u6700\u540e\uff0c\u901a\u8fc7<code>values<\/code>\u5c5e\u6027\u5f97\u5230NumPy\u683c\u5f0f\u7684\u6570\u636e\uff0c\u5e76\u8f6c\u6210<code>Tensor<\/code>\uff0c\u653e\u5728GPU\u4e0a\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>n_train = train_data.shape&#91;0] # \u8bad\u7ec3\u6570\u636e\u96c6\u7684\u884c\u6570\ntrain_features = torch.tensor(all_features&#91;:n_train].values, dtype=torch.float, device=device)\ntest_features = torch.tensor(all_features&#91;n_train:].values, dtype=torch.float, device=device)\ntrain_labels = torch.tensor(train_data.SalePrice.values, dtype=torch.float, device=device).view(-1, 1)# view\u51fd\u6570\u5c06\u884c\u5411\u91cf\u8f6c\u6362\u4e3a\u5217\u5411\u91cf<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u8bad\u7ec3\u6a21\u578b<\/h2>\n\n\n\n<p>\u4f7f\u7528\u4e00\u4e2a\u57fa\u672c\u7684\u7ebf\u6027\u56de\u5f52\u6a21\u578b\u548c\u5e73\u65b9\u635f\u5931\u51fd\u6570\u6765\u8bad\u7ec3\u6a21\u578b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>loss = torch.nn.MSELoss()\n\ndef get_net():\n    num_inputs = train_features.shape&#91;1]\n    hidden_units_1 = 81\n    num_outputs = 1\n\n    net = nn.Sequential(\n        nn.Linear(num_inputs, num_outputs)\n    )\n\n    # net = nn.Sequential(\n    #     nn.Linear(num_inputs, hidden_units_1),\n    #     nn.ReLU(),\n    #     nn.Linear(hidden_units_1, num_outputs)\n    # )\n\n    # \u521d\u59cb\u5316\u6a21\u578b\u53c2\u6570\n    for params in net.parameters(): # \u521d\u59cb\u5316\u6a21\u578b\u53c2\u6570\n        init.normal_(params, mean=0, std=0.01) # \u6b63\u6001\u5206\u5e03\u521d\u59cb\u5316\n\n    net = net.float() # \u5c06\u6a21\u578b\u7684\u53c2\u6570\u8f6c\u6362\u4e3afloat\u578b\n    net.cuda() # \u5c06\u6a21\u578b\u52a0\u8f7d\u5230cuda\u4e0a\n    return net<\/code><\/pre>\n\n\n\n<p>\u4e0b\u9762\u5b9a\u4e49\u6bd4\u8d5b\u7528\u6765\u8bc4\u4ef7\u6a21\u578b\u7684\u5bf9\u6570\u5747\u65b9\u6839\u8bef\u5dee\u3002\u7ed9\u5b9a\u9884\u6d4b\u503c$\\hat y_1, \\ldots, \\hat y_n$\u548c\u5bf9\u5e94\u7684\u771f\u5b9e\u6807\u7b7e$y_1,\\ldots, y_n$\uff0c\u5b83\u7684\u5b9a\u4e49\u4e3a<\/p>\n\n\n\n<p>$$<br>\\sqrt{\\frac{1}{n}\\sum_{i=1}^n\\left(\\log(y_i)-\\log(\\hat y_i)\\right)^2}.<br>$$<\/p>\n\n\n\n<p>\u5bf9\u6570\u5747\u65b9\u6839\u8bef\u5dee\u7684\u5b9e\u73b0\u5982\u4e0b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def log_rmse(net, features, labels):\n    with torch.no_grad():\n        # \u5c06\u5c0f\u4e8e1\u7684\u503c\u8bbe\u62101\uff0c\u4f7f\u5f97\u53d6\u5bf9\u6570\u65f6\u6570\u503c\u66f4\u7a33\u5b9a\n        clipped_preds = torch.max(net(features), torch.tensor(1.0))\n        rmse = torch.sqrt(loss(clipped_preds.log(), labels.log()))\n    return rmse.item()<\/code><\/pre>\n\n\n\n<p>\u4e0b\u9762\u7684\u8bad\u7ec3\u51fd\u6570\u8ddf\u672c\u7ae0\u4e2d\u524d\u51e0\u8282\u7684\u4e0d\u540c\u5728\u4e8e\u4f7f\u7528\u4e86Adam\u4f18\u5316\u7b97\u6cd5\u3002\u76f8\u5bf9\u4e4b\u524d\u4f7f\u7528\u7684\u5c0f\u6279\u91cf\u968f\u673a\u68af\u5ea6\u4e0b\u964d\uff0c\u5b83\u5bf9\u5b66\u4e60\u7387\u76f8\u5bf9\u4e0d\u90a3\u4e48\u654f\u611f\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def train(net, train_features, train_labels, test_features, test_labels, num_epochs, learning_rate, weight_decay, batch_size):\n    train_ls, test_ls = &#91;], &#91;]\n    dataset = data.TensorDataset(train_features, train_labels)\n    train_iter = data.DataLoader(dataset, batch_size, shuffle=True)\n    optimizer = torch.optim.Adam(net.parameters(), lr = lr, weight_decay = weight_decay) \n\n    for epoch in range(1, num_epochs + 1):\n        for X, y in train_iter: # X\u662f\u7279\u5f81\uff0cy\u662f\u6807\u7b7e\n            output = net(X) # \u524d\u5411\u4f20\u64ad \n            l = loss(output, y) # \u8ba1\u7b97\u635f\u5931\n            optimizer.zero_grad() # \u68af\u5ea6\u6e05\u96f6\uff0c\u7b49\u4ef7\u4e8enet.zero_grad()\n            l.backward() # \u53cd\u5411\u4f20\u64ad\n            optimizer.step() # \u8fed\u4ee3\u6a21\u578b\u53c2\u6570\n\n        train_ls.append(log_rmse(net, train_features, train_labels)) # \u8bad\u7ec3\u96c6\u4e0a\u7684\u635f\u5931\n        if test_labels is not None: # \u5982\u679c\u4f20\u5165\u4e86\u6d4b\u8bd5\u96c6\n            test_ls.append(log_rmse(net, test_features, test_labels)) # \u6d4b\u8bd5\u96c6\u4e0a\u7684\u635f\u5931\n    return train_ls, test_ls<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">$K$\u6298\u4ea4\u53c9\u9a8c\u8bc1<\/h2>\n\n\n\n<p>$K$\u6298\u4ea4\u53c9\u9a8c\u8bc1\u88ab\u7528\u6765\u9009\u62e9\u6a21\u578b\u8bbe\u8ba1\u5e76\u8c03\u8282\u8d85\u53c2\u6570\u3002\u4e0b\u9762\u5b9e\u73b0\u4e86\u4e00\u4e2a\u51fd\u6570\uff0c\u5b83\u8fd4\u56de\u7b2c<code>i<\/code>\u6298\u4ea4\u53c9\u9a8c\u8bc1\u65f6\u6240\u9700\u8981\u7684\u8bad\u7ec3\u548c\u9a8c\u8bc1\u6570\u636e\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def get_k_fold_data(k, i, X, y):\n    fold_size = X.shape&#91;0] \/\/ k\n    X_train, y_train = None, None\n\n    for j in range(k):\n        idx = slice(j * fold_size, (j + 1) * fold_size)  # slice(start, end, step)\u5207\u7247\u51fd\u6570\n        X_part, y_part = X&#91;idx, :], y&#91;idx]\n        if j == i:\n            X_valid, y_valid = X_part, y_part\n        elif X_train is None:\n            X_train, y_train = X_part, y_part\n        else:\n            X_train = torch.cat((X_train, X_part), dim=0)\n            y_train = torch.cat((y_train, y_part), dim=0)\n    return X_train, y_train, X_valid, y_valid<\/code><\/pre>\n\n\n\n<p>\u5728$K$\u6298\u4ea4\u53c9\u9a8c\u8bc1\u4e2d\u8bad\u7ec3$K$\u6b21\u5e76\u8fd4\u56de\u8bad\u7ec3\u548c\u9a8c\u8bc1\u7684\u5e73\u5747\u8bef\u5dee\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def k_fold(k, X_train, y_train, num_epochs, learning_rate, weight_decay, batch_size):\n    train_l_sum, valid_l_sum = 0, 0\n    for i in range(k):\n        data = get_k_fold_data(k, i, X_train, y_train)\n\n        net = get_net()\n        train_ls, valid_ls = train(net, *data, num_epochs, learning_rate, weight_decay, batch_size)\n        train_l_sum += train_ls&#91;-1]\n        valid_l_sum += valid_ls&#91;-1]\n        if i == 0:\n            semilogy(range(1, num_epochs + 1), train_ls, 'epochs', 'rmse', range(1, num_epochs + 1), valid_ls, &#91;'train', 'valid'])\n        print('fold %d, train rmse %f, valid rmse %f' % (i, train_ls&#91;-1], valid_ls&#91;-1]))\n    return train_l_sum \/ k, valid_l_sum \/ k<\/code><\/pre>\n\n\n\n<p>\u8f93\u51fa\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>fold 0, train rmse 0.132562, valid rmse 0.143022\nfold 1, train rmse 0.126497, valid rmse 0.150703\nfold 2, train rmse 0.127167, valid rmse 0.151402\nfold 3, train rmse 0.131500, valid rmse 0.130405\nfold 4, train rmse 0.123478, valid rmse 0.159710\n(0.12824077159166336, 0.1470484495162964)<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u6a21\u578b\u9009\u62e9<\/h2>\n\n\n\n<p>\u4f7f\u7528\u4e00\u7ec4\u672a\u7ecf\u8c03\u4f18\u7684\u8d85\u53c2\u6570\u5e76\u8ba1\u7b97\u4ea4\u53c9\u9a8c\u8bc1\u8bef\u5dee\u3002\u6539\u52a8\u8fd9\u4e9b\u8d85\u53c2\u6570\u6765\u5c3d\u53ef\u80fd\u51cf\u5c0f\u5e73\u5747\u6d4b\u8bd5\u8bef\u5dee\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>k = 5\nlr = 5\nweight_decay = 0.05 # \u6743\u91cd\u8870\u51cf\u53c2\u6570\nnum_epochs = 500\nbatch_size = 64\ntrain_l, valid_l = k_fold(k, train_features, train_labels, num_epochs, lr, weight_decay, batch_size)\nprint((train_l, valid_l))<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u9884\u6d4b\u5e76\u5728Kaggle\u63d0\u4ea4\u7ed3\u679c<\/h2>\n\n\n\n<p>\u4e0b\u9762\u5b9a\u4e49\u9884\u6d4b\u51fd\u6570\u3002\u5728\u9884\u6d4b\u4e4b\u524d\uff0c\u4f7f\u7528\u5b8c\u6574\u7684\u8bad\u7ec3\u6570\u636e\u96c6\u6765\u91cd\u65b0\u8bad\u7ec3\u6a21\u578b\uff0c\u5e76\u5c06\u9884\u6d4b\u7ed3\u679c\u5b58\u6210\u63d0\u4ea4\u6240\u9700\u8981\u7684\u683c\u5f0f\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def train_and_pred(train_features, test_features, train_labels, test_data, num_epochs, lr, weight_decay, batch_size):\n    net = get_net()\n    train_ls, _ = train(net, train_features, train_labels, None, None, num_epochs, lr, weight_decay, batch_size)\n    semilogy(range(1, num_epochs + 1), train_ls, 'epochs', 'rmse')\n    print('train rmse %f' % train_ls&#91;-1])\n    preds = net(test_features).cpu().detach().numpy() # \u5c06\u9884\u6d4b\u503c\u8f6c\u6362\u4e3anumpy\u6570\u7ec4\uff0cdetach\u51fd\u6570\u5c06tensor\u4ece\u8ba1\u7b97\u56fe\u4e2d\u5206\u7981\uff0ccpu\u51fd\u6570\u5c06tensor\u8f6c\u79fb\u5230\u5185\u5b58\n    test_data&#91;'SalePrice'] = pd.Series(preds.reshape(1, -1)&#91;0]) # \u5c06\u9884\u6d4b\u503c\u586b\u5145\u5230test_data\u7684SalePrice\u5217\n    submission = pd.concat(&#91;test_data&#91;'Id'], test_data&#91;'SalePrice']], axis=1) # \u5c06test_data\u7684Id\u548cSalePrice\u5217\u62fc\u63a5\u8d77\u6765\n    submission.to_csv(bashPath+'\/submission.csv', index=False)<\/code><\/pre>\n\n\n\n<p>\u8bbe\u8ba1\u597d\u6a21\u578b\u5e76\u8c03\u597d\u8d85\u53c2\u6570\u4e4b\u540e\uff0c\u4e0b\u4e00\u6b65\u5c31\u662f\u5bf9\u6d4b\u8bd5\u6570\u636e\u96c6\u4e0a\u7684\u623f\u5c4b\u6837\u672c\u505a\u4ef7\u683c\u9884\u6d4b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>train_and_pred(train_features, test_features, train_labels, test_data, num_epochs, lr, weight_decay, batch_size)<\/code><\/pre>\n\n\n\n<p>\u8f93\u51fa\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>train rmse 0.129388<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u83b7\u53d6\u548c\u8bfb\u53d6\u6570\u636e\u96c6 \u6bd4\u8d5b\u6570\u636e\u5206\u4e3a\u8bad\u7ec3\u6570\u636e\u96c6\u548c\u6d4b\u8bd5\u6570\u636e\u96c6\u3002\u4e24\u4e2a\u6570\u636e\u96c6\u7684\u7279\u5f81\u503c\u6709\u8fde\u7eed\u7684\u6570\u5b57\u3001\u79bb\u6563\u7684\u6807\u7b7e\u751a\u81f3\u662f\u7f3a\u5931\u503c\u201cna\u201d\u3002\u53ea\u6709\u8bad\u7ec3\u6570\u636e &#8230;<\/p>","protected":false},"author":1,"featured_media":1787,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46,3],"tags":[45,44,12,22],"class_list":["post-1786","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-46","category-3","tag-45","tag-44","tag-12","tag-22"],"_links":{"self":[{"href":"https:\/\/www.forillusion.com\/index.php\/wp-json\/wp\/v2\/posts\/1786","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.forillusion.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.forillusion.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.forillusion.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.forillusion.com\/index.php\/wp-json\/wp\/v2\/comments?post=1786"}],"version-history":[{"count":1,"href":"https:\/\/www.forillusion.com\/index.php\/wp-json\/wp\/v2\/posts\/1786\/revisions"}],"predecessor-version":[{"id":1788,"href":"https:\/\/www.forillusion.com\/index.php\/wp-json\/wp\/v2\/posts\/1786\/revisions\/1788"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.forillusion.com\/index.php\/wp-json\/wp\/v2\/media\/1787"}],"wp:attachment":[{"href":"https:\/\/www.forillusion.com\/index.php\/wp-json\/wp\/v2\/media?parent=1786"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.forillusion.com\/index.php\/wp-json\/wp\/v2\/categories?post=1786"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.forillusion.com\/index.php\/wp-json\/wp\/v2\/tags?post=1786"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}