performanceScores: Getting Performance Scores : Ranking and Mean average...

Description Usage Arguments Value Examples

View source: R/performanceScores.R

Description

This function gives mean ranking and mean average precision of the trained embedding entities, which are two main performance measures of graph model. Please refer to 'vignette' to find detailed concepts of Ranking and Mean average precision.

Usage

1
performanceScores(distanceMtx, POS)

Arguments

distanceMtx

- A N x N poincare distance matrix whose (i, j) element is poincare distance between theta_i and theta_j.

POS

- A 2-row positive relation matrix that contains positive relation entities columnwisely.

Value

Ranking : The ranking of the true related entity.

MAP : Mean average precision.

Examples

1
2
3
4
5
6
toy_yaml <- yaml::yaml.load(toy)
toy_tree <- data.tree::as.Node(toy_yaml)
toy_dataset <- dataLoader(toy_tree)
emb <- poincareEmbeddings(toy_tree, 2, 50, 0.001, 5)
distanceMtx <- getPoincareDistance(emb$theta)
performanceScores(distanceMtx, toy_dataset$POS)

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