The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

k nearest neighbor - example set of nearest neighbors

danjeharrydanjeharry Member Posts: 20 Contributor II
edited November 2018 in Help
Hey all,

If I wanted to run a k-nearest neighbor algorithm on my dataset and get say the 500 nearest points for a single data point, is there a way to get rapidminer to return the 500 points that comprise the nearest neighbors?

Thanks

Answers

  • TimboTimbo Member Posts: 14 Contributor II
    Have you tried connecting the model to the output? This will enable you to visually inspect the model. It's nice for tree based algorithms but I haven't tried it for k-NN. If this does not work I could only think of a workaround by changing the coordinate system:

    Put the point in question to the center of it and create a new attribute that holds the distance from the origin of your new coordinate system. Then cut on that distance. Or sort the output with respect to that distance. The feasibility of this workaround however critically depends on the dimensionality of your problem. It'll really suck to implement that for high dimension (meaning >= well let's say 5 or 6 ...)

    Tim
Sign In or Register to comment.