问题
I need your help regarding weights in Weka. I am running some experiments on large scale of data: I am translating the data into instances and use different classifiers in order to study. Now I want to examine how entitling weights to instances effects the studying- sometimes I want to entitle an instance with a weight and sometimes not. My question is:
- What is the range of the weights possible?
- Does the effect of the weight differs from classifier to classifier?
- Is there a default weight (I saw somewhere that it might be 1 but I want to reassure it)?
- Any reference to relevant information would be appreciated :)
回答1:
The answer to question 2 is "yes", and that also affects the answer to question 1. Basically, Weka only passes the weights on to the actual classification algorithm. The range of allowed weights and how they are used depends entirely on the implementation of the classifier. Regarding question 3, the default weight will give equal weight to all instances, the actual number is not that important.
For example the nearest neighbour classifier ignores weights completely, even though it will happily take any weight values. In theory, nearest neighbour classifiers could be implemented to consider weights, but this particular one doesn't. So the answer to question 2 would be that it actually depends on the particular implementation of the classifier even more than the classifier algorithm.
来源:https://stackoverflow.com/questions/12801228/how-to-use-weights-in-weka