getDistanceGradVec: Calculating Euclidean Gradient of distance function with...

Description Usage Arguments Value Examples

View source: R/embeddingTrainer.R

Description

This function calculates Euclidean Gradient of distance between theta_i and theta_j with respect to theta_i(the first argment of the function). Please refer to 'vignette' to find the equation for Euclidean Gradient function and detailed ideas.

Usage

1
getDistanceGradVec(theta_i, theta_j)

Arguments

theta_i

- A N x 1 vector with N : Embedding space dimension. Each of theta works as proxy of an entity in tree-shape dataset.

theta_j

- A N x 1 vector with N : Embedding space dimension. Each of theta works as proxy of an entity in tree-shape dataset.

Value

d(dist(theta_i, theta_j)) / d(theta_i) : A N x 1 vector.

Examples

1
getDistanceGradVec(c(0, 0), c(0.1, 0.5))

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