The Altair Community is migrating to a new platform to provide a better experience for you. The RapidMiner Community will merge with the Altair Community at the same time. In preparation for the migration, both communities are on read-only mode from July 15th - July 24th, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here.
Options

"[SOLVED] reporting extension: Scatter Multiple attributes with some name pattern"

tennenrishintennenrishin Member Posts: 177 Contributor II
edited June 2019 in Help
Hello

I would like to report a "Scatter Multiple" plot that includes all attributes whose names start with "xyz". The "Scatter Multiple" plot-columns parameter doesn't seem to allow regular expressions.

What is the easiest way to do this? Do I have to loop through the attribute names and construct a long macro of attribute names?

Thanks for any help
Isak

Answers

  • Options
    MariusHelfMariusHelf RapidMiner Certified Expert, Member Posts: 1,869 Unicorn
    I fear the answer is just a simple "yes" oO

    Best, Marius
  • Options
    tennenrishintennenrishin Member Posts: 177 Contributor II
    Thank you Marius! So I take it then, that this is the simplest way to do it.
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.2.006">
      <context>
        <input/>
        <output/>
        <macros/>
      </context>
      <operator activated="true" class="process" compatibility="5.2.006" expanded="true" name="Process">
        <process expanded="true" height="540" width="835">
          <operator activated="true" class="generate_data_user_specification" compatibility="5.2.006" expanded="true" height="60" name="Generate Data by User Specification" width="90" x="45" y="75">
            <list key="attribute_values">
              <parameter key="xyzA" value="1"/>
              <parameter key="xyzB" value="1"/>
              <parameter key="xyzC" value="1"/>
              <parameter key="T" value="1"/>
            </list>
            <list key="set_additional_roles"/>
          </operator>
          <operator activated="true" class="set_macro" compatibility="5.2.006" expanded="true" height="76" name="Set Macro" width="90" x="179" y="75">
            <parameter key="macro" value="plot_list"/>
            <parameter key="value" value="INIT"/>
          </operator>
          <operator activated="true" class="loop_attributes" compatibility="5.2.006" expanded="true" height="60" name="Loop Attributes" width="90" x="313" y="75">
            <parameter key="attribute_filter_type" value="regular_expression"/>
            <parameter key="regular_expression" value="xyz.*"/>
            <process expanded="true" height="540" width="907">
              <operator activated="true" class="set_macro" compatibility="5.2.006" expanded="true" height="76" name="Set Macro (2)" width="90" x="112" y="30">
                <parameter key="macro" value="plot_list"/>
                <parameter key="value" value="%{plot_list},%{loop_attribute}"/>
              </operator>
              <connect from_port="example set" to_op="Set Macro (2)" to_port="through 1"/>
              <connect from_op="Set Macro (2)" from_port="through 1" to_port="example set"/>
              <portSpacing port="source_example set" spacing="0"/>
              <portSpacing port="sink_example set" spacing="0"/>
            </process>
          </operator>
          <operator activated="true" class="generate_macro" compatibility="5.2.006" expanded="true" height="76" name="Generate Macro" width="90" x="447" y="75">
            <list key="function_descriptions">
              <parameter key="plot_list" value="replace(&quot;%{plot_list}&quot;,&quot;INIT,&quot;,&quot;&quot;)"/>
            </list>
          </operator>
          <operator activated="true" class="reporting:generate_report" compatibility="5.2.000" expanded="true" height="76" name="Generate Report" width="90" x="581" y="75">
            <parameter key="report_name" value="report"/>
            <parameter key="format" value="HTML"/>
            <parameter key="html_output_directory" value="C:\Users\isak\Documents\testReport"/>
          </operator>
          <operator activated="true" class="reporting:report" compatibility="5.2.000" expanded="true" height="60" name="Report" width="90" x="715" y="75">
            <parameter key="report_name" value="report"/>
            <parameter key="specified" value="true"/>
            <parameter key="reportable_type" value="Data Table"/>
            <parameter key="renderer_name" value="Plot View"/>
            <list key="parameters">
              <parameter key="plotter" value="Scatter Multiple"/>
              <parameter key="scatter_axis_x_axis_log_scale" value="false"/>
              <parameter key="scatter_axis_y_axis_log_scale" value="false"/>
              <parameter key="scatter_jitter_amount" value="0"/>
              <parameter key="scatter_rotate_labels" value="false"/>
              <parameter key="scatter_multiple_axis_x_axis" value="T"/>
              <parameter key="scatter_multiple_axis_x_axis_log_scale" value="false"/>
              <parameter key="scatter_multiple_plot_columns" value="%{plot_list}"/>
              <parameter key="scatter_multiple_jitter_amount" value="0"/>
              <parameter key="scatter_multiple_rotate_labels" value="false"/>
              <parameter key="scatter_matrix_jitter_amount" value="0"/>
              <parameter key="bubble_axis_x_axis_log_scale" value="false"/>
              <parameter key="bubble_axis_y_axis_log_scale" value="false"/>
              <parameter key="bubble_rotate_labels" value="false"/>
              <parameter key="parallel_rotate_labels" value="false"/>
              <parameter key="parallel_local_normalization" value="false"/>
              <parameter key="deviation_rotate_labels" value="false"/>
              <parameter key="deviation_local_normalization" value="false"/>
              <parameter key="series_rotate_labels" value="false"/>
              <parameter key="series_multiple_rotate_labels" value="false"/>
              <parameter key="som_jitter_amount" value="0"/>
              <parameter key="block_axis_x_axis_log_scale" value="false"/>
              <parameter key="block_axis_y_axis_log_scale" value="false"/>
              <parameter key="block_jitter_amount" value="0"/>
              <parameter key="block_rotate_labels" value="false"/>
              <parameter key="pie_absolute_values" value="false"/>
              <parameter key="pie_aggregation" value="none"/>
              <parameter key="pie_use_distinct" value="false"/>
              <parameter key="pie_explosion_amount" value="0"/>
              <parameter key="pie_3d_absolute_values" value="false"/>
              <parameter key="pie_3d_aggregation" value="none"/>
              <parameter key="pie_3d_use_distinct" value="false"/>
              <parameter key="ring_absolute_values" value="false"/>
              <parameter key="ring_aggregation" value="none"/>
              <parameter key="ring_use_distinct" value="false"/>
              <parameter key="ring_explosion_amount" value="0"/>
              <parameter key="bars_absolute_values" value="false"/>
              <parameter key="bars_rotate_labels" value="false"/>
              <parameter key="bars_aggregation" value="none"/>
              <parameter key="bars_use_distinct" value="false"/>
              <parameter key="bars_orientation" value="vertical"/>
              <parameter key="bars_stacked_absolute_values" value="false"/>
              <parameter key="bars_stacked_rotate_labels" value="false"/>
              <parameter key="bars_stacked_aggregation" value="none"/>
              <parameter key="bars_stacked_use_distinct" value="false"/>
              <parameter key="bars_stacked_orientation" value="vertical"/>
              <parameter key="pareto_rotate_labels" value="false"/>
              <parameter key="pareto_sorting_direction" value="Descending Keys"/>
              <parameter key="pareto_show_bar_labels" value="true"/>
              <parameter key="pareto_show_cumulative_labels" value="false"/>
              <parameter key="distribution_rotate_labels" value="false"/>
              <parameter key="histogram_absolute_values" value="false"/>
              <parameter key="histogram_rotate_labels" value="false"/>
              <parameter key="histogram_log_scale" value="false"/>
              <parameter key="histogram_number_of_bins" value="40"/>
              <parameter key="histogram_opaqueness" value="100"/>
              <parameter key="histogram_color_absolute_values" value="false"/>
              <parameter key="histogram_color_rotate_labels" value="false"/>
              <parameter key="histogram_color_log_scale" value="false"/>
              <parameter key="histogram_color_number_of_bins" value="40"/>
              <parameter key="histogram_color_opaqueness" value="100"/>
            </list>
          </operator>
          <connect from_op="Generate Data by User Specification" from_port="output" to_op="Set Macro" to_port="through 1"/>
          <connect from_op="Set Macro" from_port="through 1" to_op="Loop Attributes" to_port="example set"/>
          <connect from_op="Loop Attributes" from_port="example set" to_op="Generate Macro" to_port="through 1"/>
          <connect from_op="Generate Macro" from_port="through 1" to_op="Generate Report" to_port="through 1"/>
          <connect from_op="Generate Report" from_port="through 1" to_op="Report" to_port="reportable in"/>
          <connect from_op="Report" from_port="reportable out" to_port="result 1"/>
          <portSpacing port="source_input 1" spacing="0"/>
          <portSpacing port="sink_result 1" spacing="0"/>
          <portSpacing port="sink_result 2" spacing="0"/>
        </process>
      </operator>
    </process>
    If anyone has a better way, please advise.
Sign In or Register to comment.