public class LinearKernelCombination extends KernelCombination
toCombine
Constructor and Description |
---|
LinearKernelCombination() |
Modifier and Type | Method and Description |
---|---|
void |
addKernel(float weight,
Kernel kernel)
Adds a kernel with a corresponding weight to the linear combination of kernels
|
List<Float> |
getWeights() |
protected float |
kernelComputation(Example exA,
Example exB)
Returns the kernel similarity between the given examples.
|
void |
normalizeWeights()
Scales the weights in order to make their sum being equal to 1
|
void |
setWeights(List<Float> weights) |
getToCombine, setToCombine
disableCache, getKernelCache, getKernelComputations, getNumberOfHits, getNumberOfMisses, getSquaredNormCache, innerProduct, load, reset, save, setKernelCache, setSquaredNormCache, squaredNorm, squaredNormOfTheDifference
public void addKernel(float weight, Kernel kernel)
weight
- the weight of the kernel to be addedkernel
- the kernel to be addedpublic void normalizeWeights()
protected float kernelComputation(Example exA, Example exB)
Kernel
kernelComputation
in class Kernel
exA
- the first exampleexB
- the second exampleexA
and
exB
Copyright © 2018 Semantic Analytics Group @ Uniroma2. All rights reserved.