Options

Exporting Tree Image

DancingSheepDancingSheep Member Posts: 9 Contributor II
edited November 2018 in Help
Hello,

I have a process that in the end results in a big decision tree. I'd like to export this picture to be printed on an A4 paper, but the "Save Image" function of RapidMiner just prints whatever part of the tree is visualized at the moment and not the whole.

How do I save the full picture at a nice resolution?

Best Answer

  • Options
    Marco_BoeckMarco_Boeck Administrator, Moderator, Employee, Member, University Professor Posts: 1,993 RM Engineering
    Solution Accepted
    Hi,

    you can do that with the reporting extension. Just play around with the settings until you're satisfied.
    I created an example process:

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.1.008">
      <context>
        <input/>
        <output/>
        <macros/>
      </context>
      <operator activated="true" class="process" compatibility="5.1.008" expanded="true" name="Root">
        <process expanded="true" height="584" width="815">
          <operator activated="true" class="retrieve" compatibility="5.1.008" expanded="true" height="60" name="Retrieve" width="90" x="45" y="30">
            <parameter key="repository_entry" value="//Samples/data/Golf"/>
          </operator>
          <operator activated="true" class="decision_tree" compatibility="5.1.008" expanded="true" height="76" name="DecisionTree" width="90" x="179" y="30"/>
          <operator activated="true" class="reporting:generate_report" compatibility="5.0.002" expanded="true" height="76" name="Generate Report" width="90" x="313" y="30">
            <parameter key="report_name" value="Hello Report!"/>
            <parameter key="format" value="HTML"/>
            <parameter key="repository_entry" value="//LocalRepository/t"/>
            <parameter key="html_output_directory" value="C:\Users\username\Desktop"/>
            <parameter key="pdf_output_file" value="C:\Users\username\Desktop\report.pdf"/>
            <parameter key="pdf_template_file" value="no file selected"/>
            <parameter key="image_template_file" value="no file selected"/>
            <parameter key="section_one_font" value="courier"/>
            <parameter key="section_two_font" value="courier"/>
            <parameter key="section_three_font" value="courier"/>
            <parameter key="section_four_font" value="courier"/>
            <parameter key="section_five_font" value="courier"/>
            <parameter key="text_content_font" value="courier"/>
          </operator>
          <operator activated="true" class="reporting:report" compatibility="5.0.002" expanded="true" height="60" name="Report" width="90" x="447" y="30">
            <parameter key="report_name" value="Hello Report!"/>
            <parameter key="report_item_header" value="Decision Tree Image"/>
            <parameter key="specified" value="true"/>
            <parameter key="reportable_type" value="Decision Tree"/>
            <parameter key="renderer_name" value="Graph View"/>
            <list key="parameters">
              <parameter key="layout" value="Tree"/>
              <parameter key="show_node_labels" value="true"/>
              <parameter key="show_edge_labels" value="true"/>
            </list>
          </operator>
          <connect from_op="Retrieve" from_port="output" to_op="DecisionTree" to_port="training set"/>
          <connect from_op="DecisionTree" from_port="model" 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>
    Regards,
    Marco

Answers

  • Options
    DancingSheepDancingSheep Member Posts: 9 Contributor II
    This works! Thanks!
  • Options
    blueearthblueearth Member Posts: 42 Contributor II
    how can i change the name of written image? .... i see no option in generating report operator for defining a name
  • Options
    exnerdlexnerdl Member Posts: 1 Contributor I
    Hi my name is Daniel and I am new here.

    For my master theesis I work with Rapidminer and I am pretty happy with it.

    But there is one question left. Is it possible to change the background color of an exported disicion tree?

    Every change endet in no result. I always get the tree image whith a white background.

    It would be nice if you can give me a short answer.

    Thank you very much.

  • Options
    Marco_BoeckMarco_Boeck Administrator, Moderator, Employee, Member, University Professor Posts: 1,993 RM Engineering
    Hi,

    no that is not possible. However I'm sure that almost every graphics software available is capable of doing so ;)

    Regards,
    Marco
  • Options
    dssaggu1991dssaggu1991 Member Posts: 1 Contributor I

    Hi,

     

    Could you plaese help me to export the full image of decision tree. I have installed the reporting extension. But then how does it help to export the full image of Decision tree ?

  • Options
    ophelie_vdpophelie_vdp Member Posts: 5 Newbie
    Hello! I still get a truncated image with the extension. How can I change that?
    Thanks
Sign In or Register to comment.