weka.classifiers.misc.monotone
Class AbsoluteLossFunction
java.lang.Object
weka.classifiers.misc.monotone.AbsoluteLossFunction
- All Implemented Interfaces:
- NominalLossFunction
public class AbsoluteLossFunction
- extends java.lang.Object
- implements NominalLossFunction
Class implementing the absolute loss function, this means
the returned loss is the abolute value of the difference
between the predicted and actual value.
This implementation is done as part of the master's thesis: "Studie
en implementatie van instantie-gebaseerde algoritmen voor gesuperviseerd
rangschikken", Stijn Lievens, Ghent University, 2004.
- Version:
- $Revision: 1.1 $
- Author:
- Stijn Lievens (stijn.lievens@ugent.be)
Method Summary |
double |
loss(double actual,
double predicted)
Returns the absolute loss function between two class values. |
java.lang.String |
toString()
Returns a string with the name of the loss function. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AbsoluteLossFunction
public AbsoluteLossFunction()
loss
public final double loss(double actual,
double predicted)
- Returns the absolute loss function between two class values.
- Specified by:
loss
in interface NominalLossFunction
- Parameters:
actual
- the actual class valuepredicted
- the predicted class value
- Returns:
- the absolute value of the difference between the actual
and predicted value
toString
public java.lang.String toString()
- Returns a string with the name of the loss function.
- Overrides:
toString
in class java.lang.Object
- Returns:
- a string with the name of the loss function