36#ifndef STK_KERNEL_IKERNELBASE_H
37#define STK_KERNEL_IKERNELBASE_H
52 typedef typename Array::Type
Type;
96 if(!p_data_)
return false;
97 gram_.resize(p_data_->rows());
99 for (
int j= gram_.begin();
j < gram_.end(); ++
j)
101 { gram_(
j,
j) = this->diag(
j);}
102 for (
int i=
j+1;
i < gram_.end(); ++
i)
103 { gram_(
i,
j) = this->comp(
i,
j);}
106 for (
int j= gram_.begin();
j < gram_.end(); ++
j)
108 for (
int i=
j+1;
i < gram_.end(); ++
i)
109 { gram_(
j,
i) = gram_(
i,
j);}
111 this->hasRun_ =
true;
In this file we define the Interface base class for computing a Kernels.
Interface Base class for the kernels classes.
Array const * p_data_
pointer on the data set
IKernelBase(Array const *p_data)
constructor with a constant pointer on the data set
virtual ~IKernelBase()
destructor
virtual Real value(Type const &v) const
compute the value of the kernel for the given value
virtual int nbVariable() const
IKernelBase(IKernelBase const &kernel)
copy constructor
virtual int nbSample() const
IKernelBase(Array const &data)
constructor with a constant reference on the data set
Array const * p_data() const
virtual bool run()
compute Gram matrix
Interface class for the kernels classes.
CSquareX gram_
the resulting gram_ matrix
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.