public class PartialTreeKernel extends DirectKernel<TreeRepresentation>
representation
Constructor and Description |
---|
PartialTreeKernel()
Default constructor.
|
PartialTreeKernel(float LAMBDA,
float MU,
float terminalFactor,
String representationIdentifier)
A Constructor for the Partial Tree Kernel in which parameters can be set manually.
|
PartialTreeKernel(String representationIdentifier)
This constructor by default uses lambda=0.4, mu=0.4, terminalFactor=1
|
Modifier and Type | Method and Description |
---|---|
float |
evaluateKernelNotNormalize(TreeRepresentation a,
TreeRepresentation b)
Evaluate the Partial Tree Kernel
|
float |
getLambda()
Get the Vertical Decay factor
|
float |
getMu()
Get the Horizontal Decay factor
|
float |
getTerminalFactor()
Get the Terminal Factor
|
protected float |
kernelComputation(TreeRepresentation repA,
TreeRepresentation repB)
Computes the kernel similarity between two specific representations
|
void |
setLambda(float lambda) |
void |
setMu(float mu) |
void |
setTerminalFactor(float terminalFactor) |
getRepresentation, kernelComputation, setRepresentation
disableCache, getKernelComputations, getNumberOfHits, getNumberOfMisses, innerProduct, reset, setKernelCache, setNormCache, squaredNorm, squaredNormOfTheDifference
public PartialTreeKernel()
public PartialTreeKernel(String representationIdentifier)
public PartialTreeKernel(float LAMBDA, float MU, float terminalFactor, String representationIdentifier)
LAMBDA
- lambda value in the PTK formulaMU
- mu value of the PTK formulaterminalFactor
- terminal factorrepresentationIdentifier
- the representation on which operatepublic float evaluateKernelNotNormalize(TreeRepresentation a, TreeRepresentation b)
a
- First treeb
- Second Treepublic float getLambda()
public float getMu()
public float getTerminalFactor()
public void setLambda(float lambda)
public void setMu(float mu)
public void setTerminalFactor(float terminalFactor)
protected float kernelComputation(TreeRepresentation repA, TreeRepresentation repB)
DirectKernel
kernelComputation
in class DirectKernel<TreeRepresentation>
repA
- the first representation in the kernel similarityrepB
- the second representation in the kernel similarityCopyright © 2014 Semantic Analytics Group @ Uniroma2. All rights reserved.