oracle.dmt.odm.result
Class ModelSeekerResult
java.lang.Object
|
+--oracle.dmt.odm.MiningObject
|
+--oracle.dmt.odm.LocatableObject
|
+--oracle.dmt.odm.result.MiningResult
|
+--oracle.dmt.odm.result.MiningBuildResult
|
+--oracle.dmt.odm.result.ModelSeekerResult
- All Implemented Interfaces:
- java.io.Serializable
- public class ModelSeekerResult
- extends MiningBuildResult
An instance of ModelSeekerResult
contains the results objects created by the execution
of a ModelSeekerTask
.
This class contains an array of ModelSeekerResultEntry
objects,
one for each model built by the ModelSeekerTask
execution.
The ModelSeekerResultEntry
corresponding to the best model
(as determined by the ModelSeekerTask
execution)
is identified in the ModelSeekerResult
by an index
into the ModelSeekerResultEntry
array.
This class has no public constructor because instances
of this class are created only by the execution of the restore
method.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
restore
public static MiningBuildResult restore(Connection dmsConn,
java.lang.String resultName)
throws InvalidArgumentException,
java.sql.SQLException,
ODMException
- Restores the
ModelSeekerResult
object of the given name.
The result object gets created as a ModelSeekerTask
is executed
and may be restored while the execution is taking place. The name of
the result object is supplied as an argument to the ModelSeekerTask
object.
It is NECESSARY TO CAST the object returned by this method to be a
ModelSeekerResult
object in the following manner:
ModelSeekerResult msResult =
(ModelSeekerResult)ModelSeekerResult.restore(conn,"name");
- Parameters:
msConn
- MiningServer
connection handle.sResultName
- Name of the result object to be restored.- Returns:
- The
ModelSeekerResult
object cast as a MiningBuildResult
object. - Throws:
ODMException
- the caller has not previously logged into ODM DMSSQLException
- failure in a JDBC call to the database made by an internally used methodInvalidArgumentException
- null dmsConn
- null sTaskName
- zero length or too long sTaskName
argument
If there is more than one invalid argument, the exception message
identifies the first invalid argument found and the reason it is invalid.
remove
public static void remove(Connection dmsConn,
java.lang.String resultName)
throws java.sql.SQLException,
InvalidArgumentException,
MiningObjectException
- Removes the
ModelSeekerResult
object of the given name.
The name of the result object is supplied as an argument to the
ModelSeekerTask
constructor.
This remove
method cleans up all the named objects associated with
the ModelSeekerResult
.
The items removed include:
1. All the ModelSeekerResultEntry
objects associated with the ModelSeekerResult
object
2. All the MiningTestResult
objects associated with all the ModelSeekerResultEntry
objects
3. All the MiningLiftResult
objects associated with all the ModelSeekerResultEntry
objects
4. All the MiningFunctionSettings
objects associated with all the ModelSeekerResultEntry
objects
5. The "best" MiningModel
object stored by the ModelSeeker
- Parameters:
dmsConnection
- This object is the connection handle to the ODM MiningServer
.resultName
- This is the name of the result object to be removed.- Throws:
InvalidArgumentException
- zero length or too long sResultName argumentSQLException
- failure in a JDBC call to the database made by an internally used method.MiningObjectException
- no result object of given name found in database
- unable to roll back after an error
getBestModelIndex
public int getBestModelIndex()
- Returns the index corresponding to the best model.
The following code illustrates how to retrieve the
ModelSeekerResultEntry
object corresponding to
the best model for the ModelSeekerResult
:
ModelSeekerResultEntry[] myEntries = myResult.getModelSeekerEntrysArray();
int bestModelIndex = myResult.getBestModelIndex();
ModelSeekerResultEntry bestEntry = myEntries[bestModelIndex];
- Returns:
- The index, into the
ModelSeekerResultEntry
array, corresponding to the best model associated with current
ModelSeekerResult
object.
getModelSeekerEntryArray
public ModelSeekerResultEntry[] getModelSeekerEntryArray()
- Returns the array of
ModelSeekerResultEntry
objects.
- Returns:
- The array of the
ModelSeekerResultEntry
objects
associated with current ModelSeekerResult
object. Each object
in the array corresponds to one model built by the ModelSeekerTask
.