SuffixTreeKernel (biojava-legacy 1.9.5 API)
- java.lang.Object
-
- org.biojava.stats.svm.tools.SuffixTreeKernel
-
- All Implemented Interfaces:
Serializable,SVMKernel
public class SuffixTreeKernel extends Object implements SVMKernel, Serializable
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.
- Author:
- Matthew Pocock
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceSuffixTreeKernel.DepthScalerEncapsulates the scale factor to apply at a given depth.
static classSuffixTreeKernel.MultipleScalarScale using a multiple of two DepthScalers.
static classSuffixTreeKernel.NullModelScalerScales by 4^depth - equivalent to dividing by a probablistic flatt prior null model
static classSuffixTreeKernel.SelectionScalarScale using a BitSet to allow/disallow depths.
static classSuffixTreeKernel.UniformScalerScale all depths by 1.0
-
Constructor Summary
Constructors Constructor Description SuffixTreeKernel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doubleevaluate(Object a, Object b)Calculate the dot product between the SuffixTrees a and b.
SuffixTreeKernel.DepthScalergetDepthScaler()Retrieve the current DepthScaler.
voidsetDepthScaler(SuffixTreeKernel.DepthScaler depthScaler)Change the current DepthScaler to depthScaler.
StringtoString()
-
-
-
Constructor Detail
-
SuffixTreeKernel
public SuffixTreeKernel()
-
-
Method Detail
-
getDepthScaler
public SuffixTreeKernel.DepthScaler getDepthScaler()
Retrieve the current DepthScaler.
- Returns:
- the current DepthScaler
-
setDepthScaler
public void setDepthScaler(SuffixTreeKernel.DepthScaler depthScaler)
Change the current DepthScaler to depthScaler.
- Parameters:
depthScaler- the new DepthScaler to use
-
evaluate
public double evaluate(Object a, Object b)
Calculate the dot product between the SuffixTrees a and 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.
-
-