The Altair Community is migrating to a new platform to provide a better experience for you. The RapidMiner Community will merge with the Altair Community at the same time. In preparation for the migration, both communities are on read-only mode from July 15th - July 24th, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here.

[Solved] Extract discretization model

aryan_hosseinzaaryan_hosseinza Member Posts: 74 Contributor II
Hi ,

I'd to know if it is possible to extract discretization model (intervals) out of discretization operator ?

What I'd like to do is to find appropriate intervals on dataset A and apply it on dataset B in chi-square or entropy-based discretization methods,



  • Options
    awchisholmawchisholm RapidMiner Certified Expert, Member Posts: 458 Unicorn

    The Discretize operator produces a model that you can apply to other data using the Apply Model operator.

    Here's an example.
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.3.005">
      <operator activated="true" class="process" compatibility="5.3.005" expanded="true" name="Process">
        <process expanded="true">
          <operator activated="true" class="generate_data" compatibility="5.3.005" expanded="true" height="60" name="Generate Data" width="90" x="45" y="75">
            <parameter key="attributes_lower_bound" value="3.0"/>
            <parameter key="attributes_upper_bound" value="7.0"/>
          <operator activated="true" class="discretize_by_bins" compatibility="5.3.005" expanded="true" height="94" name="Discretize" width="90" x="246" y="75">
            <parameter key="number_of_bins" value="3"/>
          <operator activated="true" class="generate_data" compatibility="5.3.005" expanded="true" height="60" name="Generate Data (2)" width="90" x="45" y="300">
            <parameter key="attributes_lower_bound" value="0.0"/>
          <operator activated="true" class="apply_model" compatibility="5.3.005" expanded="true" height="76" name="Apply Model" width="90" x="313" y="300">
            <list key="application_parameters"/>
          <connect from_op="Generate Data" from_port="output" to_op="Discretize" to_port="example set input"/>
          <connect from_op="Discretize" from_port="example set output" to_port="result 1"/>
          <connect from_op="Discretize" from_port="preprocessing model" to_op="Apply Model" to_port="model"/>
          <connect from_op="Generate Data (2)" from_port="output" to_op="Apply Model" to_port="unlabelled data"/>
          <connect from_op="Apply Model" from_port="labelled data" 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"/>
    I hope that's what you meant.


  • Options
    aryan_hosseinzaaryan_hosseinza Member Posts: 74 Contributor II
    Thanks a lot ,
Sign In or Register to comment.