org.opentox.interfaces
Interface IDataset

All Superinterfaces:
IProne2Error
All Known Implementing Classes:
Dataset

public interface IDataset
extends IProne2Error

Author:
chung

Method Summary
 weka.core.Instances getInstaces(java.lang.String target, boolean isClassNominal)
          This method is used to encapsulate the data of the RDF document in a weka.core.Instances object which can be used to create Regression and classification models using weka algorithms.
 weka.core.Instances getInstances(java.lang.String model_id)
          Similar to Dataset.getInstaces(java.lang.String, boolean) but the generated Instances is constructed with respect to a certain model.
 Dataset populateDataset(weka.core.Instances predictedData)
           
 
Methods inherited from interface org.opentox.interfaces.IProne2Error
getErrorRep
 

Method Detail

getInstaces

weka.core.Instances getInstaces(java.lang.String target,
                                boolean isClassNominal)
                                throws java.lang.Exception
This method is used to encapsulate the data of the RDF document in a weka.core.Instances object which can be used to create Regression and classification models using weka algorithms.

Description:
This method was developed to generate datasets (as Instances) in order to be used as input to training algorithms of weka.

Characteristics of generated Instances:
The relation name of the generated instances is the same with the identifier of the dataset. If no identifier is available, then this is set to some arbitraty URI. If isClassNominal is set to false, the class attribute is not defined in this method but it can be set externally (from the method that calls getWekaDataset). If isClassNominal is set to true, the target of the datset is defined by the first agument of the method (String target).
The attributes of the Instances object coincides with the set of features of the dataset in RDF format.

Parameters:
target - URI of the target feature of the dataset. It is optional (you may leave it null) if you are going to use the Instances for regression models and isClassNominal is set to false, otherwise you have to specify a valid feature URI.
isClassNominal - Set to true if the class attribute should be considered to be nominal.
Returns:
The Instances object which encapsulates the data in the RDF document.
Throws:
java.lang.Exception

getInstances

weka.core.Instances getInstances(java.lang.String model_id)
Similar to Dataset.getInstaces(java.lang.String, boolean) but the generated Instances is constructed with respect to a certain model.

Parameters:
model_id -
Returns:
Instances for prediction using a given model.

populateDataset

Dataset populateDataset(weka.core.Instances predictedData)
Parameters:
predictedData -
Returns:
Populated Dataset.