Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## fr.lip6.classifier
Class PegasosSVM<T>

    java.lang.Object
      fr.lip6.classifier.PegasosSVM<T>

All Implemented Interfaces:
  Classifier<T>

    public class PegasosSVM<T>

extends java.lang.Object
implements Classifier<T>

Constructor Summary
`PegasosSVM(Kernel<T> k)`

Method Summary
`java.util.ArrayList<java.lang.Double>` | `getAlphas()` returns the list of weights associated with the support vectors
`int` | `getK()`
`double` | `getLambda()`
`int` | `getT()`
`void` | `setK(int k)`
`void` | `setLambda(double lambda)`
`void` | `setT(int t)`
`void` | `train(java.util.ArrayList<TrainingSample<T>> l)` Replace the current training and train the classifier
`void` | `train(TrainingSample<T> t)` Add a single example to the current training set and train the classifier
`double` | `valueOf(T e)` Computes the category of the provided example

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PegasosSVM

    public PegasosSVM(Kernel<T> k)

Method Detail

### train

    public void train(java.util.ArrayList<TrainingSample<T>> l)

  Description copied from interface: `Classifier`
  Replace the current training and train the classifier

  Specified by:
    `train` in interface `Classifier<T>`
  Parameters:
    `l` - list of training samples

### train

    public void train(TrainingSample<T> t)

  Description copied from interface: `Classifier`
  Add a single example to the current training set and train the classifier

  Specified by:
    `train` in interface `Classifier<T>`
  Parameters:
    `t` - the training sample

### valueOf

    public double valueOf(T e)

  Description copied from interface: `Classifier`
  Computes the category of the provided example

  Specified by:
    `valueOf` in interface `Classifier<T>`
  Parameters:
    `e` - example
  Returns:
    >0. if e belongs to the category, <0. if not.

### getAlphas

    public java.util.ArrayList<java.lang.Double> getAlphas()

  returns the list of weights associated with the support vectors

  Returns:
    an ArrayList od Double containing the weights in the order of the training set.

### getT

    public int getT()

  Returns:
    the t

### setT

    public void setT(int t)

  Parameters:
    `t` - the t to set

### getK

    public int getK()

  Returns:
    the k

### setK

    public void setK(int k)

  Parameters:
    `k` - the k to set

### getLambda

    public double getLambda()

  Returns:
    the lambda

### setLambda

    public void setLambda(double lambda)

  Parameters:
    `lambda` - the lambda to set

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD