Skip to contents

For each pair the edge features along the path are weighted by w_table[step] and averaged across the path length. Bond type is a property of neither endpoint, so it has to enter the model here.

Usage

morie_grphmr_edge(paths, edge_features, w_table)

Arguments

paths

Named list of integer vectors, one per (i, j) pair.

edge_features

Named list of numeric vectors keyed by edge "u,v" (and "v,u").

w_table

Length-K numeric vector of step weights.

Value

A list with edge_bias (named numeric vector), note.

Examples

# each path is the list of edges walked from i to j
paths <- list(`1,3` = list(c(1, 2), c(2, 3)))
ef <- list(`1,2` = c(1, 0), `2,3` = c(0, 1))
morie_grphmr_edge(paths, ef, w_table = c(0.5, 0.5))$edge_bias
#> $`1,3`
#> [1] 0.25
#>