You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mahout.apache.org by td...@apache.org on 2010/09/17 20:41:26 UTC
svn commit: r998244 -
/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/evaluation/Auc.java
Author: tdunning
Date: Fri Sep 17 18:41:26 2010
New Revision: 998244
URL: http://svn.apache.org/viewvc?rev=998244&view=rev
Log:
Simplification of Auc code structure.
Modified:
mahout/trunk/core/src/main/java/org/apache/mahout/classifier/evaluation/Auc.java
Modified: mahout/trunk/core/src/main/java/org/apache/mahout/classifier/evaluation/Auc.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/evaluation/Auc.java?rev=998244&r1=998243&r2=998244&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/classifier/evaluation/Auc.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/classifier/evaluation/Auc.java Fri Sep 17 18:41:26 2010
@@ -45,22 +45,15 @@ public class Auc {
private boolean hasScore;
- // exposed for testing only
-
- public Auc(Random rand) {
- confusion = new DenseMatrix(2, 2);
- entropy = new DenseMatrix(2, 2);
-
- this.rand = rand;
- }
-
/**
* Allocates a new data-structure for accumulating information about AUC and a few other accuracy
* measures.
* @param threshold The threshold to use in computing the confusion matrix.
*/
public Auc(double threshold) {
- this(RandomUtils.getRandom());
+ confusion = new DenseMatrix(2, 2);
+ entropy = new DenseMatrix(2, 2);
+ this.rand = RandomUtils.getRandom();
this.threshold = threshold;
}