public class SmoothedPartialTreeKernel extends DirectKernel<TreeRepresentation>
representation
Constructor and Description |
---|
SmoothedPartialTreeKernel() |
SmoothedPartialTreeKernel(float LAMBDA,
float MU,
float terminalFactor,
float similarityThreshold,
StructureElementSimilarityI nodeSimilarity,
String representationIdentifier) |
Modifier and Type | Method and Description |
---|---|
DeltaMatrix |
getDeltaMatrix() |
float |
getLambda()
Get the Vertical Decay factor
|
int |
getMaxSubseqLeng() |
float |
getMu()
Get the Horizontal Decay factor
|
StructureElementSimilarityI |
getNodeSimilarity() |
float |
getSimilarityThreshold() |
float |
getTerminalFactor() |
float |
kernelComputation(TreeRepresentation repA,
TreeRepresentation repB)
Computes the kernel similarity between two specific representations
|
void |
setDeltaMatrix(DeltaMatrix deltaMatrix)
Deprecated.
|
void |
setLambda(float lambda) |
void |
setMaxSubseqLeng(int maxSubseqLeng) |
void |
setMu(float mu) |
void |
setNodeSimilarity(StructureElementSimilarityI nodeSimilarity) |
void |
setSimilarityThreshold(float similarityThreshold) |
void |
setTerminalFactor(float terminalFactor) |
getRepresentation, kernelComputation, setRepresentation
disableCache, getKernelCache, getKernelComputations, getNumberOfHits, getNumberOfMisses, getSquaredNormCache, innerProduct, load, reset, save, setKernelCache, setSquaredNormCache, squaredNorm, squaredNormOfTheDifference
public SmoothedPartialTreeKernel()
public SmoothedPartialTreeKernel(float LAMBDA, float MU, float terminalFactor, float similarityThreshold, StructureElementSimilarityI nodeSimilarity, String representationIdentifier)
LAMBDA
- Horizontal Decay factorMU
- Vertical Decay FactorterminalFactor
- Multiplicative factor to scale up/down the leaves contributionsimilarityThreshold
- All similarity score below this threshold are ignorednodeSimilarityI
- The similarity function between tree nodesrepresentationIdentifier
- the representation on which operatepublic DeltaMatrix getDeltaMatrix()
public float getLambda()
public float getMu()
public StructureElementSimilarityI getNodeSimilarity()
public float getSimilarityThreshold()
public float getTerminalFactor()
public 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 similarity@Deprecated public void setDeltaMatrix(DeltaMatrix deltaMatrix)
deltaMatrix
- public void setLambda(float lambda)
lambda
- Horizontal Decay factorpublic void setMu(float mu)
mu
- Vertical Decay Factorpublic void setNodeSimilarity(StructureElementSimilarityI nodeSimilarity)
nodeSimilarity
- The similarity function between structure elements contained in tree nodespublic void setSimilarityThreshold(float similarityThreshold)
similarityThreshold
- All similarity score below this threshold are ignoredpublic void setTerminalFactor(float terminalFactor)
terminalFactor
- Multiplicative factor to scale up/down the leaves contributionpublic int getMaxSubseqLeng()
public void setMaxSubseqLeng(int maxSubseqLeng)
maxSubseqLeng
- The maximum length of common subsequences considered in the
recursion. It reflects the maximum branching factor allowed to
the tree fragments.Copyright © 2018 Semantic Analytics Group @ Uniroma2. All rights reserved.