org.opentox.algorithm.trainer
Class SvmTrainer

java.lang.Object
  extended by org.opentox.error.ErrorSource
      extended by org.opentox.algorithm.trainer.AbstractTrainer
          extended by org.opentox.algorithm.trainer.SvmTrainer
All Implemented Interfaces:
IProne2Error, ITrainer

public class SvmTrainer
extends AbstractTrainer

Trainer for Support Vector Machine Regression Models.

Version:
1.3.3 (Last update: Dec 28, 2009)
Author:
OpenTox - http://www.opentox.org/, Sopasakis Pantelis, Sarimveis Harry

Nested Class Summary
 
Nested classes/interfaces inherited from class org.opentox.algorithm.trainer.AbstractTrainer
AbstractTrainer.Classification, AbstractTrainer.Regression
 
Field Summary
private  double d
           
private  weka.core.Instances dataInstances
          An Instances object used to store the data.
private  int i
           
private  int model_id
          The id of the generated model.
private  SvmParameters prm
          Tuning Parameters for the SVM algorithm.
private static long serialVersionUID
           
 
Fields inherited from class org.opentox.algorithm.trainer.AbstractTrainer
dataseturi, form, resource, targeturi
 
Fields inherited from class org.opentox.error.ErrorSource
errorRep
 
Constructor Summary
SvmTrainer(org.restlet.data.Form form, org.restlet.resource.ServerResource resource)
          Constructor of the trainer.
 
Method Summary
 ErrorRepresentation checkParameters()
          Check the consistency of the POSTed svm parameters and assign default values to the parameters that where not posted.
 org.restlet.representation.Representation train()
          Trains a new SVM model.
 
Methods inherited from class org.opentox.error.ErrorSource
getErrorRep
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opentox.interfaces.IProne2Error
getErrorRep
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

i

private int i

d

private double d

prm

private SvmParameters prm
Tuning Parameters for the SVM algorithm.


model_id

private int model_id
The id of the generated model.


dataInstances

private volatile weka.core.Instances dataInstances
An Instances object used to store the data.

Constructor Detail

SvmTrainer

public SvmTrainer(org.restlet.data.Form form,
                  org.restlet.resource.ServerResource resource)
Constructor of the trainer.

Parameters:
form - The posted data.
Method Detail

train

public org.restlet.representation.Representation train()
Trains a new SVM model. Stores a serialized version of the weka model and produces an RDF representation which is also stored in a file.

Returns:
representation of training result.

checkParameters

public ErrorRepresentation checkParameters()
Check the consistency of the POSTed svm parameters and assign default values to the parameters that where not posted. The dataInstances are updated according to the dataset uri.

Returns:
representation of the errors that might occur during parameter checking.