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

B12276-01

oracle.dmt.odm.result
Class RecordInstance

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

public class RecordInstance
extends MiningObject

An instance of RecordInstance represents a single record of data. It is primarily used as input and output of the apply operation.

Since:
9.0.1
See Also:
MiningApplyTask, MiningApplyOutput AttributeInstance, Serialized Form

Field Summary
static java.lang.String PROBABILITY_ATTRIBUTE_NAME
          Constant specifying the name of the probability attribute as used in the apply result.
static java.lang.String RULE_ID_ATTRIBUTE_NAME
          Constant specifying the name of the rule id attribute as used in the ABN record apply result.
static java.lang.String RULE_RANK_ATTRIBUTE_NAME
          Constant specifying the name of the rule rank attribute as used in the ABN record apply result.
static java.lang.String SCORE_ATTRIBUTE_NAME
          Constant specifying the name of the score attribute as used in the apply result.

 

Constructor Summary
RecordInstance()
          Creates an empty instance of record instance.

 

Method Summary
 void addAttributeInstance(AttributeInstance instance)
          Adds an attribute instance to this record instance.
 void addAttributeInstance(java.lang.String attrName, float value)
          Adds an attribute instance of float typr with the specified name to this record instance.
 void addAttributeInstance(java.lang.String attrName, int value)
          Adds an attribute instance of integer type with the specified name to this record instance.
 void addAttributeInstance(java.lang.String attrName, java.lang.String value)
          Adds an attribute instance of string typr with the specified name to this record instance.
 AttributeInstance getValue(java.lang.String attrName)
          Returns an AttrributeInstance with the given name.
 AttributeInstance[] getValues()
          Returns an array of attrribute instances contained in this record instance.

 

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

 

Field Detail

PROBABILITY_ATTRIBUTE_NAME

public static final java.lang.String PROBABILITY_ATTRIBUTE_NAME
Constant specifying the name of the probability attribute as used in the apply result.
See Also:
Constant Field Values

SCORE_ATTRIBUTE_NAME

public static final java.lang.String SCORE_ATTRIBUTE_NAME
Constant specifying the name of the score attribute as used in the apply result.
See Also:
Constant Field Values

RULE_ID_ATTRIBUTE_NAME

public static final java.lang.String RULE_ID_ATTRIBUTE_NAME
Constant specifying the name of the rule id attribute as used in the ABN record apply result.
See Also:
Constant Field Values

RULE_RANK_ATTRIBUTE_NAME

public static final java.lang.String RULE_RANK_ATTRIBUTE_NAME
Constant specifying the name of the rule rank attribute as used in the ABN record apply result.
See Also:
Constant Field Values
Constructor Detail

RecordInstance

public RecordInstance()
Creates an empty instance of record instance. Subsequent addAttributeInstance must be invoked to create a valid record instance.
Method Detail

addAttributeInstance

public void addAttributeInstance(AttributeInstance instance)
                          throws InvalidArgumentException
Adds an attribute instance to this record instance. This method is used when adding instances of AttributeInstance for record apply operation.

Refer to apply methods in SupervisedModel for further details on record apply operation.

Parameters:
instance - An attribute instance to be added
Returns:
void
Throws:
InvalidArgumentException -
  • instance is null, or
  • the data type of instance is not int, float or string.

addAttributeInstance

public void addAttributeInstance(java.lang.String attrName,
                                 int value)
                          throws ODMException
Adds an attribute instance of integer type with the specified name to this record instance. This method is used when adding instances of AttributeInstance of integer type for record apply operation.

Refer to apply methods in SupervisedModel for further details on record apply operation.

Parameters:
attrName - The name of the attribute instance to be added
value - The value of the attribute instance
Returns:
void
Throws:
ODMException - attrName is null, or empty, or exceeds 30 bytes in length.
Since:
9.2.0

addAttributeInstance

public void addAttributeInstance(java.lang.String attrName,
                                 float value)
                          throws ODMException
Adds an attribute instance of float typr with the specified name to this record instance. This method is used when adding instances of AttributeInstance of float type for record apply operation.

Refer to apply methods in SupervisedModel for further details on record apply operation.

Parameters:
attrName - The name of the attribute instance to be added
value - The value of the attribute instance
Returns:
void
Throws:
ODMException - attrName is null, or empty, or exceeds 30 bytes in length.
Since:
9.2.0

addAttributeInstance

public void addAttributeInstance(java.lang.String attrName,
                                 java.lang.String value)
                          throws ODMException
Adds an attribute instance of string typr with the specified name to this record instance. This method is used when adding instances of AttributeInstance of string type for record apply operation.

Refer to apply methods in SupervisedModel for further details on record apply operation.

Parameters:
attrName - The name of the attribute instance to be added
value - The value of the attribute instance
Returns:
void
Throws:
ODMException - attrName is null, or empty, or exceeds 30 bytes in length.
Since:
9.2.0

getValues

public AttributeInstance[] getValues()
Returns an array of attrribute instances contained in this record instance.
Returns:
AttributeInstance[] - An array of attribute instances

getValue

public AttributeInstance getValue(java.lang.String attrName)
Returns an AttrributeInstance with the given name.
Parameters:
attrName - The name of the attribute instance to be returned
Returns:
AttributeInstance - The attribute instance with the specified name

Copyright © 2003 Oracle Corporation. All Rights Reserved.