12 #ifndef _COMBINEDKERNEL_H___
13 #define _COMBINEDKERNEL_H___
25 class CCombinedFeatures;
101 virtual const char*
get_name()
const {
return "CombinedKernel"; }
133 for (int32_t i=0; i<idx; i++)
237 int32_t num_subkernels = 0 ;
247 return num_subkernels ;
279 int32_t count, int32_t *IDX,
float64_t * weights);
301 int32_t num_vec, int32_t* vec_idx,
float64_t* target,
302 int32_t num_suppvec, int32_t* IDX,
float64_t* alphas,
329 int32_t num_suppvec, int32_t* IDX,
float64_t* weights);
347 int32_t idx,
float64_t * subkernel_contrib);
virtual void remove_lhs()
virtual void remove_rhs()
virtual void compute_by_subkernel(int32_t idx, float64_t *subkernel_contrib)
virtual EKernelType get_kernel_type()
virtual EFeatureClass get_feature_class()
virtual const char * get_name() const
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)
CSGObject * get_next_element()
virtual void set_subkernel_weights(SGVector< float64_t > weights)
int32_t num_rhs
number of feature vectors on right hand side
virtual bool init(CFeatures *lhs, CFeatures *rhs)
CCombinedKernel * KernelToCombinedKernel(shogun::CKernel *n)
virtual void clear_normal()
bool append_kernel(CKernel *k)
int32_t get_num_subkernels()
CKernel * get_next_kernel(CListElement *¤t)
virtual void set_optimization_type(EOptimizationType t)
virtual int32_t get_num_vec_lhs()
CSGObject * delete_element()
EFeatureClass
shogun feature class
bool has_property(EKernelProperty p)
static void * compute_optimized_kernel_helper(void *p)
CSGObject * get_first_element()
virtual void remove_lhs_and_rhs()
virtual ~CCombinedKernel()
bool insert_kernel(CKernel *k)
virtual SGVector< float64_t > get_subkernel_weights()
bool get_append_subkernel_weights()
CKernel * get_kernel(int32_t idx)
CKernel * get_first_kernel(CListElement *¤t)
virtual bool init_optimization(int32_t count, int32_t *IDX, float64_t *weights)
virtual float64_t compute(int32_t x, int32_t y)
void unset_property(EKernelProperty p)
int32_t get_num_elements()
The Combined kernel is used to combine a number of kernels into a single CombinedKernel object by lin...
static void * compute_kernel_helper(void *p)
int32_t num_lhs
number of feature vectors on left hand side
bool append_subkernel_weights
virtual int32_t get_num_vec_rhs()
EFeatureType
shogun feature type
CFeatures * rhs
feature vectors to occur on right hand side
virtual EFeatureType get_feature_type()
virtual bool has_features()
CFeatures * lhs
feature vectors to occur on left hand side
CKernel * get_last_kernel()
virtual bool delete_optimization()
Class ListElement, defines how an element of the the list looks like.
The class Features is the base class of all feature objects.
bool append_element(CSGObject *data)
virtual void add_to_normal(int32_t idx, float64_t weight)
void emulate_compute_batch(CKernel *k, int32_t num_vec, int32_t *vec_idx, float64_t *target, int32_t num_suppvec, int32_t *IDX, float64_t *weights)
virtual int32_t get_num_subkernels()
virtual float64_t compute_optimized(int32_t idx)
CSGObject * get_last_element()
CKernel * get_first_kernel()
CKernel * get_next_kernel()
void adjust_num_lhs_rhs_initialized(CKernel *k)
float64_t * subkernel_weights_buffer
bool precompute_subkernels()
Class List implements a doubly connected list for low-level-objects.
bool insert_element(CSGObject *data)
CCombinedKernel(int32_t size=10, bool append_subkernel_weights=false)