Due to recent updates, all users are required to create an Altair One account to login to the RapidMiner community. Click the Register button to create your account using the same email that you have previously used to login to the RapidMiner community. This will ensure that any previously created content will be synced to your Altair One account. Once you login, you will be asked to provide a username that identifies you to other Community users. Email us at Community with questions.

Problem with printing logMessages

Legacy UserLegacy User Member Posts: 0 Newbie
edited November 2018 in Help
Hello RapidMiners,

I have a problem with the log system, i.e. I do not seem to understand it :) I created a plugin which is based on GeneticAlgorithm,java. in my copied GenticAlgorithm file I can put out log message with logNote(""xxx"). The class returns a "PopulationOperator" for Muatation (used within AbstractGeneticAlgorithm) which I exchanged for my own Operator, however I am not able to log any messages from MyMutationOperator (looks very much like SelectionMuatation.java). I tried:

LogService.getGlobal().setVerbosityLevel(LogService.MAXIMUM);
LogService.getGlobal().log("--------",LogService.NOTE);
but this doesn't print any Statements on RapidMiners console. I DO know that the code is excecuted because System.out.out.printlns come through.

Any sugesstions?

Thanks
Tagged:

Answers

  • landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
    Hi Sebastian,
    if I understood you right, you implemented another operator? Then you will use it within an process. If you click on the the root of the process there is a parameter "logverbosity", did you changed the value apropriate to your verbosity used within your operator?

    Greetings,
      Sebastian
  • Legacy UserLegacy User Member Posts: 0 Newbie
    Hi,
    thanks for answering. Yes I think I did implement a new operator, however my understanding about RapidMiner still leaves something to be desired. A few days ago I started writing a plugin without having any knowledge about RapidMiner whatsoever :)

    To understand the situation perhaps you might take a look at the provided example 05_Features/11_Evolutionary Feature_Selection

    There is an Element "GeneticAlgorithm" (a FeatureOperator)from within that I can print Log Messages ("Notes"), now GeneticAlgorithm does something like new SelectionCrossover(crossoverType, pCrossover, getRandom(), minNumber, maxNumber, exactNumber); with "SelectionMuation" being an "Individual Operator". This Operator cannot be seen in RapidMiners Operator Tree, since I assume it is somehow "internal" to GeneticAlgortihm. From within Selection Mutation I found no way of printing messages to the log.

    I tried, as you suggested, playing with "logverbostiy" of the "Root-Process" element, but this didn't help.

    Any suggestions or pointers to relevant documentation?


  • IngoRMIngoRM Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, Community Manager, RMResearcher, Member, University Professor Posts: 1,751 RM Founder
    Hi,

    LogService.getGlobal().setVerbosityLevel(LogService.MAXIMUM);
    LogService.getGlobal().log("--------",LogService.NOTE);
    the problem is the first line. This will set the global LogService to a mode where only the most important messages (those with a verbosity level of MAXIMUM) will be logged at all. NOTE is lower than MAXIMUM, therefore it will not be shown. The solution is quite easy: just skip the first line and use only the second, i.e.

    LogService.getGlobal().log("--------",LogService.NOTE);
    Hope that helps,
    Ingo
  • Legacy UserLegacy User Member Posts: 0 Newbie
    Ah ok thank you. Somehow I've been understanding the LogLevels the other way around. I am still not entirely sure whether it works as intended now, but at least I get some log messages through and will figure the rest out :)
Sign In or Register to comment.