har_eval: Evaluation of event detection

View source: R/har_eval.R

har_evalR Documentation

Evaluation of event detection

Description

Evaluation of event detection (traditional hard evaluation)

Usage

har_eval()

Value

har_eval object

Examples

library(daltoolbox)

#loading the example database
data(examples_anomalies)

dataset <- examples_anomalies$simple
head(dataset)

# setting up time change point using GARCH
model <- hcp_garch()

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

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

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

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

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

harbinger documentation built on June 22, 2024, 7:38 p.m.