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

Parallelized calculation of PCAEmbedding #39

Open
JonasIsensee opened this issue Sep 20, 2018 · 3 comments
Open

Parallelized calculation of PCAEmbedding #39

JonasIsensee opened this issue Sep 20, 2018 · 3 comments

Comments

@JonasIsensee
Copy link
Member

JonasIsensee commented Sep 20, 2018

The only limiting factor for super large (>1000) embedding dimensions,
which can then be reduced by PCA is the
calculation of PCAEmbedding.

This could be parallelized
by splitting the dataset into different subsets and
computing the covariance matrix for each of them.
All covariance matrices are then averaged.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@Datseris
Copy link
Member

Is this scientifically correct? to average the covariance matrices? I wouldn't say it is obviously true (I don't think it is).

p.s.:
The average of averages is not an average: https://math.stackexchange.com/questions/95909/why-is-an-average-of-an-average-usually-incorrect and one has to use weighted average instead.

@JonasIsensee
Copy link
Member Author

JonasIsensee commented Sep 21, 2018

AFAICT it is in this case.

The entries of the cov mat are C[i,j] == ⟨ x[i] * x[j] ⟩
the arithmetic means of the product x[i] and x[j].

Therefore each matrix has to be weighted with the relative size of its subset. ( which will ideally all be the same size)

x = rand(100)
mean(x) == sum(x)/100 == sum(x[1:50])/100 + sum(x[51:100])/ 100
mean(x) == mean(x[1:50]) /2 + mean(x[51:100]) / 2

@Datseris
Copy link
Member

ok, if this every happen there will be a test that the result coincides with the non parallelized version, juuuuuust to be sure!

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

2 participants