"'Weights Table' to AttributeWeights"
Shubha
New Altair Community Member
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...
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...
0
Answers
-
Yes, but not by using HyperHyper. This works.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? <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>
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?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?
0 -
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.0 -
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">
My guess is that under these conditions Bias will always be zero!
<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>
0