Description Usage Arguments Value Examples
This function predicts the next observation for a given listining history of genres. This is achieved by calculating probability of each genre to be the next genre. This is done with the forward algorithm. The genre with the highest probability is considered to be the next favorite genre of a user.
1 | predict_next(MIR_hmm, obs)
|
MIR_hmm |
An object of the class MIR_hmm as returned by MIR_hmm(). |
obs |
A sequence of genres as list. |
Next probable genre.
1 2 3 4 5 6 7 | # Load MIR HMM
hmm <- load_model("2_state_hmm")
# Create sequence of observations
seq <- c("rock","heavy metal", "pop")
# Predict next genre
prediction <- predict_next(hmm,seq)
print(prediction)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.