projectOnTree: Project the given dataoints onto the tree defined by the...

View source: R/TreeBasedMethods.R

projectOnTreeR Documentation

Project the given dataoints onto the tree defined by the vertices (V.pos) and binary adjacency matrix (princAdj)

Description

Project the given dataoints onto the tree defined by the vertices (V.pos) and binary adjacency matrix (princAdj)

Usage

projectOnTree(data.pnts, V.pos, princAdj)

Arguments

data.pnts

(D x N numeric) the spatial coordinates of data points to project

V.pos

(D x K numeric) the spatial coordinates of the tree vertices

princAdj

(K x K logical) a symmetric binary adjacency matrix (K x K)

Details

data points are projected on their nearest edge, defined to be the edge that is connected to the nearest node and has minimal length of orthogonal projection. Data points are projected with truncated orthogonal projection: point that fall beyond the edge are projected to the closer node.

Value

(list) projection information:

  • "spatial"The D-dimensional position of the projected data points

  • "edge"a Nx2 matrix, were line i has the indices identifying the edge that datapoint i was projected on, represented as (node a, node b). For consistency and convenience, it is maintained that a < b

  • "edgePos"an N-length numeric with values in [0,1], the relative position on the edge of the datapoint. 0 is node a, 1 is node b, .5 is the exact middle of the edge, etc.


YosefLab/VISION documentation built on Feb. 19, 2023, 9:50 p.m.