Closed flokadillo closed 7 years ago
There are three issues with condDiscreteProdCpdFit:
condDiscreteProdCpdFit
the tabular cpd T is computed but not returned.
T
as far as I understand, alpha should not be added to the observations but rather to the counts.
alpha
histc should specify the dimension over which it operates. Otherwise, it doesn't work if Y(Z==k, :) has only one row.
histc
Y(Z==k, :)
This can be tested with the following code:
states{1} = [1, 1, 1, 2, 2, 3, 1]; observations{1} = [1, 1, 1, 2, 2, 3, 1]; model = hmmFitFullyObs(states, observations, 'discrete'); decodedFromTrueViterbi = hmmMap(model, observations{1}); assert(isequal(decodedFromTrueViterbi, states{1}));
There are three issues with
condDiscreteProdCpdFit
:the tabular cpd
T
is computed but not returned.as far as I understand,
alpha
should not be added to the observations but rather to the counts.histc
should specify the dimension over which it operates. Otherwise, it doesn't work ifY(Z==k, :)
has only one row.This can be tested with the following code: