Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: LinearNNSearch: any way to get the indices instead of the Instances?

  1. #1

    Question LinearNNSearch: any way to get the indices instead of the Instances?

    I'm using LinearNNSearch to find kNearestNeighbords on a filtered and normalized dataset.

    How can I link the kNN found instances back to my original un-filtered un-normalized instances?

    I'm thinking perhaps if there was a way to get the instance indexes instead of the Instance objects, that would be easy.

    Is there a quick solution?

  2. #2
    Join Date
    Aug 2006
    Posts
    1,741

    Default

    The development version of Weka has a distance function called the FilteredDistance. This takes a base distance function and applies a supplied filter to it before distances are computed. You can add an ID field to your data and then use the FilteredDistance along with a Remove filter to ensure that the ID is not part of the distance calculation (but remains in the dataset so that you can identify instances).

    Cheers,
    Mark.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.