Oracle Data Mining Java API Reference
10g Release 1 (10.1)

B12276-01

oracle.dmt.odm
Class PriorProbabilities

java.lang.Object
  |
  +--oracle.dmt.odm.MiningObject
        |
        +--oracle.dmt.odm.PriorProbabilities
All Implemented Interfaces:
java.io.Serializable

public class PriorProbabilities
extends MiningObject

An instance of PriorProbabilities contains prior probabilities corresponding to target values. Priors are an optional input for building classification models. A prior probability is assigned to each target class and used to overcome a known bias in the sampling procedure that was used to collect the data presented to the model.

For example, consider two target classes, responders and non-responders. Suppose that responders make up only 1% of population. For reasons of cost, convenience, or because of the rarity of the responders, the data might be collected such that it consists of 50% responders and 50% non-responders, thereby over-sampling the responder population. To correct this condition, the user may specify prior probabilities for each class when no known sampling bias exists, the user may specify the priors as NULL, indicating to the algorithm that the priors are to be constructed internally from the training table data.

Since:
9.2.0
See Also:
Serialized Form

Constructor Summary
PriorProbabilities()
          Creates an empty PriorProbabilities instance.

 

Method Summary
 void addEntry(Category target, float probability)
          Deprecated. As of 10.1.0, replaced by addEntry(Category target, Object probability) method.
 void addEntry(Category target, java.lang.Object probability)
          Adds a new prior probability for the target value.
 java.lang.Object getPrior(Category target)
          Returns the prior probability value associated with the given target Category.
 float getValue(Category target)
          Deprecated. As of 10.1.0, replaced by Object getValue(Category target) method.
 Category[] listTargetValues()
          Lists all target Categories present in the PriorProbabilities instance.
 void validate()
          Validates the set of priors entries to ensure all probability values are between 0 and 1 and the total of all values is less than or equal to 1.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

PriorProbabilities

public PriorProbabilities()
Creates an empty PriorProbabilities instance.
Method Detail

addEntry

public void addEntry(Category target,
                     java.lang.Object probability)
              throws ODMException
Adds a new prior probability for the target value.
Throws:
ODMException -
  • target is null,
  • probability < 0 or probability > 1,
  • al targets do not have the same data type,
  • a duplicated entry is being added, or
  • sum of all probabilities > 1.
Since:
10.1.0

addEntry

public void addEntry(Category target,
                     float probability)
              throws ODMException
Deprecated. As of 10.1.0, replaced by addEntry(Category target, Object probability) method.
Adds a new prior probability for the target value.
Throws:
ODMException
-
  • when target is nul,
  • when probability < 0 or probability > 1,
  • when all targets do not have the same data type,
  • when a duplicated entry is being added, or
  • when sum of all probabilities > 1.
ODMException

getPrior

public java.lang.Object getPrior(Category target)
                          throws ODMException
Returns the prior probability value associated with the given target Category.
Returns:
prior probability value of the given target
Throws:
ODMException<</CODE> - when no entry was found in the prior of the given target
ODMException
Since:
10.1.0

getValue

public float getValue(Category target)
               throws ODMException
Deprecated. As of 10.1.0, replaced by Object getValue(Category target) method.
Returns the prior probability value associated with the given target Category.
Returns:
prior probability value of the given target
Throws:
ODMException - wnen no entry was found in the prior of the given target

validate

public void validate()
              throws ODMException
Validates the set of priors entries to ensure all probability values are between 0 and 1 and the total of all values is less than or equal to 1.
Throws:
ODMException
-
  • when prior probability value is null,
  • when prior probability value < 0 or prior probability value > 1, or
  • when sum of all prior probability values > 1.
ODMException

listTargetValues

public Category[] listTargetValues()
Lists all target Categories present in the PriorProbabilities instance.
Returns:
an array of target Category in the prior

Copyright © 2003 Oracle Corporation. All Rights Reserved.