🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

How do I define the distance measure to be used for clustering methods?

User: "DiePaupi"
New Altair Community Member
Updated by Jocelyn
So I'm currently working on different clustering methods to analyse music data.
I'm using RapidMiner as a library and want to use e.g. the k-Means method. I've already initialized everything but I'm still struggling to define the Distance Measure to be used. I'd like to be able to choose between all of those RapidMiner offers for numerical values, but can't find how I'd have to set it and if it would be possible to get a list of those measures the clustering method supports.

I set the operator and its parameters in my class like this:
Operator clusterer = OperatorService.createOperator(FastKMeans.class);
clusterer.setParameter("k", new Integer(k).toString());
...

But the Distance Measure isn't set via a parameter but based on the given example set (in e.g. FastKMeans.class):
DistanceMeasure measure = this.getInitializedMeasure(eSet);

vs.

int k = this.getParameterAsInt("k");

So how do I set the measure?

Find more posts tagged with

Sort by:
1 - 1 of 11
    User: "jczogalla"
    New Altair Community Member
    Accepted Answer
    Hi @DiePaupi!

    You should be able to find those parameters in all the cluster operators. They should show up when calling
    getParameterTypes()
    In code, you can see that they are added by this line: 
    types<span>.addAll(getMeasureParameterTypes());</span>
    So it should be as easy to set these parameters as with the parameter k as you are already doing.

    Cheers
    Jan