Error on Apply Model

amenaakhterchyamenaakhterchy Member Posts: 7 Contributor I
edited November 2018 in Help

Hello everyone .

svm do not support polynominal .that's why i used "nominal to numerical " . but problem is when i am using apply model for testing the model . it showing error "attributes do not match" its only happening when i am using svm ..why it is showing ? how can i solve this ? can anyone please help me ?

Thank You



  • Options
    MartinLiebigMartinLiebig Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,517 RM Data Scientist


    Nominal to Numerical is giving you a red preprocessing model. This can be used with an apply model to do the same transformation on the test set.


    So you need to chain 2 Apply Model Operators. One with the preprocessing model, one with the SVM Model.



    - Sr. Director Data Solutions, Altair RapidMiner -
    Dortmund, Germany
  • Options
    JEdwardJEdward RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 578 Unicorn

    Exactly as @mschmitz says above.  


    Here's a sample process demonstrating how you'd use the preprocessing model. 


    <?xml version="1.0" encoding="UTF-8"?><process version="7.3.000">
    <operator activated="true" class="process" compatibility="7.3.000" expanded="true" name="Process">
    <process expanded="true">
    <operator activated="true" class="retrieve" compatibility="7.3.000" expanded="true" height="68" name="Retrieve Titanic Training" width="90" x="246" y="34">
    <parameter key="repository_entry" value="//Samples/data/Titanic Training"/>
    <operator activated="true" class="split_validation" compatibility="7.3.000" expanded="true" height="124" name="Validation with preprocessing model" width="90" x="447" y="34">
    <process expanded="true">
    <operator activated="true" class="nominal_to_numerical" compatibility="7.3.000" expanded="true" height="103" name="Nominal to Numerical" width="90" x="45" y="34">
    <list key="comparison_groups"/>
    <operator activated="true" class="support_vector_machine" compatibility="7.3.000" expanded="true" height="124" name="SVM" width="90" x="179" y="136"/>
    <operator activated="true" class="group_models" compatibility="7.3.000" expanded="true" height="103" name="Group Models" width="90" x="313" y="34">
    <description align="center" color="transparent" colored="false" width="126">Use Group Models to include the preprocessing model with your SVM.</description>
    <connect from_port="training" to_op="Nominal to Numerical" to_port="example set input"/>
    <connect from_op="Nominal to Numerical" from_port="example set output" to_op="SVM" to_port="training set"/>
    <connect from_op="Nominal to Numerical" from_port="preprocessing model" to_op="Group Models" to_port="models in 1"/>
    <connect from_op="SVM" from_port="model" to_op="Group Models" to_port="models in 2"/>
    <connect from_op="Group Models" from_port="model out" to_port="model"/>
    <portSpacing port="source_training" spacing="0"/>
    <portSpacing port="sink_model" spacing="0"/>
    <portSpacing port="sink_through 1" spacing="0"/>
    <process expanded="true">
    <operator activated="true" class="apply_model" compatibility="7.3.000" expanded="true" height="82" name="Apply Model" width="90" x="45" y="34">
    <list key="application_parameters"/>
    <operator activated="true" class="performance" compatibility="7.3.000" expanded="true" height="82" name="Performance" width="90" x="246" y="85"/>
    <connect from_port="model" to_op="Apply Model" to_port="model"/>
    <connect from_port="test set" to_op="Apply Model" to_port="unlabelled data"/>
    <connect from_op="Apply Model" from_port="labelled data" to_op="Performance" to_port="labelled data"/>
    <connect from_op="Performance" from_port="performance" to_port="averagable 1"/>
    <portSpacing port="source_model" spacing="0"/>
    <portSpacing port="source_test set" spacing="0"/>
    <portSpacing port="source_through 1" spacing="0"/>
    <portSpacing port="sink_averagable 1" spacing="0"/>
    <portSpacing port="sink_averagable 2" spacing="0"/>
    <connect from_op="Retrieve Titanic Training" from_port="output" to_op="Validation with preprocessing model" to_port="training"/>
    <connect from_op="Validation with preprocessing model" from_port="model" to_port="result 1"/>
    <connect from_op="Validation with preprocessing model" from_port="averagable 1" 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"/>
Sign In or Register to comment.