Filtering Question

evgenyevgeny Member Posts: 11 Contributor II
edited July 2019 in Help

is there a way to set up a filter (e.g. attribute_value_filter in ExampleFilter) such that the attributes are filtered relative to a variable as opposed to a fixed value?



  • Options
    landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
    yes. I think that should to the Attribute_filter, isn't it?

  • Options
    evgenyevgeny Member Posts: 11 Contributor II
    thx, Sebastian, could you post an example?

    i know how to filter, say for attribute1 to be greater than zero (e.g. att1>0), but how can i filter for attribute1 to be greater than a variable (e.g. att1>x) where i would specify x externally. or ultimately get ParameterOptimisation to choose it for me.
  • Options
    haddockhaddock Member Posts: 849 Maven

    Variables are called Macros in RM, and can be incorporated most places that text gets accepted, like in SQL or parameters, in the format  %{Macro_name} , like this...
    <operator name="Root" class="Process" expanded="yes">
        <operator name="ExampleSetGenerator" class="ExampleSetGenerator">
            <parameter key="target_function" value="random"/>
        <operator name="Set Your Variable X" class="SingleMacroDefinition">
            <parameter key="macro" value="X"/>
            <parameter key="value" value="0.5"/>
        <operator name="ExampleFilter" class="ExampleFilter">
            <parameter key="condition_class" value="attribute_value_filter"/>
            <parameter key="parameter_string" value="att1&lt;%{X}"/>
  • Options
    evgenyevgeny Member Posts: 11 Contributor II
    thank you very much. very helpful as always.

    is there anywhere a list of acceptable synthax options for parameter_string (such as "att1<%{X}")?
Sign In or Register to comment.