public class TreeKernelUtils extends Object
Constructor and Description |
---|
TreeKernelUtils() |
Modifier and Type | Method and Description |
---|---|
static ArrayList<TreeNodePairs> |
findCommonNodesByProduction(TreeRepresentation a,
TreeRepresentation b,
DeltaMatrix deltaMatrix,
boolean includeLeaves)
Determine the nodes sharing the same production in the given trees.
|
static float |
productionBasedDeltaFunction(TreeNode Nx,
TreeNode Nz,
int sigma,
float lambda,
DeltaMatrix deltaMatrix)
Delta Function for tree kernels operation at production level, like
SubTreeKernel and SubSetTreeKernel.
|
public static ArrayList<TreeNodePairs> findCommonNodesByProduction(TreeRepresentation a, TreeRepresentation b, DeltaMatrix deltaMatrix, boolean includeLeaves)
a
- First Treeb
- Second Treepublic static float productionBasedDeltaFunction(TreeNode Nx, TreeNode Nz, int sigma, float lambda, DeltaMatrix deltaMatrix)
Nx
- the root of the first treeNz
- the root of the second treesigma
- the sigma coefficient in the delta formula (sigma=0 for SubTreeKernel, sigma=1 for SubSetTreeKernel)lambda
- the lambda decay factor in the delta formulaDeltaMatrix
- the delta matrix where the partial delta evaluations are storedCopyright © 2015 Semantic Analytics Group @ Uniroma2. All rights reserved.