Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About the normalization in the modified k-means algorithm #3

Open
neurothew opened this issue Nov 1, 2019 · 0 comments
Open

About the normalization in the modified k-means algorithm #3

neurothew opened this issue Nov 1, 2019 · 0 comments

Comments

@neurothew
Copy link

neurothew commented Nov 1, 2019

Let me post the issue here...not sure if anyone will see it.

In modkmeans.m, in step 2a of the function opt_segment, there is a step of normalization.

A = bsxfun(@rdivide,A,sqrt(diag(A*A')))

However, I am confused by the operation right here, which is also not clearly written in the paper. I am guessing it is trying to calculate the covariance matrix and extracting the diagonal element (which is then the variance of each channel). But there are 2 questions:

  1. The covariance can be calculated via AA' only when the data is centered to mean 0 prior to the calculation (but I did not see any of such centering operation)
  2. There should be a factor of 1/n-1, where n is the number of data points.

am i missing anything? any help is much appreciated, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant