Open Youskrpig opened 2 years ago
I think this line "w = (1 - (np.max(np.exp(N_b))/np.sum(np.exp(N_b))))" should be changed to "w = (1 - (np.min(np.exp(N_b))/np.sum(np.exp(N_b))))". Because S should be the max distance between mtest and its nearest neighbor. N_b is a vector of distance between the chosen mtest and its k-nearest neighbor. So here in this line, we only need to get the smallest distance among k distances, which is the ||mtest - m*||. After changing this line, the performance raise a bit.
It can be changed to "w = (1 - (np.exp(N_b[0])/np.sum(np.exp(N_b))))" because the N_b is sorted by k. In the other hand, I want to figure out some explanation of why multiply s* by this w can make judge more robust, but still have no idea. Does anyone have any idea of this?
It can be changed to "w = (1 - (np.exp(N_b[0])/np.sum(np.exp(N_b))))" because the N_b is sorted by k. In the other hand, I want to figure out some explanation of why multiply s* by this w can make judge more robust, but still have no idea. Does anyone have any idea of this?
I have the same question.
Hi, Thanks for your work. From formula(6) in paper:
for formula (7) in paper, it should be:
![image](https://user-images.githubusercontent.com/51428142/129706640-9270f94f-9284-46b7-a5fc-32a890b2bd05.png)
### "with N_b (m^* ) the b nearest patch-features in M for test patch-feature m^*****
but your code: w = (1 - (np.max(np.exp(N_b))/np.sum(np.exp(N_b)))) I think it's not right