|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectFScore
public class FScore
This class implements the cubic time and quadratic time algorithms for computing the predictions maximizing the expected F-score under the label independence assumption. The algorithms are described in Nan Ye, Adam K.M. Chai, Wee Sun Lee, Hai Leong Chieu. Optimizing F-measures: A Tale of Two Approaches. ICML 2012. In this implementation, Fbeta = (1+beta)/(1/prec+beta/rec) , where prec and rec are the precision and recall respectively.
Constructor Summary | |
---|---|
FScore()
|
Method Summary | |
---|---|
static double |
expected_fscore(double[] p,
int n,
double beta)
Return the Fbeta score when the first n instances are predicted as positive. |
static double[] |
expected_fscores(double[] p,
double beta)
Return the Fbeta scores when the first n instances are predicted as positive, for all n. |
static double[] |
expected_fscores(double[] p,
int q,
int r)
Return the Fq/r scores when the first k instances are predicted as positive, for all k. |
static void |
main(java.lang.String[] args)
|
static int[] |
max_expected_fscore_preds(double[] p,
double beta)
Return the predictions maximizing the expected Fbeta when the probabilities that the instances are positive are given by p. |
static int[] |
max_expected_fscore_preds(double[] p,
int q,
int r)
Return the predictions maximizing the expected Fq/r when the probabilities that the instances are positive are given by p. |
static double |
max_expected_fscore(double[] p,
double beta)
Return the maximum expected Fbeta when the probabilities that the instances are positive are given by p |
static double |
max_expected_fscore(double[] p,
int q,
int r)
Return the maximum expected Fq/r when the probabilities that the instances are positive are given by p |
static void |
test(double[] p,
int q,
int r)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FScore()
Method Detail |
---|
public static double max_expected_fscore(double[] p, int q, int r)
public static int[] max_expected_fscore_preds(double[] p, int q, int r)
public static double[] expected_fscores(double[] p, int q, int r)
public static double max_expected_fscore(double[] p, double beta)
public static int[] max_expected_fscore_preds(double[] p, double beta)
public static double[] expected_fscores(double[] p, double beta)
public static double expected_fscore(double[] p, int n, double beta)
public static void test(double[] p, int q, int r)
public static void main(java.lang.String[] args) throws java.io.IOException
java.io.IOException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |