|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ClassificationApplySettings captures
a specification that prescribes the output of an
apply task specific to a classification model.
MiningObject,
ApplySettings| Method Summary | |
ClassificationApplyContent |
getContent(java.lang.String destinationAttrName)
Returns the apply content type designated to the specified physical attribute. |
ClassificationApplyContent[] |
getContentsByCategory(java.lang.Object categoryValue)
Returns the types of apply content to be included in the apply output for the specified target class. |
ClassificationApplyContent[] |
getContentsByRank(int rank)
Returns an array of apply content types to appear in the apply output for the specified rank. |
java.lang.String |
getCostMatrixName()
Returns the name of the cost matrix to be used for apply. |
java.lang.String |
getMappedBaseDestinationAttributeName(ClassificationApplyContent content)
Returns the base attribute name to be used for the values associated with the specified apply content that has been specified by mapPredictions method. |
java.lang.Object[] |
getMappedCategories()
Returns an array of categories mapped by mapByCategory method. |
ClassificationApplyContent[] |
getMappedContents()
Returns an array of apply contents that are used for mapping. |
java.lang.String |
getMappedDestinationAttrName(java.lang.Object categoryValue,
ClassificationApplyContent contentType)
Returns the name of the physical attribute mapped to the specified category. |
java.lang.Integer |
getRank(java.lang.String destinationAttrName)
Returns the rank designated to the specified physical attribute. |
java.lang.Integer |
getRanks()
Returns the number of predictions specified by mapByRank method. |
boolean |
isFromTop()
Returns true if predictions are ordered from top, false if from bottom. |
void |
mapByCategory(ClassificationApplyContent content,
java.lang.Object categoryValue,
java.lang.String destinationAttrName)
Maps the specified generated value for the specified target value to a destination attribute regardless of its rank. |
void |
mapByRank(ClassificationApplyContent content,
java.lang.String[] destPhysAttrNameArray,
boolean fromTop)
Maps the specified generated values for the predictions within the specified ranks to a set of destination attributes. |
void |
mapPredictions(ClassificationApplyContent content,
java.lang.String baseDestPhysAttrName)
Maps all predictions in the model and the specified content value to a set of named destination attributes. |
void |
mapTopPrediction(ClassificationApplyContent content,
java.lang.String destPhysAttrName)
Maps the prediction with the highest probability to appear in the apply output under the specified attribute name. |
void |
setCostMatrixName(java.lang.String costMatrixName)
Sets the name of the cost matrix to be used for apply, if supportsCapability for costMatrix returns true. |
| Methods inherited from interface javax.datamining.task.apply.ApplySettings |
getSourceDestinationMap, resetMapping, setSourceDestinationMap, verify |
| Methods inherited from interface javax.datamining.MiningObject |
getCreationDate, getCreatorInfo, getDescription, getName, getObjectIdentifier, getObjectType, setDescription |
| Method Detail |
public ClassificationApplyContent getContent(java.lang.String destinationAttrName)
throws JDMException
The attribute name must not be null.
destinationAttrName - The name of the physical attribute whose designated content type is to be returned.
JDMException
public ClassificationApplyContent[] getContentsByCategory(java.lang.Object categoryValue)
throws JDMException
categoryValue - The target class whose associated apply contents are to be returned.
JDMException
public ClassificationApplyContent[] getContentsByRank(int rank)
throws JDMException
mapByRank has not been invoked.
The rank must be greater than or equal to 1.
rank - The rank of the prediction whose content types are to be returned.
JDMExceptionpublic java.lang.String getCostMatrixName()
setCostMatrixName method.
public java.lang.String getMappedBaseDestinationAttributeName(ClassificationApplyContent content)
mapPredictions method. Returns null if the method has not been invoked.
content -
public java.lang.Object[] getMappedCategories()
mapByCategory method. Returns null otherwise.
public ClassificationApplyContent[] getMappedContents()
public java.lang.String getMappedDestinationAttrName(java.lang.Object categoryValue,
ClassificationApplyContent contentType)
throws JDMException
categoryValue - The target value to be represented as the destination attribute.contentType - The content type to be represented as the destination attribute.
JDMException
public java.lang.Integer getRank(java.lang.String destinationAttrName)
throws JDMException
distinationAttrName must not be null.
destinationAttrName - The name of the physical attribute whose designated rank is to be returned.
JDMExceptionpublic java.lang.Integer getRanks()
mapByRank method. Returns null if no such method has been invoked.
public boolean isFromTop()
public void mapByCategory(ClassificationApplyContent content,
java.lang.Object categoryValue,
java.lang.String destinationAttrName)
throws JDMException
For example, if the target attribute is color, a user may want to map the probability of the specific target value green to a destination attribute.
If this method is invoked on the same pair of content and categoryValue, or the destination attribute is duplicate, an exception is thrown.
content - A system-generated content to be included in the apply output.categoryValue - The category value to be mapped.destinationAttrName -
JDMException
public void mapByRank(ClassificationApplyContent content,
java.lang.String[] destPhysAttrNameArray,
boolean fromTop)
throws JDMException
For example, a user may want to map the predicted target values of the top 3 predictions (rank=1,2,3) to 3 destination attributes in the apply output, respectively.
If this method is invoked on the same content, the previous mapping is replaced with the new one.
Throws an exception if any destination attribute is duplicate.
content - A system-generated content to be included in the apply output.destPhysAttrNameArray - An array of destination attributes.fromTop - Indicates top predictions with the highest probabilities if true, or bottom predictions with lowest probabilities if false. If true/false, the top/bottom prediction is assigned to the first destination attribute (with index 0).
JDMException
public void mapPredictions(ClassificationApplyContent content,
java.lang.String baseDestPhysAttrName)
throws JDMException
If the same content is used, the previous mapping is replaced with the new one.
content - baseDestPhysAttrName -
JDMException
public void mapTopPrediction(ClassificationApplyContent content,
java.lang.String destPhysAttrName)
throws JDMException
Throws an exception if the destination attribute is duplicate.
content - The content type of the top prediction.destPhysAttrName - The attribute name of the content type for the top prediction.
JDMException
public void setCostMatrixName(java.lang.String costMatrixName)
throws JDMException
supportsCapability for costMatrix returns true.
If null is specified, the previously set cost matrix name becomes nullified.
costMatrixName -
JDMException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||