mardi 14 octobre 2014

Double.Min_Value not working as expected


Vote count:

0




I have the following code but it doesn't go through the if when mutual information is zero. Any idea what is going wrong?



int largestEntropyIndex = Integer.MIN_VALUE;
double largestMutualInfomation = Double.MIN_VALUE;
for (int i = 0; i < attributes.size(); i++) {
String attrName=this.attributes.get(i);
double conditionalEntropy = calcConditionalEntropy(i,
instances,
this.attributeValues.get(attrName).size(),
this.labels.size());

System.out.println("conditional entropy is: "+conditionalEntropy);
double mutualInformation = entropy - conditionalEntropy;
if (mutualInformation > largestMutualInfomation){
largestMutualInfomation = mutualInformation;
largestEntropyIndex = i;
}


asked 15 secs ago







Double.Min_Value not working as expected

Aucun commentaire:

Enregistrer un commentaire