tests/testthat/test-proxfun-aa.R

context("Testing Adamic-Adar")


test_that("AA works correctly for a line network", {
  g <- igraph::make_graph(~ a -- b -- c)
  m <- proxfun(g, method="aa")
  expect_equal(m[1,3], 1 / log(2) )
  expect_equal(m[3,1], 1 / log(2) )
})

Try the linkprediction package in your browser

Any scripts or data that you put into this service are public.

linkprediction documentation built on May 1, 2019, 9:58 p.m.