Options

Nearest Neighbors - Query

venkatesh20venkatesh20 Member Posts: 23 Maven
edited November 2018 in Help
I want to design a RM flow, where applying KNN model should return the k nearest neighbors instead of predicting the class of the unlabeled data based on k nearest neighbors.

i.e if  I provide one row of input data, the result I need is the k records which are neighbors to it, nothing more.

Here i am attempting to design a recommendation system using rapid miner flow. I am not sure if its possible to design such a flow. I would be grateful if anybody can help.

Thanks,
Venki

Answers

  • Options
    landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
    Hi,
    RapidMiner 5 has an operator called Cross Distances, which exactly does what you are longing for. You must give it two example sets, one containing the request examples and one containing the reference examples. It will return the top k nearest or farthest examples on any distance measure available.

    If you build your recommendation system, please keep in mind that it has to be licensed under the AGPL3 unless you have bought an OEM license of RapidMiner.

    Greetings,
      Sebastian
  • Options
    venkatesh20venkatesh20 Member Posts: 23 Maven
    Dear Sebastian,
    Thanks for the info. This is not for commercial use. I am doing my M.S disertation, I have chosen to research various techniques for recommendation systems. I will surely get an OEM license if i can successfully make a sellable product out of it  ;). Thanks again

    Venki
  • Options
    venkatesh20venkatesh20 Member Posts: 23 Maven
    Dear sebastian,
      The output example set of cross distances has 3 attributes request, document and distance.  The attributes  request, document are the id of the records in the datasets. Is there any operator which can use to retrieve the data corresponding to document ids?
  • Options
    landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
    Hi,
    you might join the resulting set with the original reference set using the Join operator. Before this you have to define the correct attribute to be the id using the set role operator.

    Greetings,
      Sebastian
  • Options
    venkatesh20venkatesh20 Member Posts: 23 Maven
    Works Like a charm !! Thanks sebastian..
Sign In or Register to comment.