## org.apache.mahout.math.stats
Class GlobalOnlineAuc

    java.lang.Object
      org.apache.mahout.math.stats.GlobalOnlineAuc

All Implemented Interfaces:
  org.apache.hadoop.io.Writable, OnlineAuc

    public class GlobalOnlineAuc

extends Object
implements OnlineAuc

Computes a running estimate of AUC (see http://en.wikipedia.org/wiki/Receiver_operating_characteristic).

Since AUC is normally a global property of labeled scores, it is almost always computed in a batch fashion. The probabilistic definition (the probability that a random element of one set has a higher score than a random element of another set) gives us a way to estimate this on-line.

See Also:
  `GroupedOnlineAuc`

Field Summary
`static int` `HISTORY`

Constructor Summary
`GlobalOnlineAuc()`

Method Summary
`double` `addSample(int category, double score)`
`double` `addSample(int category, String groupKey, double score)`
`double` `auc()`
`void` `readFields(DataInput in)`
`void` `setPolicy(org.apache.mahout.math.stats.GlobalOnlineAuc.ReplacementPolicy policy)`
`void` `setWindowSize(int windowSize)`
`double` `value()`
`void` `write(DataOutput out)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### HISTORY

    public static final int HISTORY

See Also:
  Constant Field Values

Constructor Detail

### GlobalOnlineAuc

    public GlobalOnlineAuc()

Method Detail

### addSample

    public double addSample(int category,
                            String groupKey,
                            double score)

  Specified by:
    `addSample` in interface `OnlineAuc`

### addSample

    public double addSample(int category,
                            double score)

  Specified by:
    `addSample` in interface `OnlineAuc`

### auc

    public double auc()

  Specified by:
    `auc` in interface `OnlineAuc`

### value

    public double value()

### setPolicy

    public void setPolicy(org.apache.mahout.math.stats.GlobalOnlineAuc.ReplacementPolicy policy)

  Specified by:
    `setPolicy` in interface `OnlineAuc`

### setWindowSize

    public void setWindowSize(int windowSize)

  Specified by:
    `setWindowSize` in interface `OnlineAuc`

### write

    public void write(DataOutput out)
               throws IOException

  Specified by:
    `write` in interface `org.apache.hadoop.io.Writable`
  Throws:
    `IOException`

### readFields

    public void readFields(DataInput in)
                    throws IOException

  Specified by:
    `readFields` in interface `org.apache.hadoop.io.Writable`
  Throws:
    `IOException`

Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.