edu.berkeley.compbio.jlibsvm
Class SolutionVector<P>

java.lang.Object
  extended by edu.berkeley.compbio.jlibsvm.SolutionVector<P>
All Implemented Interfaces:
Comparable<SolutionVector>

public class SolutionVector<P>
extends Object
implements Comparable<SolutionVector>

Version:
$Id$
Author:
David Soergel

Nested Class Summary
static class SolutionVector.Status
           
 
Field Summary
 double alpha
           
 double G
           
 int id
          keep track of the sample id for mapping to ranks
 float linearTerm
           
 P point
           
 int rank
          Used by the cacheing mechanism to keep track of which SVs are the most active.
 boolean targetValue
           
 
Constructor Summary
SolutionVector(int id, P key, Boolean targetValue, float linearTerm)
           
SolutionVector(int id, P key, Boolean value, float linearTerm, float alpha)
           
 
Method Summary
 int compareTo(SolutionVector b)
           
 boolean equals(Object o)
           
 int hashCode()
           
 boolean isShrinkable(double Gmax1, double Gmax2)
           
 boolean isShrinkable(double Gmax1, double Gmax2, double Gmax3, double Gmax4)
           
protected  boolean isUpperBound()
           
 String toString()
           
 void updateAlphaStatus(float Cp, float Cn)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

rank

public int rank
Used by the cacheing mechanism to keep track of which SVs are the most active.


id

public final int id
keep track of the sample id for mapping to ranks


point

public final P point

targetValue

public boolean targetValue

alpha

public double alpha

G

public double G

linearTerm

public float linearTerm
Constructor Detail

SolutionVector

public SolutionVector(int id,
                      @NotNull
                      P key,
                      Boolean targetValue,
                      float linearTerm)

SolutionVector

public SolutionVector(int id,
                      @NotNull
                      P key,
                      Boolean value,
                      float linearTerm,
                      float alpha)
Method Detail

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

compareTo

public int compareTo(SolutionVector b)
Specified by:
compareTo in interface Comparable<SolutionVector>

isShrinkable

public boolean isShrinkable(double Gmax1,
                            double Gmax2)

isUpperBound

protected boolean isUpperBound()

isShrinkable

public boolean isShrinkable(double Gmax1,
                            double Gmax2,
                            double Gmax3,
                            double Gmax4)

updateAlphaStatus

public void updateAlphaStatus(float Cp,
                              float Cn)


Copyright © 2008-2013 David Soergel. All Rights Reserved.