calculate_gtd_pr: Calculate precision, recall and F1 score for an edgelist

Description Usage Arguments Details Value

View source: R/pr.r

Description

This function calculates the precision, recall and F1 score for an edgelists containing matches of GTD events and news articles from The Guardian

Usage

1
2
3
4
5
6
7
calculate_gtd_pr(
  e,
  min_weight = NA,
  weight_col = "weight",
  hourdiff_range = c(0, Inf),
  gtd_id_filter = NULL
)

Arguments

e

An edgelist in which the from column contains GTD event ids, and the to column contains The Guardian news article ids

min_weight

Optionally, specify minimum weight to filter e before calculation

Details

See gold_matches$description for more information on the gold standard

Value

A list with P, R and F1 scores for both the match and article level.


maskedforreview/gtdnews documentation built on April 12, 2021, 11:53 a.m.