Hi
Thank you for both your comments.
Regarding the bug xpos and ypos, you were right and I fixed it.
Regarding the distribution, according to the paper the distribution is "uniform", I have no idea what is the difference in this case but now the code is according to the paper

Hi
Please correct me if I miss something.
I think your code is wrong, though it is working.
The state prediction:
xp=A*x(i-1,:)' + Bu
will give as a result the same vector x with the g in the last element.
This matrix
A=[[1,0,0,0]',[0,1,0,0]',[dt,0,1,0]',[0,dt,0,1]'];
multiplied by
xp = [MC/2,MR/2,0,0]'.
It is a bit pointless, since the dt elements will always be cancel out by the last zeros. Then you do correctly the observation step and the algorithm is working, but the prediction practically doesn't exist.

Excelent job.
This algorithm is based on Nyul one and this needs a training step before normalize the image, it isn't needed here, I mean, I just introduce a reference image and a target image and I get a normalized image accord to the reference image given?

Note that the Statistics Toolbox implements the gap statistic as a class in the package clustering.evaluation since R2013b: http://www.mathworks.com/help/stats/clustering.evaluation.gapevaluationclass.html

Hi, I used this method to compute optional number of clusters, but if I run the program, get for example 4 clusters, when I run it another time, I get 3 clusters on the same signal without any changes... How it is possible? My signal is 10 seconds (5000 samples) od ECQ signal, where are cut only QRS complexes (usually 50 samples).

Hi
Thank you for both your comments.
Regarding the bug xpos and ypos, you were right and I fixed it.
Regarding the distribution, according to the paper the distribution is "uniform", I have no idea what is the difference in this case but now the code is according to the paper

Excelent job.
This algorithm is based on Nyul one and this needs a training step before normalize the image, it isn't needed here, I mean, I just introduce a reference image and a target image and I get a normalized image accord to the reference image given?

5

03 Nov 2013

Gap statistics
Algorithm for cluster validity index, R. Tibshirani et al. 2001

Note that the Statistics Toolbox implements the gap statistic as a class in the package clustering.evaluation since R2013b: http://www.mathworks.com/help/stats/clustering.evaluation.gapevaluationclass.html

Comment only

09 May 2013

Gap statistics
Algorithm for cluster validity index, R. Tibshirani et al. 2001

Hi, I used this method to compute optional number of clusters, but if I run the program, get for example 4 clusters, when I run it another time, I get 3 clusters on the same signal without any changes... How it is possible? My signal is 10 seconds (5000 samples) od ECQ signal, where are cut only QRS complexes (usually 50 samples).

5

10 Mar 2013

Gap statistics
Algorithm for cluster validity index, R. Tibshirani et al. 2001

Hi
Thank you for both your comments.
Regarding the bug xpos and ypos, you were right and I fixed it.
Regarding the distribution, according to the paper the distribution is "uniform", I have no idea what is the difference in this case but now the code is according to the paper

Comment only