Severity: Warning
Message: fopen(/home/polpe/.phpsession/ci_sessionf259f61020702d7d17f7dbeefd6071fb23c83a8a): failed to open stream: No space left on device
Filename: drivers/Session_files_driver.php
Line Number: 159
Backtrace:
File: /home/polpe/public_html/application/controllers/Main.php
Line: 17
Function: library
File: /home/polpe/public_html/index.php
Line: 315
Function: require_once
\n Teljes Matlab script\n kieg\xc3\xa9sz\xc3\xadt\xc5\x91 f\xc3\xbcggv\xc3\xa9nyekkel.\n
' b'File: Ex2_GP_Model_1.m\nDirectory: 5_Sztaki20_Main/Tanulas/13_SparseGP_Methods\nAuthor: Peter Polcz (ppolcz@gmail.com)' b'
Created on 2022. March 01. (2021b)' b'
rng(1)\n\nf = @(x) x;\n\nN = 5;\nsn = 0.1;\nX = randn(N,1);\ny = f(X) + sn*randn(N,1);\n\n% GP: Tune the hyperparameters\nhyp_init = struct(\'mean\',[],\'cov\',zeros(1,2),\'lik\',-1);\ngpml_minimize = fn_gpml_minimize;\nhyp_tuned = gpml_minimize(hyp_init,@gp,-200,gpml_inf,gpml_mean,gpml_cov,gpml_lik,X,y);\nhyp = GP_hyp(hyp_tuned,X,y);\n\nfig = figure(1); hold off;\nNs = 7;\nXs = linspace(-4,4,Ns)\';\nGP_plot_1D(hyp,Xs);\n\nNu = 3;\nXu = linspace(-2,2,Nu)\';\n\n% Covariance matrices\nKuu = GP_eval_Kxy(hyp,Xu,Xu);\nKuf = GP_eval_Kxy(hyp,Xu,X);\nKff = GP_eval_Kxy(hyp,X,X);\nKfs = GP_eval_Kxy(hyp,X,Xs);\nKus = GP_eval_Kxy(hyp,Xu,Xs);\n\n% Stabilize Kuu\n[S,D] = eig(Kuu);\nd = diag(D);\nd(d < 0) = 0;\nD = diag(d);\nKuu = S \\ D * S;\nLuu = chol(Kuu);\n\nAf = Luu\'\\Kuf;\nQff = Af\'*Af;\n\nAs = Luu\'\\Kus;\nQss = sum(As.*As,1)\';\n\n\nLambda = diag(diag(Kff - Qff)) + hyp.sf * eye(N);\niLambda = diag(1./diag(Lambda));\n\niSigma = Kuu + Kuf * iLambda * Kuf\';\niSigma = (iSigma + iSigma\')/2 + eye(Nu)*1e-10;\nR = chol(iSigma);\n\nKss = hyp.sf^2 + hyp.sn^2 + zeros(Ns,1);\n\nB = R\' \\ Kus;\nFITC_var = Kss - Qss + sum(B.*B,1)\';\nFITC_mean = Kus\'*(R\\(R\'\\(Kuf*iLambda*y)));\n\nfig = figure(2); hold off;\nGP_plot_1D(hyp,Xs,FITC_mean,FITC_var);\n\n% A lenyeg\nL = chol(Kff + hyp.sn^2*eye(N));\nalpha = L\\(L\'\\y);\nv = L\'\\Kfs;\nGP_mean = Kfs\' * alpha;\nGP_var = hyp.sf^2 + hyp.sn^2 - sum(v.*v)\';\n\n\nfig = figure(3); hold off;\nGP_plot_1D(hyp,Xs,GP_mean,GP_var);\n
'
b'Function evaluation 0; Value 3.852894e+00Function evaluation 5; Value 1.527906e+00Function evaluation 7; Value 1.287270e+00Function evaluation 9; Value 9.404406e-01Function evaluation 11; Value 8.041962e-01Function evaluation 14; Value 8.011742e-01Function evaluation 16; Value 8.011532e-01Function evaluation 18; Value 8.011345e-01Function evaluation 20; Value 8.011345e-01Function evaluation 23; Value 8.011345e-01Function evaluation 24; Value 8.011345e-01Function evaluation 26; Value 8.011345e-01Function evaluation 28; Value 8.011345e-01\n' b'
% Induced inputs\nX_sp = linspace(-13,13,15)\';\n\ngpml_cov_SP = {\'apxSparse\',gpml_cov,X_sp};\ngpml_inf_FITC = @(varargin) gpml_inf(varargin{:},struct(\'s\',1.0));\n\ntic\n[GP_mean,GP_var] = gp(hyp,gpml_inf_FITC,gpml_mean,gpml_cov_SP,gpml_lik,X,y,Xs);\ntoc\ntic\n[GP_mean,GP_var] = gp(hyp,gpml_inf_FITC,gpml_mean,gpml_cov_SP,gpml_lik,X,y,Xs);\ntoc\ntic\n[GP_mean,GP_var] = gp(hyp,gpml_inf_FITC,gpml_mean,gpml_cov_SP,gpml_lik,X,y,Xs);\ntoc\n\nfig3 = figure(3); hold off\nGP_plot_1D(hyp,Xs,GP_mean,GP_var);\nplot(Xs,Unknown_Model(Xs,s),\'k\')\n\nfunction g = Unknown_Model(x,args)\n\ns.a = 0.3;\ns.b = 5;\ns.c = 0.797963;\ns.d = 1;\ns = parsepropval(s,args);\n\na = s.a;\nb = s.b;\nc = s.c;\nd = s.d;\n\nxTr = x-c;\nxTrSc = xTr*a;\n\nStribeck = xTrSc .* (1 ./ ( xTrSc.^2 + 0.02) + 1 ) / a;\ng = ( 10*sin(xTr/5) + 3*cos(xTr/3.2) + sin(xTr) + xTr + Stribeck ) / b + d;\n\nend\n\nfunction plot_GP\n
'
b'[f,Ed,C,hyp,Ts] = GP_Model_1;\n[~,g] = GP_Model_1("CT-nom");\n\nXLim = [-15,15];\n\n% Generate test points over a grid (to plot the Gaussian Process)\nNr_Grid_Points = 1501;\nxx = linspace(XLim(1),XLim(2),Nr_Grid_Points)\';\n\nfig = figure(1);\nfig.Position([3 4]) = [509 390];\ndelete(fig.Children);\nax = axes(\'Parent\',fig);\n\n[Pl_Samples,Sh] = GP_plot_1D(hyp,xx);\nPl_Ukn = plot(xx,g(xx),\'k\');\nax.XLim = XLim;\n\nLeg = legend([Pl_Ukn Pl_Samples Sh(1) Sh(4)],[ ...\n "Unknown function", ...\n "Measurements", ...\n "GP mean", ...\n "$2~\\times$ std. deviation", ...\n % "$1 \\times $\\,St.dev. of $\\hat \\beta$ $(\\approx 68\\%)$", ...\n % "$2 \\times $\\,St.dev. of $\\hat \\beta$ $(\\approx 95\\%)$"\n ],\'Location\',\'northwest\',\'Interpreter\',\'latex\',\'FontSize\',12);\n\nax.XLabel.String = \'$x_2$\';\nax.YLabel.String = \'$g(x_2)$\';\n\nexportgraphics(ax,\'/home/ppolcz/_/5_Sztaki20_Main/LaTeX/04_LTV-MPC_contouring/actual/fig/Academic/GP-model.pdf\',\'ContentType\',\'vector\')\nexportgraphics(ax,\'/home/ppolcz/_/5_Sztaki20_Main/LaTeX/04_LTV-MPC_contouring/actual/fig/Academic/GP-model.png\')\n
'
b'end\n\nfunction K = stabilize(K)\n\nend\n
'
b' '