Skip to contents

1 when every output the answers have a value for equals the prediction's (text compared ignoring case and repeated white space), else 0; with several outputs, each also gets <name>_match.

Usage

exact_match(answers, prediction)

Arguments

answers

A named list of right answers.

prediction

A named list of predicted outputs.

Value

A named numeric vector.

Examples

exact_match(list(result = "New York"), list(result = "  new   york "))
#> exact_match 
#>           1