Options

# Saved weights with weights to data operator - How can I use them with the select by weight operator?

Member Posts: 11 Contributor I
edited January 2019 in Help
Hello community,
this might be a rather dumb question, but I am struggling with the way how the weights operators work. I did a filter-based feature selection
with multiple different filters and combined the results in one table. The columns in that table are Attribute, Information Gain, Chi-Squared, etc. The rows look like the following:

Row No. | Attribute | Information Gain | Chi-Quared
1            A                   0.59                0.87
2            B                   0.26                  1
3            C                     1                   0.67

Now I want to select the top 10 features of my example set using this - unfortunetly I do not understand how I can get the right weight vector to apply in select weights. I can divide the weights table for each attribute again so it only consists of e.g. Attribute and Information Gain, but how can I get those weights applied with the select by weight Operator. I already watched the video by Markus Hoffman, but am still struggling. Any help is appreciated!

Tagged:

• Options
Moderator, RapidMiner Certified Analyst, Member Posts: 1,195 Unicorn
Hi @green_tea,

Use the Data to Weights operator.

Regards,

Lionel
• Options
Member Posts: 11 Contributor I
I tried that, but it generates a weight vector with only 1s as values. From the RapidMiner Documentation:
This operator simply generates an attribute weights vector with weight 1.0 for each input attribute.
How can I generate a weight vactor that has the weights from my stored exampleSet (which was created with Weights to Data Operator)?
Best regards,
green_tea
• Options
Moderator, RapidMiner Certified Analyst, Member Posts: 1,195 Unicorn
Hi @green_tea,

You can not use directly the weights from the output of Weight by Information Gain, Weight by Chi Squared  operator(s) ?

Regards,

Lionel

• Options
Member Posts: 11 Contributor I
in theory, yes. In practice, I ran 30+ filter-based weight operators with different example sets that took a long time to complete execution. Using the direct weights would require me to run them again for which I lack the time unfortunately.
In the end I found a work around so I didn't check the converters extension @mschmitz. Thanks for the tip though! I will mark the post as solved, but to all future readers, I did not test if it actually works.