Normalize the kernel by either a constant or the average value of the diagonal elements (depending on argument c of the constructor).
In case c <= 0 compute scale as
otherwise use scale=c and normalize the kernel via
Definition at line 31 of file AvgDiagKernelNormalizer.h.
Public Member Functions | |
CAvgDiagKernelNormalizer (float64_t c=0.0) | |
virtual | ~CAvgDiagKernelNormalizer () |
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 |
Protected Attributes | |
float64_t | scale |
the constant scaling factor (avg of diagonal or user given const) |
CAvgDiagKernelNormalizer | ( | float64_t | c = 0.0 |
) |
constructor
c | scale parameter, if <= 0 scaling will be computed from the avg of the kernel diagonal elements |
Definition at line 39 of file AvgDiagKernelNormalizer.h.
virtual ~CAvgDiagKernelNormalizer | ( | ) | [virtual] |
default destructor
Definition at line 48 of file AvgDiagKernelNormalizer.h.
virtual const char* get_name | ( | void | ) | const [virtual] |
virtual bool init | ( | CKernel * | k | ) | [virtual] |
initialization of the normalizer (if needed)
k | kernel |
Implements CKernelNormalizer.
Definition at line 54 of file AvgDiagKernelNormalizer.h.
normalize the kernel value
value | kernel value | |
idx_lhs | index of left hand side vector | |
idx_rhs | index of right hand side vector |
Implements CKernelNormalizer.
Definition at line 84 of file AvgDiagKernelNormalizer.h.
normalize only the left hand side vector
value | value of a component of the left hand side feature vector | |
idx_lhs | index of left hand side vector |
Implements CKernelNormalizer.
Definition at line 94 of file AvgDiagKernelNormalizer.h.
normalize only the right hand side vector
value | value of a component of the right hand side feature vector | |
idx_rhs | index of right hand side vector |
Implements CKernelNormalizer.
Definition at line 103 of file AvgDiagKernelNormalizer.h.
the constant scaling factor (avg of diagonal or user given const)
Definition at line 113 of file AvgDiagKernelNormalizer.h.