I want to give weights to features of a data set before using the feature in any classification algorithm like KNN or J48, but i don't know how to evaluate a weighted feature vector.
dose any of the classification algorithms accept weights as input instead of just '0' and '1'?
especially, is any of Weka's ready classification functions capable of working with weights (not 0 and 1 as filters)?
Asked
Active
Viewed 708 times
0

Manizheh Ghaemi
- 3
- 1
2 Answers
0
In most situations, you can just scale the data set according to your weights. This is trivial to prove for Minkowski distances such as Euclidean distance.

Has QUIT--Anony-Mousse
- 76,138
- 12
- 138
- 194
0
Not all of weka's classification algorithms support weights but some do.
You need to set weight information while after loading your dataset , see example code in weka wiki. I remember that Weka J48 , decision tree , supports weights in developer version but can not find reference. There exists a patch though.
This search for feature weights in weka wiki may help.
I suggest trying add weights to data set and training in your data.

Atilla Ozgur
- 14,339
- 3
- 49
- 69
-
thank you for your help. so you mean that the classification algorithm (e.g j48) considers the added weights while classifying? – Manizheh Ghaemi Jul 21 '12 at 07:08