{"id":24690,"date":"2024-03-17T02:17:59","date_gmt":"2024-03-16T17:17:59","guid":{"rendered":"https:\/\/www.silicloud.com\/ja\/blog\/knn%e3%82%a2%e3%83%ab%e3%82%b4%e3%83%aa%e3%82%ba%e3%83%a0%e3%81%aepython%e3%82%b3%e3%83%bc%e3%83%89%e3%81%af%e3%81%a9%e3%81%ae%e3%82%88%e3%81%86%e3%81%ab%e6%9b%b8%e3%81%91%e3%81%b0%e8%89%af%e3%81%84\/"},"modified":"2024-03-22T09:44:37","modified_gmt":"2024-03-22T00:44:37","slug":"knn%e3%82%a2%e3%83%ab%e3%82%b4%e3%83%aa%e3%82%ba%e3%83%a0%e3%81%aepython%e3%82%b3%e3%83%bc%e3%83%89%e3%81%af%e3%81%a9%e3%81%ae%e3%82%88%e3%81%86%e3%81%ab%e6%9b%b8%e3%81%91%e3%81%b0%e8%89%af%e3%81%84","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/ja\/blog\/knn%e3%82%a2%e3%83%ab%e3%82%b4%e3%83%aa%e3%82%ba%e3%83%a0%e3%81%aepython%e3%82%b3%e3%83%bc%e3%83%89%e3%81%af%e3%81%a9%e3%81%ae%e3%82%88%e3%81%86%e3%81%ab%e6%9b%b8%e3%81%91%e3%81%b0%e8%89%af%e3%81%84\/","title":{"rendered":"knn\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306ePython\u30b3\u30fc\u30c9\u306f\u3069\u306e\u3088\u3046\u306b\u66f8\u3051\u3070\u826f\u3044\u3067\u3059\u304b\uff1f"},"content":{"rendered":"<p>\u4ee5\u4e0b\u306f\u3001Python\u3067\u306e\u7c21\u5358\u306aKNN\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306e\u30b3\u30fc\u30c9\u4f8b\u3067\u3059\uff1a<\/p>\n<pre class=\"post-pre\"><code><span class=\"hljs-keyword\">import<\/span> numpy <span class=\"hljs-keyword\">as<\/span> np\r\n<span class=\"hljs-keyword\">from<\/span> collections <span class=\"hljs-keyword\">import<\/span> Counter\r\n\r\n<span class=\"hljs-keyword\">def<\/span> <span class=\"hljs-title function_\">euclidean_distance<\/span>(<span class=\"hljs-params\">x1, x2<\/span>):\r\n    <span class=\"hljs-keyword\">return<\/span> np.sqrt(np.<span class=\"hljs-built_in\">sum<\/span>((x1 - x2) ** <span class=\"hljs-number\">2<\/span>))\r\n\r\n<span class=\"hljs-keyword\">class<\/span> <span class=\"hljs-title class_\">KNN<\/span>:\r\n    <span class=\"hljs-keyword\">def<\/span> <span class=\"hljs-title function_\">__init__<\/span>(<span class=\"hljs-params\">self, k=<span class=\"hljs-number\">3<\/span><\/span>):\r\n        self.k = k\r\n    \r\n    <span class=\"hljs-keyword\">def<\/span> <span class=\"hljs-title function_\">fit<\/span>(<span class=\"hljs-params\">self, X, y<\/span>):\r\n        self.X_train = X\r\n        self.y_train = y\r\n    \r\n    <span class=\"hljs-keyword\">def<\/span> <span class=\"hljs-title function_\">predict<\/span>(<span class=\"hljs-params\">self, X<\/span>):\r\n        y_pred = [self._predict(x) <span class=\"hljs-keyword\">for<\/span> x <span class=\"hljs-keyword\">in<\/span> X]\r\n        <span class=\"hljs-keyword\">return<\/span> np.array(y_pred)\r\n    \r\n    <span class=\"hljs-keyword\">def<\/span> <span class=\"hljs-title function_\">_predict<\/span>(<span class=\"hljs-params\">self, x<\/span>):\r\n        <span class=\"hljs-comment\"># \u8ba1\u7b97\u6240\u6709\u8bad\u7ec3\u6837\u672c\u4e0e\u5f85\u9884\u6d4b\u6837\u672c\u7684\u8ddd\u79bb<\/span>\r\n        distances = [euclidean_distance(x, x_train) <span class=\"hljs-keyword\">for<\/span> x_train <span class=\"hljs-keyword\">in<\/span> self.X_train]\r\n        <span class=\"hljs-comment\"># \u6839\u636e\u8ddd\u79bb\u6392\u5e8f\u5e76\u83b7\u53d6\u524dk\u4e2a\u6837\u672c\u7684\u7d22\u5f15<\/span>\r\n        k_indices = np.argsort(distances)[:self.k]\r\n        <span class=\"hljs-comment\"># \u83b7\u53d6\u524dk\u4e2a\u6837\u672c\u7684\u6807\u7b7e<\/span>\r\n        k_labels = [self.y_train[i] <span class=\"hljs-keyword\">for<\/span> i <span class=\"hljs-keyword\">in<\/span> k_indices]\r\n        <span class=\"hljs-comment\"># \u8fd4\u56de\u51fa\u73b0\u6b21\u6570\u6700\u591a\u7684\u6807\u7b7e\u4f5c\u4e3a\u9884\u6d4b\u7ed3\u679c<\/span>\r\n        most_common = Counter(k_labels).most_common(<span class=\"hljs-number\">1<\/span>)\r\n        <span class=\"hljs-keyword\">return<\/span> most_common[<span class=\"hljs-number\">0<\/span>][<span class=\"hljs-number\">0<\/span>]\r\n<\/code><\/pre>\n<p>Example of usage:<br \/>\n\u4f7f\u7528\u4f8b\uff1a<\/p>\n<pre class=\"post-pre\"><code>X_train = np.array([[<span class=\"hljs-number\">1<\/span>, <span class=\"hljs-number\">2<\/span>], [<span class=\"hljs-number\">1.5<\/span>, <span class=\"hljs-number\">1.8<\/span>], [<span class=\"hljs-number\">5<\/span>, <span class=\"hljs-number\">8<\/span>], [<span class=\"hljs-number\">8<\/span>, <span class=\"hljs-number\">8<\/span>], [<span class=\"hljs-number\">1<\/span>, <span class=\"hljs-number\">0.6<\/span>], [<span class=\"hljs-number\">9<\/span>, <span class=\"hljs-number\">11<\/span>]])\r\ny_train = np.array([<span class=\"hljs-number\">0<\/span>, <span class=\"hljs-number\">0<\/span>, <span class=\"hljs-number\">1<\/span>, <span class=\"hljs-number\">1<\/span>, <span class=\"hljs-number\">0<\/span>, <span class=\"hljs-number\">1<\/span>])\r\n\r\nknn = KNN(k=<span class=\"hljs-number\">3<\/span>)\r\nknn.fit(X_train, y_train)\r\n\r\nX_test = np.array([[<span class=\"hljs-number\">2<\/span>, <span class=\"hljs-number\">3<\/span>], [<span class=\"hljs-number\">6<\/span>, <span class=\"hljs-number\">9<\/span>], [<span class=\"hljs-number\">1<\/span>, <span class=\"hljs-number\">1<\/span>]])\r\ny_pred = knn.predict(X_test)\r\n\r\n<span class=\"hljs-built_in\">print<\/span>(y_pred)  <span class=\"hljs-comment\"># \u8f93\u51fa\uff1a[0, 1, 0]<\/span>\r\n<\/code><\/pre>\n<p>\u3053\u306e\u4f8b\u3067\u306f\u3001\u8ddd\u96e2\u6e2c\u5b9a\u65b9\u6cd5\u3068\u3057\u3066\u30e6\u30fc\u30af\u30ea\u30c3\u30c9\u8ddd\u96e2\u3092\u4f7f\u7528\u3057\u3001\u7c21\u5358\u306aKNN\u30af\u30e9\u30b9\u3092\u5b9f\u88c5\u3057\u3066\u3044\u307e\u3059\u3002fit()\u30e1\u30bd\u30c3\u30c9\u306f\u30e2\u30c7\u30eb\u306e\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u306b\u4f7f\u7528\u3055\u308c\u3001predict()\u30e1\u30bd\u30c3\u30c9\u306f\u65b0\u3057\u3044\u30b5\u30f3\u30d7\u30eb\u306e\u30e9\u30d9\u30eb\u3092\u4e88\u6e2c\u3059\u308b\u305f\u3081\u306b\u4f7f\u308f\u308c\u307e\u3059\u3002KNN\u30af\u30e9\u30b9\u306e_predict()\u30e1\u30bd\u30c3\u30c9\u306f\u500b\u3005\u306e\u30b5\u30f3\u30d7\u30eb\u306e\u4e88\u6e2c\u7d50\u679c\u3092\u8a08\u7b97\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ee5\u4e0b\u306f\u3001Python\u3067\u306e\u7c21\u5358\u306aKNN\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306e\u30b3\u30fc\u30c9\u4f8b\u3067\u3059\uff1a import numpy as np from collections import Counter def euclidean_distance(x1, [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-24690","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>knn\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306ePython\u30b3\u30fc\u30c9\u306f\u3069\u306e\u3088\u3046\u306b\u66f8\u3051\u3070\u826f\u3044\u3067\u3059\u304b\uff1f - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/ja\/blog\/knn\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306epython\u30b3\u30fc\u30c9\u306f\u3069\u306e\u3088\u3046\u306b\u66f8\u3051\u3070\u826f\u3044\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"knn\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306ePython\u30b3\u30fc\u30c9\u306f\u3069\u306e\u3088\u3046\u306b\u66f8\u3051\u3070\u826f\u3044\u3067\u3059\u304b\uff1f\" \/>\n<meta property=\"og:description\" content=\"\u4ee5\u4e0b\u306f\u3001Python\u3067\u306e\u7c21\u5358\u306aKNN\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306e\u30b3\u30fc\u30c9\u4f8b\u3067\u3059\uff1a import numpy as np from collections import Counter def euclidean_distance(x1, [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/ja\/blog\/knn\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306epython\u30b3\u30fc\u30c9\u306f\u3069\u306e\u3088\u3046\u306b\u66f8\u3051\u3070\u826f\u3044\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2024-03-16T17:17:59+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-22T00:44:37+00:00\" \/>\n<meta name=\"author\" content=\"\u7d50\u8863, \u6625\u82b1\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u7d50\u8863, \u6625\u82b1\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"1\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/knn%e3%82%a2%e3%83%ab%e3%82%b4%e3%83%aa%e3%82%ba%e3%83%a0%e3%81%aepython%e3%82%b3%e3%83%bc%e3%83%89%e3%81%af%e3%81%a9%e3%81%ae%e3%82%88%e3%81%86%e3%81%ab%e6%9b%b8%e3%81%91%e3%81%b0%e8%89%af%e3%81%84\/\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/knn%e3%82%a2%e3%83%ab%e3%82%b4%e3%83%aa%e3%82%ba%e3%83%a0%e3%81%aepython%e3%82%b3%e3%83%bc%e3%83%89%e3%81%af%e3%81%a9%e3%81%ae%e3%82%88%e3%81%86%e3%81%ab%e6%9b%b8%e3%81%91%e3%81%b0%e8%89%af%e3%81%84\/\",\"name\":\"knn\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306ePython\u30b3\u30fc\u30c9\u306f\u3069\u306e\u3088\u3046\u306b\u66f8\u3051\u3070\u826f\u3044\u3067\u3059\u304b\uff1f - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\"},\"datePublished\":\"2024-03-16T17:17:59+00:00\",\"dateModified\":\"2024-03-22T00:44:37+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/e52a686063ac76fd8cc6f539d41497ac\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/knn%e3%82%a2%e3%83%ab%e3%82%b4%e3%83%aa%e3%82%ba%e3%83%a0%e3%81%aepython%e3%82%b3%e3%83%bc%e3%83%89%e3%81%af%e3%81%a9%e3%81%ae%e3%82%88%e3%81%86%e3%81%ab%e6%9b%b8%e3%81%91%e3%81%b0%e8%89%af%e3%81%84\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/ja\/blog\/knn%e3%82%a2%e3%83%ab%e3%82%b4%e3%83%aa%e3%82%ba%e3%83%a0%e3%81%aepython%e3%82%b3%e3%83%bc%e3%83%89%e3%81%af%e3%81%a9%e3%81%ae%e3%82%88%e3%81%86%e3%81%ab%e6%9b%b8%e3%81%91%e3%81%b0%e8%89%af%e3%81%84\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/knn%e3%82%a2%e3%83%ab%e3%82%b4%e3%83%aa%e3%82%ba%e3%83%a0%e3%81%aepython%e3%82%b3%e3%83%bc%e3%83%89%e3%81%af%e3%81%a9%e3%81%ae%e3%82%88%e3%81%86%e3%81%ab%e6%9b%b8%e3%81%91%e3%81%b0%e8%89%af%e3%81%84\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/ja\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"knn\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306ePython\u30b3\u30fc\u30c9\u306f\u3069\u306e\u3088\u3046\u306b\u66f8\u3051\u3070\u826f\u3044\u3067\u3059\u304b\uff1f\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"ja\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/e52a686063ac76fd8cc6f539d41497ac\",\"name\":\"\u7d50\u8863, \u6625\u82b1\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c74c6e2eb915a3c8e795b3934aa25a7333e0b38e7f1c7baf52785286ad51105e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c74c6e2eb915a3c8e795b3934aa25a7333e0b38e7f1c7baf52785286ad51105e?s=96&d=mm&r=g\",\"caption\":\"\u7d50\u8863, \u6625\u82b1\"},\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/author\/yuiharuka\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/knn%e3%82%a2%e3%83%ab%e3%82%b4%e3%83%aa%e3%82%ba%e3%83%a0%e3%81%aepython%e3%82%b3%e3%83%bc%e3%83%89%e3%81%af%e3%81%a9%e3%81%ae%e3%82%88%e3%81%86%e3%81%ab%e6%9b%b8%e3%81%91%e3%81%b0%e8%89%af%e3%81%84\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"knn\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306ePython\u30b3\u30fc\u30c9\u306f\u3069\u306e\u3088\u3046\u306b\u66f8\u3051\u3070\u826f\u3044\u3067\u3059\u304b\uff1f - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/ja\/blog\/knn\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306epython\u30b3\u30fc\u30c9\u306f\u3069\u306e\u3088\u3046\u306b\u66f8\u3051\u3070\u826f\u3044\/","og_locale":"ja_JP","og_type":"article","og_title":"knn\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306ePython\u30b3\u30fc\u30c9\u306f\u3069\u306e\u3088\u3046\u306b\u66f8\u3051\u3070\u826f\u3044\u3067\u3059\u304b\uff1f","og_description":"\u4ee5\u4e0b\u306f\u3001Python\u3067\u306e\u7c21\u5358\u306aKNN\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306e\u30b3\u30fc\u30c9\u4f8b\u3067\u3059\uff1a import numpy as np from collections import Counter def euclidean_distance(x1, [&hellip;]","og_url":"https:\/\/www.silicloud.com\/ja\/blog\/knn\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306epython\u30b3\u30fc\u30c9\u306f\u3069\u306e\u3088\u3046\u306b\u66f8\u3051\u3070\u826f\u3044\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2024-03-16T17:17:59+00:00","article_modified_time":"2024-03-22T00:44:37+00:00","author":"\u7d50\u8863, \u6625\u82b1","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"\u7d50\u8863, \u6625\u82b1","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"1\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/ja\/blog\/knn%e3%82%a2%e3%83%ab%e3%82%b4%e3%83%aa%e3%82%ba%e3%83%a0%e3%81%aepython%e3%82%b3%e3%83%bc%e3%83%89%e3%81%af%e3%81%a9%e3%81%ae%e3%82%88%e3%81%86%e3%81%ab%e6%9b%b8%e3%81%91%e3%81%b0%e8%89%af%e3%81%84\/","url":"https:\/\/www.silicloud.com\/ja\/blog\/knn%e3%82%a2%e3%83%ab%e3%82%b4%e3%83%aa%e3%82%ba%e3%83%a0%e3%81%aepython%e3%82%b3%e3%83%bc%e3%83%89%e3%81%af%e3%81%a9%e3%81%ae%e3%82%88%e3%81%86%e3%81%ab%e6%9b%b8%e3%81%91%e3%81%b0%e8%89%af%e3%81%84\/","name":"knn\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306ePython\u30b3\u30fc\u30c9\u306f\u3069\u306e\u3088\u3046\u306b\u66f8\u3051\u3070\u826f\u3044\u3067\u3059\u304b\uff1f - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website"},"datePublished":"2024-03-16T17:17:59+00:00","dateModified":"2024-03-22T00:44:37+00:00","author":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/e52a686063ac76fd8cc6f539d41497ac"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/knn%e3%82%a2%e3%83%ab%e3%82%b4%e3%83%aa%e3%82%ba%e3%83%a0%e3%81%aepython%e3%82%b3%e3%83%bc%e3%83%89%e3%81%af%e3%81%a9%e3%81%ae%e3%82%88%e3%81%86%e3%81%ab%e6%9b%b8%e3%81%91%e3%81%b0%e8%89%af%e3%81%84\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/ja\/blog\/knn%e3%82%a2%e3%83%ab%e3%82%b4%e3%83%aa%e3%82%ba%e3%83%a0%e3%81%aepython%e3%82%b3%e3%83%bc%e3%83%89%e3%81%af%e3%81%a9%e3%81%ae%e3%82%88%e3%81%86%e3%81%ab%e6%9b%b8%e3%81%91%e3%81%b0%e8%89%af%e3%81%84\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/ja\/blog\/knn%e3%82%a2%e3%83%ab%e3%82%b4%e3%83%aa%e3%82%ba%e3%83%a0%e3%81%aepython%e3%82%b3%e3%83%bc%e3%83%89%e3%81%af%e3%81%a9%e3%81%ae%e3%82%88%e3%81%86%e3%81%ab%e6%9b%b8%e3%81%91%e3%81%b0%e8%89%af%e3%81%84\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/ja\/blog\/"},{"@type":"ListItem","position":2,"name":"knn\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306ePython\u30b3\u30fc\u30c9\u306f\u3069\u306e\u3088\u3046\u306b\u66f8\u3051\u3070\u826f\u3044\u3067\u3059\u304b\uff1f"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website","url":"https:\/\/www.silicloud.com\/ja\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"ja"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/e52a686063ac76fd8cc6f539d41497ac","name":"\u7d50\u8863, \u6625\u82b1","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c74c6e2eb915a3c8e795b3934aa25a7333e0b38e7f1c7baf52785286ad51105e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c74c6e2eb915a3c8e795b3934aa25a7333e0b38e7f1c7baf52785286ad51105e?s=96&d=mm&r=g","caption":"\u7d50\u8863, \u6625\u82b1"},"url":"https:\/\/www.silicloud.com\/ja\/blog\/author\/yuiharuka\/"},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/knn%e3%82%a2%e3%83%ab%e3%82%b4%e3%83%aa%e3%82%ba%e3%83%a0%e3%81%aepython%e3%82%b3%e3%83%bc%e3%83%89%e3%81%af%e3%81%a9%e3%81%ae%e3%82%88%e3%81%86%e3%81%ab%e6%9b%b8%e3%81%91%e3%81%b0%e8%89%af%e3%81%84\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/24690","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/comments?post=24690"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/24690\/revisions"}],"predecessor-version":[{"id":105404,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/24690\/revisions\/105404"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/media?parent=24690"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/categories?post=24690"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/tags?post=24690"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}