org.wdssii.decisiontree
Class MulticategorySkillScore

java.lang.Object
  extended by org.wdssii.decisiontree.MulticategorySkillScore

public class MulticategorySkillScore
extends Object

Computes and returns skill scores for a multi-category forecast. For definitions of the skill scores used, see: http://www.bom.gov.au/bmrc/wefor/staff/eee/verif/verif_web_page.html Usage:

   float[][] data = new float[numTesting][numAttr];
   int[] categories = new int[numTesting]; // true categories
   MulticategorySkillScore tss = new MulticategorySkillScore(tree.getNumCategories());
   for (int i=0; i < numTesting; ++i){
                int result = tree.classify(data[i]);
                tss.update(categories[i], result);
    }
    float trueSkillScore = tss.getTSS();
 

Author:
lakshman

Field Summary
private  int[][] stats
           
 
Constructor Summary
MulticategorySkillScore(int numCategories)
           
 
Method Summary
private static String align(int x)
           
 float getOverallAccuracy()
           
 float getTSS()
          Computes True Skill Score (Hanssen/Kuipers/Peirces' skill score)
 String toString()
           
 void update(int[] expectedValue, int[] algValues)
           
 void update(int expectedValue, int alg_stormtype)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

stats

private int[][] stats
Constructor Detail

MulticategorySkillScore

public MulticategorySkillScore(int numCategories)
Method Detail

update

public void update(int expectedValue,
                   int alg_stormtype)

update

public void update(int[] expectedValue,
                   int[] algValues)

align

private static String align(int x)

toString

public String toString()
Overrides:
toString in class Object

getOverallAccuracy

public float getOverallAccuracy()

getTSS

public float getTSS()
Computes True Skill Score (Hanssen/Kuipers/Peirces' skill score)