DiceKernelNormalizer performs kernel normalization inspired by the Dice coefficient (see http://en.wikipedia.org/wiki/Dice's_coefficient).
Definition at line 26 of file DiceKernelNormalizer.h.
Public Member Functions | |
CDiceKernelNormalizer (bool use_opt_diag=false) | |
virtual | ~CDiceKernelNormalizer () |
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 (void) const |
bool | alloc_and_compute_diag (CKernel *k, float64_t *&v, int32_t num) |
Protected Attributes | |
float64_t * | diag_lhs |
int32_t | num_diag_lhs |
float64_t * | diag_rhs |
int32_t | num_diag_rhs |
bool | use_optimized_diagonal_computation |
CDiceKernelNormalizer | ( | bool | use_opt_diag = false |
) |
default constructor
use_opt_diag | - some kernels support faster diagonal compuation via compute_diag(idx), this flag enables this |
Definition at line 33 of file DiceKernelNormalizer.h.
virtual ~CDiceKernelNormalizer | ( | ) | [virtual] |
default destructor
Definition at line 47 of file DiceKernelNormalizer.h.
alloc and compute the vector containing the square root of the diagonal elements of this kernel.
Definition at line 125 of file DiceKernelNormalizer.h.
virtual const char* get_name | ( | void | ) | const [virtual] |
Returns the name of the SGSerializable instance. It MUST BE the CLASS NAME without the prefixed `C'.
Implements CSGObject.
Definition at line 117 of file DiceKernelNormalizer.h.
virtual bool init | ( | CKernel * | k | ) | [virtual] |
initialization of the normalizer
k | kernel |
Implements CKernelNormalizer.
Definition at line 55 of file DiceKernelNormalizer.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 85 of file DiceKernelNormalizer.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 96 of file DiceKernelNormalizer.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 106 of file DiceKernelNormalizer.h.
diagonal left-hand side
Definition at line 151 of file DiceKernelNormalizer.h.
diagonal right-hand side
Definition at line 156 of file DiceKernelNormalizer.h.
int32_t num_diag_lhs [protected] |
num diag lhs
Definition at line 153 of file DiceKernelNormalizer.h.
int32_t num_diag_rhs [protected] |
num diag rhs
Definition at line 158 of file DiceKernelNormalizer.h.
bool use_optimized_diagonal_computation [protected] |
flat if optimized diagonal computation is used
Definition at line 161 of file DiceKernelNormalizer.h.