# Harbinger Package # version 1.0.777 source("https://raw.githubusercontent.com/cefet-rj-dal/harbinger/master/jupyter.R") #loading Harbinger load_library("daltoolbox") load_library("harbinger") #loading the example database data(examples_changepoints) #Using the simple time series dataset <- examples_changepoints$simple head(dataset) #ploting the time series plot_ts(x = 1:length(dataset$serie), y = dataset$serie) # establishing change finder ets method model <- hcp_cf_ets() # fitting the model model <- fit(model, dataset$serie) # making detections detection <- detect(model, dataset$serie) # filtering detected events print(detection |> dplyr::filter(event==TRUE)) # evaluating the detections evaluation <- evaluate(model, detection$event, dataset$event) print(evaluation$confMatrix) # ploting the results grf <- har_plot(model, dataset$serie, detection, dataset$event) plot(grf)