## S3 method for class 'EMM,matrix':
score(x, newdata, method = c("prod", "sum", "log_odds"), match_state = "nn", plus_one=TRUE, initial_transition = FALSE)
EMM
object."exact"
) or is nearest neighbor
used ("nn"
)?$$P_\mathrm{prod} = \sqrt[l-1]{\prod_{i=1}^{l-1}{a_{s(i),s(i+1)}}}$$
$$P_\mathrm{sum} = \frac{1}{l-1} \sum_{i=1}^{l-1}{a_{s(i),s(i+1)}}$$
where $a_{ij}$ is the transition probability from state $i$ to state $j$ and $s(i)$ is the state the $i$th data point in the new sequence is assigned to.
transition
to access transition probabilities
and find_states
for assigning observations to states/clusters.data("EMMsim")
emm <- EMM(threshold=.5)
emm <- build(emm, EMMsim_train)
score(emm, EMMsim_test)
Run the code above in your browser using DataLab