SHOGUN
v1.1.0
|
TanimotoKernelNormalizer performs kernel normalization inspired by the Tanimoto coefficient (see http://en.wikipedia.org/wiki/Jaccard_index )
Definition at line 26 of file TanimotoKernelNormalizer.h.
Public Member Functions | |
CTanimotoKernelNormalizer (bool use_opt_diag=false) | |
virtual | ~CTanimotoKernelNormalizer () |
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 |
bool | alloc_and_compute_diag (CKernel *k, float64_t *&v, int32_t num) |
![]() | |
CKernelNormalizer () | |
virtual | ~CKernelNormalizer () |
virtual void | register_params () |
ENormalizerType | get_normalizer_type () |
void | set_normalizer_type (ENormalizerType type) |
![]() | |
CSGObject () | |
CSGObject (const CSGObject &orig) | |
virtual | ~CSGObject () |
virtual bool | is_generic (EPrimitiveType *generic) const |
template<class T > | |
void | set_generic () |
void | unset_generic () |
virtual void | print_serializable (const char *prefix="") |
virtual bool | save_serializable (CSerializableFile *file, const char *prefix="") |
virtual bool | load_serializable (CSerializableFile *file, const char *prefix="") |
void | set_global_io (SGIO *io) |
SGIO * | get_global_io () |
void | set_global_parallel (Parallel *parallel) |
Parallel * | get_global_parallel () |
void | set_global_version (Version *version) |
Version * | get_global_version () |
SGVector< char * > | get_modelsel_names () |
char * | get_modsel_param_descr (const char *param_name) |
index_t | get_modsel_param_index (const char *param_name) |
Protected Attributes | |
float64_t * | diag_lhs |
float64_t * | diag_rhs |
bool | use_optimized_diagonal_computation |
![]() | |
ENormalizerType | m_type |
Additional Inherited Members | |
![]() | |
SGIO * | io |
Parallel * | parallel |
Version * | version |
Parameter * | m_parameters |
Parameter * | m_model_selection_parameters |
![]() | |
virtual void | load_serializable_pre () throw (ShogunException) |
virtual void | load_serializable_post () throw (ShogunException) |
virtual void | save_serializable_pre () throw (ShogunException) |
virtual void | save_serializable_post () throw (ShogunException) |
CTanimotoKernelNormalizer | ( | 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 TanimotoKernelNormalizer.h.
|
virtual |
default destructor
Definition at line 40 of file TanimotoKernelNormalizer.h.
alloc and compute the vector containing the square root of the diagonal elements of this kernel.
Definition at line 118 of file TanimotoKernelNormalizer.h.
|
virtual |
Returns the name of the SGSerializable instance. It MUST BE the CLASS NAME without the prefixed `C'.
Implements CSGObject.
Definition at line 110 of file TanimotoKernelNormalizer.h.
|
virtual |
initialization of the normalizer
k | kernel |
Implements CKernelNormalizer.
Definition at line 48 of file TanimotoKernelNormalizer.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 78 of file TanimotoKernelNormalizer.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 89 of file TanimotoKernelNormalizer.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 99 of file TanimotoKernelNormalizer.h.
|
protected |
diagonal left-hand side
Definition at line 144 of file TanimotoKernelNormalizer.h.
|
protected |
diagonal right-hand side
Definition at line 146 of file TanimotoKernelNormalizer.h.
|
protected |
flat if optimized diagonal computation is used
Definition at line 148 of file TanimotoKernelNormalizer.h.