{"id":254,"date":"2020-01-24T15:38:24","date_gmt":"2020-01-24T06:38:24","guid":{"rendered":"http:\/\/aiacademy.jp\/media\/?p=254"},"modified":"2024-08-08T16:26:15","modified_gmt":"2024-08-08T07:26:15","slug":"k-means%e3%81%a8%e3%81%af","status":"publish","type":"post","link":"https:\/\/aiacademy.jp\/media\/?p=254","title":{"rendered":"k-means\u3068\u306f"},"content":{"rendered":"<div id=\"sgb-css-id-1\">\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button has-custom-font-size is-style-fill has-medium-font-size\"><a class=\"wp-block-button__link has-vivid-green-cyan-background-color has-background wp-element-button\" href=\"https:\/\/lin.ee\/3E4GzWk\" rel=\"nofollow noopener\" target=\"_blank\">LINE\u53cb\u3060\u3061\u767b\u9332 \u25b6 \u6a5f\u68b0\u5b66\u7fd2\u30b3\u30fc\u30b9 \u25b6 \u53d7\u8b1b\u5272\u5f15\u30af\u30fc\u30dd\u30f3 \u7121\u6599\u52d5\u753b<\/a><\/div>\n<\/div>\n<\/div>\n\n<div class=\"toc\">    <div id=\"toc_container\" class=\"sgb-toc--no-bullets js-smooth-scroll\" data-dialog-title=\"Table of Contents\">\n      <p class=\"toc_title\">\u76ee\u6b21 <\/p>\n      <ul class=\"toc_list\">  <li class=\"first\">    <span><\/span>    <ul class=\"menu_level_1\">      <li class=\"first\">        <a href=\"#i-0\">\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0<\/a>      <\/li>      <li>        <a href=\"#i-1\">K-means\u3068\u306f<\/a>      <\/li>      <li>        <a href=\"#i-2\">K-means\u306e\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0<\/a>      <\/li>      <li>        <a href=\"#i-3\">K-means\u306e\u554f\u984c\u70b9<\/a>      <\/li>      <li>        <a href=\"#i-4\">K-means\u306e\u5b9f\u88c5\u4f8b<\/a>      <\/li>      <li>        <a href=\"#i-5\">\u4eca\u56de\u4f5c\u6210\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30e0<\/a>      <\/li>      <li class=\"last\">        <a href=\"#i-6\">\u307e\u3068\u3081<\/a>      <\/li>    <\/ul>  <\/li>  <li class=\"last\">    <a href=\"#i-7\">Python\u3084\u7d71\u8a08\u3092\u52b9\u7387\u3088\u304f\u5b66\u3076\u306b\u306f\uff1f<\/a>  <\/li><\/ul>\n      \n    <\/div><\/div><div class=\"toc\"><p><\/p>\n<\/div><h2 id=\"i-0\">\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0<\/h2>\n<p>\u4eca\u307e\u3067\u306e\u5b66\u7fd2\u306f\u3001\u6559\u5e2b\u3042\u308a\u5b66\u7fd2\u3068\u547c\u3070\u308c\u6b63\u89e3\u30e9\u30d9\u30eb\u304c\u3042\u308b\u30c7\u30fc\u30bf\u3092\u5206\u985e\u3059\u308b\u3082\u306e\u3067\u3057\u305f\u3002<br>\u4eca\u56de\u306f\u3001\u6559\u5e2b\u306a\u3057\u5b66\u7fd2\u306e\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0\u306b\u3064\u3044\u3066\u5b66\u7fd2\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u521d\u3081\u306b\u30af\u30e9\u30b9\u5206\u985e\u3068\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0\u306e\u9055\u3044\u3092\u8aac\u660e\u3057\u307e\u3059\u3002<br><strong>\u30af\u30e9\u30b9\u5206\u985e\u306f\u300c\u6559\u5e2b\u3042\u308a\u5b66\u7fd2\u300d\u3067\u3001\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0\u306f\u300c\u6559\u5e2b\u306a\u3057\u5b66\u7fd2\u300d\u306b\u306a\u308a\u307e\u3059\u3002<\/strong><\/p>\n<p>\u30af\u30e9\u30b9\u5206\u985e\u3067\u306f\u4e8b\u524d\u306b\u6c7a\u307e\u3063\u3066\u3044\u308b\u5206\u985e\u3092\u65b0\u3057\u3044\u30c7\u30fc\u30bf\u306b\u5f53\u3066\u306f\u3081\u3066\u8003\u3048\u308b\u624b\u6cd5\u3067\u3001\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0\u306f\u3001\u30c7\u30fc\u30bf\u306e\u4e2d\u3067\u4f3c\u305f\u3082\u306e\u306e\u96c6\u307e\u308a\u3092\u898b\u3064\u3051\u308b\u624b\u6cd5\u3067\u3059\u3002<\/p>\n<p><strong><em>\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0\u3068\u306f\u3001\u6b63\u89e3\u30e9\u30d9\u30eb\u304c\u306a\u3044\u30c7\u30fc\u30bf\u306b\u5bfe\u3057\u3044\u304f\u3064\u304b\u306e\u30b0\u30eb\u30fc\u30d7\uff08\u30af\u30e9\u30b9\u30bf\uff09\u306b\u5206\u3051\u308b\u3082\u306e\u3067\u3059\u3002<\/em><\/strong><br><strong>\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0\u306f\u3001\u4ee3\u8868\u7684\u306a\u6559\u5e2b\u306a\u3057\u5b66\u7fd2\u624b\u6cd5\u3067\u3001\u591a\u5909\u91cf\u306e\u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf\u304c\u5927\u91cf\u306b\u3042\u308b\u5834\u5408\u3084\u3001\u3069\u3046\u3044\u3063\u305f\u50be\u5411\u306e\u30af\u30e9\u30b9\u30bf\u306b\u5206\u5272\u3067\u304d\u308b\u304b\u304c\u4e0d\u660e\u306a\u5834\u5408\u306b\u3001\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0\u3059\u308b\u3053\u3068\u3067\u3001\u5168\u4f53\u306e\u30b5\u30f3\u30d7\u30eb\u306e\u4e2d\u3067\u30af\u30e9\u30b9\u30bf\u3092\u5206\u5272\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u308b\u624b\u6cd5\u306b\u306a\u308a\u307e\u3059\u3002<\/strong><br>\u4f8b\u3068\u3057\u3066\u3001\u9867\u5ba2\u306e\u30bb\u30b0\u30e1\u30f3\u30c8\u5316\u3084\u907a\u4f1d\u5b50\u306e\u767a\u73fe\u30d1\u30bf\u30fc\u30f3\u306a\u3069\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h2 id=\"i-1\">K-means\u3068\u306f<\/h2>\n<p><strong>K-means\u3068\u306f\u3001\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0\u306e\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306e\u4e00\u7a2e\u3067\u5b9f\u884c\u901f\u5ea6\u304c\u901f\u304f\u62e1\u5f35\u6027\u304c\u3042\u308b\u3068\u3044\u3046\u7279\u5fb4\u304c\u3042\u308a\u307e\u3059\u3002<\/strong><br>K-means\u306eK\u306f\u30af\u30e9\u30b9\u30bf\u306e\u6570\u3092\u793a\u3059\u30cf\u30a4\u30d1\u30fc\u30d1\u30e9\u30e1\u30fc\u30bf\u3067\u3059\u3002<br>K\u306f\u5fc5\u305a\u30c7\u30fc\u30bf\u306e\u6570\u3088\u308a\u5c0f\u3055\u3044\u5024\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002<br>\u306a\u305c\u300cK\u304c\u30c7\u30fc\u30bf\u306f\u6570\u3088\u308a\u5c11\u306a\u304f\u8a2d\u5b9a\u3059\u308b\u306e\u304b\u300d\u3067\u3059\u304c\u3001<strong><em>\u30af\u30e9\u30b9\u306e\u6570\uff1c\u30c7\u30fc\u30bf\u6570\u3068\u3057\u3066\u3001\u5206\u985e\u3092\u3059\u308b\u305f\u3081<\/em><\/strong>\u3067\u3059\u3002<br>\u6c7a\u307e\u3063\u305f\u5024\u304c\u306a\u304f\u4e0d\u660e\u77ad\u3067\u3059\u304c\u3001\u69d8\u3005\u306a\u6c42\u3081\u308b\u624b\u6cd5\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h2 id=\"i-2\">K-means\u306e\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0<\/h2>\n<p>K-means\u306f\u4ee5\u4e0b\u306e\u30b9\u30c6\u30c3\u30d7\u306b\u3088\u308a\u5b66\u7fd2\u3092\u884c\u3044\u307e\u3059\u3002<br>1.\u30e9\u30f3\u30c0\u30e0\u306a\u4f4d\u7f6e\u306b\u30af\u30e9\u30b9\u30bf\u306e\u91cd\u5fc3\uff08\u4e2d\u5fc3\u70b9\uff09\u3092\u5b9a\u3081\u308b<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/camo.qiitausercontent.com\/4d46030b947191b4219e058b5f67543bd6d277c1\/68747470733a2f2f71696974612d696d6167652d73746f72652e73332e616d617a6f6e6177732e636f6d2f302f3130353838372f37653430623338352d653038322d346664342d376534342d6564653235303161653938632e706e67\" alt=\"\"><\/p>\n<p>2.\u305d\u308c\u305e\u308c\u306e\u30af\u30e9\u30b9\u30bf\u306e\u91cd\u5fc3\u3068\u5404\u70b9\u306e\u8ddd\u96e2\u3092\u8a08\u7b97<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/camo.qiitausercontent.com\/4c9cad6131c06636d05929bec906aa228d98acc7\/68747470733a2f2f71696974612d696d6167652d73746f72652e73332e616d617a6f6e6177732e636f6d2f302f3130353838372f38646332656130642d633365382d653336352d386266312d6333383036633962333130612e706e67\" alt=\"\"><\/p>\n<p>3.\u5404\u70b9\u3092\u4e00\u756a\u8fd1\u3044\u30af\u30e9\u30b9\u30bf\u306b\u5272\u308a\u5f53\u3066\u308b<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/camo.qiitausercontent.com\/efe4c8225fb056d183770ad0688563c9890c05e7\/68747470733a2f2f71696974612d696d6167652d73746f72652e73332e616d617a6f6e6177732e636f6d2f302f3130353838372f66646535366335302d613737662d376337332d623262302d6431313331306666336330612e706e67\" alt=\"\"><\/p>\n<p>4.2\u30683\u3092\u7e70\u308a\u8fd4\u3057\u3001\u8a2d\u5b9a\u3057\u305f\u56de\u6570\u7e70\u308a\u8fd4\u3059\u304b\u3001\u30af\u30e9\u30b9\u30bf\u306e\u5909\u66f4\u304c\u306a\u304f\u306a\u3063\u305f\u3089\u7d42\u4e86<br>\u5b9f\u969b\u306b\u3001K-means\u3092\u884c\u3063\u3066\u3044\u308b\u904e\u7a0b\u3092\u307f\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u30b5\u30a4\u30c8\u304c\u3042\u308b\u306e\u3067\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<br><a href=\"http:\/\/tech.nitoyon.com\/ja\/blog\/2013\/11\/07\/k-means\/\" rel=\"nofollow noopener\" target=\"_blank\">K-means \u6cd5\u3092 D3.js \u3067\u30d3\u30b8\u30e5\u30a2\u30e9\u30a4\u30ba\u3057\u3066\u307f\u305f<\/a><\/p>\n<h2 id=\"i-3\">K-means\u306e\u554f\u984c\u70b9<\/h2>\n<p>K-means\u306e\u554f\u984c\u70b9\u3068\u3057\u3066\u3001\u521d\u671f\u5024\u306b\u3088\u3063\u3066\u5c40\u6240\u6700\u9069\u89e3\u306b\u9665\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/camo.qiitausercontent.com\/8623939055c3e382808e9e768a11df764f793873\/68747470733a2f2f71696974612d696d6167652d73746f72652e73332e616d617a6f6e6177732e636f6d2f302f3130353838372f61633964313237342d356634362d653835372d626337662d3139323963313339613661612e706e67\" alt=\"\"><\/p>\n<p>\u3053\u306e\u4f8b\u3060\u3068\u3001\u660e\u3089\u304b\u306b\u4e0a\u4e0b\u306b\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0\u3067\u304d\u308b\u306b\u3082\u95a2\u308f\u3089\u305a\u3001\u521d\u671f\u5024\u304c\u8fd1\u3044\u6240\u306b\u3042\u308b\u305f\u3081\u9069\u5207\u306a\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0\u304c\u3067\u304d\u3066\u3044\u307e\u305b\u3093\u3002<br>\u89e3\u6c7a\u7b56\u3068\u3057\u3066\u3001\u521d\u671f\u5024\u3092\u5909\u3048\u3066\u4f55\u5ea6\u3082\u5b9f\u884c\u3059\u308b\u3053\u3068\u304c\u3042\u3052\u3089\u308c\u307e\u3059\u3002<\/p>\n<h2 id=\"i-4\">K-means\u306e\u5b9f\u88c5\u4f8b<\/h2>\n<p>\u306f\u3058\u3081\u306b\u3001\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0\u3059\u308b\u305f\u3081\u306e\u30c7\u30fc\u30bf\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre><code>import numpy as np\nfrom sklearn.cluster import KMeans\nfrom sklearn import metrics\nimport matplotlib.pyplot as plt\n\nx1 = np.array([1,2,3,1,5,6,5,5,6,7,8,9,7,9])\nx2 = np.array([1,3,2,2,8,6,7,6,7,1,2,1,1,3])\n\n#1\u6b21\u5143\u76ee\u3092x1\uff0c2\u6b21\u5143\u76ee\u3092x2\u3068\u3059\u308b\u884c\u5217\u3092\u4f5c\u6210\nx = np.c_[x1, x2]\n\n#x\u8ef8\u3068y\u8ef8\u306e\u5e45\u3092\u8a2d\u5b9a\u3059\u308b\nplt.xlim([0, 10])\nplt.ylim([0, 10])\nplt.title('data')\n#\u6563\u5e03\u56f3\u3092\u4f5c\u6210\nplt.scatter(x1, x2)\nplt.show()\n<\/code><\/pre>\n<p>\u5b9f\u884c\u3059\u308b\u3068\u3001\u56f3\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/camo.qiitausercontent.com\/737e1ec2f7fc31cf2eee6b7a0c251c0d9e271254\/68747470733a2f2f71696974612d696d6167652d73746f72652e73332e616d617a6f6e6177732e636f6d2f302f3130353838372f66616133393339392d633830312d616332642d393238662d3161653864343432323461642e706e67\" alt=\"\"><\/p>\n<p>\u4eca\u56de\u306fk\u30923\u306b\u3057\u3066\u5b66\u7fd2\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<pre><code>kmeans = KMeans(n_clusters=3)\nkmeans_model = kmeans.fit(x)\nprint(kmeans_model.labels_)\n<\/code><\/pre>\n<p>\u30d1\u30e9\u30e1\u30fc\u30bf\u306en_clusters\u306f\u30af\u30e9\u30b9\u30bf\u6570\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002<br>\u5b9f\u884c\u3059\u308b\u3068\u3001\u305d\u308c\u305e\u308c\u306e\u30c7\u30fc\u30bf\u304c\u3069\u306e\u30af\u30e9\u30b9\u30bf\u306b\u5c5e\u3057\u3066\u3044\u308b\u304b\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre><code class=\"shell\">[0 0 0 0 2 2 2 2 2 1 1 1 1 1]\n<\/code><\/pre>\n<p>\u6570\u5024\u3067\u306f\u308f\u304b\u308a\u3065\u3089\u3044\u306e\u3067\u53ef\u8996\u5316\u3057\u3066\u307f\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre><code># \u8272\u3068\u30de\u30fc\u30ab\u30fc\u306e\u5f62\u3092\u8a2d\u5b9a\ncolors = ['b','g','y']\nmarkers = ['o','s','D']\n\nfor i, l in enumerate(kmeans_model.labels_):\n    plt.plot(x1[i],x2[i], color=colors[l],marker=markers[l], ls='None')\n    plt.xlim([0, 10])\n    plt.ylim([0, 10])\nplt.show()\n<\/code><\/pre>\n<p>\u4ee5\u4e0a\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u30af\u30e9\u30b9\u30bf\u306b\u5206\u3051\u3089\u308c\u305f\u56f3\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/camo.qiitausercontent.com\/839963c985ed3b2593f79944ec680fe6a59ebe2f\/68747470733a2f2f71696974612d696d6167652d73746f72652e73332e616d617a6f6e6177732e636f6d2f302f3130353838372f62353665653434362d333039342d653763392d343435372d6363323034323733393935312e706e67\" alt=\"\"><\/p>\n<p>\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0\u304c\u304d\u308c\u3044\u306b\u884c\u308f\u308c\u3066\u3044\u308b\u3053\u3068\u304c\u5206\u304b\u308a\u307e\u3059\u3002<\/p>\n<h2 id=\"i-5\">\u4eca\u56de\u4f5c\u6210\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30e0<\/h2>\n<pre><code>import numpy as np\nfrom sklearn.cluster import KMeans\nimport matplotlib.pyplot as plt\n\n\nx1 = np.array([1,2,3,1,5,6,5,5,6,7,8,9,7,9])\nx2 = np.array([1,3,2,2,8,6,7,6,7,1,2,1,1,3])\n\nx = np.c_[x1, x2]\nprint(x)\n\nplt.xlim([0, 10])\nplt.ylim([0, 10])\nplt.title('data')\nplt.scatter(x1, x2)\nplt.show()\n\nkmeans = KMeans(n_clusters=3)\nkmeans_model = kmeans.fit(x)\nprint(kmeans_model.labels_)\n\n\n# \u8272\u3068\u30de\u30fc\u30ab\u30fc\u306e\u5f62\u3092\u8a2d\u5b9a\ncolors = ['b','g','y']\nmarkers = ['o','s','D']\n\nfor i, l in enumerate(kmeans_model.labels_):\n    plt.plot(x1[i],x2[i], color=colors[l],marker=markers[l], ls='None')\n    plt.xlim([0, 10])\n    plt.ylim([0, 10])\nplt.show()\n<\/code><\/pre>\n<h2 id=\"i-6\">\u307e\u3068\u3081<\/h2>\n<p>\u4eca\u56de\u306f\u3001\u6559\u5e2b\u306a\u3057\u5b66\u7fd2\u306e\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0\u3068\u305d\u306e\u624b\u6cd5\u306eK-means\u3092\u5b66\u7fd2\u3057\u307e\u3057\u305f\u3002<br>K-means\u306f\u8a2d\u5b9a\u3057\u305fK\u306e\u6570\u306b\u30c7\u30fc\u30bf\u3092\u5206\u3051\u308b\u5b66\u7fd2\u3067\u3001\u9867\u5ba2\u306e\u30bb\u30b0\u30e1\u30f3\u30c8\u5316\u306a\u3069\u306b\u4f7f\u308f\u308c\u307e\u3059\u3002<\/p>\n<h1 id=\"i-7\">Python\u3084\u7d71\u8a08\u3092\u52b9\u7387\u3088\u304f\u5b66\u3076\u306b\u306f\uff1f<\/h1>\n<p>Python\u3084\u7d71\u8a08\u3092\u52b9\u7387\u3088\u304f\u5b66\u3076\u306b\u306f\u3001\u666e\u6bb5\u304b\u3089Python\u3084\u7d71\u8a08\u5b66\u3092\u7528\u3044\u3066\u696d\u52d9\u3092\u3057\u3066\u3044\u308b\u73fe\u5f79\u306e\u30c7\u30fc\u30bf\u30b5\u30a4\u30a8\u30f3\u30c6\u30a3\u30b9\u30c8\u306b\u8cea\u554f\u3067\u304d\u308b\u74b0\u5883\u3067\u5b66\u3076\u3053\u3068\u3067\u3059\u3002<br>\u8cea\u554f\u3057\u653e\u984c\u304b\u3064\u3001\u4f53\u7cfb\u7684\u306b\u5b66\u3079\u308b\u52d5\u753b\u30b3\u30f3\u30c6\u30f3\u30c4\u3067\u30c7\u30fc\u30bf\u5206\u6790\u6280\u8853\u3092\u5b66\u3073\u305f\u3044\u65b9\u306f\u3001\u30aa\u30f3\u30e9\u30a4\u30f3\u3067\u597d\u304d\u306a\u6642\u9593\u306b\u52c9\u5f37\u3067\u304d\u308b<a href=\"https:\/\/aiacademy.jp\/bootcamp\">AI Academy Bootcamp<\/a>\u304c\u30aa\u30b9\u30b9\u30e1\u3067\u3059\u3002\u53d7\u8b1b\u6599\u3082\u696d\u754c\u6700\u5b89\u5024\u306e35,000\u5186\uff08\uff16\u30f6\u6708\u9593\u8cea\u554f\u3057\u653e\u984c\uff0b\u30aa\u30ea\u30b8\u30ca\u30eb\u306e\u52d5\u753b\u30b3\u30f3\u30c6\u30f3\u30c4\u3001\u30c6\u30ad\u30b9\u30c8\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u5229\u7528\u53ef\u80fd\uff09\u306a\u306e\u3067\u3001\u662f\u975e\u3054\u6d3b\u7528\u304f\u3060\u3055\u3044\u3002<\/p>\n<figure class=\"wp-block-image\"><a href=\"https:\/\/aiacademy.jp\/bootcamp\/\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-691\" src=\"https:\/\/aiacademy.jp\/media\/wp-content\/uploads\/2021\/12\/bootcamp_ad_72ppi-1024x341.png\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" srcset=\"https:\/\/aiacademy.jp\/media\/wp-content\/uploads\/2021\/12\/bootcamp_ad_72ppi-1024x341.png 1024w, https:\/\/aiacademy.jp\/media\/wp-content\/uploads\/2021\/12\/bootcamp_ad_72ppi-300x100.png 300w, https:\/\/aiacademy.jp\/media\/wp-content\/uploads\/2021\/12\/bootcamp_ad_72ppi-768x256.png 768w, https:\/\/aiacademy.jp\/media\/wp-content\/uploads\/2021\/12\/bootcamp_ad_72ppi-940x313.png 940w, https:\/\/aiacademy.jp\/media\/wp-content\/uploads\/2021\/12\/bootcamp_ad_72ppi.png 1200w\" alt=\"\" width=\"1024\" height=\"341\"><\/a><\/figure>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u76ee\u6b21 \u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0 K-means\u3068\u306f K-means\u306e\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0 K-means\u306e\u554f\u984c\u70b9 K-means\u306e\u5b9f\u88c5\u4f8b \u4eca\u56de\u4f5c\u6210\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30e0 \u307e\u3068\u3081 Python\u3084\u7d71\u8a08\u3092\u52b9\u7387\u3088\u304f\u5b66\u3076\u306b\u306f\uff1f \u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0 \u4eca\u307e\u3067\u306e\u5b66\u7fd2 &#8230; <\/p>\n","protected":false},"author":1,"featured_media":484,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[85,105,130],"tags":[],"class_list":{"0":"post-254","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-python","8":"category-105","9":"category-130"},"_links":{"self":[{"href":"https:\/\/aiacademy.jp\/media\/index.php?rest_route=\/wp\/v2\/posts\/254","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aiacademy.jp\/media\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aiacademy.jp\/media\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aiacademy.jp\/media\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aiacademy.jp\/media\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=254"}],"version-history":[{"count":4,"href":"https:\/\/aiacademy.jp\/media\/index.php?rest_route=\/wp\/v2\/posts\/254\/revisions"}],"predecessor-version":[{"id":4876,"href":"https:\/\/aiacademy.jp\/media\/index.php?rest_route=\/wp\/v2\/posts\/254\/revisions\/4876"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/aiacademy.jp\/media\/index.php?rest_route=\/wp\/v2\/media\/484"}],"wp:attachment":[{"href":"https:\/\/aiacademy.jp\/media\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aiacademy.jp\/media\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=254"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aiacademy.jp\/media\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}