I am trying to implement this research paper:
I understand everything in the paper except the part about the nearest neighbors calculation (section 3).
The only MATLAB function I can think of that makes sense with this research paper squared euclidean distance is the pdist2 function. It would give me the D matrix.
Assuming I am correct, but what is the input to the pdist2 in terms of X and Y? Research paper mentions 100 nearest neighbors and sorted in ascending order, I am assuming this:
[D,I] = pdist2(X,Y,'squaredeuclidean','Smallest',100);
and X and Y is the magnitude spectrogram of the mixture signal. X = Y ?
Also, after I get D matrix, the paper mentions a P matrix of size n x p, I am not sure how to get that matrix from the previous calculation.
After I get that P matrix, I can do the rest of the research paper. So basically, I am just trying to figure out the nearest neighbors calculations D and P.
The author used MATLAB, and I would be happy if someone can provide MATLAB code for this nearest neighbor calculation, just like in the paper.