Attribute construction.

ratheesanratheesan Member Posts: 68 Maven
edited November 2018 in Help
Hi,
I have a problem while I am using if conditions in Attribute Construction Operator.Always getting an error message like " 'Syntax Error (implicit multiplication not enabled)".I am attaching my process here.

<operator name="Root" class="Process" expanded="yes">
    <operator name="ExcelExampleSource" class="ExcelExampleSource">
        <parameter key="excel_file" value="C:\Documents and Settings\ADMIN\Desktop\combined.xls"/>
        <parameter key="first_row_as_names" value="true"/>
    </operator>
    <operator name="Aggregation" class="Aggregation">
        <list key="aggregation_attributes">
          <parameter key="Cycle Time" value="average"/>
          <parameter key="File Quality Manager" value="average"/>
          <parameter key="File Quality CR" value="average"/>
          <parameter key="File Quality Supervisor" value="average"/>
          <parameter key="Customer Experience" value="average"/>
          <parameter key="Estimate Accuracy" value="average"/>
        </list>
        <parameter key="group_by_attributes" value="OFFICE"/>
        <parameter key="only_distinct" value="true"/>
    </operator>
    <operator name="AttributeConstruction" class="AttributeConstruction">
        <list key="function_descriptions">
          <parameter key="FileQualityManager" value="if(average(File Quality Manager))&lt;80,&quot;Low&quot;,if(average(File Quality Manager))&lt;90,&quot;Medium&quot;,if(average(File Quality Manager))&lt;=100,&quot;High&quot;,&quot;Other&quot;)))"/>
          <parameter key="FileQualitySupervisor" value="if(average(File Quality Supervisor))&lt;76,&quot;Low&quot;,if(average(File Quality Supervisor) )&lt;88,&quot;Medium&quot;,if(average(File Quality Supervisor))&lt;=100,&quot;High&quot;,&quot;Other&quot;)))"/>
          <parameter key="FileQualityCR" value="if(average(File Quality CR))&lt;87,&quot;Low&quot;,if(average(File Quality CR))&lt;94,&quot;Medium&quot;,if(average(File Quality CR))&lt;=100,&quot;High&quot;,&quot;Other&quot;)))"/>
        </list>
    </operator>
    <operator name="ExcelExampleSetWriter" class="ExcelExampleSetWriter">
        <parameter key="excel_file" value="C:\Documents and Settings\ADMIN\Desktop\levels.xls"/>
    </operator>
</operator>

Thanks
Ratheesan

Answers

  • IngoRMIngoRM Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, Community Manager, RMResearcher, Member, University Professor Posts: 1,751 RM Founder
    Hi,

    the reason for this is that the operator "Generate Attributes"  ("Attribute Construction" in RM < 5) does not support attribute names with empty spaces. The name

    File Quality Manager

    is interpreted as

    File * Quality * Manager

    which is disabled by default. Exactly for this reason: because the attributes "File" and "Quality" would not exist. Currently, the only solution is to use underscores '_' instead of spaces in attribute names, i.e. please use "File_Quality_Manager" instead. Of course you can rename your attributes back after the construction. If you want to rename them in a convenient way, you can use the operator "Rename by Replacing" and replace all spaces by underscores automatically.

    Cheers,
    Ingo



  • ratheesanratheesan Member Posts: 68 Maven
    Thanks Ingo for this valuable information.

    By
    Ratheesan
  • PrablyPrably Member Posts: 3 Contributor I
    Very helpful. Thank you much.
Sign In or Register to comment.