59 QuadProgOpts = optimset(
"'Display','off','Algorithm','active-set'");
78 this =
this@general.regression.BaseScalarSVR;
90 error(
" Cannot call clone without subclass argument. ");
92 copy =
clone@general.regression.BaseScalarSVR(
this, copy);
104 it = 100*(size(Q,1)+size(A,1));
106 fprintf(
" BaseQPSVR: MaxIterations of %d smaller than recommended value %d.\n ",this.
MaxIterations,it);
116 [p,d,cflag,info] = this.internal_solve(Q,c,lb,ub,A,Alb,Aub,x0);
119 info.CompTime= toc(s);
120 info.NumVariables= size(Q,1);
121 info.NumConstraints= size(A,1);
126 if isfield(info,
" message ")
127 fprintf(
" Message: %s\n ",info.message);
129 m = MException(
" BaseQPSVR:notconverged ",
" quadprog solver did not converge. ");
135 fprintf(
" QP-SVR finished after %d/%d Iterations and %f seconds. Info:\n ",info.Iterations,
this.MaxIterations, info.CompTime);
176 function [p , d , cflag , info ] = internal_solve(Q,c,lb,ub,A,lbA,ubA,x0) {
186 eq = abs(lbA-ubA) < sqrt(eps);
192 prog.Aineq= A(~eq,:);
193 prog.bineq= ubA(~eq,:);
210 prog.solver= " quadprog ";
213 [p, ~, exitflag, out, la] = quadprog(prog);
218 d = [la.lower + la.upper; -la.eqlin; la.ineqlin];
219 cflag = exitflag == 1;
221 info.exitflag= exitflag;
222 info.Iterations= out.iterations;
integer MaxIterations
The maximum number of iterations.
function [ p , d , info ] = solve(matrix Q,colvec c,colvec lb,colvec ub,matrix A,matrix Alb,matrix Aub, x0)
Solves the given quadratic problem according to the subclasses' algorithm.
function registerProps(varargin)
Call this method at any class that defines DPCM observed properties.
function copy = clone(copy)
The interface method with returns a copy of the current class instance.
BaseQPSVR: SVR variant that is solved using quadratic programs.
QuadProgOpts
Options for quadprog-solver.
function bool = eq(B)
Checks equality of two KerMor objects.
disp
Handle object disp method which is called by the display method. See the MATLAB disp function...
SCALARSVR Scalar support vector regression.
Global configuration class for all KerMor run-time settings.
static function KerMor theinstance = App()
The singleton KerMor instance.
BaseQPSVR()
LargeScale,off, interior-point-convex, trust-region-reflective