Description Usage Arguments Value Examples
This function gives a 2 dimension plot with entity names and line segments between the entities with positive relation.
1 | make2dPlot(theta, nameOfSample, POS, N_epoch, lr, n_neg)
|
theta |
- A N x 2 matrix. Each of the column corresponds to the entity subject to embed. |
nameOfSample |
- Name of the entity subject to embed. |
POS |
- A 2-row positive relation matrix that contains positive relation entities columnwisely. |
N_epoch |
- The number of epochs. |
lr |
- The learning rate. |
n_neg |
- The number of negative samples for each iteration. |
A 2-dimension plot with entity names and line segments between the entities with positive relation.
1 2 3 4 5 | toy_yaml <- yaml::yaml.load(toy)
toy_tree <- data.tree::as.Node(toy_yaml)
toy_dataset <- dataLoader(toy_tree)
emb <- poincareEmbeddings(toy_tree, 2, 100, 0.001, 5)
make2dPlot(emb$theta, toy_dataset$entity, toy_dataset$POS, 100, 0.001, 5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.