org.opentox.algorithm.trainer
Class SvcTrainer

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

public class SvcTrainer
extends AbstractTrainer

Version:
1.3.3 (Last update: Dec 20, 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  java.lang.String cacheSize
          The cahed memory used in model training.
private  java.lang.String coeff0
          The bias of the support vector model.
private  java.lang.String cost
          The Cost coefficient.
private  double d
           
private  weka.core.Instances dataInstances
          An Instances object used to store the data.
private  java.lang.String degree
          The degree of the polynomial kernel (when used).
private  java.lang.String epsilon
          The parameter epsilon used in SVM models.
private  java.lang.String gamma
          The kernel parameter gamma used in various kernel functions.
private  int i
           
private  java.lang.String kernel
          The kernel used in the SVM model.
private  int model_id
          The id of the generated model.
private static long serialVersionUID
           
private  java.lang.String targetAttribute
          The name of the target attribute which normally is the URI of a feature definition.
private  java.lang.String tolerance
          The tolerance used in model training.
 
Fields inherited from class org.opentox.algorithm.trainer.AbstractTrainer
dataseturi, form, resource, targeturi
 
Fields inherited from class org.opentox.error.ErrorSource
errorRep
 
Constructor Summary
SvcTrainer(org.restlet.data.Form form, org.restlet.resource.ServerResource resource)
          Constructor of the trainer.
 
Method Summary
 ErrorRepresentation checkParameters()
          Check the consistency of the posted parameters.
 org.restlet.representation.Representation train()
          Train a support vector machine classification 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

targetAttribute

private java.lang.String targetAttribute
The name of the target attribute which normally is the URI of a feature definition.


kernel

private java.lang.String kernel
The kernel used in the SVM model. This can be rbf, linear, sigmoid or polynomial.


degree

private java.lang.String degree
The degree of the polynomial kernel (when used).


cacheSize

private java.lang.String cacheSize
The cahed memory used in model training.


cost

private java.lang.String cost
The Cost coefficient.


epsilon

private java.lang.String epsilon
The parameter epsilon used in SVM models.


gamma

private java.lang.String gamma
The kernel parameter gamma used in various kernel functions.


coeff0

private java.lang.String coeff0
The bias of the support vector model.


tolerance

private java.lang.String tolerance
The tolerance used in model training.


model_id

private int model_id
The id of the generated model.


dataInstances

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

Constructor Detail

SvcTrainer

public SvcTrainer(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()
Train a support vector machine classification model.

Returns:
representation of the training result.

checkParameters

public ErrorRepresentation checkParameters()
Description copied from interface: ITrainer
Check the consistency of the posted parameters.

Returns:
A null Representation if the posted parameters are consistent, or an Error Message otherwise.