sum columns ??

eselva
eselva New Altair Community Member
edited 2024 05 in Community Q&A
i new in rapidminer, but  i dont know how to sum or average one column
Tagged:

Answers

  • MartinLiebig
    MartinLiebig
    Altair Employee
    Hi,

    you can do this using the aggregate operator. It works similar to the aggregate in SQL.

    ~Martin
  • eselva
    eselva New Altair Community Member
    i cant it.  I just sum one colum? how?
  • MartinLiebig
    MartinLiebig
    Altair Employee
    Hi eselva,

    try out the process below. This should illustrate it.

    Martin

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="6.5.002">
      <context>
        <input/>
        <output/>
        <macros/>
      </context>
      <operator activated="true" class="process" compatibility="6.5.002" expanded="true" name="Process">
        <process expanded="true">
          <operator activated="true" class="retrieve" compatibility="6.5.002" expanded="true" height="60" name="Retrieve Sonar" width="90" x="45" y="120">
            <parameter key="repository_entry" value="//Samples/data/Sonar"/>
          </operator>
          <operator activated="true" class="aggregate" compatibility="6.5.002" expanded="true" height="76" name="Aggregate" width="90" x="179" y="120">
            <list key="aggregation_attributes">
              <parameter key="attribute_1" value="sum"/>
            </list>
          </operator>
          <connect from_op="Retrieve Sonar" from_port="output" to_op="Aggregate" to_port="example set input"/>
          <connect from_op="Aggregate" from_port="example set output" 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>