public class SubTreeKernel extends DirectKernel<TreeRepresentation>
representation
Constructor and Description |
---|
SubTreeKernel()
SubTree Kernel: default constructor.
|
SubTreeKernel(float lambda,
String representationIdentifier)
SubTree Kernel
|
SubTreeKernel(String representationIdentifier)
SubTree Kernel constructor.
|
Modifier and Type | Method and Description |
---|---|
DeltaMatrix |
getDeltaMatrix()
Get the DeltaMatrix used to store the evaluated delta functions
of this tree kernel
|
boolean |
getIncludeLeaves()
Returns whether the leaves must be involved in the kernel computation
|
float |
getLambda()
Get the decay factor
|
float |
kernelComputation(TreeRepresentation repA,
TreeRepresentation repB)
Computes the kernel similarity between two specific representations
|
void |
setDeltaMatrix(DeltaMatrix deltaMatrix)
Deprecated.
|
void |
setIncludeLeaves(boolean includeLeaves)
Sets whether the leaves must be involved in the kernel computation.
|
void |
setLambda(float lambda)
Set the decay factor
|
getRepresentation, kernelComputation, setRepresentation
disableCache, getKernelCache, getKernelComputations, getNumberOfHits, getNumberOfMisses, getSquaredNormCache, innerProduct, load, reset, save, setKernelCache, setSquaredNormCache, squaredNorm, squaredNormOfTheDifference
public SubTreeKernel(float lambda, String representationIdentifier)
lambda
- Decay FactorrepresentationIdentifier
- Identifier of the Tree representation on which the kernel
workspublic SubTreeKernel(String representationIdentifier)
representationIdentifier
- Identifier of the Tree representation on which the kernel
workspublic SubTreeKernel()
public float getLambda()
public void setLambda(float lambda)
lambda
- the decay factorpublic DeltaMatrix getDeltaMatrix()
@Deprecated public void setDeltaMatrix(DeltaMatrix deltaMatrix)
deltaMatrix
- public boolean getIncludeLeaves()
public void setIncludeLeaves(boolean includeLeaves)
includeLeaves
- the includeLeaves to setpublic 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 © 2018 Semantic Analytics Group @ Uniroma2. All rights reserved.