label_sequences.Rd
The function label_sequences()
launches an interactive app in your default web-browser that allows you to
(1) visualize observations and existing ground truth or other state sequences,
(2) label time-points with states of the provided hsmm
model,
(3) delete any existing ground truth, and
(4) validate state sequences provided with the observation so that they are included in the ground truth.
The app lets you select the sequence if the argument X
contains several sequences and lets you zoom on particular sections of the sequences.
Another slider allows you to select specific time-points of the sequence for labeling them.
Closing the app window will stop the app and returns the updated ground truth.
label_sequences(model, X, ground_truth = data.frame(), verbose = FALSE)
model | a |
---|---|
X | a |
ground_truth | (optional) a |
verbose | a logical (default = |
a data.frame
which combines the initial ground truth (if provided) and the newly labeled time-points.
my_model = simple_model Xsim = simulate_hsmm(model = my_model, n_state_transition = 20, seq_id = "test_seq") Xsim = dplyr::rename(Xsim, state_simulated_sequence = state) if (FALSE) { ground_truth = label_sequences(model = my_model, X = Xsim) if(nrow(ground_truth)>0) table(model$state_names[ground_truth$state]) }