net.sf.myra.datamining.statistics
Class CurveFactory

java.lang.Object
  extended by net.sf.myra.datamining.statistics.CurveFactory
Direct Known Subclasses:
CurveFactory.PRCurveFactory, CurveFactory.ROCCurveFactory

public abstract class CurveFactory
extends java.lang.Object

Version:
$Revision$ $Date:: $
Author:
Fernando Esteban Barril Otero

Nested Class Summary
static class CurveFactory.PRCurveFactory
          This class represents the Precision-Recall curve factory.
static class CurveFactory.ROCCurveFactory
          This class represents the Precision-Recall curve factory.
 
Field Summary
static int NEGATIVE
          The negative value constant.
static int POSITIVE
          The positive value constant.
static CurveFactory.PRCurveFactory PRECISION_RECALL
          The precision-recall curve factory.
static CurveFactory.ROCCurveFactory ROC
          The ROC curve factory.
 
Constructor Summary
CurveFactory()
           
 
Method Summary
protected static int count(double[][] values, int value)
          Returns the number of occurences of the specified class value.
abstract  Curve create(double[][] values)
          Returns a curve based on the specified (predicted,class) values.
protected static void sort(double[][] values)
          Sorts (based on a bubble sort algorithm) a bidimensional array (predicted value,class value).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NEGATIVE

public static final int NEGATIVE
The negative value constant.

See Also:
Constant Field Values

POSITIVE

public static final int POSITIVE
The positive value constant.

See Also:
Constant Field Values

PRECISION_RECALL

public static final CurveFactory.PRCurveFactory PRECISION_RECALL
The precision-recall curve factory.


ROC

public static final CurveFactory.ROCCurveFactory ROC
The ROC curve factory.

Constructor Detail

CurveFactory

public CurveFactory()
Method Detail

create

public abstract Curve create(double[][] values)
Returns a curve based on the specified (predicted,class) values.

Parameters:
values -
Returns:
a curve based on the specified (predicted,class) values.

count

protected static int count(double[][] values,
                           int value)
Returns the number of occurences of the specified class value.

Parameters:
values - the bidimensional array of values.
value - the class value.
Returns:
the number of occurences of the specified class value.

sort

protected static void sort(double[][] values)
Sorts (based on a bubble sort algorithm) a bidimensional array (predicted value,class value).

Parameters:
values - the array to be sorted.


Copyright © 2013. All Rights Reserved.