{"id":74,"date":"2017-12-07T20:16:41","date_gmt":"2017-12-07T20:16:41","guid":{"rendered":"http:\/\/ai.intelligentonlinetools.com\/ml\/?p=74"},"modified":"2018-10-07T23:45:34","modified_gmt":"2018-10-07T23:45:34","slug":"k-means-clustering-example-word2vec","status":"publish","type":"post","link":"http:\/\/ai.intelligentonlinetools.com\/ml\/k-means-clustering-example-word2vec\/","title":{"rendered":"K Means Clustering Example with Word2Vec in Data Mining or Machine Learning"},"content":{"rendered":"<div class=\"eaquh69e38ca181396\" ><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\n<!-- Text analytics techniques 728_90 horizontal top -->\n<ins class=\"adsbygoogle\"\n     style=\"display:inline-block;width:728px;height:90px\"\n     data-ad-client=\"ca-pub-3416618249440971\"\n     data-ad-slot=\"2926649501\"><\/ins>\n<script>\n(adsbygoogle = window.adsbygoogle || []).push({});\n<\/script><\/div><style type=\"text\/css\">\r\n.eaquh69e38ca181396 {\r\nmargin: 5px; padding: 0px;\r\n}\r\n@media screen and (min-width: 1201px) {\r\n.eaquh69e38ca181396 {\r\ndisplay: block;\r\n}\r\n}\r\n@media screen and (min-width: 993px) and (max-width: 1200px) {\r\n.eaquh69e38ca181396 {\r\ndisplay: block;\r\n}\r\n}\r\n@media screen and (min-width: 769px) and (max-width: 992px) {\r\n.eaquh69e38ca181396 {\r\ndisplay: block;\r\n}\r\n}\r\n@media screen and (min-width: 768px) and (max-width: 768px) {\r\n.eaquh69e38ca181396 {\r\ndisplay: block;\r\n}\r\n}\r\n@media screen and (max-width: 767px) {\r\n.eaquh69e38ca181396 {\r\ndisplay: block;\r\n}\r\n}\r\n<\/style>\r\n<p>In this post you will find K means clustering example with <strong>word2vec<\/strong> in python code. <b>Word2Vec<\/b> is one of the popular methods in language modeling and feature learning techniques in natural language processing (NLP).  This method is used to create <b>word embeddings<\/b> in machine learning whenever we need vector representation of data. <\/p>\n<p>For example in data clustering algorithms instead of <b>bag of words (BOW)<\/b> model we can use <b>Word2Vec<\/b>. The advantage of using Word2Vec is that it can capture the distance between individual words.<\/p>\n<p>The example in this post will demonstrate how to use results of <b>Word2Vec word embeddings in clustering algorithms<\/b>. For this, Word2Vec model will be feeded into several K means clustering algorithms from NLTK and Scikit-learn libraries.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/intelligentonlinetools.com\/blog\/wp-content\/uploads\/2017\/07\/Kmeans-CLustering-S1-dataset--300x211.png\" alt=\"\" width=\"600\" height=\"411\" class=\"alignnone size-medium wp-image-1322\" \/><\/p>\n<p>Here we will do clustering at word level. Our clusters will be groups of words.  In case we need to cluster at  sentence or paragraph level, here is the link that showing how to move from word level to sentence\/paragraph level:<\/p>\n<p><a href=\"http:\/\/ai.intelligentonlinetools.com\/ml\/text-clustering-word-embedding-machine-learning\/\" target=\"_blank\">Text Clustering with Word Embedding in Machine Learning<\/a><\/p>\n<p>There is also doc2vec word embedding model that is based on word2vec. doc2vec is created for embedding sentence\/paragraph\/document. Here is the link how to use doc2vec word embedding in machine learning:<br \/>\n<a href=\"http:\/\/ai.intelligentonlinetools.com\/ml\/text-clustering-doc2vec-word-embedding-machine-learning\/\" target=\"_blank\">Text Clustering with doc2vec Word Embedding Machine Learning Model<\/a><\/p>\n<h2>Getting Word2vec<\/h2>\n<p>Using <strong>word2vec<\/strong> from python library <strong>gensim<\/strong> is simple and well described in tutorials and on the web [3], [4], [5]. Here we just look at basic example. For the input we use the sequence of sentences hard-coded in the script.<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nfrom gensim.models import Word2Vec\r\nsentences = [['this', 'is', 'the', 'good', 'machine', 'learning', 'book'],\r\n\t\t\t['this', 'is',  'another', 'book'],\r\n\t\t\t['one', 'more', 'book'],\r\n\t\t\t['this', 'is', 'the', 'new', 'post'],\r\n                        ['this', 'is', 'about', 'machine', 'learning', 'post'],  \r\n\t\t\t['and', 'this', 'is', 'the', 'last', 'post']\r\nmodel = Word2Vec(sentences, min_count=1)\r\n<\/pre>\n<p>Now we have model with words embedded.  We can query model for similar words like below or ask to represent word as vector:<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nprint (model.similarity('this', 'is'))\r\nprint (model.similarity('post', 'book'))\r\n#output -0.0198180344218\r\n#output -0.079446731287\r\nprint (model.most_similar(positive=['machine'], negative=[], topn=2))\r\n#output: [('new', 0.24608060717582703), ('is', 0.06899910420179367)]\r\nprint (model['the'])\r\n#output [-0.00217354 -0.00237131  0.00296396 ...,  0.00138597  0.00291924  0.00409528]\r\n<\/pre>\n<p>To get <strong>vocabulary<\/strong> or the number of words in vocabulary:<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nprint (list(model.vocab))\r\nprint (len(list(model.vocab)))\r\n<\/pre>\n<p>This will produce: [&#8216;good&#8217;, &#8216;this&#8217;, &#8216;post&#8217;, &#8216;another&#8217;, &#8216;learning&#8217;, &#8216;last&#8217;, &#8216;the&#8217;, &#8216;and&#8217;, &#8216;more&#8217;, &#8216;new&#8217;, &#8216;is&#8217;, &#8216;one&#8217;, &#8216;about&#8217;, &#8216;machine&#8217;, &#8216;book&#8217;]<\/p>\n<p>Now we will feed word embeddings into <strong>clustering algorithm<\/strong> such as <strong>k Means<\/strong> which is one of the most popular unsupervised learning algorithms for finding interesting segments in the data. It can be used for separating customers into groups, combining documents into topics and for many other applications.<\/p>\n<p>You will find below two k means clustering examples. <\/p>\n<p><strong>K Means Clustering with NLTK Library<\/strong><br \/>\nOur first example is using k means algorithm from NLTK library.<br \/>\nTo use word embeddings word2vec in machine learning clustering algorithms we initiate X as below:<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nX = model[model.vocab]\r\n<\/pre>\n<p>Now we can plug our X data into clustering algorithms. <\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nfrom nltk.cluster import KMeansClusterer\r\nimport nltk\r\nNUM_CLUSTERS=3\r\nkclusterer = KMeansClusterer(NUM_CLUSTERS, distance=nltk.cluster.util.cosine_distance, repeats=25)\r\nassigned_clusters = kclusterer.cluster(X, assign_clusters=True)\r\nprint (assigned_clusters)\r\n# output: [0, 2, 1, 2, 2, 1, 2, 2, 0, 1, 0, 1, 2, 1, 2]\r\n<\/pre>\n<p>In the python code above there are several options for the distance as below:<\/p>\n<p>nltk.cluster.util.cosine_distance(u, v)<br \/>\nReturns 1 minus the cosine of the angle between vectors v and u. This is equal to 1 &#8211; (u.v \/ |u||v|).<\/p>\n<p>nltk.cluster.util.euclidean_distance(u, v)<br \/>\nReturns the euclidean distance between vectors u and v. This is equivalent to the length of the vector (u &#8211; v).<\/p>\n<p>Here we use cosine distance to cluster our data.<br \/>\nAfter we got cluster results we can associate each word with the cluster that it got assigned to:<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nwords = list(model.vocab)\r\nfor i, word in enumerate(words):  \r\n    print (word + &quot;:&quot; + str(assigned_clusters[i]))\r\n<\/pre>\n<p>Here is the output for the above:<br \/>\ngood:0<br \/>\nthis:2<br \/>\npost:1<br \/>\nanother:2<br \/>\nlearning:2<br \/>\nlast:1<br \/>\nthe:2<br \/>\nand:2<br \/>\nmore:0<br \/>\nnew:1<br \/>\nis:0<br \/>\none:1<br \/>\nabout:2<br \/>\nmachine:1<br \/>\nbook:2<\/p>\n<h2>K Means Clustering with Scikit-learn Library<\/h2>\n<p>This example is based on k means from scikit-learn library.<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nfrom sklearn import cluster\r\nfrom sklearn import metrics\r\nkmeans = cluster.KMeans(n_clusters=NUM_CLUSTERS)\r\nkmeans.fit(X)\r\n\r\nlabels = kmeans.labels_\r\ncentroids = kmeans.cluster_centers_\r\n\r\nprint (&quot;Cluster id labels for inputted data&quot;)\r\nprint (labels)\r\nprint (&quot;Centroids data&quot;)\r\nprint (centroids)\r\n\r\nprint (&quot;Score (Opposite of the value of X on the K-means objective which is Sum of distances of samples to their closest cluster center):&quot;)\r\nprint (kmeans.score(X))\r\n\r\nsilhouette_score = metrics.silhouette_score(X, labels, metric='euclidean')\r\n\r\nprint (&quot;Silhouette_score: &quot;)\r\nprint (silhouette_score)\r\n<\/pre>\n<p>In this example we also got some useful metrics to estimate clustering performance.<br \/>\nOutput:<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nCluster id labels for inputted data\r\n[0 1 1 ..., 1 2 2]\r\nCentroids data\r\n[[ -3.82586889e-04   1.39791325e-03  -2.13839358e-03 ...,  -8.68172920e-04\r\n   -1.23599875e-03   1.80053393e-03]\r\n [ -3.11774168e-04  -1.63297475e-03   1.76715955e-03 ...,  -1.43826099e-03\r\n    1.22940990e-03   1.06353679e-03]\r\n [  1.91571176e-04   6.40696089e-04   1.38173658e-03 ...,  -3.26442620e-03\r\n   -1.08828480e-03  -9.43636987e-05]]\r\n\r\nScore (Opposite of the value of X on the K-means objective which is Sum of distances of samples to their closest cluster center):\r\n-0.00894730946094\r\nSilhouette_score: \r\n0.0427737\r\n<\/pre>\n<p>Here is the full python code of the script.  <\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\n# -*- coding: utf-8 -*-\r\n\r\n\r\n\r\nfrom gensim.models import Word2Vec\r\n\r\nfrom nltk.cluster import KMeansClusterer\r\nimport nltk\r\n\r\n\r\nfrom sklearn import cluster\r\nfrom sklearn import metrics\r\n\r\n# training data\r\n\r\nsentences = [['this', 'is', 'the', 'good', 'machine', 'learning', 'book'],\r\n\t\t\t['this', 'is',  'another', 'book'],\r\n\t\t\t['one', 'more', 'book'],\r\n\t\t\t['this', 'is', 'the', 'new', 'post'],\r\n          ['this', 'is', 'about', 'machine', 'learning', 'post'],  \r\n\t\t\t['and', 'this', 'is', 'the', 'last', 'post']]\r\n\r\n\r\n# training model\r\nmodel = Word2Vec(sentences, min_count=1)\r\n\r\n# get vector data\r\nX = model[model.vocab]\r\nprint (X)\r\n\r\nprint (model.similarity('this', 'is'))\r\n\r\nprint (model.similarity('post', 'book'))\r\n\r\nprint (model.most_similar(positive=['machine'], negative=[], topn=2))\r\n\r\nprint (model['the'])\r\n\r\nprint (list(model.vocab))\r\n\r\nprint (len(list(model.vocab)))\r\n\r\n\r\n\r\n\r\nNUM_CLUSTERS=3\r\nkclusterer = KMeansClusterer(NUM_CLUSTERS, distance=nltk.cluster.util.cosine_distance, repeats=25)\r\nassigned_clusters = kclusterer.cluster(X, assign_clusters=True)\r\nprint (assigned_clusters)\r\n\r\nwords = list(model.vocab)\r\nfor i, word in enumerate(words):  \r\n    print (word + &quot;:&quot; + str(assigned_clusters[i]))\r\n\r\n\r\n\r\nkmeans = cluster.KMeans(n_clusters=NUM_CLUSTERS)\r\nkmeans.fit(X)\r\n\r\nlabels = kmeans.labels_\r\ncentroids = kmeans.cluster_centers_\r\n\r\nprint (&quot;Cluster id labels for inputted data&quot;)\r\nprint (labels)\r\nprint (&quot;Centroids data&quot;)\r\nprint (centroids)\r\n\r\nprint (&quot;Score (Opposite of the value of X on the K-means objective which is Sum of distances of samples to their closest cluster center):&quot;)\r\nprint (kmeans.score(X))\r\n\r\nsilhouette_score = metrics.silhouette_score(X, labels, metric='euclidean')\r\n\r\nprint (&quot;Silhouette_score: &quot;)\r\nprint (silhouette_score)\r\n<\/pre>\n<p><strong>References<\/strong><br \/>\n1. <a href=https:\/\/en.wikipedia.org\/wiki\/Word_embedding target=\"_blank\">Word embedding<\/a><br \/>\n2. <a href=https:\/\/ac.els-cdn.com\/S1877050917313480\/1-s2.0-S1877050917313480-main.pdf?_tid=2d56850a-d79f-11e7-8054-00000aab0f02&#038;acdnat=1512246611_e8ed123a682b73f71916d4da02d56900 target=\"_blank\">Comparative study of word embedding methods in topic segmentation<\/a><br \/>\n3. <a href=https:\/\/radimrehurek.com\/gensim\/models\/word2vec.html target=\"_blank\">models.word2vec \u2013 Deep learning with word2vec<\/a><br \/>\n4. <a href=https:\/\/rare-technologies.com\/word2vec-tutorial\/ target=\"_blank\">Word2vec Tutorial<\/a><br \/>\n5. <a href=https:\/\/machinelearningmastery.com\/develop-word-embeddings-python-gensim\/ target=\"_blank\">How to Develop Word Embeddings in Python with Gensim<\/a><br \/>\n6. <a href=http:\/\/www.nltk.org\/api\/nltk.cluster.html target=\"_blank\">nltk.cluster package<\/a><\/p>\n<div class=\"sbklx69e38ca1813c7\" ><center>\n<script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\n<!-- Text analytics techniques link ads horizontal Medium after content -->\n<ins class=\"adsbygoogle\"\n     style=\"display:inline-block;width:468px;height:15px\"\n     data-ad-client=\"ca-pub-3416618249440971\"\n     data-ad-slot=\"5765984772\"><\/ins>\n<script>\n(adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n\n<script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\n<ins class=\"adsbygoogle\"\n     style=\"display:block\"\n     data-ad-format=\"autorelaxed\"\n     data-ad-client=\"ca-pub-3416618249440971\"\n     data-ad-slot=\"3903486841\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n<\/center><\/div><style type=\"text\/css\">\r\n.sbklx69e38ca1813c7 {\r\nmargin: 5px; padding: 0px;\r\n}\r\n@media screen and (min-width: 1201px) {\r\n.sbklx69e38ca1813c7 {\r\ndisplay: block;\r\n}\r\n}\r\n@media screen and (min-width: 993px) and (max-width: 1200px) {\r\n.sbklx69e38ca1813c7 {\r\ndisplay: block;\r\n}\r\n}\r\n@media screen and (min-width: 769px) and (max-width: 992px) {\r\n.sbklx69e38ca1813c7 {\r\ndisplay: block;\r\n}\r\n}\r\n@media screen and (min-width: 768px) and (max-width: 768px) {\r\n.sbklx69e38ca1813c7 {\r\ndisplay: block;\r\n}\r\n}\r\n@media screen and (max-width: 767px) {\r\n.sbklx69e38ca1813c7 {\r\ndisplay: block;\r\n}\r\n}\r\n<\/style>\r\n","protected":false},"excerpt":{"rendered":"<p>In this post you will find K means clustering example with word2vec in python code. Word2Vec is one of the popular methods in language modeling and feature learning techniques in natural language processing (NLP). This method is used to create word embeddings in machine learning whenever we need vector representation of data. For example in &#8230; <a title=\"K Means Clustering Example with Word2Vec in Data Mining or Machine Learning\" class=\"read-more\" href=\"http:\/\/ai.intelligentonlinetools.com\/ml\/k-means-clustering-example-word2vec\/\" aria-label=\"More on K Means Clustering Example with Word2Vec in Data Mining or Machine Learning\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[46,5],"tags":[9,7,10,6,8],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>K Means Clustering Example with Word2Vec in Data Mining or Machine Learning - Text Analytics Techniques<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/ai.intelligentonlinetools.com\/ml\/k-means-clustering-example-word2vec\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"K Means Clustering Example with Word2Vec in Data Mining or Machine Learning - Text Analytics Techniques\" \/>\n<meta property=\"og:description\" content=\"In this post you will find K means clustering example with word2vec in python code. Word2Vec is one of the popular methods in language modeling and feature learning techniques in natural language processing (NLP). This method is used to create word embeddings in machine learning whenever we need vector representation of data. For example in ... Read more\" \/>\n<meta property=\"og:url\" content=\"http:\/\/ai.intelligentonlinetools.com\/ml\/k-means-clustering-example-word2vec\/\" \/>\n<meta property=\"og:site_name\" content=\"Text Analytics Techniques\" \/>\n<meta property=\"article:published_time\" content=\"2017-12-07T20:16:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-10-07T23:45:34+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/intelligentonlinetools.com\/blog\/wp-content\/uploads\/2017\/07\/Kmeans-CLustering-S1-dataset--300x211.png\" \/>\n<meta name=\"author\" content=\"owygs156\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"owygs156\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"http:\/\/ai.intelligentonlinetools.com\/ml\/k-means-clustering-example-word2vec\/\",\"url\":\"http:\/\/ai.intelligentonlinetools.com\/ml\/k-means-clustering-example-word2vec\/\",\"name\":\"K Means Clustering Example with Word2Vec in Data Mining or Machine Learning - Text Analytics Techniques\",\"isPartOf\":{\"@id\":\"http:\/\/ai.intelligentonlinetools.com\/ml\/#website\"},\"datePublished\":\"2017-12-07T20:16:41+00:00\",\"dateModified\":\"2018-10-07T23:45:34+00:00\",\"author\":{\"@id\":\"http:\/\/ai.intelligentonlinetools.com\/ml\/#\/schema\/person\/832f10562faaa1c7ed668c1ab4388857\"},\"breadcrumb\":{\"@id\":\"http:\/\/ai.intelligentonlinetools.com\/ml\/k-means-clustering-example-word2vec\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/ai.intelligentonlinetools.com\/ml\/k-means-clustering-example-word2vec\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/ai.intelligentonlinetools.com\/ml\/k-means-clustering-example-word2vec\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/ai.intelligentonlinetools.com\/ml\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"K Means Clustering Example with Word2Vec in Data Mining or Machine Learning\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/ai.intelligentonlinetools.com\/ml\/#website\",\"url\":\"http:\/\/ai.intelligentonlinetools.com\/ml\/\",\"name\":\"Text Analytics Techniques\",\"description\":\"Text Analytics Techniques\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/ai.intelligentonlinetools.com\/ml\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"http:\/\/ai.intelligentonlinetools.com\/ml\/#\/schema\/person\/832f10562faaa1c7ed668c1ab4388857\",\"name\":\"owygs156\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/ai.intelligentonlinetools.com\/ml\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/2.gravatar.com\/avatar\/b351def598609cb4c0b5bca26497c7e5?s=96&d=mm&r=g\",\"contentUrl\":\"http:\/\/2.gravatar.com\/avatar\/b351def598609cb4c0b5bca26497c7e5?s=96&d=mm&r=g\",\"caption\":\"owygs156\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"K Means Clustering Example with Word2Vec in Data Mining or Machine Learning - Text Analytics Techniques","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":"http:\/\/ai.intelligentonlinetools.com\/ml\/k-means-clustering-example-word2vec\/","og_locale":"en_US","og_type":"article","og_title":"K Means Clustering Example with Word2Vec in Data Mining or Machine Learning - Text Analytics Techniques","og_description":"In this post you will find K means clustering example with word2vec in python code. Word2Vec is one of the popular methods in language modeling and feature learning techniques in natural language processing (NLP). This method is used to create word embeddings in machine learning whenever we need vector representation of data. For example in ... Read more","og_url":"http:\/\/ai.intelligentonlinetools.com\/ml\/k-means-clustering-example-word2vec\/","og_site_name":"Text Analytics Techniques","article_published_time":"2017-12-07T20:16:41+00:00","article_modified_time":"2018-10-07T23:45:34+00:00","og_image":[{"url":"http:\/\/intelligentonlinetools.com\/blog\/wp-content\/uploads\/2017\/07\/Kmeans-CLustering-S1-dataset--300x211.png"}],"author":"owygs156","twitter_card":"summary_large_image","twitter_misc":{"Written by":"owygs156","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"http:\/\/ai.intelligentonlinetools.com\/ml\/k-means-clustering-example-word2vec\/","url":"http:\/\/ai.intelligentonlinetools.com\/ml\/k-means-clustering-example-word2vec\/","name":"K Means Clustering Example with Word2Vec in Data Mining or Machine Learning - Text Analytics Techniques","isPartOf":{"@id":"http:\/\/ai.intelligentonlinetools.com\/ml\/#website"},"datePublished":"2017-12-07T20:16:41+00:00","dateModified":"2018-10-07T23:45:34+00:00","author":{"@id":"http:\/\/ai.intelligentonlinetools.com\/ml\/#\/schema\/person\/832f10562faaa1c7ed668c1ab4388857"},"breadcrumb":{"@id":"http:\/\/ai.intelligentonlinetools.com\/ml\/k-means-clustering-example-word2vec\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/ai.intelligentonlinetools.com\/ml\/k-means-clustering-example-word2vec\/"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/ai.intelligentonlinetools.com\/ml\/k-means-clustering-example-word2vec\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/ai.intelligentonlinetools.com\/ml\/"},{"@type":"ListItem","position":2,"name":"K Means Clustering Example with Word2Vec in Data Mining or Machine Learning"}]},{"@type":"WebSite","@id":"http:\/\/ai.intelligentonlinetools.com\/ml\/#website","url":"http:\/\/ai.intelligentonlinetools.com\/ml\/","name":"Text Analytics Techniques","description":"Text Analytics Techniques","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/ai.intelligentonlinetools.com\/ml\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"http:\/\/ai.intelligentonlinetools.com\/ml\/#\/schema\/person\/832f10562faaa1c7ed668c1ab4388857","name":"owygs156","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/ai.intelligentonlinetools.com\/ml\/#\/schema\/person\/image\/","url":"http:\/\/2.gravatar.com\/avatar\/b351def598609cb4c0b5bca26497c7e5?s=96&d=mm&r=g","contentUrl":"http:\/\/2.gravatar.com\/avatar\/b351def598609cb4c0b5bca26497c7e5?s=96&d=mm&r=g","caption":"owygs156"}}]}},"_links":{"self":[{"href":"http:\/\/ai.intelligentonlinetools.com\/ml\/wp-json\/wp\/v2\/posts\/74"}],"collection":[{"href":"http:\/\/ai.intelligentonlinetools.com\/ml\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/ai.intelligentonlinetools.com\/ml\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/ai.intelligentonlinetools.com\/ml\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/ai.intelligentonlinetools.com\/ml\/wp-json\/wp\/v2\/comments?post=74"}],"version-history":[{"count":11,"href":"http:\/\/ai.intelligentonlinetools.com\/ml\/wp-json\/wp\/v2\/posts\/74\/revisions"}],"predecessor-version":[{"id":531,"href":"http:\/\/ai.intelligentonlinetools.com\/ml\/wp-json\/wp\/v2\/posts\/74\/revisions\/531"}],"wp:attachment":[{"href":"http:\/\/ai.intelligentonlinetools.com\/ml\/wp-json\/wp\/v2\/media?parent=74"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/ai.intelligentonlinetools.com\/ml\/wp-json\/wp\/v2\/categories?post=74"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/ai.intelligentonlinetools.com\/ml\/wp-json\/wp\/v2\/tags?post=74"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}