predefined_tests {diyar}R Documentation

Predefined logical tests in diyar

Description

A collection of predefined logical tests used with sub_criteria objects.

Usage

exact_match(x, y)

range_match(x, y, range = 10)

range_match_legacy(x, y)

prob_link(
  x,
  y,
  cmp_func,
  attr_threshold,
  score_threshold,
  probabilistic,
  return_weights
)

Arguments

x

Value of an attribute(s) to be compare against.

y

Value of an attribute(s) to be compare by.

range

Difference between y and x.

cmp_func

Logical tests such as string comparators. See links_wf_probabilistic.

attr_threshold

Matching set of weight thresholds for each result of cmp_func. See links_wf_probabilistic.

score_threshold

Score threshold determining matched or linked records. See links_wf_probabilistic.

probabilistic

If TRUE, matches determined through a score derived base on Fellegi-Sunter model for probabilistic linkage. See links_wf_probabilistic.

return_weights

If TRUE, returns the match-weights and score-thresholds for record pairs. See links_wf_probabilistic.

Details

exact_match() - test that x == y

range_match() - test that x \le y \le (x + range)

range_match_legacy() - test that overlap(as.number_line(x@gid), y) is TRUE.

prob_link() - Test that a record-sets x and y are from the same entity based on calculated weights and probability scores.

Examples

`exact_match`
exact_match(x = 1, y = 1)
exact_match(x = 1, y = 2)

`range_match`
range_match(x = 10, y = 16, range = 6)
range_match(x = 16, y = 10, range = 6)

`range_match_legacy`
x_nl <- number_line(10, 16, gid = 10)
y_nl1 <- number_line(16, 10)
y_nl2 <- number_line(16, 10)

range_match_legacy(x = x_nl, y = y_nl1)
range_match_legacy(x = x_nl, y = y_nl2)



[Package diyar version 0.4.1 Index]