"Weka learner - no operator description"

nicugeorgiannicugeorgian MemberPosts:31Guru
edited May 2019 inHelp
Hello,

I tried to define a Weka Learner for building a regression tree. This learner appears as "W-M5P" in the RapidMiner GUI.

This is the definition I use:

Learner learner = (Learner) OperatorService.createOperator("M5P");

Unfortunately, I get the the following exception:

data:com.rapidminer.operator.OperatorCreationException: No operator description object given for 'M5P
在com.rapidminer.tools.OperatorService.createOperator

Note that I get the same exception if I try, for example, to use the J48 learner.

This is what I did so far (I'm using the Eclipse platform for Java):

1. In Eclipse, I have (myself) built the Java classes corresponding to the Java source files in the folder

C:\Program Files\Rapid-I\RapidMiner-4.1beta2\src

输出文件夹的名字叫C:\Program Files\Rapid-I\RapidMiner-4.1beta2\build

2. I have added the above "build" class folder to the Java build path of the project

3. I have defined the variable "rapidminer.home" to point to

C:\Program Files\Rapid-I\RapidMiner-4.1beta2\lib\rapidminer.jar

Could you please help me with this matter?

Thank you!
Geo
Tagged:

Answers

  • IngoRMIngoRM Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, Community Manager, RMResearcher, Member, University ProfessorPosts:1,751RM Founder
    Hello Geo,

    please try to point the variable "rapidminer.home" to the place where a lib directory exists containing the file weka.jar, e.g. try

    System.setProperty("rapidminer.home", "C:\\Dokumente und Einstellungen\\Mierswa\\Eigene Dateien\\workspace\\yale");
    RapidMiner.init();
    (of course with a correct path)

    In the next version, you will no longer have to specify rapidminer.home at all any longer (it is now only necessary for Weka, for all other purposes (plugins etc.) there exist new global setting possibilities. But for now the solution above should work. Of course you would have to ensure that the file "weka.jar" is actually there;)

    Cheers,
    Ingo

  • nicugeorgiannicugeorgian MemberPosts:31Guru
    Hi Ingo,

    Thank you very much for the help.

    I've set the "rapidminer.home" variable to "C://Program Files/Rapid-I/RapidMiner-4.1beta2/" and not to the work space (as you did).

    And, yes, it worked!:)Thanks!

    Unfortunately, I got an java.lang.OutOfMemoryError:(

    Probably, I should reduce the size of my training data set (~ 67'000 records with 14 attributes) ... or is there a memory size limit imposed by RapidMiner (which can be changed)?

    Cheers,
    Geo
  • IngoRMIngoRM Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, Community Manager, RMResearcher, Member, University ProfessorPosts:1,751RM Founder
    Hello,

    Probably, I should reduce the size of my training data set (~ 67'000 records with 14 attributes) ... or is there a memory size limit imposed by RapidMiner (which can be changed)?
    67000 with 14 attributes does not sound too much to me but this of course depends on the learner. Tree based learners always need more memory than for example NaiveBayes.

    Did you try to increase the heap size setting of your Java program? Try -Xmx800m or something similar as start option for your program so that it is able to use more memory (just search at google for Java heap size setting).

    In principal, there is no limit for memory included in RapidMiner. With 64 bit machines, you can use (almost) arbitrary amounts of memory (but you have to tell Java this, see above). If you work directly on databases, which is possible with a certain setting in the DBExampleSource operator, there are no limits at all. But this will not properly work for all types of processes and is rather slow so we recommend to work in memory whenever this is possible.

    Cheers,
    Ingo
  • nicugeorgiannicugeorgian MemberPosts:31Guru
    mierswa wrote:

    Try -Xmx800m or something similar as start option for your program so that it is able to use more memory
    I did that, but I still get the error:(The error actually shows as soon as the first iteration of the (regression tree) learner starts.

    Thanks anyway for all your hints!
  • IngoRMIngoRM Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, Community Manager, RMResearcher, Member, University ProfessorPosts:1,751RM Founder
    Hi,

    I am not too familiar with M5P so maybe this learner just needs a lot of memory... you could try to transform your data to only nominal (using a discretization operator) or only numerical (using the appropriate preprocessing operators) and try other learners instead. Of course increasing the main memory and changing to a 64 bit always is an option...

    Cheers,
    Ingo
  • nicugeorgiannicugeorgian MemberPosts:31Guru
    Hi,

    I have changed myeclipse.inifile such that it now looks as follows:

    -showsplash
    org.eclipse.platform
    --launcher.XXMaxPermSize
    256M
    -vmargs
    -Dosgi.requiredJavaVersion=1.5
    -Xms64m
    -Xmx800m
    And, as I said, I still get thatOutOfMemoryError. I, however, think that changing the eclipse.ini file did not matter at all. Why am I saying this?

    Because I've also modified theRapidMinerGUI.batfile such that it now has
    if "%MAX_JAVA_MEMORY%"=="" set MAX_JAVA_MEMORY=1024
    and, surprise, the RapidMinertooldoes not throw anymore theOutOfMemoryError. However, theJava program(developed in Eclipse) that uses the RapidMiner library still throws theOutOfMemoryError...

    Cheers,
    Geo
  • UsernameUsername MemberPosts:39Guru
    nicugeorgian wrote:

    I have changed myeclipse.inifile such that it now looks as follows:

    and, surprise, the RapidMinertooldoes not throw anymore theOutOfMemoryError. However, theJava program(developed in Eclipse) that uses the RapidMiner library still throws theOutOfMemoryError...
    The eclipse.ini file changes the memory settings for Eclipse but as I understand you want to increase memory for your application. If you run your program inside Eclipse you can set memory parameters (-Xmx1024m) via "Run" -> "Open Run Dialog" -> "Arguments" -> "VM arguments".
  • nicugeorgiannicugeorgian MemberPosts:31Guru
    Username wrote:

    If you run your program inside Eclipse you can set memory parameters (-Xmx1024m) via "Run" -> "Open Run Dialog" -> "Arguments" -> "VM arguments".
    Yes, it worked!:DThank you very muchUsername.
Sign InorRegisterto comment.