edu.udo.cs.yale.operator.learner.kernel.evosvm
Class EvoSVMModel

java.lang.Object
  extended by edu.udo.cs.yale.operator.AbstractIOObject
      extended by edu.udo.cs.yale.operator.ResultObjectAdapter
          extended by edu.udo.cs.yale.operator.AbstractModel
              extended by edu.udo.cs.yale.operator.IOModel
                  extended by edu.udo.cs.yale.operator.learner.PredictionModel
                      extended by edu.udo.cs.yale.operator.learner.kernel.KernelModel
                          extended by edu.udo.cs.yale.operator.learner.kernel.evosvm.EvoSVMModel
All Implemented Interfaces:
IOObject, Model, ResultObject, Saveable

public class EvoSVMModel
extends KernelModel

The model for the evolutionary SVM. Basically the same as other SVM models.

Version:
$Id: EvoSVMModel.java,v 1.9 2006/09/30 00:05:30 ingomierswa Exp $
Author:
Ingo Mierswa

Field Summary
private  double bias
          The bias.
private  Kernel kernel
          The used kernel function.
private  int numberOfAttributes
          The number of attributes.
private  java.util.List<SupportVector> supportVectors
          The list of all support vectors.
 
Constructor Summary
EvoSVMModel()
          Creates a new EvoSVMModel (after loading).
EvoSVMModel(Attribute label)
          Creates a new EvoSVMModel (after loading).
EvoSVMModel(Attribute label, java.util.List<SupportVector> supportVectors, Kernel kernel, double bias)
          Creates a new EvoSVMModel after training.
 
Method Summary
 double getAlpha(int index)
           
 double getAttributeValue(int exampleIndex, int attributeIndex)
           
 java.lang.String getClassificationLabel(int index)
           
 double getFunctionValue(int index)
           
 java.lang.String getId(int index)
           
 java.lang.String getModelInfo()
           
 int getNumberOfAttributes()
           
 int getNumberOfExamples()
           
 double getRegressionLabel(int index)
           
 boolean isClassificationModel()
           
 void performPrediction(ExampleSet exampleSet, Attribute predictedLabelAttribute)
          Applies the model to each example of the example set.
 void readPredictionModelData(java.io.ObjectInputStream in)
          Reads the data for this model.
 java.lang.String toString()
          Returns a string representation of this model.
 void writePredictionModelData(java.io.ObjectOutputStream out)
          Writes the data for this model.
 
Methods inherited from class edu.udo.cs.yale.operator.learner.kernel.KernelModel
getVisualisationComponent
 
Methods inherited from class edu.udo.cs.yale.operator.learner.PredictionModel
apply, createPredictedLabel, getLabel, readData, removePredictedLabel, setLabel, writeData
 
Methods inherited from class edu.udo.cs.yale.operator.AbstractModel
equals, getExtension, getFileDescription, readModel, readModel, save, setParameter, writeModel, writeModel
 
Methods inherited from class edu.udo.cs.yale.operator.ResultObjectAdapter
addAction, getActions, getName, toHTML, toResultString
 
Methods inherited from class edu.udo.cs.yale.operator.AbstractIOObject
copy, read, read, read, write, write
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.udo.cs.yale.operator.ResultObject
getActions, getName, toResultString
 
Methods inherited from interface edu.udo.cs.yale.operator.IOObject
copy, write, write
 

Field Detail

kernel

private Kernel kernel
The used kernel function.


supportVectors

private java.util.List<SupportVector> supportVectors
The list of all support vectors.


bias

private double bias
The bias.


numberOfAttributes

private int numberOfAttributes
The number of attributes.

Constructor Detail

EvoSVMModel

public EvoSVMModel()
Creates a new EvoSVMModel (after loading).


EvoSVMModel

public EvoSVMModel(Attribute label)
Creates a new EvoSVMModel (after loading).


EvoSVMModel

public EvoSVMModel(Attribute label,
                   java.util.List<SupportVector> supportVectors,
                   Kernel kernel,
                   double bias)
Creates a new EvoSVMModel after training.

Method Detail

getModelInfo

public java.lang.String getModelInfo()
Specified by:
getModelInfo in class KernelModel

isClassificationModel

public boolean isClassificationModel()
Specified by:
isClassificationModel in class KernelModel

getAlpha

public double getAlpha(int index)
Specified by:
getAlpha in class KernelModel

getId

public java.lang.String getId(int index)
Specified by:
getId in class KernelModel

getNumberOfExamples

public int getNumberOfExamples()
Specified by:
getNumberOfExamples in class KernelModel

getNumberOfAttributes

public int getNumberOfAttributes()
Specified by:
getNumberOfAttributes in class KernelModel

getAttributeValue

public double getAttributeValue(int exampleIndex,
                                int attributeIndex)
Specified by:
getAttributeValue in class KernelModel

getClassificationLabel

public java.lang.String getClassificationLabel(int index)
Specified by:
getClassificationLabel in class KernelModel

getRegressionLabel

public double getRegressionLabel(int index)
Specified by:
getRegressionLabel in class KernelModel

getFunctionValue

public double getFunctionValue(int index)
Specified by:
getFunctionValue in class KernelModel

performPrediction

public void performPrediction(ExampleSet exampleSet,
                              Attribute predictedLabelAttribute)
Applies the model to each example of the example set.

Specified by:
performPrediction in class PredictionModel


readPredictionModelData

public void readPredictionModelData(java.io.ObjectInputStream in)
                             throws java.io.IOException
Reads the data for this model.

Specified by:
readPredictionModelData in class PredictionModel
Throws:
java.io.IOException


writePredictionModelData

public void writePredictionModelData(java.io.ObjectOutputStream out)
                              throws java.io.IOException
Writes the data for this model.

Specified by:
writePredictionModelData in class PredictionModel
Throws:
java.io.IOException


toString

public java.lang.String toString()
Returns a string representation of this model.

Overrides:
toString in class PredictionModel



Copyright © 2001-2006