AbsoluteLossFunction

Overview | Package | Class | Tree | Deprecated | Index | Help | Weka's home

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weka.classifiers.misc.monotone
Class AbsoluteLossFunction

    java.lang.Object
      weka.classifiers.misc.monotone.AbsoluteLossFunction

All Implemented Interfaces:
  NominalLossFunction, RevisionHandler

    public class AbsoluteLossFunction

extends java.lang.Object
implements NominalLossFunction, RevisionHandler

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.2 $
Author:
  Stijn Lievens (stijn.lievens@ugent.be)

Constructor Summary
`AbsoluteLossFunction()`

Method Summary
`java.lang.String` | `getRevision()` Returns the revision string.
`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`

Constructor Detail

### AbsoluteLossFunction

    public AbsoluteLossFunction()

Method Detail

### 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 value
    `predicted` - 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

### getRevision

    public java.lang.String getRevision()

  Returns the revision string.

  Specified by:
    `getRevision` in interface `RevisionHandler`
  Returns:
    the revision

Overview | Package | Class | Tree | Deprecated | Index | Help | Weka's home

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD