"Error:Beginner"

catchyoulater
catchyoulater New Altair Community Member
edited November 2024 in Community Q&A
Hi,
    I'm a beginner of Rapidminer.An error came out, when I used it.The text of Error is:Input example set must have special attribute label. It made me confused because  I had  selected  an attribute when I read the data table from Database. The detail of the XML is:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.0">
  <context>
    <input/>
    <output/>
    <macros/>
  </context>
  <operator activated="true" class="process" expanded="true" name="Process">
    <parameter key="logfile" value="E:\test\samples\processes\test\first1.log"/>
    <parameter key="resultfile" value="E:\test\samples\data\first1.res"/>
    <process expanded="true" height="419" width="570">
      <operator activated="true" class="read_database" expanded="true" height="60" name="Read Database" width="90" x="45" y="30">
        <parameter key="database_system" value="Microsoft SQL Server (JTDS)"/>
        <parameter key="database_url" value="jdbc:jtds:sqlserver://127.0.0.1:1433/kdd"/>
        <parameter key="username" value="ling"/>
        <parameter key="password" value="IBgRiRv1A6A="/>
        <parameter key="query" value="SELECT [Var5], [Var6], [Var165], [Var166], [Var167], [Var168], [appetency], [id] FROM [orange_small_train]"/>
        <parameter key="table_name" value="orange_small_train"/>
        <parameter key="label_attribute" value="appetency"/>
        <parameter key="id_attribute" value="id"/>
      </operator>
      <operator activated="true" class="replace_missing_values" expanded="true" height="94" name="Replace Missing Values" width="90" x="179" y="30">
        <parameter key="default" value="none"/>
        <list key="columns"/>
      </operator>
      <operator activated="true" class="decision_tree" expanded="true" height="76" name="Decision Tree" width="90" x="315" y="30"/>
      <connect from_op="Read Database" from_port="output" to_op="Replace Missing Values" to_port="example set input"/>
      <connect from_op="Replace Missing Values" from_port="example set output" to_op="Decision Tree" to_port="training set"/>
      <connect from_op="Decision Tree" from_port="model" 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>

    Looking forward to you reply.
Tagged:

Answers

  • TobiasMalbrecht
    TobiasMalbrecht New Altair Community Member
    Hi,

    you may verify if your data contains a label if you place a breakpoint at the [tt]Read Database[/tt] operator and inspect the resulting data set. It might be that the functionality concerning setting a label in the database reader is broken since we did some refactoring in the input operators. This will of course be fixed in the final version of RM 5 at the latest. As a workaround, you can use the operator [tt]Set Role[/tt] after loading the data to mark an attribute as label.

    Kind regards,
    Tobias
  • catchyoulater
    catchyoulater New Altair Community Member
    Hi,Tobias
        thanks for your reply. I tried to follow what you said in the  reply by insetting the operator, Role set, behind the operator of Read Database and entering the name of the target attribute which I want to set it as label.  But then a confusing error appeared: The attribute appetency is missing in the input example set. (note: ‘appetency’ is the name of the target attribute). I ignored the error, run the process. To my surprise, the result was right. (There is a information copied from the results workspace: label: appetency (nominal in {-1, 1 }; no missing values) ).Then I used the result data for the process of Decision Tree, but the same error appeared: Input example set must have special attribute label. What’s the matter on earth?
        Looking forward to your reply.

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.