Looks like no one added any tags here yet for you.
Exam: 2022-23
MATLAB - Hidden Markov Model (HMM) for DNA Sequence Classification
rite a MATLAB function that implements an HMM to classify DNA sequences.
a) Define the transition probabilities for a two-state HMM, where each state has a probability of remaining the same or transitioning to the other state.
b) Define the emission probabilities for a ten-symbol sequence, where the first five symbols are more likely in one state and the last five symbols are more likely in the other state.
c) Load the sequence data from a given file.
d) Apply HMM decoding using hmmdecode.m
to determine sequence classifications before training.
e) Train the HMM using hmmtrain.m
.
f) Apply hmmdecode.m
again using the trained parameters.
g) Plot two subfigures:
The original DNA sequence data.
The HMM state classification before and after training.
h) Return the optimized transition probability as the function output.
Data Analysis Exercises
HMM: Ice Cream Sales and Weather Prediction
You are given a dataset of ice cream sales per day. The task is to use an HMM to infer the weather conditions (sunny or rainy) based on sales data.
a) Define the initial transition and emission probabilities for the two weather states (sunny and rainy).
b) Apply the HMM to decode the most likely sequence of weather states using hmmdecode.m
.
c) Train the HMM using hmmtrain.m
to optimize transition and emission probabilities.
d) Re-run hmmdecode.m
using the trained parameters.
e) Plot the results in four subplots:
Ice cream sales per day.
Predicted weather states before training.
Predicted weather states after training.
True weather states.
f) Plot estimated emission probabilities for each weather state in two separate graphs.
g) Compute the percentage of correctly classified weather states and evaluate the accuracy of the HMM.
HMM
HMM