58 copy =
clone@kernels.BaseKernel(
this, kernels.PolyKernel);
64 error(
" Not implemented yet! ");
74 Nabla = this.
Degree*bsxfun(@times, y, x^
t*y.^(
this.Degree-1));
90 if nargin == 2 || isempty(y)
128 x = (-1.2:.01:1.2)+c;
130 k = kernels.PolyKernel;
131 kexp = kernels.KernelExpansion;
135 conf = [.1 .4 .8 1 2 3 4];
136 for n = 1:length(conf)
138 tag = sprintf(
" poly_1d_deg%g ",
k.Degree);
139 h = pm.nextPlot(tag,sprintf(
" Polynomial kernel with deg=%g on 1D data ",
k.Degree));
140 z = kexp.evaluate(x);
141 plot(h,x,[real(z); imag(z)]);
143 kexp.Centers.xi= [c; 1.6*c];
145 x2 = [
X(:)
" ; Y(:) "];
146 for n = 1:length(conf)
148 tag = sprintf(
" poly_2d_deg%g ",
k.Degree);
149 h = pm.nextPlot(tag,sprintf(
" Polynomial kernel with deg=%g on 2D data ",
k.Degree));
150 Z = real(
reshape(kexp.evaluate(x2),length(x),[]));
151 surf(h,
X,
Y,Z,
" EdgeColor ",
" none ");
Degree
The degree of the polynomial kernel.
function c = getGlobalLipschitz()
function Nabla = getNabla(colvec< double > x,matrix< double > y)
Partial derivatives of scalar product is simply the second argument vector.
reshape
hanges the dimensions of the handle object array to the specified dimensions. See the MATLAB reshape ...
PlotManager: Small class that allows the same plots generated by some script to be either organized a...
function K = evaluate(colvec< double > x,matrix< double > y)
static function res = test_PolyKernel(pm)
logical IsScProd
Flag that determines if the current kernel bases on scalar product evaluations, i.e. are of the form for some scalar function .
POLYKERNEL Basic polynomial kernel.
Base class for all KerMor Kernels.