# "Rocchio Algorithm"

Hi,

is there an implementation of the rocchio algorithm in RapidMiner? Or how could I change the k-Nearest-Neighbor to a Rocchio by calculating the average word vector for each class and use only these for classification.

THX in advance.

is there an implementation of the rocchio algorithm in RapidMiner? Or how could I change the k-Nearest-Neighbor to a Rocchio by calculating the average word vector for each class and use only these for classification.

THX in advance.

Tagged:

0

## Answers

6Contributor IIit's pretty sad, that there is no Rocchio in RapidMiner. Now I'm trying to set up my own but already having problems while trying to get the mean of all word vectors of a class.

Is there a function that averages all given word vectors so I get one centroid vector? I can't find it.

Thanks for any help.

2,531Unicornthis is possible if you somehow missuse K-Medoids. See the following process for details: Unfortunately this won't work in the current version because of a bug in the nominal Distance measure using the numerical attributes, too. This is resolved with the coming update at end of next week.

Greetings,

Sebastian

6Contributor II6Contributor IIisn't there another operator to just calculate the mean of some wordvectors? there must be anything like averaging all given vectors and getting the mean vector?! just can't find it.

thanks a lot for any advice.

1,751RM FounderI have just uploaded a process which calculates the average values for all attributes grouped by the class and uses the resulting prototypes as input for the k-NN learner. It might be that you need a recent RapidMiner version since this process makes use of a relatively new feature of the operator "Aggregate", namely to directly aggregate a set of attributes with the same default function. Otherwise you will have to define all aggegations for all attributes manually which is of course not really possible for word vectors...

The description of the process on myExperiment can be found at

http://www.myexperiment.org/workflows/1917.html

You can directly download the process from myExperiment within RapidMiner (which I strongly recommend) by using the Community Extension of RapidMiner. Just install the extension and activate the "MyExperiment Browser" view. Then you can easily search for processes and download them. The process is called "Rocchio".

Cheers,

Ingo

2,531Unicornlet me mention that this is possible only with the 5.1.002+ version released a week before.

Some problems become outdated really fast...

Greetings,

Sebastian