Permalink
Browse files

Merge branch 'release-0.3' into develop

  • Loading branch information...
2 parents e467779 + b51033a commit 99ddb11ac3d59aa9d37d9a4c1cd0a267b4ba234b @nzhiltsov committed Mar 13, 2013
View
@@ -8,7 +8,7 @@ Ext-RESCAL is a memory efficient implementation of [RESCAL](http://www.cip.ifi.l
Current Version
------------
-[0.2](https://github.com/nzhiltsov/Ext-RESCAL/archive/0.2.zip)
+[0.3](https://github.com/nzhiltsov/Ext-RESCAL/archive/0.3.zip)
Features
------------
@@ -37,15 +37,26 @@ Prerequisites
Usage Examples
----------------------
-1) Run the RESCAL algorithm to decompose a 3-D tensor with 2 latent components and zero regularization on the test data:
+1) Let's imagine we have the following semantic graph:
-<pre>python rescal.py --latent 2 --lmbda 0 --input tiny-example --outputentities entity.embeddings.csv --log rescal.log</pre>
+![semantic-graph](tiny-mixed-example/semantic-graph.png)
+
+Each tensor slice represents an adjacency matrix of the corresponding predicate (member-of, genre, cites). Run the RESCAL algorithm to decompose a 3-D tensor with 2 latent components and zero regularization on the test data:
+
+<pre>python rescal.py --latent 2 --lmbda 0 --input tiny-example --outputentities entity.embeddings.csv --outputfactors latent.factors.csv --log rescal.log</pre>
The test data set represents a tiny entity graph of 3 adjacency matrices (tensor slices) in the row-column representation. See the directory <i>tiny-example</i>. Ext-RESCAL will output the latent factors for the entities into the file <i>entity.embeddings.csv</i>.
-2) Run the extended version of RESCAL algorithm to decompose a 3-D tensor and 2-D matrix with 2 latent components and regularizer equal to 0.001 on the test data (entity graph and entity-term matrix):
+2) Then, we assume that there is an entity-term matrix:
+
+![entity-term-matrix](tiny-mixed-example/entity-term-matrix.png)
+
+Run the extended version of RESCAL algorithm to decompose a 3-D tensor and 2-D matrix with 2 latent components and regularizer equal to 0.001 on the test data (entity graph and entity-term matrix):
-<pre>python extrescal.py --latent 2 --lmbda 0.001 --input tiny-mixed-example --outputentities entity.embeddings.csv --outputterms term.embeddings.csv --log extrescal.log</pre>
+<pre>python extrescal.py --latent 2 --lmbda 0.001 --input tiny-mixed-example --outputentities entity.embeddings.csv --outputterms term.embeddings.csv --outputfactors latent.factors.csv --log extrescal.log</pre>
+
+If we plot the resulting embeddings, we would get the following picture, which reveals the similarity of entities and words in the latent space:
+![latent-space-visualization](tiny-mixed-example/TinyMixedExample.png)
Development and Contribution
----------------------
@@ -55,6 +66,11 @@ This is a fork of the original code base provided by [Maximilian Nickel](http://
Release Notes
------------
+0.3 (March 12, 2013):
+
+* Fix random sampling for the basic task
+* Add output of latent factors
+
0.2 (February 26, 2013):
* Add an opportunity to approximate the objective function via random sampling
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,8 @@
+digraph semantic_graph {
+"dbr:Vibeke" -> "dbr:Tristania" [label="member-of"];
+"dbr:Morten" -> "dbr:Tristania" [label="member-of"];
+"dbr:Tristania" -> "dbr:Metal" [label="genre"];
+"author1" -> "author2" [label="cites"];
+"author1" -> "author1" [label="cites"];
+"author2" -> "author2" [label="cites"];
+}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 99ddb11

Please sign in to comment.