weka.classifiers.misc.monotone
Interface NominalLossFunction

All Known Implementing Classes:
AbsoluteLossFunction, ZeroOneLossFunction

public interface NominalLossFunction

Interface for incorporating different loss functions.

This interface contains only one method, namely loss that measures the error between an actual class value actual and a predicted value predicted. It is understood that the return value of this method is always be positive and that it is zero if and only if the actual and the predicted value coincide.

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)
          Calculate the loss between an actual and a predicted class value.
 

Method Detail

loss

double loss(double actual,
            double predicted)
Calculate the loss between an actual and a predicted class value.

Parameters:
actual - the actual class value
predicted - the predicted class value
Returns:
a measure for the error of making the prediction predicted instead of actual