|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.dmt.odm.MiningObject | +--oracle.dmt.odm.result.MiningApplyOutput
An instance of MiningApplyOutput
specifies the data (columns)
to be included in the apply output
table created as the result of the apply mining operation.
For example, an apply output table looks like a table with columns
(1) caseID
, (2) score
value with the highest probability,
and (3) its probablility
with caseID
being
the key field.
caseId
: Key column of the input table
score
: The predicted target value with the highest probability
probability
: The probability of the score
ApplyContentItem
objects.
The table may contain columns from the input table using ApplySourceAttributeItem
to identify the records and make the output table more meaningful in its own.
One of the following options may be combined with source attributes
in a MiningApplyOutput
object.
ApplyMultipleScoringItem
: top/bottom n predictions
ordered by probability
ApplyTargetProbabilityItem
: a list of particular target values
Example 1: Top 3 predictions with a key column
When interested in only the top 3 predictions (i.e., three target
values with highest probabilities), use ApplyMultipleScoringItem
.
A key column may be present in the apply output table to identify the
input record for which the prediction is made.
An ApplySourceAttributeItem
object is used to describe the key column.
The column names of the apply output table are designated by the user.
A typical apply output table for this example contains the following columns:
CustomerID
: The key column from the input table
Prediction
: The predicted target value (one of the top 3)
Probability
: The probability of the prediction (optional)
TransactionalDataSpecification
and
NonTransactionalDataSpecification
for further details on the data formats.
Example 2: Target values blue
and yellow
with a key column
When interested in a set of particular target values
(regardless of the probability) ApplyTargetProbabilityItem
must be used.
for example, if interested in only blue
and yellow
when the target attribute is color
.
If the key column ProductID
from the input table is to be included
in the output table, the apply output table to be produced is:
ProductID
: The key column from the input table
Prediction
: One of the two target values
blue
and yellow
Rank
: The rank of the prediction between 1 and the number of
total target values, with 1 being the highest (optional)
Probability
: The probability of the prediction (optional)
Constructor Summary |
MiningApplyOutput()
Creates an empty instance of MiningApplyOutput . |
Method Summary |
Type | Method |
---|---|
void |
addItem(ApplyContentItem contentItem)
Adds an instance of ApplyContentItem . |
static MiningApplyOutput |
createDefault()
Creates a default apply output settings. |
static MiningApplyOutput |
createDefault(MiningAttribute sourceAttr)
Creates a default apply output settings with a source column that is provided by the user. |
static MiningApplyOutput |
createDefault(java.lang.String predAttrName,
java.lang.String probAttrName)
Creates a default apply output settings by which an apply output table is created with the specified attribute names The resulting apply output table will contain the top score and its associated probability. |
static MiningApplyOutput |
deserialize(byte[] obj)
For internal use only. |
ApplyContentOptionItem[] |
getApplyContentOptionItems()
Returns an array of ApplyContentOptionItem objects
contained in this object. |
ApplyMultipleScoringItem[] |
getApplyMultipleScoringItems()
Returns an array of ApplyMultipleScoringItem objects
contained in this object. |
ApplyContentItem[] |
getApplyOutputContentItems()
Returns an array of ApplyContentItem objects contained in this object. |
ApplySourceAttributeItem[] |
getApplySourceAttributes()
Returns an array of ApplySourceAttributeItem objects
contained in this object. |
ApplyTargetProbabilityItem[] |
getApplyTargetProbabilityItems()
Returns the array of ApplyTargetProbabilityItem objects
contained to this object. |
byte[] |
serialize()
For internal use only. |
void |
validate()
Validates if the content of this apply output object can produce a valid output table. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MiningApplyOutput()
MiningApplyOutput
.
Subsequent add
methods must be invoked to make this instance
valid.Method Detail |
public static MiningApplyOutput createDefault() throws ODMException
MiningApplyOutput
- An instance with the default settings.ODMException
- Inherited exceptionpublic static MiningApplyOutput createDefault(MiningAttribute sourceAttr) throws ODMException
sourceAttr
- A logical representation of a column in the input table
to be used for apply operation and to appear in the output tableMiningApplyOutput
- An instance with the default settings
and the provided source attributeODMException
- when the name of sourceAttr
is empty or exceeds 30 bytes in length.public static MiningApplyOutput createDefault(java.lang.String predAttrName, java.lang.String probAttrName) throws ODMException, InvalidArgumentException
predAttrName
- The column name of the apply output table for the top predictionprobAttrName
- The column name of the apply output table for probability
of the top predictionMiningApplyOutput
- An instance with the default settings
with the provided destination columnsInvalidArgumentException
- when either predAttrName
or
probAttrName
is null.ODMException
- when either predAttrName
or
probAttrName
is empty or exceeds 30 bytes in length.public void addItem(ApplyContentItem contentItem) throws InvalidArgumentException
ApplyContentItem
.contentItem
- An instance of ApplyContentItem
to be added in this object.InvalidArgumentException
- when contentItem
is null.public ApplyContentItem[] getApplyOutputContentItems()
ApplyContentItem
objects contained in this object.ApplyContentItem[]
- An array of apply content itemspublic ApplyContentOptionItem[] getApplyContentOptionItems()
ApplyContentOptionItem
objects
contained in this object.ApplyContentOptionItem[]
- An array of apply content
option itemspublic ApplySourceAttributeItem[] getApplySourceAttributes()
ApplySourceAttributeItem
objects
contained in this object.ApplySourceAttributeItem[]
- An array of source attribute
itemspublic ApplyMultipleScoringItem[] getApplyMultipleScoringItems()
ApplyMultipleScoringItem
objects
contained in this object.ApplyMultipleScoringItem[]
- An array of apply multiple
scoring itemspublic ApplyTargetProbabilityItem[] getApplyTargetProbabilityItems()
ApplyTargetProbabilityItem
objects
contained to this object.ApplyTargetProbabilityItem[]
- An array of apply target
probability itemspublic void validate() throws MiningObjectException
MiningApplyOutput
is valid if it meets certain
integrity constraints, e.g., all items are uniquely named.
The constraints include:
ApplyContentOptionItem
,
ApplyMultipleScoringItem
, or
ApplyTargetProbabilityItem
present,
ApplyContentOptionItem
object has the same option (score
, probability
,
and sequenceId
),
ApplyContentOptionItem
object
with score
option,
ApplyContentOptionItem
,
ApplyMultipleScoringItem
, and
ApplyTargetProbabilityItem
are present in this object,
ApplyTargetProbabilityItem
,
ApplyTargetProbabilityItem
,
ApplyTargetProbabilityItem
,
ApplySourceAttributeItem
are identical,
ApplySourceAttributeItem
objects
with the same MiningAttribute
,
MiningObjectException
- when this instance of apply output object is invalid.public byte[] serialize()
public static MiningApplyOutput deserialize(byte[] obj) throws java.io.IOException, java.lang.ClassNotFoundException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |