public void testGetBestLabel () { assertTrue (lv.getBestLabel() == ld.lookupLabel ("b")); }
public void testGetBestLabel () { assertTrue (lv.getBestLabel() == ld.lookupLabel ("b")); }
int bestLabelIndex = getGainRatio().getBaseLabelDistribution().getBestIndex(); int numMajorityLabel = (int) (getGainRatio().getBaseLabelDistribution().value(bestLabelIndex) * getSize()); System.out.println("root:" + getGainRatio().getBaseLabelDistribution().getBestLabel() + " " + numMajorityLabel + "/" + getSize()); int bestLabelIndex = m_leftChild.getGainRatio().getBaseLabelDistribution().getBestIndex(); int numMajorityLabel = (int) (m_leftChild.getGainRatio().getBaseLabelDistribution().value(bestLabelIndex) * m_leftChild.getSize()); System.out.println(m_leftChild.getGainRatio().getBaseLabelDistribution().getBestLabel() + " " + numMajorityLabel + "/" + m_leftChild.getSize()); int bestLabelIndex = m_rightChild.getGainRatio().getBaseLabelDistribution().getBestIndex(); int numMajorityLabel = (int) (m_rightChild.getGainRatio().getBaseLabelDistribution().value(bestLabelIndex) * m_rightChild.getSize()); System.out.println(m_rightChild.getGainRatio().getBaseLabelDistribution().getBestLabel() + " " + numMajorityLabel + "/" + m_rightChild.getSize());
int bestLabelIndex = getGainRatio().getBaseLabelDistribution().getBestIndex(); int numMajorityLabel = (int) (getGainRatio().getBaseLabelDistribution().value(bestLabelIndex) * getSize()); System.out.println("root:" + getGainRatio().getBaseLabelDistribution().getBestLabel() + " " + numMajorityLabel + "/" + getSize()); int bestLabelIndex = m_leftChild.getGainRatio().getBaseLabelDistribution().getBestIndex(); int numMajorityLabel = (int) (m_leftChild.getGainRatio().getBaseLabelDistribution().value(bestLabelIndex) * m_leftChild.getSize()); System.out.println(m_leftChild.getGainRatio().getBaseLabelDistribution().getBestLabel() + " " + numMajorityLabel + "/" + m_leftChild.getSize()); int bestLabelIndex = m_rightChild.getGainRatio().getBaseLabelDistribution().getBestIndex(); int numMajorityLabel = (int) (m_rightChild.getGainRatio().getBaseLabelDistribution().value(bestLabelIndex) * m_rightChild.getSize()); System.out.println(m_rightChild.getGainRatio().getBaseLabelDistribution().getBestLabel() + " " + numMajorityLabel + "/" + m_rightChild.getSize());
int bestLabelIndex = getGainRatio().getBaseLabelDistribution().getBestIndex(); int numMajorityLabel = (int) (getGainRatio().getBaseLabelDistribution().value(bestLabelIndex) * getSize()); System.out.println("root:" + getGainRatio().getBaseLabelDistribution().getBestLabel() + " " + numMajorityLabel + "/" + getSize()); int bestLabelIndex = m_leftChild.getGainRatio().getBaseLabelDistribution().getBestIndex(); int numMajorityLabel = (int) (m_leftChild.getGainRatio().getBaseLabelDistribution().value(bestLabelIndex) * m_leftChild.getSize()); System.out.println(m_leftChild.getGainRatio().getBaseLabelDistribution().getBestLabel() + " " + numMajorityLabel + "/" + m_leftChild.getSize()); int bestLabelIndex = m_rightChild.getGainRatio().getBaseLabelDistribution().getBestIndex(); int numMajorityLabel = (int) (m_rightChild.getGainRatio().getBaseLabelDistribution().value(bestLabelIndex) * m_rightChild.getSize()); System.out.println(m_rightChild.getGainRatio().getBaseLabelDistribution().getBestLabel() + " " + numMajorityLabel + "/" + m_rightChild.getSize());
totalIncorrectCorrect+=cpc.getLabelVector().value("incorrect"); String correct = new String("correct"); if(correct.equals(cpc.getLabelVector().getBestLabel().toString())) numConfidenceCorrect++; else numFalseNegative++; totalIncorrect+=cpc.getLabelVector().value("correct"); totalIncorrectIncorrect+=cpc.getLabelVector().value("incorrect"); if((new String("incorrect")).equals(cpc.getLabelVector().getBestLabel().toString())) numConfidenceCorrect++; else numFalsePositive++;
totalIncorrectCorrect+=cpc.getLabelVector().value("incorrect"); String correct = new String("correct"); if(correct.equals(cpc.getLabelVector().getBestLabel().toString())) numConfidenceCorrect++; else numFalseNegative++; totalIncorrect+=cpc.getLabelVector().value("correct"); totalIncorrectIncorrect+=cpc.getLabelVector().value("incorrect"); if((new String("incorrect")).equals(cpc.getLabelVector().getBestLabel().toString())) numConfidenceCorrect++; else numFalsePositive++;
totalIncorrectCorrect+=cpc.getLabelVector().value("incorrect"); String correct = new String("correct"); if(correct.equals(cpc.getLabelVector().getBestLabel().toString())) numConfidenceCorrect++; else numFalseNegative++; totalIncorrect+=cpc.getLabelVector().value("correct"); totalIncorrectIncorrect+=cpc.getLabelVector().value("incorrect"); if((new String("incorrect")).equals(cpc.getLabelVector().getBestLabel().toString())) numConfidenceCorrect++; else numFalsePositive++;
+ (label == latticeLabeling.getBestLabel() ? " " : " *") + " truelabel=" + label + " predlabel=" + latticeLabeling.getBestLabel() + " fv=" + ((FeatureVector) input.get(j)).toString(true)); errorInstances.add(input.get(j), label, null, null);
(label == latticeLabeling.getBestLabel() ? " " : " *")+ " truelabel="+label+ " predlabel="+latticeLabeling.getBestLabel()+ " fv="+((FeatureVector)input.get(j)).toString(true)); errorInstances.add (input.get(j), label, null, null);
(label == latticeLabeling.getBestLabel() ? " " : " *")+ " truelabel="+label+ " predlabel="+latticeLabeling.getBestLabel()+ " fv="+((FeatureVector)input.get(j)).toString(true)); errorInstances.add (input.get(j), label, null, null);
PropertyList features = null; LabelVector lv = classification.getLabelVector(); Label bestLabel = lv.getBestLabel(); Instance inst = (Instance)classification.getInstance(); FeatureVector fv = (FeatureVector)inst.getData();
PropertyList features = null; LabelVector lv = classification.getLabelVector(); Label bestLabel = lv.getBestLabel(); Instance inst = (Instance)classification.getInstance(); FeatureVector fv = (FeatureVector)inst.getData();
PropertyList features = null; LabelVector lv = classification.getLabelVector(); Label bestLabel = lv.getBestLabel(); Instance inst = (Instance)classification.getInstance(); FeatureVector fv = (FeatureVector)inst.getData();