org.jasen.core
Class ProbabilityTestResult

java.lang.Object
  extended byorg.jasen.core.AbstractTestResult
      extended byorg.jasen.core.ProbabilityTestResult
All Implemented Interfaces:
JasenTestResult, Serializable

public class ProbabilityTestResult
extends AbstractTestResult

Returned from a test when the result indicates a spam probability.

Author:
Jason Polites
See Also:
PointTestResult, Serialized Form

Constructor Summary
ProbabilityTestResult()
           
ProbabilityTestResult(double probability)
          Creates a new probability test result with the given probability
 
Method Summary
 float calculateProbability()
          Calculates the final probability for this test result based on the data contained within
 double getProbability()
          Gets the probability that the result of the test indicates a spam message.
 void setProbability(float probability)
          Sets the probability that the result of the test indicates a spam message.
 
Methods inherited from class org.jasen.core.AbstractTestResult
isAbsolute, setAbsolute
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProbabilityTestResult

public ProbabilityTestResult()

ProbabilityTestResult

public ProbabilityTestResult(double probability)
Creates a new probability test result with the given probability

Parameters:
probability -
Method Detail

getProbability

public double getProbability()
Gets the probability that the result of the test indicates a spam message.

This result MUST always be 0.0 <= probability <= 1.0

The closer the result to 1.0, the more confidence the test indicates a spam message

Returns:

setProbability

public void setProbability(float probability)
Sets the probability that the result of the test indicates a spam message.

This result MUST always be 0.0 <= probability <= 1.0

The closer the result to 1.0, the more confidence the test indicates a spam message

Parameters:
probability -

calculateProbability

public float calculateProbability()
Description copied from interface: JasenTestResult
Calculates the final probability for this test result based on the data contained within

Returns:
A probability such that the returned value is > 0.0 and < 1.0