I'm working on feature weighting techniques (chi-square, relief..) for classification tasks using Weka. Can I add these weights to the dataset's attributes? If yes, how? Do the classification algorithms in Weka make use of the feature weights?
1 Answer
Yes. You can add weights to the dataset's attributes. To first add the weights:
- Open the dataset in explorer
- Perform any required filtering (if necessary)
- Click the "Edit" button on the top panel
- Right click on the respective attributes you wish to assign a weight to
- Once you implemented your respective weights, click "OK"
You have now implemented weights to your attributes! However, one must keep in mind that these weights will only work for some boosting classification algorithms such as AdaBoostM1
and its variants (MultiBoostAB
, etc.). Additionally, the sampling option must also be disabled and base classifier must also be a WeightedInstancesHandler
. Otherwise, the algorithms likely won't use the weights correctly.