|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava.stats.svm.tools.SuffixTreeKernel
public class SuffixTreeKernel
Computes the dot-product of two suffix-trees as the sum of the products of the counts of all nodes they have in common.
This implementation allows you to scale the sub-space for each word length independently.
Nested Class Summary | |
---|---|
static interface |
SuffixTreeKernel.DepthScaler
Encapsulates the scale factor to apply at a given depth. |
static class |
SuffixTreeKernel.MultipleScalar
Scale using a multiple of two DepthScalers. |
static class |
SuffixTreeKernel.NullModelScaler
Scales by 4^depth - equivalent to dividing by a probablistic flatt prior null model |
static class |
SuffixTreeKernel.SelectionScalar
Scale using a BitSet to allow/disallow depths. |
static class |
SuffixTreeKernel.UniformScaler
Scale all depths by 1.0 |
Constructor Summary | |
---|---|
SuffixTreeKernel()
|
Method Summary | |
---|---|
double |
evaluate(Object a,
Object b)
Calculate the dot product between the SuffixTrees a and b. |
SuffixTreeKernel.DepthScaler |
getDepthScaler()
Retrieve the current DepthScaler. |
void |
setDepthScaler(SuffixTreeKernel.DepthScaler depthScaler)
Change the current DepthScaler to depthScaler. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SuffixTreeKernel()
Method Detail |
---|
public SuffixTreeKernel.DepthScaler getDepthScaler()
public void setDepthScaler(SuffixTreeKernel.DepthScaler depthScaler)
depthScaler
- the new DepthScaler to usepublic double evaluate(Object a, Object b)
This is the sum of the dot products of each subspace for a given word length. Each subspace is scaled using the DepthScaler returned by getDepthScaler.
evaluate
in interface SVMKernel
a
- the first Objectb
- the second Object
- class="type">ClassCastException if either
a or b are not
castable to SuffixTree
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |