@PublicationReference(author="Wikipedia", title="Receiver operating characteristic", type=WebPage, year=2009, url="http://en.wikipedia.org/wiki/Receiver_operating_characteristic") public class ReceiverOperatingCharacteristic extends AbstractCloneableSerializable implements Evaluator<java.lang.Double,java.lang.Double>
Modifier and Type | Class and Description |
---|---|
static class |
ReceiverOperatingCharacteristic.DataPoint
Contains information about a datapoint on an ROC curve
|
static class |
ReceiverOperatingCharacteristic.Statistic
Contains useful statistics derived from a ROC curve
|
Modifier and Type | Method and Description |
---|---|
ReceiverOperatingCharacteristic |
clone()
This makes public the clone method on the
Object class and
removes the exception that it throws. |
ReceiverOperatingCharacteristic.Statistic |
computeStatistics()
Computes useful statistical information associated with the ROC curve
|
static ReceiverOperatingCharacteristic |
create(java.util.Collection<? extends InputOutputPair<java.lang.Double,java.lang.Boolean>> data)
Creates an ROC curve based on the scored data with target information
|
static ReceiverOperatingCharacteristic |
createFromTargetEstimatePairs(java.util.Collection<? extends Pair<java.lang.Boolean,? extends java.lang.Number>> data)
Creates an ROC curve based on the scored data with target information.
|
java.lang.Double |
evaluate(java.lang.Double input)
Evaluates the "pessimistic" value of the truePositiveRate for a given
falsePositiveRate.
|
java.util.ArrayList<ReceiverOperatingCharacteristic.DataPoint> |
getSortedROCData()
Getter for sortedROCData
|
MannWhitneyUConfidence.Statistic |
getUtest()
Getter for Utest
|
protected void |
setSortedROCData(java.util.ArrayList<ReceiverOperatingCharacteristic.DataPoint> sortedROCData)
Setter for srtedROCData
|
void |
setUtest(MannWhitneyUConfidence.Statistic Utest)
Setter for Utest
|
public ReceiverOperatingCharacteristic clone()
AbstractCloneableSerializable
Object
class and
removes the exception that it throws. Its default behavior is to
automatically create a clone of the exact type of object that the
clone is called on and to copy all primitives but to keep all references,
which means it is a shallow copy.
Extensions of this class may want to override this method (but call
super.clone()
to implement a "smart copy". That is, to target
the most common use case for creating a copy of the object. Because of
the default behavior being a shallow copy, extending classes only need
to handle fields that need to have a deeper copy (or those that need to
be reset). Some of the methods in ObjectUtil
may be helpful in
implementing a custom clone method.
Note: The contract of this method is that you must use
super.clone()
as the basis for your implementation.clone
in interface CloneableSerializable
clone
in class AbstractCloneableSerializable
public java.lang.Double evaluate(java.lang.Double input)
public java.util.ArrayList<ReceiverOperatingCharacteristic.DataPoint> getSortedROCData()
protected void setSortedROCData(java.util.ArrayList<ReceiverOperatingCharacteristic.DataPoint> sortedROCData)
sortedROCData
- Sorted data containing a ConfusionMatrix at each point, sorted in an
ascending order along the abscissa (x-axis), which is FalsePositiveRatepublic static ReceiverOperatingCharacteristic createFromTargetEstimatePairs(java.util.Collection<? extends Pair<java.lang.Boolean,? extends java.lang.Number>> data)
data
- Collection of target/estimate-score pairs. The second element in
the pair is an estimated score, the first is a flag to determine
which group the score belongs to. For example:
{(true, 1.0), (false, 0.9)}
means that data1=1.0 and data2=0.9 and so forth. This is useful
for computing that classified data partitions data better than
chance.public static ReceiverOperatingCharacteristic create(java.util.Collection<? extends InputOutputPair<java.lang.Double,java.lang.Boolean>> data)
data
- Collection of estimate-score/target pairs. The second element in the
Pair is an estimated score, the first is a flag to determine which
group the score belongs to. For example {<1.0,true>, <0.9,false> means
that data1=1.0 and data2=0.9 and so forth. This is useful for computing
that classified data partitions data better than chance.public ReceiverOperatingCharacteristic.Statistic computeStatistics()
public MannWhitneyUConfidence.Statistic getUtest()
public void setUtest(MannWhitneyUConfidence.Statistic Utest)
Utest
- Results from conducting a U-test on the underlying classification data,
the null hypothesis determines if the classifier can reliably separate
the classes, not just chance