How to use scales in Weka

I need your help regarding weight in Weka. I experiment with large amounts of data: I translated the data into instances and used different classifiers to study. Now I want to study the question of how the inclusion of copies in the scales affects the study - sometimes I want to give the right to a copy with weight, and sometimes not. My question is:

  • What is the range of possible weights?
  • Does the weight effect differ from the classifier by the classifier?
  • Is there a default weight (I saw somewhere that it could be 1, but I want to calm him down)?
  • Any link to relevant information would be appreciated :)
+5
source share
2 answers

The answer to question 2 is yes, and this also affects the answer to question 1. In principle, Weka only passes the scales to the actual classification algorithm. The range of permissible weights and their use depend entirely on the implementation of the classifier. Regarding question 3, the default weight will be equal to the weight for all instances, the actual number is not so important.

For example, the nearest neighbor classifier completely ignores weight, although it will be happy to accept any weight values. Theoretically, the classifiers of the nearest neighbors can be implemented to take into account the weights, but this is not specific. Thus, the answer to question 2 is that it actually depends on the concrete implementation of the classifier even more than the classifier algorithm.

+7
source

I am creating an XRFF file with the following contents:

<dataset name="Weka" version="3.7.13-SNAPSHOT"> <header> <attributes> <attribute name="Nombre" type="nominal"> <labels> <label>Alcohol</label> <label>Opioides</label> <label>Cannabinoides</label> <label>Benzodiacepinas</label> <label>Cocaina</label> <label>Anfetaminas_y_derivados</label> </labels> <metadata> <property name="weight">0.2</property> </metadata> </attribute> <attribute name="Tendencia_a_discutir" type="nominal"> <labels> <label>No</label> <label>Yes</label> </labels> <metadata> <property name="weight">0.5</property> </metadata> </attribute> <attribute name="Agresion" type="nominal"> <labels> <label>No</label> <label>Yes</label> </labels> <metadata> <property name="weight">0.5</property> </metadata> </attribute> . . . <instance> <value>Anfetaminas_y_derivados</value> <value>Yes</value> <value>Yes</value> <value>Yes</value> <value>No</value> <value>No</value> <value>Yes</value> <value>No</value> <value>No</value> <value>No</value> <value>No</value> <value>Yes</value> <value>No</value> <value>No</value> <value>No</value> <value>No</value> <value>Yes</value> <value>Yes</value> <value>No</value> <value>No</value> <value>Yes</value> <value>No</value> <value>No</value> <value>Yes</value> <value>Yes</value> <value>Yes</value> <value>Yes</value> <value>No</value> <value>No</value> <value>No</value> <value>No</value> <value>No</value> <value>No</value> <value>No</value> <value>No</value> <value>No</value> <value>No</value> <value>No</value> <value>No</value> <value>Yes</value> <value>No</value> <value>Yes</value> <value>Yes</value> <value>Yes</value> <value>Yes</value> <value>Yes</value> <value>Yes</value> <value>Yes</value> <value>Yes</value> <value>Yes</value> <value>Yes</value> <value>Yes</value> </instance> </instances> </body> </dataset> 

But I can see if Weka uses scales when I use NaivesBayes. My suggestion suggests changing the AttributeSelectedClassifier algorithm code to use weights.

+1
source

All Articles