oracle.dmt.odm.task
Class MiningApplyTask

java.lang.Object
  |
  +--oracle.dmt.odm.MiningObject
        |
        +--oracle.dmt.odm.LocatableObject
              |
              +--oracle.dmt.odm.task.MiningTask
                    |
                    +--oracle.dmt.odm.task.MiningDataTask
                          |
                          +--oracle.dmt.odm.task.MiningApplyTask
All Implemented Interfaces:
java.io.Serializable

public class MiningApplyTask
extends MiningDataTask

An instance of MiningApplyTask is used for applying a model to a data set to make predictions, classifications, and to provide associated probabilities. The apply task can be performed using any supervised model or clustering model supported by ODM.

ODM supports flexible ways to create the apply output table. The MiningApplyOutput (MAO) object is used to specify the apply output table format using ApplyContentItem. The MAO provides the ability to specify the computation of top N scores of the target attribute and associated probability. It also provides the user the ability to specify the computation of probability of a specified target attribute category.

The input data for a MiningApplyTask must have all the active attributes used in building the associated supervised model. Input data must also have all source attributes specified in the MAO. If the task input data is not compatible with the specified input model and MAO, the execution of apply task throws an exception.

After constructing a valid MiningApplyTask instance, the task must be persisted in the DMS using store(dmsConn, taskName) method before executing. The task name must be unique in the DMS task name space.

After successful completion of the apply task, the apply output table is avaliable in the user-specified schema. MiningApplyResults object can be used to retrieve the result details of the apply task. To remove the mining apply task object in a DMS, call the remove(dmsConn, taskName) method.

Since:
ODM 9.2.0
See Also:
Serialized Form

Constructor Summary
MiningApplyTask(PhysicalDataSpecification taskInputData, java.lang.String inputModelName, MiningApplyOutput applyOutput, LocationAccessData applyOutputLoc, java.lang.String applyResultName)
          Creates an instance of the apply task from the given mining data (as a set of records), the model to which the data is applied, and the apply output.
 
Method Summary
TypeMethod
 MiningApplyOutput getApplyOutput()
          Returns the apply output specification used in performing the apply operation.
 java.lang.String getApplyResultName()
          Returns the apply result name.
 LocationAccessData getOutputDataLocation()
          Returns location of the apply output table.
static MiningApplyTask restore(Connection dmsConn, java.lang.String taskName)
          Restores the user-specified mining apply task object from the data mining server.
 
Methods inherited from class oracle.dmt.odm.task.MiningDataTask
getInputModelName, getTaskInputData
 
Methods inherited from class oracle.dmt.odm.task.MiningTask
execute, getCurrentStatus, getExecutionDuration, getName, getStatusHistory, listTasks, remove, store, terminate, waitForCompletion, waitForCompletion
 
Methods inherited from class oracle.dmt.odm.LocatableObject
deserialize, serialize
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MiningApplyTask

public MiningApplyTask(PhysicalDataSpecification taskInputData,
                       java.lang.String inputModelName,
                       MiningApplyOutput applyOutput,
                       LocationAccessData applyOutputLoc,
                       java.lang.String applyResultName)
                throws InvalidArgumentException,
                       ODMException
Creates an instance of the apply task from the given mining data (as a set of records), the model to which the data is applied, and the apply output.
Parameters:
taskInputData - Physical data specification of the input data
inputModelName - Input mining model name in the data mining server
applyOutput - Apply output specification. For more details refer to oracle.dmt.odm.result.MiningApplyOutput
applyOutputLocn - Location details of the apply output data (i.e., scoring, propability etc.)
applyResultName - Apply result name
Throws:
InvalidArgumentException - is thrown
- when any of the input arguments are null
- when the inputModelName/applyResultName length >64
- when the taskInputData does not have location access data
- when the applyOutput is not valid
Method Detail

getApplyOutput

public MiningApplyOutput getApplyOutput()
Returns the apply output specification used in performing the apply operation.
Returns:
MiningApplyOutput.

getApplyResultName

public java.lang.String getApplyResultName()
Returns the apply result name.
Returns:
String - apply result name.

getOutputDataLocation

public LocationAccessData getOutputDataLocation()
Returns location of the apply output table. This table is created once the apply task is successful.
Returns:
LocationAccessData - apply output table location.

restore

public static MiningApplyTask restore(Connection dmsConn,
                                      java.lang.String taskName)
                               throws InvalidArgumentException,
                                      MiningTaskException,
                                      java.sql.SQLException,
                                      ODMException
Restores the user-specified mining apply task object from the data mining server.
Parameters:
dmsConn - Data mining server connection.
taskName - Name of the apply task.
Returns:
MiningApplyTask Restored mining apply task.
Throws:
InvalidArgumentException - is thrown
- when the dmsConn/taskName are null
- when the taskName length >64 characters
MiningTaskException - is thrown
- when the restore fails
SQLException - is thrown
- when there is a failure in JDBC calls