"Accessing parameter values by macros"

keyser84keyser84 Member Posts: 9 Contributor II
edited May 2019 in Help
I want to write some parameter values into the filename string of my output file, e.g. when iterating over the number of clusters in k-Means I want the output files "output_2.arff", "output_3.arff", etc.

Setting the filename to "output_%{operator.KMeans.parameter.k}.arff" does not work.

I found a workaround here: http://rapid-i.com/rapidforum/index.php/topic,801.0.html
A process log is used to read current parameter values, is then converted to an example set and by data macro definition a macro holding the appropriate value is defined.

Isn't there a simpler way to access current parameter values via macros?
Tagged:

Answers

  • landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
    Hi,
    yes there is simpler solution to that: Insert a SingleMacroDefinition and define your macro there. Then use the ParameterCloner to copy the parameterValue you want in your macro into the value parameter of the SingleMacroDefinition operator. Et voila!


    Greetings,
      Sebastian
  • keyser84keyser84 Member Posts: 9 Contributor II
    Thank you. That works.
Sign In or Register to comment.