Filterung the results of the Kernel Density Estimation and its associated numbers

1 view (last 30 days)
Hi
I have successfully managed to program the following: Based on matrix of numbers below I have applied the Kernel Density Estimation for each column to get the most frequent number for each column. Now each number is associated with a certain set of numbers in the same row and I want to find out those numbers. For instance if the KDE says column 2 has an KDE of 0.4 then the numbers associated with the KDE of 0.4 are the ones in column 1 and column 3,4 and 5. I want to find those numbers.
I thought about solving this problem the following way: So I would have to get the most frequent number for each column. Then filter the matrix according to the most frequent number in each column and then get the results. What is the best way to filter the matrix or is there an easier algortihm to do this? THanks for your help
x=
0.84653,0.72772,0.27021,3,2
0.91969,0.40057,0.27059,0,13
1.2493,0.8526,0.27381,18,4
0.95155,0.43755,0.28089,4,14
1.0834,0.65129,0.28112,15,2
0.961,0.6391,0.28889,1,14
0.9456,0.59716,0.29324,2,18
0.90963,0.47961,0.29743,2,17
1.0843,0.73494,0.29987,14,2
0.89685,0.41783,0.30036,4,16
1.2205,0.58522,0.30068,22,7
1.2503,0.62006,0.30105,18,3
0.88673,0.29021,0.30182,5,18
1.3581,0.73311,0.30232,1,1
0.89734,0.37548,0.30655,11,23
0.99294,0.43664,0.30913,4,16
[f,xi] = ksdensity(x(:,2)); %%% e.g. getting the KDE for column three of matrix x

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!