Learn R Programming

RegimeChange (version 0.1.1)

f1_score: F1 Score with Tolerance

Description

Harmonic mean of precision and recall.

Usage

f1_score(detected, true_cp, tolerance = 5)

Value

F1 score (0 to 1)

Arguments

detected

Vector of detected changepoint locations

true_cp

Vector of true changepoint locations

tolerance

Maximum distance for a match

Examples

Run this code
f1_score(c(48, 102, 150), c(50, 100), tolerance = 5)

Run the code above in your browser using DataLab