"Accessing parameter values by macros"
keyser84
New Altair Community Member
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?
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?
0
Answers
-
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,
Sebastian0 -
Thank you. That works.0