<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Embeddings on Christian Hotz-Behofsits</title><link>https://hotzbehofsits.com/tags/embeddings/</link><description>Recent content in Embeddings on Christian Hotz-Behofsits</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Tue, 05 Nov 2019 21:02:51 +0100</lastBuildDate><atom:link href="https://hotzbehofsits.com/tags/embeddings/index.xml" rel="self" type="application/rss+xml"/><item><title>Learning Emoji Representations from Observed Usage</title><link>https://hotzbehofsits.com/post/emoji_embeddings/</link><pubDate>Tue, 05 Nov 2019 21:02:51 +0100</pubDate><guid>https://hotzbehofsits.com/post/emoji_embeddings/</guid><description>&lt;p&gt;Nowadays it is hard to imagine daily communication without emojis like &amp;#x1f604;, &amp;#x1f62c; or &amp;#x2764;&amp;#xfe0f;. These cute pictograms are not only ideal for expressing emotions, they are also standardized. This makes them ideal for analysis. However, before classical analyses such as clustering can be performed, a numerical representation is required. A simple method would be one-hot-encoding, which would be obvious considering the very limited vocabulary (there are only a few thousand emojis). However, embeddings can not only provide more memory friendly representations, but also those that capture a meaning.&lt;/p&gt;</description></item><item><title>Bigquery &amp; Embeddings</title><link>https://hotzbehofsits.com/post/bigquery_vectors/</link><pubDate>Sun, 27 Oct 2019 08:48:29 +0100</pubDate><guid>https://hotzbehofsits.com/post/bigquery_vectors/</guid><description>&lt;p&gt;math: true&lt;/p&gt;
&lt;p&gt;One can argue if it is wise to store embeddings directly in bigquery or calculate the similarities in SQL. For sure, in some cases a library (e.g. gensim) or approximations (e.g. Facebook faiss) are more appropriate. However, in our setting we wanted to use BigQuery. Therefore, arrays are used to store the word vectors and I created SQL functions to calculate pairwise cosine similarities.&lt;/p&gt;
&lt;div class="notice warning" &gt;
&lt;p class="first notice-title"&gt;&lt;span class="icon-notice baseline"&gt;&lt;svg&gt;&lt;use href="#warning-notice"&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;One downside of using BigQuery arrays to store vectors is that there is no guarantee that the ordering of the components is preserved. However, in most situations the order will not change.&lt;/p&gt;</description></item><item><title>Using Embeddings in R</title><link>https://hotzbehofsits.com/post/embeddings_in_r/</link><pubDate>Thu, 08 Aug 2019 21:24:40 +0200</pubDate><guid>https://hotzbehofsits.com/post/embeddings_in_r/</guid><description>&lt;p&gt;There exist different file formats to store distributed vector or word representations also known as embeddings. However, one of the most convenient ways is to use the text format used by the original word2vec implementation. In this format, each row starts with a label (an item of the vocabulary) followed by the vector components. Furthermore, each field is separated by an ordinary space. The following function processes such *.vec-files and can be used to load them directly into R:&lt;/p&gt;</description></item></channel></rss>