36 using namespace shogun;
73 SG_ERROR(
"Kernel still initialized on destruction.\n");
78 SG_INFO(
"Kernel deleted (%p).\n",
this);
198 #define ENUM_CASE(n) case n: SG_INFO(#n " "); break;
205 "SLOWBUTMEMEFFICIENT");
305 int32_t count, int32_t *IDX,
float64_t * weights)
307 SG_ERROR(
"kernel does not support linadd optimization\n");
313 SG_ERROR(
"kernel does not support linadd optimization\n");
319 SG_ERROR(
"kernel does not support linadd optimization\n");
324 int32_t num_vec, int32_t* vec_idx,
float64_t* target, int32_t num_suppvec,
327 SG_ERROR(
"kernel does not support batch computation\n");
332 SG_ERROR(
"kernel does not support linadd optimization, add_to_normal not implemented\n");
337 SG_ERROR(
"kernel does not support linadd optimization, clear_normal not implemented\n");
346 int32_t vector_idx,
float64_t * subkernel_contrib)
348 SG_ERROR(
"kernel compute_by_subkernel not implemented\n");
361 SG_ERROR(
"number of subkernel weights should be one ...\n");
369 int32_t* sv_idx=
SG_MALLOC(int32_t, num_suppvec);
372 for (int32_t i=0; i<num_suppvec; i++)
409 "Cache size in MB.");
411 "Feature vectors to occur on left hand side.");
413 "Feature vectors to occur on right hand side.");
415 "If features on lhs are the same as on rhs.");
417 "Number of feature vectors on left hand side.");
419 "Number of feature vectors on right hand side.");
421 "Combined kernel weight.");
423 "optimization_initialized",
424 "Optimization is initialized.");
426 "Optimization type.");
428 "Kernel properties.");
430 "Normalize the kernel.");
virtual void clear_normal()
virtual const char * get_name() const =0
virtual void load_serializable_post()
virtual bool init(CFeatures *lhs, CFeatures *rhs)
int32_t get_num_support_vectors()
virtual void set_matrix(const bool *matrix, int32_t num_feat, int32_t num_vec)
virtual void compute_by_subkernel(int32_t vector_idx, float64_t *subkernel_contrib)
virtual EFeatureType get_feature_type()=0
int32_t num_rhs
number of feature vectors on right hand side
Class ShogunException defines an exception which is thrown whenever an error inside of shogun occurs...
virtual bool set_normalizer(CKernelNormalizer *normalizer)
virtual int32_t get_num_vectors() const =0
virtual void save_serializable_pre()
virtual bool delete_optimization()
virtual void remove_rhs()
takes all necessary steps if the rhs is removed from kernel
int32_t cache_size
cache_size in MB
bool get_is_initialized()
float64_t combined_kernel_weight
virtual void register_params()
virtual void remove_lhs_and_rhs()
void add(bool *param, const char *name, const char *description="")
virtual CKernelNormalizer * get_normalizer()
Class SGObject is the base class of all shogun objects.
virtual EFeatureClass get_feature_class()=0
virtual EFeatureType get_feature_type()=0
KERNELCACHE_ELEM * kernel_matrix
A File access base class.
virtual void save_serializable_post()
virtual float64_t compute_optimized(int32_t vector_idx)
EOptimizationType get_optimization_type()
virtual void save_serializable_post()
float64_t get_alpha(int32_t idx)
float64_t get_combined_kernel_weight()
virtual const float64_t * get_subkernel_weights(int32_t &num_weights)
Identity Kernel Normalization, i.e. no normalization is applied.
int32_t num_lhs
number of feature vectors on left hand side
The class Kernel Normalizer defines a function to post-process kernel values.
int32_t get_support_vector(int32_t idx)
virtual void set_subkernel_weights(SGVector< float64_t > weights)
virtual bool init_normalizer()
bool optimization_initialized
EOptimizationType opt_type
virtual void load_serializable_post()
CFeatures * rhs
feature vectors to occur on right hand side
virtual bool init(CKernel *k)=0
virtual void compute_batch(int32_t num_vec, int32_t *vec_idx, float64_t *target, int32_t num_suppvec, int32_t *IDX, float64_t *alphas, float64_t factor=1.0)
virtual EKernelType get_kernel_type()=0
virtual bool init_optimization(int32_t count, int32_t *IDX, float64_t *weights)
CFeatures * lhs
feature vectors to occur on left hand side
The class Features is the base class of all feature objects.
virtual void save_serializable_pre()
virtual void remove_lhs()
virtual int32_t get_num_subkernels()
bool init_optimization_svm(CSVM *svm)
A generic Support Vector Machine Interface.
CKernelNormalizer * normalizer
virtual void add_to_normal(int32_t vector_idx, float64_t weight)
#define SG_MALLOC(type, len)
virtual EFeatureClass get_feature_class()=0