The Altair Community is migrating to a new platform to provide a better experience for you. The RapidMiner Community will merge with the Altair Community at the same time. In preparation for the migration, both communities are on read-only mode from July 15th - July 24th, 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.
Options

K-medoids in Rapidminer

amarquesamarques Member Posts: 3 Contributor I
edited November 2018 in Help
Hello,

I am writing a Java program which uses k-medoids algorithm and I am new in rapidminer.
I have the ExampleSet to generate the cluster model, but first I need to initialize the class k-medoids. The constructor is:
public KMedoids(OperatorDescription description) {
super(description);
getExampleSetInputPort().addPrecondition(new DistanceMeasurePrecondition(getExampleSetInputPort(), this));
}
The problem is the Object description, I don't know how to create because in the following constructor:
public OperatorDescription(String fullyQualifiedGroupKey, String key, Class<? extends Operator> clazz, ClassLoader classLoader, String iconName, Plugin provider);

I don't know what I should put in Class<? extends Operator> clazz and in Plugin provider.
Could anybody help me? I am losing my mind :'(
Thank you
Tagged:

Answers

  • Options
    Marco_BoeckMarco_Boeck Administrator, Moderator, Employee, Member, University Professor Posts: 1,996 RM Engineering
    Hi,

    please have a look at the Development FAQ here: click
    This should help you, especially answer 5) where we heavily suggest you do not create processes programmatically unless you absolutely know what you are doing.

    Regards,
    Marco
  • Options
    amarquesamarques Member Posts: 3 Contributor I
    Thank you, but I've already initialized Rapid miner and created an ExampleSet, but the problem is the OperatorDescription object.
  • Options
    Marco_BoeckMarco_Boeck Administrator, Moderator, Employee, Member, University Professor Posts: 1,996 RM Engineering
    Hi,

    as I said, we strongly advise against creating new processes programmatically instead of creating a process from an existing GUI process. You can create a template process which simply needs an ExampleSet as input and which outputs your clustering model.

    Regards,
    Marco
  • Options
    amarquesamarques Member Posts: 3 Contributor I
    I understand perfectly what you say, but the problem is that I need to do a java program because is a part of my thesis.
  • Options
    Marco_BoeckMarco_Boeck Administrator, Moderator, Employee, Member, University Professor Posts: 1,996 RM Engineering
    Hi,

    it is still a Java program because all you do is create a Process object from an existing process xml template and then programmatically supply arguments and continue with the results.
    But I know how some professors can be ::)
    If you want an OperatorDescription object, you can call

    OperatorService.getOperatorDescription(className);
    where className is a String equal to the key found in the OperatorsCore.xml file. For example "decision_tree" for a Decision Tree operator.

    While you're at it, may I suggest the ctrl+shift+g shortcut in Eclipse which will show you all the places a class/method/variable is used? Very handy to find out how things are done :)

    Regards,
    Marco
Sign In or Register to comment.