poincareEmbeddings: Poincare-embeddings

Description Usage Arguments Value Examples

View source: R/main.R

Description

This function is aggregated the functions to give the outputs, 2-D plot(if theta_dim = 2), ranking and MAP. Please refer to 'vignette' to find detailed implementation.

Usage

1
2
poincareEmbeddings(dataset_tree, theta_dim = 2, N_epoch = 50,
  lr = 0.01, n_neg = 5)

Arguments

dataset_tree

- A tree-shape dataset from "data.tree"

theta_dim

- The dimension of the embedding space.

N_epoch

- The number of epochs.

lr

- The learning rate.

n_neg

- The number of negative samples for each iteration.

Value

Ranking : The ranking of the true related entity.

MAP : Mean average precision.

A 2-dimension plot only if theta_dim = 2.

Examples

1
2
3
statistics_adv_yaml <- yaml::yaml.load(statistics_adv)
statistics_adv_tree <- data.tree::as.Node(statistics_adv_yaml)
poincareEmbeddings(statistics_adv_tree, theta_dim = 2, N_epoch = 200, lr = 0.005, n_neg = 10)

hwchang1201/poincare.embeddings documentation built on Dec. 9, 2019, 1:30 p.m.