de.fu_berlin.ties.classify.winnow
Class WinnowPrediction

java.lang.Object
  extended byde.fu_berlin.ties.io.BaseStorable
      extended byde.fu_berlin.ties.classify.Prediction
          extended byde.fu_berlin.ties.classify.winnow.WinnowPrediction
All Implemented Interfaces:
Storable

public class WinnowPrediction
extends Prediction

A prediction that also stores a raw score (activation value) and a sigmoid score, as calculated by the Winnow algorithm. The pR is never set by this class.

Version:
$Revision: 1.7 $, $Date: 2004/04/06 09:34:59 $, $Author: siefkes $
Author:
Christian Siefkes

Field Summary
static String KEY_RAW
          Serialization key for the predicted class.
static String KEY_SIGMOID
          Serialization key for the source identifier.
 
Fields inherited from class de.fu_berlin.ties.classify.Prediction
KEY_PR, KEY_PROB, KEY_SOURCE, KEY_TYPE
 
Constructor Summary
WinnowPrediction(FieldMap fieldMap)
          Creates a new instance from a field map, fulfilling the Storable contract.
WinnowPrediction(String predicted, double prob, float raw, float sigmoid)
          Creates a new instance, setting the evaluation status to EvalStatus.UNKNOWN.
WinnowPrediction(String predicted, double prob, float raw, float sigmoid, EvalStatus status)
          Creates a new instance, without setting a source ID.
WinnowPrediction(String predicted, String sourceID, double prob, float raw, float sigmoid, EvalStatus status)
          Creates a new instance.
 
Method Summary
 float getRawScore()
          Returns the raw score (activation value) of this prediction.
 float getSigmoidScore()
          Returns the sigmoid score (activation value) of this prediction.
 FieldMap storeFields()
          Stores all relevant fields of this object in a field map for serialization.
 
Methods inherited from class de.fu_berlin.ties.classify.Prediction
addProb, equals, getEvalStatus, getPR, getProbability, getSource, getType, hashCode, setEvalStatus, setSource
 
Methods inherited from class de.fu_berlin.ties.io.BaseStorable
toString, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

KEY_RAW

public static final String KEY_RAW
Serialization key for the predicted class.

See Also:
Constant Field Values

KEY_SIGMOID

public static final String KEY_SIGMOID
Serialization key for the source identifier.

See Also:
Constant Field Values
Constructor Detail

WinnowPrediction

public WinnowPrediction(FieldMap fieldMap)
Creates a new instance from a field map, fulfilling the Storable contract.

Parameters:
fieldMap - map containing the serialized fields

WinnowPrediction

public WinnowPrediction(String predicted,
                        double prob,
                        float raw,
                        float sigmoid)
Creates a new instance, setting the evaluation status to EvalStatus.UNKNOWN.

Parameters:
predicted - the predicted type
prob - the probability of the prediction (must be in the range from 0.0 to 1.0; or -1 if this is a confirmed prediction or an answer key)
raw - the raw score (activation value) of this prediction
sigmoid - the sigmoid score (activation value) of this prediction; must be a value in the range from 0 to 1

WinnowPrediction

public WinnowPrediction(String predicted,
                        double prob,
                        float raw,
                        float sigmoid,
                        EvalStatus status)
Creates a new instance, without setting a source ID.

Parameters:
predicted - the predicted type
prob - the probability of the prediction (must be in the range from 0.0 to 1.0; or -1 if this is a confirmed prediction or an answer key)
raw - the raw score (activation value) of this prediction
sigmoid - the sigmoid score (activation value) of this prediction; must be a value in the range from 0 to 1
status - the evaluation status of this instance

WinnowPrediction

public WinnowPrediction(String predicted,
                        String sourceID,
                        double prob,
                        float raw,
                        float sigmoid,
                        EvalStatus status)
Creates a new instance.

Parameters:
predicted - the predicted type
sourceID - an identifier of the source of this prediction (e.g., the file name), might be null
prob - the probability of the prediction (must be in the range from 0.0 to 1.0; or -1 if this is a confirmed prediction or an answer key)
raw - the raw score (activation value) of this prediction
sigmoid - the sigmoid score (activation value) of this prediction; must be a value in the range from 0 to 1
status - the evaluation status of this instance
Method Detail

getRawScore

public float getRawScore()
Returns the raw score (activation value) of this prediction.

Returns:
the value of the attribute

getSigmoidScore

public float getSigmoidScore()
Returns the sigmoid score (activation value) of this prediction.

Returns:
the value of the attribute; a value in the range from 0 to 1

storeFields

public FieldMap storeFields()
Stores all relevant fields of this object in a field map for serialization. An equivalent object can be created by calling FieldMap.createObject(Class) on the created field map.

Specified by:
storeFields in interface Storable
Overrides:
storeFields in class Prediction
Returns:
the created field map


Copyright © 2003-2004 Christian Siefkes. All Rights Reserved.