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

How to deal with unmatched sample size? #4

Open
LiJiaqi96 opened this issue Dec 17, 2019 · 2 comments
Open

How to deal with unmatched sample size? #4

LiJiaqi96 opened this issue Dec 17, 2019 · 2 comments

Comments

@LiJiaqi96
Copy link

Hi,

Thanks for your idea and work. I would like to figure out how did you deal with unmatched sample size, in other words, two batch sizes are not the same.
I notice that in the MMD loss you used "assert" to ignore this situation. But is there any solution to this problem as the number of samples in two clusters may not be the same.

Thanks!

@txWang
Copy link
Owner

txWang commented Dec 17, 2019

Hi,
Thank you for your question. We apply MMD loss on pairs of similar clusters from different batches. During the construction of a mini-batch for training the network, we sample the same amount of cells from each cell cluster, so the batch size for calculating MMD is always matched. If the size of some cell cluster is insufficient, we simply random over-sample the cells. You could also try to apply MMD for different batch sizes. Here, we just did sample the same amount of cells in mini-batch gradient descent for simplicity.

@LiJiaqi96
Copy link
Author

Thanks for your in-time reply. It really helps.

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