Options

"'Weights Table' to AttributeWeights"

ShubhaShubha Member Posts: 139 Maven
edited May 2019 in Help
Hi,

Can I convert the "Weights Table" output of an SVM model into an object of type "AttribteWeights" or even an "ExampleSet", so that later I can apply these weights on my data?

My second question is: Can i somehow store the Bias (Offset) in a macro variable (or an examplset), so that it can be used in further calculations?

Below I produce an example:

<operator name="Root" class="Process" expanded="yes">
    <operator name="ExampleSetGenerator" class="ExampleSetGenerator">
        <parameter key="target_function" value="sum classification"/>
        <parameter key="number_of_attributes" value="6"/>
    </operator>
    <operator name="HyperHyper" class="HyperHyper">
        <parameter key="keep_example_set" value="true"/>
    </operator>
</operator>


I hope the above questions are fine and sensible... Tried hard to solve this, but at last ended up as a question in the Forum. Thanks for your help...

Tagged:

Answers

  • Options
    haddockhaddock Member Posts: 849 Maven
    Can I convert the "Weights Table" output of an SVM model into an object of type "AttribteWeights" or even an "ExampleSet", so that later I can apply these weights on my data?
    Yes, but not by using HyperHyper. This works.
    <operator name="Root" class="Process" expanded="yes">
        <operator name="ExampleSetGenerator" class="ExampleSetGenerator">
            <parameter key="target_function" value="sum classification"/>
            <parameter key="number_of_attributes" value="6"/>
        </operator>
        <operator name="SVMWeighting" class="SVMWeighting">
        </operator>
    </operator>
    My second question is: Can i somehow store the Bias (Offset) in a macro variable (or an examplset), so that it can be used in further calculations?
    Yes, by rewriting the HyperHyper operator. But before you rush off to do so, have you even the remotest idea of what this number represents, or of anything else?

  • Options
    ShubhaShubha Member Posts: 139 Maven
    Thanks,

    Had tried with SVM Weightings... but it gives the weights rather than any model. I basically wanted to extract the weights generated from a model. And ofcourse, the weights are different from the applied models and the SVM weightings. Is there a method to extract these weigts even in text-view? Does 'ParameterSet' or 'ProcessLog' operator be useful in this regard?

    Does Rewriting the HyperHyper mean, whether the options in the operator need to be changed or the built-in code could be modified to our requirements by writing the extension plugins?

    I am a bit cautious to again ask these questions...

    And yes, the bias represents the intercept term of the separating hyperplane in the kernel (linear, radial etc) space... In other words, if g(.) is the hyperplane, g(0) will yield the bias.
  • Options
    haddockhaddock Member Posts: 849 Maven
    Okidokey, I see what you want to do, I just cannot see why you would want to do it. Here's my reasoning....

    HyperHyper, according to the operator info, takes two inputs, one positive and one negative example; moreover SVMs need normalised input. So we get....
    <operator name="Root" class="Process" expanded="yes">
        <operator name="ExampleSetGenerator" class="ExampleSetGenerator">
            <parameter key="target_function" value="sum classification"/>
            <parameter key="number_examples" value="2"/>
            <parameter key="number_of_attributes" value="60"/>
        </operator>
        <operator name="Normalization" class="Normalization">
        </operator>
        <operator name="HyperHyper" class="HyperHyper">
            <parameter key="keep_example_set" value="true"/>
        </operator>
    </operator>
    My guess is that under these conditions Bias will always be zero!


Sign In or Register to comment.