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

dynamic thresholds #2

Open
xuebaliang opened this issue Feb 10, 2020 · 6 comments
Open

dynamic thresholds #2

xuebaliang opened this issue Feb 10, 2020 · 6 comments

Comments

@xuebaliang
Copy link

hello, I have some question about u and v in your code. You say they are dynamic in your paper, but it seems that they are fixed in your code. Therefore, can you supply the dynamic version to me? Thanks!!!

@tnlin
Copy link
Contributor

tnlin commented Feb 10, 2020 via email

@xuebaliang
Copy link
Author

oh oh, thanks for your reply. I see the dynamic setting in experiment.py file. Then I have another question:
label_mat[labels==-1, :] = -1
label_mat[:, labels==-1] = -1
label_mat[label_mat==0] = 0
label_mat[label_mat==1] = 1
pos_mask = (sim_mat > u_threshold).type(torch.cuda.FloatTensor)
neg_mask = (sim_mat < l_threshold).type(torch.cuda.FloatTensor)
pos_mask[label_mat==1] = 1
neg_mask[label_mat==0] = 1
pos_entropy = -torch.log(torch.clamp(sim_mat, eps, 1.0)) * pos_mask
neg_entropy = -torch.log(torch.clamp(1-sim_mat, eps, 1.0)) * neg_mask
loss = pos_entropy.mean() + neg_entropy.mean() + u_threshold - l_threshold

above codes seem to indicate that the cross entropy is still restricted in known true labels, but does not support from these high similar pair points. This is inconsistent with the definition of Rij in your self-supervised method. Because I can not find that you will change the labels during training process in experiment.py file. Do I get it wrong? Thanks!!!

@tnlin
Copy link
Contributor

tnlin commented Feb 13, 2020 via email

@xuebaliang
Copy link
Author

Yes, you are right, I misunderstand these two sentences: pos_mask[label_mat==1] = 1
neg_mask[label_mat==0] = 1. Originally I think it will add extra constraint on pos_mask and neg_mask, but if you think about it carefully, it is actually complementary. Thanks for your reply.

@xuebaliang
Copy link
Author

Hi, I find that the choice of upper threshold u and lower threshold l in dynamic process has a significant impact on clustering results. The 0.95 and 0.455 are selected by experience or after tuning the network parameter. Have you considered designing a data based selection method for them? For example, based on the similarity matrix. Looking forward to your reply, thanks!!!(Haha, I find that you are in Tsinghua University, I am in Peking University, may I have your WeChat?)

@tnlin
Copy link
Contributor

tnlin commented Mar 10, 2020 via email

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