|
Oracle Data Mining Java API Reference 10g Release 1 (10.1) B12276-01 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.dmt.odm.MiningObject | +--oracle.dmt.odm.data.LogicalDataSpecification
An instance of LogicalDataSpecification
(LDS) is used to describe the logical characteristics of the data used in model building, and is composed of a set of mining attributes. The mining attributes contained in an LDS must have unique names.
An instance of LogicalDataSpecification
can be constructed in two ways:
LogicalDataSpecification
object, then add mining attributes. For example:LogicalDataSpecification lds = new LogicalDataSpecification();
lds.addAttribute( mAttr1 );
lds.addAttribute( mAttr2 );
...
LogicalDataSpecification
object using the create
utility method, which creates the LDS based on an input table. The user can use either transactional or non-transactional tables. For example:LogicalDataSpecification lds = LogicalDataSpecification.create(dmsConn, pds);
Oracle database data type |
Default Data Type |
Default Attribute Type |
---|---|---|
VARCHAR2 |
String |
Categorical |
CHAR with greater than 1 length |
String |
Categorical |
NUMBER |
Float |
Numerical |
NUMBER with zero scale |
Int |
Numerical |
CLOB |
Unstructured |
Text |
BLOB |
Unstructured |
Text |
BFILE |
Unstructured |
Text |
XMLTYPE |
Unstructured |
Text |
URITYPE |
Unstructured |
Text |
MiningAttribute
, MiningFunctionSettings
, Serialized FormConstructor Summary | |
LogicalDataSpecification() Creates an instance of LogicalDataSpecification with the specified array of MiningAttribute s. |
Method Summary | |
void |
addAttribute(MiningAttribute attribute) Adds a mining attribute to the LDS. |
void |
adjustNonStringAttributesType(java.lang.String[] attrNames, AttributeType changeToType) Deprecated. As of 10.1.0, replaced by MiningFunctionSettings.adjustAttributesType method. |
static LogicalDataSpecification |
create(Connection dmsConn, PhysicalDataSpecification pds) Creates an instance of LogicalDataSpecification with the default settings based on the database table specified in the input. |
static LogicalDataSpecification |
create(java.lang.String dbUrl, java.lang.String userName, java.lang.String password, java.lang.String tableName, java.lang.String schemaName, PhysicalDataSpecification pds) Deprecated. As of ODM 9.2.0. Use other create method. |
boolean |
equals(LogicalDataSpecification lds) Checks the equality of two logical data specifications. |
LocationAccessData |
getCategoricalDiscretizationTable() Gets the LocationAccessData pointing to the categorical discretization tables. |
MiningAttribute |
getMiningAttribute(java.lang.String name) Returns a mining attribute with the specified name in the LDS. |
MiningAttribute[] |
getMiningAttributes() Returns an array of mining attributes contained in the LDS. |
int |
getMiningAttributesCount() Returns the total count of mining attributes contained in the LDS. |
LocationAccessData |
getNumericalDiscretizationTable() Gets the LocationAccessData pointing to the numerical discretization tables. |
void |
setUserSuppliedDiscretizationTables(LocationAccessData numericalBoundaryTable, LocationAccessData categoricalBoundaryTable) Sets the user specified discretization tables(a.k.a bin boundary tables). |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LogicalDataSpecification()
LogicalDataSpecification
with the specified array of MiningAttribute
s. A valid LogicalDataSpecification
object must have mining attributes defined corresponding to the input mining data.Method Detail |
public MiningAttribute[] getMiningAttributes()
public MiningAttribute getMiningAttribute(java.lang.String name)
name
- An attribute namepublic void addAttribute(MiningAttribute attribute) throws InvalidArgumentException
The name of the mining attribute being added must be unique in the LDS. Otherwise, the mining function settings object containing this LDS would become invalid, which is checked when store
method in MiningFunctionSettings
is invoked.
attribute
- An instance of mining attributeInvalidArgumentException
-
MiningFunctionSettings
public boolean equals(LogicalDataSpecification lds)
lds
is null or does not have the same mining attributes.lds
- An instance of LDS to be compared to this instanceMiningAttribute
public static LogicalDataSpecification create(java.lang.String dbUrl, java.lang.String userName, java.lang.String password, java.lang.String tableName, java.lang.String schemaName, PhysicalDataSpecification pds) throws InvalidArgumentException, java.sql.SQLException, ODMException
create
method.LogicalDataSpecification
from the specified database table. This method supports both transactional and non-transaction data.
Default settings of MiningAttribute
in the LDS are based on the table column data type.
adjustNonStringAttributeType
method.dbUrl
- A JDBC URL like jdbc:oracle:thin:@host:port:siduserName
- A user namepassword
- The password of the specified user nametableName
- An input table name from which a logical data specification is to be createdschemaName
- The schema name where the specified input table is locatedpds
- A physical data specification that describes the input tableInvalidArgumentException
- when an invalid argument is passedjava.sql.SQLException
- when there is a failure in JDBC callsODMException
AttributeUsage
,create( oracle.dmt.odm.Connection dmsConn, PhysicalDataSpecification pds )
public static LogicalDataSpecification create(Connection dmsConn, PhysicalDataSpecification pds) throws InvalidArgumentException, java.sql.SQLException, ODMException
LogicalDataSpecification
with the default settings based on the database table specified in the input.
Default settings of MiningAttribute
in the LDS are based on the table column data type.
adjustNonStringAttributeType
method.dmsConn
- A connection to the data mining serverpds
- Input physical data specification used to create the associated logical data specificationInvalidArgumentException
-
dmsConn
or pds
is null, orpds
does not contain a LocationAccessData
.java.sql.SQLException
- when there is a failure in JDBC calls.ODMException
LocationAccessData
, PhysicalDataSpecification
public void adjustNonStringAttributesType(java.lang.String[] attrNames, AttributeType changeToType) throws InvalidArgumentException
MiningFunctionSettings.adjustAttributesType
method.This method is especially useful when LDS is created using the create
utility method. Scine create
method uses the table column datatype as the basis for defining attribute type, this method provides a convenient way to modify the attribute types.
attrNames
- The names of mining attributes to be changedchangeToType
- New attribute typeInvalidArgumentException
-
attrNames
or changeToType
is null, orpds
does not contain a LocationAccessData
.AttributeType
public int getMiningAttributesCount()
public void setUserSuppliedDiscretizationTables(LocationAccessData numericalBoundaryTable, LocationAccessData categoricalBoundaryTable) throws InvalidArgumentException
USAGE : To use this feature, mark all the attributes that need preparation as Unprepared. The bin boundary tables must contain information to bin all the attributes that are unprepared. Assuming this is the api user's responsibility, ODM wll not validate the list of unprepared attributes against the contents of bin boundary tables. Supplying the bin boundary table names, will switch off automatic bin boundary tables creation. The supplied tables will be used instead. The schema of the supplied bin boundary tables MUST match the schema of the tables created using Transformation.createDiscretizationTables
numericalBoundaryTable
- User supplied numerical boundary tablecategoricalBoundaryTable
- User supplied categorical boundary tableInvalidArgumentException
- is thrown - when one of the LocationAccessData objects is nullpublic LocationAccessData getNumericalDiscretizationTable()
public LocationAccessData getCategoricalDiscretizationTable()
|
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |