Options

Is there a way to remove Attribute from ExampleSet?

GhostriderGhostrider Member Posts: 60 Contributor II
edited November 2018 in Help
I have an ExampleSet which contains an attribute that is not needed for a learning algorithm that I want to run...I included the attribute to be used by another, un-related process I am also working on.  So I would basically like an operator that can delete an attribute by name.  Or is it possible to assign the attribute as a attribute to be ignored?  I'm willing to develop and commit this operator to the SVN if others think it would be useful to have...and if someone can grant me SVN write access.
Tagged:

Answers

  • Options
    haddockhaddock Member Posts: 849 Maven
    Hi there,

    You can set the attribute role to 'ignore', like this..
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.0">
      <context>
        <input/>
        <output/>
        <macros/>
      </context>
      <operator activated="true" class="process" compatibility="5.0.8" expanded="true" name="Process">
        <process expanded="true" height="161" width="614">
          <operator activated="true" class="generate_data" compatibility="5.0.8" expanded="true" height="60" name="Generate Data" width="90" x="165" y="72"/>
          <operator activated="true" class="set_role" compatibility="5.0.8" expanded="true" height="76" name="Set Role" width="90" x="339" y="69">
            <parameter key="name" value="att1"/>
            <parameter key="target_role" value="ignore"/>
          </operator>
          <operator activated="true" class="support_vector_machine_libsvm" compatibility="5.0.8" expanded="true" height="76" name="SVM" width="90" x="514" y="75">
            <parameter key="svm_type" value="epsilon-SVR"/>
            <list key="class_weights"/>
          </operator>
          <connect from_op="Generate Data" from_port="output" to_op="Set Role" to_port="example set input"/>
          <connect from_op="Set Role" from_port="example set output" to_op="SVM" to_port="training set"/>
          <connect from_op="SVM" 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
    GhostriderGhostrider Member Posts: 60 Contributor II
    Very nice, thanks haddock.
Sign In or Register to comment.