37 void CLinearARDKernel::init()
50 CDotKernel::init(l, r);
67 REQUIRE(alen==blen,
"Number of right and left hand features must be the " 76 SG_DEBUG(
"Initialized weights for LinearARDKernel (%p).\n",
this)
83 SG_ERROR(
"Index %i out of range for LinearARDKernel."\
94 SG_ERROR(
"Index %i out of range for LinearARDKernel."\
111 "features must be the same\n")
126 if (!strcmp(param->
m_name,
"weights"))
140 "features must be the same\n");
142 derivative(j,k)=avec[index]*bvec[index]*
m_weights[index];
149 SG_ERROR(
"Can't compute derivative wrt %s parameter\n", param->
m_name);
int32_t num_rhs
number of feature vectors on right hand side
Template class DotKernel is the base class for kernels working on DotFeatures.
virtual bool init(CFeatures *l, CFeatures *r)
SGVector< float64_t > m_weights
virtual float64_t get_weight(index_t i)
virtual ~CLinearARDKernel()
int32_t num_lhs
number of feature vectors on left hand side
void set_const(T const_elem)
virtual bool init_normalizer()
CFeatures * rhs
feature vectors to occur on right hand side
all of classes and functions are contained in the shogun namespace
CFeatures * lhs
feature vectors to occur on left hand side
virtual float64_t compute(int32_t idx_a, int32_t idx_b)
The class Features is the base class of all feature objects.
virtual void set_weight(float64_t w, index_t i)
virtual SGMatrix< float64_t > get_parameter_gradient(const TParameter *param, index_t index=-1)