public class KernelUtil
extends java.lang.Object
Constructor and Description |
---|
KernelUtil() |
Modifier and Type | Method and Description |
---|---|
static <InputType> |
norm2(DefaultKernelBinaryCategorizer<InputType> target)
Computes the 2-norm of the weight vector implied by the given kernel
binary categorizer.
|
static <ValueType> |
norm2(ValueType value,
Kernel<? super ValueType> kernel)
Computes the 2-norm of the given value according to the given kernel.
|
static <InputType> |
norm2Squared(DefaultKernelBinaryCategorizer<InputType> target)
Computes the squared 2-norm of the weight vector implied by the given
kernel binary categorizer.
|
static <ValueType> |
norm2Squared(ValueType value,
Kernel<? super ValueType> kernel)
Computes the squared 2-norm of the given value according to the given
kernel.
|
static void |
scaleEquals(DefaultKernelBinaryCategorizer<?> target,
double scale)
Scales all of the weights in the given kernel binary categorizer by
the given value.
|
public static <ValueType> double norm2(ValueType value, Kernel<? super ValueType> kernel)
ValueType
- The type of the value.value
- A value.kernel
- A kernel function that can operate on the value.public static <InputType> double norm2(DefaultKernelBinaryCategorizer<InputType> target)
InputType
- The type of input to the categorizer value.target
- A kernel binary categorizer.public static <ValueType> double norm2Squared(ValueType value, Kernel<? super ValueType> kernel)
ValueType
- The type of the value.value
- A value.kernel
- A kernel function that can operate on the value.public static <InputType> double norm2Squared(DefaultKernelBinaryCategorizer<InputType> target)
InputType
- The type of input to the categorizer value.target
- A kernel binary categorizer.public static void scaleEquals(DefaultKernelBinaryCategorizer<?> target, double scale)
target
- The kernel binary categorizer to update the weights on.scale
- The scale to apply to all the weights.