% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/har_eval.R
\name{har_eval}
\alias{har_eval}
\title{Evaluation of event detection}
\usage{
har_eval()
}
\value{
\code{har_eval} object
}
\description{
Hard evaluation of event detection producing confusion matrix and common
metrics (accuracy, precision, recall, F1, etc.).
}
\examples{
library(daltoolbox)

# Load anomaly example data
data(examples_anomalies)

dataset <- examples_anomalies$simple
head(dataset)

# Configure a change-point detector (GARCH)
model <- hcp_garch()

# Fit the detector
model <- fit(model, dataset$serie)

# Run detection
detection <- detect(model, dataset$serie)

# Show detected events
print(detection[(detection$event),])

# Evaluate detections
evaluation <- evaluate(har_eval(), detection$event, dataset$event)
print(evaluation$confMatrix)

# Plot the results
grf <- har_plot(model, dataset$serie, detection, dataset$event)
plot(grf)

}
\references{
\itemize{
\item Harbinger documentation: https://cefet-rj-dal.github.io/harbinger
\item Ogasawara, E., Salles, R., Porto, F., Pacitti, E. Event Detection in Time Series. 1st ed.
Cham: Springer Nature Switzerland, 2025. doi:10.1007/978-3-031-75941-3
}
}
