Normalize the kernel by adding a constant term to its diagonal. This aids kernels to become positive definite (even though they are not - often caused by numerical problems).
where E is a matrix with ones on the diagonal and R is the scalar ridge term. The ridge term R is computed as .
In case c <= 0, c is compute as the mean of the kernel diagonal
|CRidgeKernelNormalizer (float64_t r=1e-10, float64_t c=0.0)|
|virtual bool||init (CKernel *k)|
|virtual float64_t||normalize (float64_t value, int32_t idx_lhs, int32_t idx_rhs)|
|virtual float64_t||normalize_lhs (float64_t value, int32_t idx_lhs)|
|virtual float64_t||normalize_rhs (float64_t value, int32_t idx_rhs)|
|virtual const char *||get_name () const|
|the constant ridge to be added to the kernel diagonal |
|scaling parameter (avg of diagonal) |
|c||scale parameter, if <= 0 scaling will be computed from the avg of the kernel diagonal elements|
the scalar r*c will be added to the kernel diagonal, typical use cases:
|virtual const char* get_name||(||)|| const
|virtual bool init||(||CKernel *||k||)||