Pages: [1]
  Print  
Author Topic: Way to get list of the actual "nearest neighbors"?  (Read 2382 times)
keith
Full Member
***
Posts: 160


« on: September 04, 2008, 09:16:27 PM »

When applying a NearestNeighbor model, is there a way to return the list nearest neighbor points for each predicted value?

In other words, if I run an existing KNN model to predict new values on 100 new examples, where K=5, I want to return the five nearest neighbor point matches for each example.  Something like


Example#  Neighbor    ID
1               1                 AAA
1               2                 BBB
1               3                 CCC
1               4                 DDD
1               5                 EEE
2               1                 FFF
2                2                CCC
2                3                GGG
2                4                AAA
2                5                HHH
3                1                JJJ
etc.


Even if it doesn't rank the neighbors, just getting a list of neighbors for each example row would be great.  Any suggestions are appreciated.

Keith
Logged
Tobias Malbrecht
Global Moderator
Sr. Member
*****
Posts: 293



WWW
« Reply #1 on: September 06, 2008, 09:16:47 PM »

Hi Keith,

I do not know if this is possible with RapidMiner without checking, but I assume that it is at least not a one-operator-process .. Wink

However, I would start by using the ExampleSet2SimilarityExampleSet operator in combination with some filtering techniques ... did you try that already?

Regards,
Tobias
Logged

Tobias Malbrecht
Director of Product Marketing
RapidMiner
keith
Full Member
***
Posts: 160


« Reply #2 on: September 06, 2008, 10:10:02 PM »

Thanks Tobias.  I wasn't aware of the similiarity operators.  That's almost exactly what I'm looking for.  Is there a version that can compute similarity distances using attribute weights?

Keith
Logged
Tobias Malbrecht
Global Moderator
Sr. Member
*****
Posts: 293



WWW
« Reply #3 on: September 06, 2008, 10:28:25 PM »

Hi Keith,

since there is neither parameter to specify if attribute weights are considered nor an input indicating that attribute weights might be processed, I assume that attribute weights may not be considered. But in conjunction with numerical attribute weights, you may use the AttributeWeightsApplier before using one of the similarity calculation operator.

Cheers,
Tobias
Logged

Tobias Malbrecht
Director of Product Marketing
RapidMiner
keith
Full Member
***
Posts: 160


« Reply #4 on: September 06, 2008, 10:37:33 PM »

Cool!  I will try that.  Thanks again.

Keith
Logged
Pages: [1]
  Print  
 
Jump to: