oracle.dmt.odm.task
Class ClassificationTestTask
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.ClassificationTestTask
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- CrossValidateTask
- public class ClassificationTestTask
- extends MiningDataTask
An instance of ClassificationTestTask
is used for testing a model on test data. Test involves computing the accuracy of the model and confusion matrix. The test task can be performed using any supervised model supported by ODM.
ClassificationTestTask
's input data must have all the active attributes used in model building and target attribute of the associated supervised model. DataUsageSpecifications
of the model build input data and test input data must be same. If the task input data is not compatible with the specified input model, the test test task will fail with an exception.
After constructing a valid ClassificationTestTask
instance, it must be persisted in the data mining server using the store(dmsConn, taskName)
instance method before executing. The task name must be unique in the user schema task name space.
After successful completion of the test task, the user can retrieve the results using a ClassificationTestResult
object. To remove the mining test task object in a data mining server, invoke the static method remove
.
- Since:
- ODM 9.2.0
- See Also:
- Serialized Form
Constructor Summary |
ClassificationTestTask(PhysicalDataSpecification taskInputData, java.lang.String inputModelName, java.lang.String testResultName)
Creates an instance of test task from the given test data, the model to which the test data is applied, and the location of the test output. |
Methods inherited from class oracle.dmt.odm.task.MiningTask |
execute, getActiveExecutionHandle, getCurrentStatus, getExecutionDuration, getExecutionHandle, getLatestExecutionHandle, getName, getStatusHistory, getTaskType, getType, listTasks, remove, rename, store, terminate, waitForCompletion, waitForCompletion |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClassificationTestTask
public ClassificationTestTask(PhysicalDataSpecification taskInputData,
java.lang.String inputModelName,
java.lang.String testResultName)
throws InvalidArgumentException,
ODMException
- Creates an instance of test task from the given test data, the model to which the test data is applied, and the location of the test output.
- Parameters:
taskInputData
- Physical data specification of the test input data
inputModelName
- Name of the input mining model to be tested
testResultName
- Name of the test results
- Throws:
InvalidArgumentException
- is thrown
- when any of the parameters are null
- when the taskInputData
does not have location access details
- when the inputModelName or testResultName
length >64
InvalidArgumentException
ODMException
getTestResultName
public java.lang.String getTestResultName()
- Returns test result name used for this task.
-
- Returns:
- test result name.
restore
public static ClassificationTestTask restore(Connection dmsConn,
java.lang.String taskName)
throws InvalidArgumentException,
MiningTaskException,
java.sql.SQLException,
ODMException
- Restores the named test task object from the database.
-
- Parameters:
dmsConn
- Data mining server connection.
taskName
- Name of the test task.
- Returns:
ClassificationTestTask
- restored classification test task object
- 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
InvalidArgumentException
MiningTaskException
java.sql.SQLException
ODMException