org.opentox.algorithm.trainer
Class SvmTrainer
java.lang.Object
org.opentox.error.ErrorSource
org.opentox.algorithm.trainer.AbstractTrainer
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
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
|
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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.
SvmTrainer
public SvmTrainer(org.restlet.data.Form form,
org.restlet.resource.ServerResource resource)
- Constructor of the trainer.
- Parameters:
form
- The posted data.
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.