12 #ifndef _COMBINEDKERNEL_H___ 13 #define _COMBINEDKERNEL_H___ 15 #include <shogun/lib/config.h> 28 class CCombinedFeatures;
106 virtual const char*
get_name()
const {
return "CombinedKernel"; }
198 return succesful_deletion;
218 int32_t num_subkernels = 0;
226 return num_subkernels;
267 int32_t count, int32_t *IDX,
float64_t * weights);
291 int32_t num_vec, int32_t* vec_idx,
float64_t* target,
292 int32_t num_suppvec, int32_t* IDX,
float64_t* alphas,
308 int32_t num_suppvec, int32_t* IDX,
float64_t* weights);
326 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 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)
SGVector< float64_t > subkernel_log_weights
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)
SGMatrix< float64_t > get_parameter_gradient(const TParameter *param, index_t index=-1)
virtual void clear_normal()
bool insert_element(CSGObject *e, int32_t index)
bool append_kernel(CKernel *k)
CSGObject * get_element(int32_t index) const
CDynamicObjectArray * kernel_array
float64_t kernel(int32_t idx_a, int32_t idx_b)
int32_t get_num_subkernels()
virtual void set_optimization_type(EOptimizationType t)
bool delete_kernel(int32_t idx)
int32_t get_num_kernels()
virtual int32_t get_num_vec_lhs()
EFeatureClass
shogun feature class
CDynamicObjectArray * get_array()
bool has_property(EKernelProperty p)
virtual void remove_lhs_and_rhs()
virtual ~CCombinedKernel()
virtual SGVector< float64_t > get_subkernel_weights()
bool get_append_subkernel_weights()
CKernel * get_kernel(int32_t idx)
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)
static CList * combine_kernels(CList *kernel_list)
The Combined kernel is used to combine a number of kernels into a single CombinedKernel object by lin...
Dynamic array class for CSGObject pointers that creates an array that can be used like a list or an a...
int32_t get_num_elements() const
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()
all of classes and functions are contained in the shogun namespace
virtual bool has_features()
static CCombinedKernel * obtain_from_generic(CKernel *kernel)
CFeatures * lhs
feature vectors to occur on left hand side
CKernel * get_last_kernel()
virtual bool delete_optimization()
The class Features is the base class of all feature objects.
virtual void add_to_normal(int32_t idx, float64_t weight)
virtual const char * get_name() const
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)
CKernel * get_first_kernel()
void push_back(CSGObject *e)
bool delete_element(int32_t idx)
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 enable_subkernel_weight_opt
CCombinedKernel(int32_t size=10, bool append_subkernel_weights=false)
virtual void init_subkernel_weights()
virtual void enable_subkernel_weight_learning()
bool insert_kernel(CKernel *k, int32_t idx)