Description Usage Arguments Details See Also Examples

`f1`

computes the F1 Score in the context of information retrieval problems.

1 | ```
f1(actual, predicted)
``` |

`actual` |
The ground truth vector of relevant documents. The vector can contain
any numeric or character values, order does not matter, and the
vector does not need to be the same length as |

`predicted` |
The predicted vector of retrieved documents. The vector can contain
any numeric or character values, order does not matter, and the
vector does not need to be the same length as |

`f1`

is defined as *2 * precision * recall / (precision + recall)*. In the
context of information retrieval problems, precision is the proportion of retrieved
documents that are relevant to a query and recall is the proportion of relevant
documents that are successfully retrieved by a query. If there are zero relevant
documents that are retrieved, zero relevant documents, or zero predicted documents,
`f1`

is defined as `0`

.

1 2 3 |

```
[1] 0.4
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.