Options

X-validation process failed

sgmeiresgmeire Member Posts: 9 Contributor II
edited November 2019 in Help
Hi,
I'm executing a x-validation process but it fails and this is the log:

May 14, 2010 4:57:05 PM INFO: Loading initial data.
May 14, 2010 4:57:19 PM WARNING: Binary2MultiClass: The value types between training and application differ for attribute 'sex', training: numeric, application: nominal
May 14, 2010 4:57:19 PM WARNING: Binary2MultiClass: The value types between training and application differ for attribute 'lenght', training: numeric, application: nominal
May 14, 2010 4:57:19 PM WARNING: Binary2MultiClass: The value types between training and application differ for attribute 'diameter', training: numeric, application: nominal
May 14, 2010 4:57:19 PM WARNING: Binary2MultiClass: The value types between training and application differ for attribute 'height', training: numeric, application: nominal
May 14, 2010 4:57:19 PM WARNING: Binary2MultiClass: The value types between training and application differ for attribute 'whole weight', training: numeric, application: nominal
May 14, 2010 4:57:19 PM WARNING: Binary2MultiClass: The value types between training and application differ for attribute 'shucked weight', training: numeric, application: nominal
May 14, 2010 4:57:19 PM WARNING: Binary2MultiClass: The value types between training and application differ for attribute 'viscera weight', training: numeric, application: nominal
May 14, 2010 4:57:19 PM WARNING: Binary2MultiClass: The value types between training and application differ for attribute 'shell weight', training: numeric, application: nominal
May 14, 2010 4:57:19 PM SEVERE: Process failed: operator cannot be executed (Cannot clone com.rapidminer.example.set.RemappedExampleSet: java.lang.reflect.InvocationTargetException. Target: java.lang.RuntimeException: Cannot clone com.rapidminer.example.set.NonSpecialAttributesExampleSet: java.lang.reflect.InvocationTargetException. Target: java.lang.RuntimeException: Cannot clone com.rapidminer.example.set.SplittedExampleSet: java.lang.reflect.InvocationTargetException. Target: java.lang.RuntimeException: Cannot clone com.rapidminer.example.set.NonSpecialAttributesExampleSet: java.lang.reflect.InvocationTargetException. Target: java.lang.RuntimeException: Cannot clone com.rapidminer.example.set.RemappedExampleSet: java.lang.reflect.InvocationTargetException. Target: java.lang.UnsupportedOperationException: The method getNominalMapping() is not supported by numerical attributes! You probably tried to execute an operator on a numerical data which is only able to handle nominal values. You could use one of the discretization operators before this application.. Cause: java.lang.UnsupportedOperationException: The method getNominalMapping() is not supported by numerical attributes! You probably tried to execute an operator on a numerical data which is only able to handle nominal values. You could use one of the discretization operators before this application... Cause: java.lang.RuntimeException: Cannot clone com.rapidminer.example.set.RemappedExampleSet: java.lang.reflect.InvocationTargetException. Target: java.lang.UnsupportedOperationException: The method getNominalMapping() is not supported by numerical attributes! You probably tried to execute an operator on a numerical data which is only able to handle nominal values. You could use one of the discretization operators before this application..  (this is repeated a lot of times)
May 14, 2010 4:57:19 PM SEVERE: Here:           Process[1] (Process)
          subprocess 'Main Process'
            +- Read Excel[1] (Read Excel)
            +- Nominal to Numerical[1] (Nominal to Numerical)
            +- Replace Missing Values[1] (Replace Missing Values)
            +- Numerical to Polynominal[1] (Numerical to Polynominal)
            +- Set Role[1] (Set Role)
            +- Validation[1] (X-Validation)
          subprocess 'Training'
               |  +- Polynomial by Binomial Classification[1] (Polynomial by Binomial Classification)
          subprocess 'Learning Process'
               |        +- SVM[3] (Support Vector Machine (LibSVM))
          subprocess 'Testing'
                  +- Numerical to Polynominal (2)[1] (Numerical to Polynominal)
   ==>         +- Apply Model[1] (Apply Model)
                  +- Performance (2)[0] (Performance (Classification))
The xml is:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.0">
 <context>
   <input>
     <location/>
   </input>
   <output>
     <location/>
     <location/>
   </output>
   <macros/>
 </context>
 <operator activated="true" class="process" expanded="true" name="Process">
   <process expanded="true" height="469" width="820">
     <operator activated="true" class="read_excel" expanded="true" height="60" name="Read Excel" width="90" x="45" y="30">
       <parameter key="excel_file" value="C:\Documents and Settings\sgmeire\Mis documentos\Trabajo\investigación\Floro\Ejercicios-Yale\Abalone\abalone.xls"/>
     </operator>
     <operator activated="true" class="nominal_to_numerical" expanded="true" height="94" name="Nominal to Numerical" width="90" x="45" y="165">
       <parameter key="attribute" value="rings"/>
     </operator>
     <operator activated="true" class="replace_missing_values" expanded="true" height="94" name="Replace Missing Values" width="90" x="179" y="120">
       <parameter key="default" value="zero"/>
       <list key="columns"/>
     </operator>
     <operator activated="true" class="numerical_to_polynominal" expanded="true" height="76" name="Numerical to Polynominal" width="90" x="179" y="345">
       <parameter key="attribute_filter_type" value="single"/>
       <parameter key="attribute" value="rings"/>
     </operator>
     <operator activated="true" class="set_role" expanded="true" height="76" name="Set Role" width="90" x="313" y="255">
       <parameter key="name" value="rings"/>
       <parameter key="target_role" value="label"/>
     </operator>
     <operator activated="true" class="x_validation" expanded="true" height="112" name="Validation" width="90" x="380" y="75">
       <description>A cross-validation evaluating a linear regression model.</description>
       <process expanded="true" height="550" width="165">
         <operator activated="true" class="polynomial_by_binomial_classification" expanded="true" height="76" name="Polynomial by Binomial Classification" width="90" x="45" y="30">
           <process expanded="true" height="469" width="796">
             <operator activated="true" class="support_vector_machine_libsvm" expanded="true" height="76" name="SVM" width="90" x="362" y="30">
               <parameter key="kernel_type" value="poly"/>
               <parameter key="cache_size" value="100"/>
               <list key="class_weights"/>
             </operator>
             <connect from_port="training set" to_op="SVM" to_port="training set"/>
             <connect from_op="SVM" from_port="model" to_port="model"/>
             <portSpacing port="source_training set" spacing="0"/>
             <portSpacing port="sink_model" spacing="0"/>
           </process>
         </operator>
         <connect from_port="training" to_op="Polynomial by Binomial Classification" to_port="training set"/>
         <connect from_op="Polynomial by Binomial Classification" from_port="model" to_port="model"/>
         <portSpacing port="source_training" spacing="0"/>
         <portSpacing port="sink_model" spacing="0"/>
         <portSpacing port="sink_through 1" spacing="0"/>
       </process>
       <process expanded="true" height="550" width="435">
         <operator activated="true" class="numerical_to_polynominal" expanded="true" height="76" name="Numerical to Polynominal (2)" width="90" x="45" y="120"/>
         <operator activated="true" class="apply_model" expanded="true" height="76" name="Apply Model" width="90" x="180" y="30">
           <list key="application_parameters"/>
         </operator>
         <operator activated="true" class="performance_classification" expanded="true" height="76" name="Performance (2)" width="90" x="315" y="30">
           <parameter key="main_criterion" value="accuracy"/>
           <parameter key="accuracy" value="true"/>
           <list key="class_weights"/>
         </operator>
         <connect from_port="model" to_op="Apply Model" to_port="model"/>
         <connect from_port="test set" to_op="Numerical to Polynominal (2)" to_port="example set input"/>
         <connect from_op="Numerical to Polynominal (2)" from_port="example set output" to_op="Apply Model" to_port="unlabelled data"/>
         <connect from_op="Apply Model" from_port="labelled data" to_op="Performance (2)" to_port="labelled data"/>
         <connect from_op="Performance (2)" 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"/>
       </process>
     </operator>
     <connect from_op="Read Excel" from_port="output" to_op="Nominal to Numerical" to_port="example set input"/>
     <connect from_op="Nominal to Numerical" from_port="example set output" to_op="Replace Missing Values" to_port="example set input"/>
     <connect from_op="Replace Missing Values" from_port="example set output" to_op="Numerical to Polynominal" to_port="example set input"/>
     <connect from_op="Numerical to Polynominal" 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="Validation" to_port="training"/>
     <connect from_op="Validation" 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>


Could anybody help me to solve this problem?

Thank you so much.
Silvana.
 

Answers

  • Options
    radoneradone RapidMiner Certified Expert, Member Posts: 74 Guru
    Hello Silvana,

    could you pleaase attach your AML file? You are most probably using a numerical label for your data but by the SVM in such configuration only a nominal label is supported.

    - radone
  • Options
    sgmeiresgmeire Member Posts: 9 Contributor II
    Hi,
    Of course, here it is.
    I post the xml code because i am not able to attach a file. Sorry.

    __________________________-

    <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
    - <process version="5.0">
    - <context>
    - <input>
      <location />
      </input>
    - <output>
      <location />
      <location />
      </output>
      <macros />
      </context>
    - <operator activated="true" class="process" expanded="true" name="Process">
      <parameter key="logverbosity" value="3" />
      <parameter key="random_seed" value="2001" />
      <parameter key="send_mail" value="1" />
      <parameter key="process_duration_for_mail" value="30" />
      <parameter key="encoding" value="SYSTEM" />
    - <process expanded="true" height="469" width="820">
    - <operator activated="true" class="read_excel" expanded="true" height="60" name="Read Excel" width="90" x="45" y="30">
      <parameter key="excel_file" value="C:\Documents and Settings\sgmeire\Mis documentos\Trabajo\investigación\Floro\Ejercicios-Yale\Abalone\abalone.xls" />
      <parameter key="sheet_number" value="1" />
      <parameter key="row_offset" value="0" />
      <parameter key="column_offset" value="0" />
      <parameter key="first_row_as_names" value="true" />
      </operator>
    - <operator activated="true" class="nominal_to_numerical" expanded="true" height="94" name="Nominal to Numerical" width="90" x="45" y="165">
      <parameter key="return_preprocessing_model" value="false" />
      <parameter key="create_view" value="false" />
      <parameter key="attribute_filter_type" value="all" />
      <parameter key="attribute" value="rings" />
      <parameter key="use_except_expression" value="false" />
      <parameter key="value_type" value="0" />
      <parameter key="use_value_type_exception" value="false" />
      <parameter key="except_value_type" value="4" />
      <parameter key="block_type" value="0" />
      <parameter key="use_block_type_exception" value="false" />
      <parameter key="except_block_type" value="0" />
      <parameter key="invert_selection" value="false" />
      <parameter key="include_special_attributes" value="false" />
      </operator>
    - <operator activated="true" class="replace_missing_values" expanded="true" height="94" name="Replace Missing Values" width="90" x="179" y="120">
      <parameter key="return_preprocessing_model" value="false" />
      <parameter key="create_view" value="false" />
      <parameter key="attribute_filter_type" value="0" />
      <parameter key="attribute" value="" />
      <parameter key="use_except_expression" value="false" />
      <parameter key="value_type" value="0" />
      <parameter key="use_value_type_exception" value="false" />
      <parameter key="except_value_type" value="11" />
      <parameter key="block_type" value="0" />
      <parameter key="use_block_type_exception" value="false" />
      <parameter key="except_block_type" value="8" />
      <parameter key="invert_selection" value="false" />
      <parameter key="include_special_attributes" value="false" />
      <parameter key="default" value="zero" />
      <list key="columns" />
      </operator>
    - <operator activated="true" class="numerical_to_polynominal" expanded="true" height="76" name="Numerical to Polynominal" width="90" x="179" y="345">
      <parameter key="attribute_filter_type" value="single" />
      <parameter key="attribute" value="rings" />
      <parameter key="use_except_expression" value="false" />
      <parameter key="value_type" value="0" />
      <parameter key="use_value_type_exception" value="false" />
      <parameter key="except_value_type" value="2" />
      <parameter key="block_type" value="0" />
      <parameter key="use_block_type_exception" value="false" />
      <parameter key="except_block_type" value="2" />
      <parameter key="invert_selection" value="false" />
      <parameter key="include_special_attributes" value="false" />
      </operator>
    - <operator activated="true" class="set_role" expanded="true" height="76" name="Set Role" width="90" x="313" y="255">
      <parameter key="name" value="rings" />
      <parameter key="target_role" value="label" />
      </operator>
    - <operator activated="true" class="x_validation" expanded="true" height="112" name="Validation" width="90" x="380" y="75">
      <description>A cross-validation evaluating a linear regression model.</description>
      <parameter key="create_complete_model" value="false" />
      <parameter key="average_performances_only" value="true" />
      <parameter key="leave_one_out" value="false" />
      <parameter key="number_of_validations" value="10" />
      <parameter key="sampling_type" value="2" />
      <parameter key="use_local_random_seed" value="false" />
      <parameter key="local_random_seed" value="1992" />
    - <process expanded="true" height="550" width="165">
    - <operator activated="true" class="polynomial_by_binomial_classification" expanded="true" height="76" name="Polynomial by Binomial Classification" width="90" x="45" y="30">
      <parameter key="classification_strategies" value="1 against all" />
      <parameter key="random_code_multiplicator" value="2.0" />
      <parameter key="use_local_random_seed" value="false" />
      <parameter key="local_random_seed" value="1992" />
    - <process expanded="true" height="469" width="796">
    - <operator activated="true" class="support_vector_machine_libsvm" expanded="true" height="76" name="SVM" width="90" x="362" y="30">
      <parameter key="svm_type" value="0" />
      <parameter key="kernel_type" value="poly" />
      <parameter key="degree" value="3" />
      <parameter key="gamma" value="0.0" />
      <parameter key="coef0" value="0.0" />
      <parameter key="C" value="0.0" />
      <parameter key="nu" value="0.5" />
      <parameter key="cache_size" value="100" />
      <parameter key="epsilon" value="0.0010" />
      <parameter key="p" value="0.1" />
      <list key="class_weights" />
      <parameter key="shrinking" value="true" />
      <parameter key="calculate_confidences" value="false" />
      <parameter key="confidence_for_multiclass" value="true" />
      </operator>
      <connect from_port="training set" to_op="SVM" to_port="training set" />
      <connect from_op="SVM" from_port="model" to_port="model" />
      <portSpacing port="source_training set" spacing="0" />
      <portSpacing port="sink_model" spacing="0" />
      </process>
      </operator>
      <connect from_port="training" to_op="Polynomial by Binomial Classification" to_port="training set" />
      <connect from_op="Polynomial by Binomial Classification" from_port="model" to_port="model" />
      <portSpacing port="source_training" spacing="0" />
      <portSpacing port="sink_model" spacing="0" />
      <portSpacing port="sink_through 1" spacing="0" />
      </process>
    - <process expanded="true" height="550" width="435">
    - <operator activated="true" class="numerical_to_polynominal" expanded="true" height="76" name="Numerical to Polynominal (2)" width="90" x="45" y="120">
      <parameter key="attribute_filter_type" value="0" />
      <parameter key="attribute" value="" />
      <parameter key="use_except_expression" value="false" />
      <parameter key="value_type" value="0" />
      <parameter key="use_value_type_exception" value="false" />
      <parameter key="except_value_type" value="2" />
      <parameter key="block_type" value="0" />
      <parameter key="use_block_type_exception" value="false" />
      <parameter key="except_block_type" value="2" />
      <parameter key="invert_selection" value="false" />
      <parameter key="include_special_attributes" value="false" />
      </operator>
    - <operator activated="true" class="apply_model" expanded="true" height="76" name="Apply Model" width="90" x="180" y="30">
      <list key="application_parameters" />
      <parameter key="create_view" value="false" />
      </operator>
    - <operator activated="true" class="performance_classification" expanded="true" height="76" name="Performance (2)" width="90" x="315" y="30">
      <parameter key="main_criterion" value="accuracy" />
      <parameter key="accuracy" value="true" />
      <parameter key="classification_error" value="false" />
      <parameter key="kappa" value="false" />
      <parameter key="weighted_mean_recall" value="false" />
      <parameter key="weighted_mean_precision" value="false" />
      <parameter key="spearman_rho" value="false" />
      <parameter key="kendall_tau" value="false" />
      <parameter key="absolute_error" value="false" />
      <parameter key="relative_error" value="false" />
      <parameter key="relative_error_lenient" value="false" />
      <parameter key="relative_error_strict" value="false" />
      <parameter key="normalized_absolute_error" value="false" />
      <parameter key="root_mean_squared_error" value="false" />
      <parameter key="root_relative_squared_error" value="false" />
      <parameter key="squared_error" value="false" />
      <parameter key="correlation" value="false" />
      <parameter key="squared_correlation" value="false" />
      <parameter key="cross-entropy" value="false" />
      <parameter key="margin" value="false" />
      <parameter key="soft_margin_loss" value="false" />
      <parameter key="logistic_loss" value="false" />
      <parameter key="skip_undefined_labels" value="true" />
      <parameter key="use_example_weights" value="true" />
      <list key="class_weights" />
      </operator>
      <connect from_port="model" to_op="Apply Model" to_port="model" />
      <connect from_port="test set" to_op="Numerical to Polynominal (2)" to_port="example set input" />
      <connect from_op="Numerical to Polynominal (2)" from_port="example set output" to_op="Apply Model" to_port="unlabelled data" />
      <connect from_op="Apply Model" from_port="labelled data" to_op="Performance (2)" to_port="labelled data" />
      <connect from_op="Performance (2)" 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" />
      </process>
      </operator>
      <connect from_op="Read Excel" from_port="output" to_op="Nominal to Numerical" to_port="example set input" />
      <connect from_op="Nominal to Numerical" from_port="example set output" to_op="Replace Missing Values" to_port="example set input" />
      <connect from_op="Replace Missing Values" from_port="example set output" to_op="Numerical to Polynominal" to_port="example set input" />
      <connect from_op="Numerical to Polynominal" 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="Validation" to_port="training" />
      <connect from_op="Validation" 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>

    ___________________________________



    Thank you so much.
    Silvana.
  • Options
    landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
    Hi,
    please copy the process file directly from RapidMiner's xml view. Then there aren't these nasty - characters inserted by the internet Explorer.
    Another hint: please insert your process in a code area here in this forum. You can reach it with the # sign in the buttons above.

    Greetings,
    Sebastian
  • Options
    sgmeiresgmeire Member Posts: 9 Contributor II
    Hi,
    Let's see if this time I'll do it right.

    Greetings,
    Silvana.

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.0">
      <context>
        <input>
          <location/>
        </input>
        <output>
          <location/>
          <location/>
        </output>
        <macros/>
      </context>
      <operator activated="true" class="process" expanded="true" name="Process">
        <process expanded="true" height="469" width="820">
          <operator activated="true" class="read_excel" expanded="true" height="60" name="Read Excel" width="90" x="45" y="30">
            <parameter key="excel_file" value="C:\Documents and Settings\sgmeire\Mis documentos\Trabajo\investigación\Floro\Ejercicios-Yale\Abalone\abalone.xls"/>
          </operator>
          <operator activated="true" class="nominal_to_numerical" expanded="true" height="94" name="Nominal to Numerical" width="90" x="45" y="165">
            <parameter key="attribute" value="rings"/>
          </operator>
          <operator activated="true" class="replace_missing_values" expanded="true" height="94" name="Replace Missing Values" width="90" x="179" y="120">
            <parameter key="default" value="zero"/>
            <list key="columns"/>
          </operator>
          <operator activated="true" class="numerical_to_polynominal" expanded="true" height="76" name="Numerical to Polynominal" width="90" x="179" y="345">
            <parameter key="attribute_filter_type" value="single"/>
            <parameter key="attribute" value="rings"/>
          </operator>
          <operator activated="true" class="set_role" expanded="true" height="76" name="Set Role" width="90" x="313" y="255">
            <parameter key="name" value="rings"/>
            <parameter key="target_role" value="label"/>
          </operator>
          <operator activated="true" class="x_validation" expanded="true" height="112" name="Validation" width="90" x="380" y="75">
            <description>A cross-validation evaluating a linear regression model.</description>
            <process expanded="true" height="550" width="165">
              <operator activated="true" class="polynomial_by_binomial_classification" expanded="true" height="76" name="Polynomial by Binomial Classification" width="90" x="45" y="30">
                <process expanded="true" height="469" width="796">
                  <operator activated="true" class="support_vector_machine_libsvm" expanded="true" height="76" name="SVM" width="90" x="362" y="30">
                    <parameter key="kernel_type" value="poly"/>
                    <parameter key="cache_size" value="100"/>
                    <list key="class_weights"/>
                  </operator>
                  <connect from_port="training set" to_op="SVM" to_port="training set"/>
                  <connect from_op="SVM" from_port="model" to_port="model"/>
                  <portSpacing port="source_training set" spacing="0"/>
                  <portSpacing port="sink_model" spacing="0"/>
                </process>
              </operator>
              <connect from_port="training" to_op="Polynomial by Binomial Classification" to_port="training set"/>
              <connect from_op="Polynomial by Binomial Classification" from_port="model" to_port="model"/>
              <portSpacing port="source_training" spacing="0"/>
              <portSpacing port="sink_model" spacing="0"/>
              <portSpacing port="sink_through 1" spacing="0"/>
            </process>
            <process expanded="true" height="550" width="435">
              <operator activated="true" class="numerical_to_polynominal" expanded="true" height="76" name="Numerical to Polynominal (2)" width="90" x="45" y="120"/>
              <operator activated="true" class="apply_model" expanded="true" height="76" name="Apply Model" width="90" x="180" y="30">
                <list key="application_parameters"/>
              </operator>
              <operator activated="true" class="performance_classification" expanded="true" height="76" name="Performance (2)" width="90" x="315" y="30">
                <parameter key="main_criterion" value="accuracy"/>
                <parameter key="accuracy" value="true"/>
                <list key="class_weights"/>
              </operator>
              <connect from_port="model" to_op="Apply Model" to_port="model"/>
              <connect from_port="test set" to_op="Numerical to Polynominal (2)" to_port="example set input"/>
              <connect from_op="Numerical to Polynominal (2)" from_port="example set output" to_op="Apply Model" to_port="unlabelled data"/>
              <connect from_op="Apply Model" from_port="labelled data" to_op="Performance (2)" to_port="labelled data"/>
              <connect from_op="Performance (2)" 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"/>
            </process>
          </operator>
          <connect from_op="Read Excel" from_port="output" to_op="Nominal to Numerical" to_port="example set input"/>
          <connect from_op="Nominal to Numerical" from_port="example set output" to_op="Replace Missing Values" to_port="example set input"/>
          <connect from_op="Replace Missing Values" from_port="example set output" to_op="Numerical to Polynominal" to_port="example set input"/>
          <connect from_op="Numerical to Polynominal" 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="Validation" to_port="training"/>
          <connect from_op="Validation" 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>



  • Options
    landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
    Hi Silvana,
    why have you inserted this numerical to polynomial operator? It will map all numerical attributes to polynomial values, and hence the SVM cannot be applied at all?

    Greetings,
      Sebastian
  • Options
    sgmeiresgmeire Member Posts: 9 Contributor II
    Hi Sebastian,
    I am doing an example to learn about rapid-i and classification and prediction issues. In this example we try to classify abalone, 3 classes, so we need to wrap the LibSVMLearner in a Binary2MultiClassLearner operator. Sorry, i can help you more.

    Greetings,
    Silvana.
  • Options
    landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
    Hi,
    yes I understood that you need to have the Polynomial by Binomial Classification operator. But before applying the model you again changed all attribute types. Since the model was learned on numerical attributes, it cannot handle the polynomial ones. You have to simply remove this operator like in this process:
    <?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">
        <process expanded="true" height="469" width="820">
          <operator activated="true" class="read_excel" expanded="true" height="60" name="Read Excel" width="90" x="45" y="30">
            <parameter key="excel_file" value="C:\Documents and Settings\sgmeire\Mis documentos\Trabajo\investigación\Floro\Ejercicios-Yale\Abalone\abalone.xls"/>
            <list key="annotations"/>
          </operator>
          <operator activated="true" class="nominal_to_numerical" expanded="true" height="94" name="Nominal to Numerical" width="90" x="45" y="165">
            <parameter key="attribute" value="rings"/>
          </operator>
          <operator activated="true" class="replace_missing_values" expanded="true" height="94" name="Replace Missing Values" width="90" x="179" y="120">
            <parameter key="default" value="zero"/>
            <list key="columns"/>
          </operator>
          <operator activated="true" class="numerical_to_polynominal" expanded="true" height="76" name="Numerical to Polynominal" width="90" x="179" y="345">
            <parameter key="attribute_filter_type" value="single"/>
            <parameter key="attribute" value="rings"/>
          </operator>
          <operator activated="true" class="set_role" expanded="true" height="76" name="Set Role" width="90" x="313" y="255">
            <parameter key="name" value="rings"/>
            <parameter key="target_role" value="label"/>
          </operator>
          <operator activated="true" class="x_validation" expanded="true" height="112" name="Validation" width="90" x="380" y="75">
            <description>A cross-validation evaluating a linear regression model.</description>
            <process expanded="true" height="550" width="165">
              <operator activated="true" class="polynomial_by_binomial_classification" expanded="true" height="76" name="Polynomial by Binomial Classification" width="90" x="45" y="30">
                <process expanded="true" height="469" width="796">
                  <operator activated="true" class="support_vector_machine_libsvm" expanded="true" height="76" name="SVM" width="90" x="362" y="30">
                    <parameter key="kernel_type" value="poly"/>
                    <parameter key="cache_size" value="100"/>
                    <list key="class_weights"/>
                  </operator>
                  <connect from_port="training set" to_op="SVM" to_port="training set"/>
                  <connect from_op="SVM" from_port="model" to_port="model"/>
                  <portSpacing port="source_training set" spacing="0"/>
                  <portSpacing port="sink_model" spacing="0"/>
                </process>
              </operator>
              <connect from_port="training" to_op="Polynomial by Binomial Classification" to_port="training set"/>
              <connect from_op="Polynomial by Binomial Classification" from_port="model" to_port="model"/>
              <portSpacing port="source_training" spacing="0"/>
              <portSpacing port="sink_model" spacing="0"/>
              <portSpacing port="sink_through 1" spacing="0"/>
            </process>
            <process expanded="true" height="550" width="435">
              <operator activated="true" class="apply_model" expanded="true" height="76" name="Apply Model" width="90" x="180" y="30">
                <list key="application_parameters"/>
              </operator>
              <operator activated="true" class="performance_classification" expanded="true" height="76" name="Performance (2)" width="90" x="315" y="30">
                <parameter key="main_criterion" value="accuracy"/>
                <list key="class_weights"/>
              </operator>
              <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 (2)" to_port="labelled data"/>
              <connect from_op="Performance (2)" 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"/>
            </process>
          </operator>
          <connect from_op="Read Excel" from_port="output" to_op="Nominal to Numerical" to_port="example set input"/>
          <connect from_op="Nominal to Numerical" from_port="example set output" to_op="Replace Missing Values" to_port="example set input"/>
          <connect from_op="Replace Missing Values" from_port="example set output" to_op="Numerical to Polynominal" to_port="example set input"/>
          <connect from_op="Numerical to Polynominal" 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="Validation" to_port="training"/>
          <connect from_op="Validation" 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>
    Does it work this way?


    Greetings,
      Sebastian
  • Options
    sgmeiresgmeire Member Posts: 9 Contributor II
    Hi Sebastian,
    I remove the operator but there is a problem with the performance operator, it needs that label and prediction have the same type so I have to change the label to polynominal because prediction is nominal. But theres is a problem yet when I try to execute the process, it says:
    Process failed:
    Reason: The method getNominalMapping() is not supported by numerical attributes! You probably tried to execute an operator on a numerical data which is only able to handle nominal values. You could use one of the discretization operators befores this application.
    The process now is:

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.0">
      <context>
        <input>
          <location/>
        </input>
        <output>
          <location/>
          <location/>
        </output>
        <macros/>
      </context>
      <operator activated="true" class="process" expanded="true" name="Process">
        <process expanded="true" height="469" width="820">
          <operator activated="true" class="read_excel" expanded="true" height="60" name="Read Excel" width="90" x="45" y="30">
            <parameter key="excel_file" value="C:\Documents and Settings\sgmeire\Mis documentos\Trabajo\investigación\Floro\Ejercicios-Yale\Abalone\abalone.xls"/>
          </operator>
          <operator activated="true" class="nominal_to_numerical" expanded="true" height="94" name="Nominal to Numerical" width="90" x="45" y="165">
            <parameter key="attribute" value="rings"/>
          </operator>
          <operator activated="true" class="replace_missing_values" expanded="true" height="94" name="Replace Missing Values" width="90" x="179" y="120">
            <parameter key="default" value="zero"/>
            <list key="columns"/>
          </operator>
          <operator activated="true" class="set_role" expanded="true" height="76" name="Set Role" width="90" x="313" y="255">
            <parameter key="name" value="rings"/>
            <parameter key="target_role" value="label"/>
          </operator>
          <operator activated="true" class="x_validation" expanded="true" height="112" name="Validation" width="90" x="380" y="75">
            <description>A cross-validation evaluating a linear regression model.</description>
            <process expanded="true" height="550" width="413">
              <operator activated="true" class="polynomial_by_binomial_classification" expanded="true" height="76" name="Polynomial by Binomial Classification" width="90" x="45" y="30">
                <process expanded="true" height="469" width="796">
                  <operator activated="true" class="support_vector_machine_libsvm" expanded="true" height="76" name="SVM" width="90" x="362" y="30">
                    <parameter key="svm_type" value="nu-SVR"/>
                    <parameter key="kernel_type" value="poly"/>
                    <parameter key="cache_size" value="100"/>
                    <list key="class_weights"/>
                  </operator>
                  <connect from_port="training set" to_op="SVM" to_port="training set"/>
                  <connect from_op="SVM" from_port="model" to_port="model"/>
                  <portSpacing port="source_training set" spacing="0"/>
                  <portSpacing port="sink_model" spacing="0"/>
                </process>
              </operator>
              <connect from_port="training" to_op="Polynomial by Binomial Classification" to_port="training set"/>
              <connect from_op="Polynomial by Binomial Classification" from_port="model" to_port="model"/>
              <portSpacing port="source_training" spacing="0"/>
              <portSpacing port="sink_model" spacing="0"/>
              <portSpacing port="sink_through 1" spacing="0"/>
            </process>
            <process expanded="true" height="550" width="435">
              <operator activated="true" class="apply_model" expanded="true" height="76" name="Apply Model" width="90" x="112" y="30">
                <list key="application_parameters"/>
              </operator>
              <operator activated="true" class="numerical_to_polynominal" expanded="true" height="76" name="Numerical to Polynominal" width="90" x="179" y="165">
                <parameter key="attribute_filter_type" value="single"/>
                <parameter key="attribute" value="rings"/>
                <parameter key="include_special_attributes" value="true"/>
              </operator>
              <operator activated="true" class="performance_classification" expanded="true" height="76" name="Performance (2)" width="90" x="315" y="30">
                <parameter key="main_criterion" value="accuracy"/>
                <list key="class_weights"/>
              </operator>
              <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="Numerical to Polynominal" to_port="example set input"/>
              <connect from_op="Numerical to Polynominal" from_port="example set output" to_op="Performance (2)" to_port="labelled data"/>
              <connect from_op="Performance (2)" 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"/>
            </process>
          </operator>
          <connect from_op="Read Excel" from_port="output" to_op="Nominal to Numerical" to_port="example set input"/>
          <connect from_op="Nominal to Numerical" from_port="example set output" to_op="Replace Missing Values" to_port="example set input"/>
          <connect from_op="Replace Missing Values" 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="Validation" to_port="training"/>
          <connect from_op="Validation" 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>
    Greetings,
    Silvana.
  • Options
    landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
    Hi,
    of course I cannot execute your process, because I don't have the excel file it is referring to, but I guess my process would just run fine.
    Each polynominal and binominal attribute is also of the more generic type nominal, which is some sort of super type, or parent of both in the hierarchy of types.

    Could you please send me the error it gives, if you execute my process I posted above?

    Greetings,
      Sebastian
  • Options
    sgmeiresgmeire Member Posts: 9 Contributor II
    Hi,I execute your code and this is the error:

    May 25, 2010 10:31:18 AM CONFIG: Loading perspectives.
    May 25, 2010 10:31:19 AM CONFIG: Ignoring update check. Last update check was on Mon May 24 10:47:29 CEST 2010
    May 25, 2010 10:31:54 AM INFO: Process file version is 50
    May 25, 2010 10:32:32 AM INFO: No filename given for result file, using stdout for logging results!
    May 25, 2010 10:32:32 AM INFO: Process starts
    May 25, 2010 10:32:32 AM INFO: Loading initial data.
    May 25, 2010 10:32:46 AM SEVERE: Process failed: operator cannot be executed (Cannot clone com.rapidminer.example.set.RemappedExampleSet: java.lang.reflect.InvocationTargetException. Target: java.lang.RuntimeException: Cannot clone com.rapidminer.example.set.SplittedExampleSet: java.lang.reflect.InvocationTargetException. Target: java.lang.RuntimeException: Cannot clone com.rapidminer.example.set.NonSpecialAttributesExampleSet: java.lang.reflect.InvocationTargetException. Target: java.lang.RuntimeException: Cannot clone com.rapidminer.example.set.RemappedExampleSet: java.lang.reflect.InvocationTargetException. Target: java.lang.UnsupportedOperationException: The method getNominalMapping() is not supported by numerical attributes! You probably tried to execute an operator on a numerical data which is only able to handle nominal values. You could use one of the discretization operators before this application.. Cause: java.lang.UnsupportedOperationException: The method getNominalMapping() is not supported by numerical attributes! You probably tried to execute an operator on a numerical data which is only able to handle nominal values. You could use one of the discretization operators before this application... Cause: java.lang.RuntimeException: Cannot clone com.rapidminer.example.set.RemappedExampleSet: java.lang.reflect.InvocationTargetException. Target: java.lang.UnsupportedOperationException: The method getNominalMapping() is not supported by numerical attributes! You probably tried to execute an operator on a numerical data which is only able to handle nominal values. You could use one of the discretization operators before this application.. Cause: java.lang.UnsupportedOperationException: The method getNominalMapping() is not supported by numerical attributes! You probably tried to execute an operator on a numerical data which is only able to handle nominal values. You could use one of the discretization operators before this application.... Cause: java.lang.RuntimeException: Cannot clone com.rapidminer.example.set.NonSpecialAttributesExampleSet: java.lang.reflect.InvocationTargetException. Target: java.lang.RuntimeException: Cannot clone com.rapidminer.example.set.RemappedExampleSet: java.lang.reflect.InvocationTargetException. Target: java.lang.UnsupportedOperationException: The method getNominalMapping() is not supported by numerical attributes! You probably tried to execute an operator on a numerical data which is only able to handle nominal values. You could use one of the discretization operators before this application.. Cause: java.lang.UnsupportedOperationException: The method getNominalMapping() is not supported by numerical attributes! You probably tried to execute an operator on a numerical data which is only able to handle nominal values. You could use one of the discretization operators before this application... Cause: java.lang.RuntimeException: Cannot clone com.rapidminer.example.set.RemappedExampleSet: java.lang.reflect.InvocationTargetException. Target: java.lang.UnsupportedOperationException: The method getNominalMapping() is not supported by numerical attributes! You probably tried to execute an operator on a numerical data which is only able to handle nominal values. You could use one of the discretization operators before this application.. Cause: java.lang.UnsupportedOperationException: The method getNominalMapping() is not supported by numerical attributes! You probably tried to execute an operator on a numerical data which is only able to handle nominal values. You could use one of the discretization operators before this application..... Cause: java.lang.RuntimeException: Cannot clone com.rapidminer.example.set.SplittedExampleSet: java.lang.reflect.InvocationTargetException. Target: java.lang.RuntimeException: Cannot clone com.rapidminer.example.set.NonSpecialAttributesExampleSet: java.lang.reflect.InvocationTargetException. Target: java.lang.RuntimeException: Cannot clone com.rapidminer.example.set.RemappedExampleSet: java.lang.reflect.InvocationTargetException. Target: java.lang.UnsupportedOperationException: The method getNominalMapping() is not supported by numerical attributes! You probably tried to execute an operator on a numerical data which is only able to handle nominal values. You could use one of the discretization operators before this application.. Cause: java.lang.UnsupportedOperationException: The method getNominalMapping() is not supported by numerical attributes! You probably tried to execute an operator on a numerical data which is only able to handle nominal values. You could use one of the discretization operators before this application... Cause: java.lang.RuntimeException: Cannot clone com.rapidminer.example.set.RemappedExampleSet: java.lang.reflect.InvocationTargetException. Target: java.lang.UnsupportedOperationException: The method getNominalMapping() is not supported by numerical attributes! You probably tried to execute an operator on a numerical data which is only able to handle nominal values. You could use one of the discretization operators before this application.. Cause: java.lang.UnsupportedOperationException: The method getNominalMapping() is not supported by numerical attributes! You probably tried to execute an operator on a numerical data which is only able to handle nominal values. You could use one of the discretization operators before this application.... Cause: java.lang.RuntimeException: Cannot clone com.rapidminer.example.set.NonSpecialAttributesExampleSet: java.lang.reflect.InvocationTargetException. Target: java.lang.RuntimeException: Cannot clone com.rapidminer.example.set.RemappedExampleSet: java.lang.reflect.InvocationTargetException. Target: java.lang.UnsupportedOperationException: The method getNominalMapping() is not supported by numerical attributes! You probably tried to execute an operator on a numerical data which is only able to handle nominal values. You could use one of the discretization operators before this application.. Cause: java.lang.UnsupportedOperationException: The method getNominalMapping() is not supported by numerical attributes! You probably tried to execute an operator on a numerical data which is only able to handle nominal values. You could use one of the discretization operators before this application... Cause: java.lang.RuntimeException: Cannot clone com.rapidminer.example.set.RemappedExampleSet: java.lang.reflect.InvocationTargetException. Target: java.lang.UnsupportedOperationException: The method getNominalMapping() is not supported by numerical attributes! You probably tried to execute an operator on a numerical data which is only able to handle nominal values. You could use one of the discretization operators before this application.. Cause: java.lang.UnsupportedOperationException: The method getNominalMapping() is not supported by numerical attributes! You probably tried to execute an operator on a numerical data which is only able to handle nominal values. You could use one of the discretization operators before this application.....). Check the log messages...
    May 25, 2010 10:32:46 AM SEVERE: Here:          Process[1] (Process)

              subprocess 'Main Process'

                +- Read Excel[1] (Read Excel)

                +- Nominal to Numerical[1] (Nominal to Numerical)

                +- Replace Missing Values[1] (Replace Missing Values)

                +- Numerical to Polynominal[1] (Numerical to Polynominal)

                +- Set Role[1] (Set Role)

                +- Validation[1] (X-Validation)

              subprocess 'Training'

                    |  +- Polynomial by Binomial Classification[1] (Polynomial by Binomial Classification)

              subprocess 'Learning Process'

                    |        +- SVM[3] (Support Vector Machine (LibSVM))

              subprocess 'Testing'

          ==>        +- Apply Model[1] (Apply Model)

                      +- Performance (2)[0] (Performance (Classification))

    Is there any way to send you the excel file?

    Greetings,
    Silvana.
  • Options
    landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
    Hi,
    just send me an email to my mail address at rapid-i.com. It's equal to my last name.

    Greetings,
      Sebastian
  • Options
    landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
    Hi,
    I traced down your problem and it consisted of two components: On the one hand the polynomial by binomial classification operator declares the wrong capabilities, this will be corrected with the next update.
    But although the error message might be missleading, it would work with the following process, that correctly defines and transformes types (it spares the label when transforrming to numeric):
    <?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">
        <process expanded="true" height="469" width="820">
          <operator activated="true" class="read_excel" expanded="true" height="60" name="Read Excel" width="90" x="45" y="30">
            <parameter key="excel_file" value="C:\Dokumente und Einstellungen\sland\Desktop\abalone.xls"/>
            <list key="annotations"/>
          </operator>
          <operator activated="true" class="set_role" expanded="true" height="76" name="Set Role" width="90" x="45" y="120">
            <parameter key="name" value="rings"/>
            <parameter key="target_role" value="label"/>
          </operator>
          <operator activated="true" class="nominal_to_numerical" expanded="true" height="94" name="Nominal to Numerical" width="90" x="45" y="255">
            <parameter key="attribute" value="rings"/>
          </operator>
          <operator activated="true" class="replace_missing_values" expanded="true" height="94" name="Replace Missing Values" width="90" x="313" y="255">
            <parameter key="default" value="zero"/>
            <list key="columns"/>
          </operator>
          <operator activated="true" class="x_validation" expanded="true" height="112" name="Validation" width="90" x="514" y="255">
            <description>A cross-validation evaluating a linear regression model.</description>
            <process expanded="true" height="550" width="413">
              <operator activated="true" class="polynomial_by_binomial_classification" expanded="true" height="76" name="Polynomial by Binomial Classification" width="90" x="45" y="30">
                <process expanded="true" height="469" width="796">
                  <operator activated="true" class="support_vector_machine_libsvm" expanded="true" height="76" name="SVM" width="90" x="362" y="30">
                    <parameter key="kernel_type" value="poly"/>
                    <parameter key="cache_size" value="100"/>
                    <list key="class_weights"/>
                  </operator>
                  <connect from_port="training set" to_op="SVM" to_port="training set"/>
                  <connect from_op="SVM" from_port="model" to_port="model"/>
                  <portSpacing port="source_training set" spacing="0"/>
                  <portSpacing port="sink_model" spacing="0"/>
                </process>
              </operator>
              <connect from_port="training" to_op="Polynomial by Binomial Classification" to_port="training set"/>
              <connect from_op="Polynomial by Binomial Classification" from_port="model" to_port="model"/>
              <portSpacing port="source_training" spacing="0"/>
              <portSpacing port="sink_model" spacing="0"/>
              <portSpacing port="sink_through 1" spacing="0"/>
            </process>
            <process expanded="true" height="550" width="435">
              <operator activated="true" class="apply_model" expanded="true" height="76" name="Apply Model" width="90" x="112" y="30">
                <list key="application_parameters"/>
              </operator>
              <operator activated="true" class="performance_classification" expanded="true" height="76" name="Performance (2)" width="90" x="315" y="30">
                <parameter key="main_criterion" value="accuracy"/>
                <list key="class_weights"/>
              </operator>
              <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 (2)" to_port="labelled data"/>
              <connect from_op="Performance (2)" 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"/>
            </process>
          </operator>
          <connect from_op="Read Excel" from_port="output" to_op="Set Role" to_port="example set input"/>
          <connect from_op="Set Role" from_port="example set output" to_op="Nominal to Numerical" to_port="example set input"/>
          <connect from_op="Nominal to Numerical" from_port="example set output" to_op="Replace Missing Values" to_port="example set input"/>
          <connect from_op="Replace Missing Values" from_port="example set output" to_op="Validation" to_port="training"/>
          <connect from_op="Validation" 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>
    By the way: Usually transforming nominal values to binominal ones before representing by numbers increases the performance.

    Greetings,
      Sebastian
Sign In or Register to comment.