RapidMiner

[SOLVED] Transition Graph: "Error creating renderer: java.lang.NullPointer...

Contributor II chrismxnr
Contributor II

[SOLVED] Transition Graph: "Error creating renderer: java.lang.NullPointer...

Hello,
I want to use the Transition Graph Operator, but I'm not able to get it working. I have two string attributes containing my nodes (source and target) and an additional real-valued strength attribute.

After my first try I got the error message that an id-attribute is needed. I don't really get why an id is needed, but I just generated one. Now my process executes, but I can not view the graph, it shows: "Error creating renderer Graph View (see log)".
In the log there is "WARNING: Error creating renderer: java.lang.NullPointerException".

I'm not sure if it is a bug or I'm using it in a wrong manner, because I did not find examples using it. Can you help me?

Best regards,
Christian
5 REPLIES
Contributor II haddock
Contributor II

Re: Transition Graph: "Error creating renderer: java.lang.NullPointerException"

Hi there,

I think that operator is under review, see the recent posts here...

http://rapid-i.com/rapidforum/index.php/topic,4381.msg15939.html#msg15939
RM Staff
RM Staff

Re: Transition Graph: "Error creating renderer: java.lang.NullPointerException"

Hi,

in fact this is an other operator and seems to be a bug. I have fixed it an it will be gone with the next RapidMiner update.

Cheers,
Nils
Contributor II chrismxnr
Contributor II

Re: Transition Graph: "Error creating renderer: java.lang.NullPointerException"

Thank you very much for your fast fix Smiley Happy. I tried it with the current SVN version today and it runs fine. The only thing I still don't get is why an ID attribute is needed? Like I told I just generated one and now it runs fine with that, but I'm not sure if I use it correctly.

Best regards,
Christian
RM Staff
RM Staff

Re: Transition Graph: "Error creating renderer: java.lang.NullPointerException"

Hi,

the ID is used to filter attributes in the Graph view. You can select a source filter and all transitions from that source will be shown.
The the correct way to use it is to set the role of the source attribute to ID I think.

Here is an example process which works fine for me.


<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.1.014">
  <context>
    <input/>
    <output/>
    <macros/>
  </context>
  <operator activated="true" class="process" compatibility="5.1.014" expanded="true" name="Process">
    <process expanded="true" height="386" width="949">
      <operator activated="true" class="generate_nominal_data" compatibility="5.1.014" expanded="true" height="60" name="Generate Nominal Data" width="90" x="56" y="161"/>
      <operator activated="true" class="rename" compatibility="5.1.014" expanded="true" height="76" name="Rename" width="90" x="179" y="165">
        <parameter key="old_name" value="att1"/>
        <parameter key="new_name" value="source"/>
        <list key="rename_additional_attributes"/>
      </operator>
      <operator activated="true" class="rename" compatibility="5.1.014" expanded="true" height="76" name="Rename (2)" width="90" x="320" y="161">
        <parameter key="old_name" value="att2"/>
        <parameter key="new_name" value="target"/>
        <list key="rename_additional_attributes"/>
      </operator>
      <operator activated="true" class="select_attributes" compatibility="5.1.014" expanded="true" height="76" name="Select Attributes" width="90" x="447" y="165">
        <parameter key="attribute_filter_type" value="subset"/>
        <parameter key="attributes" value="|target|source"/>
        <parameter key="include_special_attributes" value="true"/>
      </operator>
      <operator activated="true" class="set_role" compatibility="5.1.014" expanded="true" height="76" name="Set Role" width="90" x="581" y="300">
        <parameter key="name" value="source"/>
        <parameter key="target_role" value="id"/>
        <list key="set_additional_roles"/>
      </operator>
      <operator activated="true" class="generate_attributes" compatibility="5.1.014" expanded="true" height="76" name="Generate Attributes" width="90" x="648" y="165">
        <list key="function_descriptions">
          <parameter key="strength" value="rand()*5"/>
        </list>
      </operator>
      <operator activated="true" class="transition_graph" compatibility="5.1.014" expanded="true" height="76" name="Transition Graph" width="90" x="782" y="120">
        <parameter key="source_attribute" value="source"/>
        <parameter key="target_attribute" value="target"/>
        <parameter key="strength_attribute" value="strength"/>
      </operator>
      <connect from_op="Generate Nominal Data" from_port="output" to_op="Rename" to_port="example set input"/>
      <connect from_op="Rename" from_port="example set output" to_op="Rename (2)" to_port="example set input"/>
      <connect from_op="Rename (2)" from_port="example set output" to_op="Select Attributes" to_port="example set input"/>
      <connect from_op="Select Attributes" from_port="example set output" to_op="Set Role" to_port="example set input"/>
      <connect from_op="Set Role" from_port="example set output" to_op="Generate Attributes" to_port="example set input"/>
      <connect from_op="Generate Attributes" from_port="example set output" to_op="Transition Graph" to_port="example set"/>
      <connect from_op="Transition Graph" from_port="example set" to_port="result 1"/>
      <connect from_op="Transition Graph" from_port="transition graph" to_port="result 2"/>
      <portSpacing port="source_input 1" spacing="0"/>
      <portSpacing port="sink_result 1" spacing="0"/>
      <portSpacing port="sink_result 2" spacing="0"/>
      <portSpacing port="sink_result 3" spacing="0"/>
    </process>
  </operator>
</process>


Regards,
Nils
Highlighted
Contributor II chrismxnr
Contributor II

Re: Transition Graph: "Error creating renderer: java.lang.NullPointerException"

Ok I see. I just want to propose to change this behaviour, that the attribute which is already configured as "source attribute" is used in the "Source Filter" insted of using the id-attribute, which is confusing in my opinion.

Anyway, my main problem is fixed now and I thank you very much for your fast reaction Smiley Happy.

Best regards,
Christian