36#ifndef STK_KERNEL_LINEAR_H
37#define STK_KERNEL_LINEAR_H
57 typedef typename Array::Type
Type;
76 template<
class Derived>
83 template<
class Derived>
92 template<
class Derived>
113{
return hasRun_ ? gram_(
i,
i)
114 : p_data_->row(
i).norm2();
119{
return hasRun_ ? gram_(
i,
j)
120 : p_data_->row(
i).dot(p_data_->row(
j));}
In this file we define the Interface base class for computing a Kernels.
bool hasRun_
true if run has been used, false otherwise
Interface Base class for the kernels classes.
Array const * p_data_
pointer on the data set
CSquareX gram_
the resulting gram_ matrix
Array const * p_data() const
The Linear Kernel is a kernel of the form.
Linear(Array const *p_data, ExprBase< Derived > const ¶m)
constructor with an array of parameter.
virtual ~Linear()
destructor
virtual Real diag(int i) const
virtual method.
Linear(Array const &data)
constructor with a constant pointer on the data set
virtual Real comp(int i, int j) const
virtual method implementation.
IKernelBase< Array > Base
void setParam(ExprBase< Derived > const ¶m)
Set parameter using an array.
Linear()
Default constructor.
Linear(Array const &data, ExprBase< Derived > const ¶m)
constructor with a constant pointer on the data set
Linear(Array const *p_data)
constructor with a constant pointer on the data set
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
double Real
STK fundamental type of Real values.
The namespace STK is the main domain space of the Statistical ToolKit project.