diff --git a/ea/ubA/EAA10HohlochMutschler.pdf b/ea/ubA/EAA10HohlochMutschler.pdf new file mode 100644 index 0000000..1ee9b4d --- /dev/null +++ b/ea/ubA/EAA10HohlochMutschler.pdf Binary files differ diff --git a/is/ub9/is9.pdf b/is/ub9/is9.pdf index cd12f41..d944551 100644 --- a/is/ub9/is9.pdf +++ b/is/ub9/is9.pdf Binary files differ diff --git a/is/ub9/is9.tex b/is/ub9/is9.tex index e1c11b7..c34f421 100644 --- a/is/ub9/is9.tex +++ b/is/ub9/is9.tex @@ -85,11 +85,25 @@ Da $Y$ qudratisch von $X$ abhängt, vergrößert sich auch die Varianz. Entsprechend werden die Residuen für größere $Y$ ebenfalls größer. %TODO: ? \Aufgabe{Kernels}{50} \begin{enumerate} - \item $k(x_1,x_2)=C=\sqrt{C}^2\cdot k'(x_1,x_2)$, where $k'(x_1,x_2)=1$ which is clearly positive semidefinite. - \item is p.d. according to the lecture, because it's a polynomial kernel - \item TODO: don't see why not in the hint-case - \item As 2. is a kernel, this is too with $\alpha=\sqrt{5}$ - \item As $k_1(x_1,x_2)=x_1^Tx_2$ and $k_2(x_1,x_2)=1$ are kernels, their sum is too. Now we multiply the sum of this kernels with itself and get another kernel. + \item $k(x_1,x_2)=C= \alpha \cdot k'(x,y)\\ + k'(x,y)=1 \begin{pmatrix} + x &y + \end{pmatrix} \begin{pmatrix} + 1 &1\\1&1 + \end{pmatrix}\begin{pmatrix} + x\\y + \end{pmatrix}= x^2+2xy+y^2=(x+y)^2 \geq 0 \forall{x,y}\\$ + \item $k(x,y) =xy\\ + \geq 0 \forall{x,y} $ + \item No kernel $k(x,y) =\dfrac{1}{2}(x+y)\\ + k(-1,-1) =-1 \ngeq 0\\$ + But for a Kernel ist has to be:\\ + $k(x,x) \geq 0 \forall{x} $ + \item $k(x,y) = 5x^Ty = 5 \cdot k'(x,y)$ with $k'(x,y) = x^Ty =$\\ + $= \alpha *k'(x,y)$ where $\alpha =5$ + \item $k(x,y)=(x^Ty+1)^2= (k_1(x,y)+k_2(x,y))^2$\\ + where $k_1(x,y)=x^Ty, k_2(x,y)=1$\\ + $k_1$ and $k_2$ are proven as kernels in task 2 and 1. \end{enumerate} \end{document} diff --git a/mr/ub9/loc_framework/localize_pf.m b/mr/ub9/loc_framework/localize_pf.m index f9ce2c6..7160621 100644 --- a/mr/ub9/loc_framework/localize_pf.m +++ b/mr/ub9/loc_framework/localize_pf.m @@ -56,12 +56,14 @@ pf_w = cat(2,pf_w, currw); % Resampling step: - - currx = pf_resample_sys(currx,w,ESSmin); + ess= 1/sum(arrayfun(@(x) x^2,w)); + if ess < ESSmin + + currx = pf_resample_sys(currx,w,ESSmin); % Do not forget to reset weights after resampling: - w = ones(nSamples,1)/nSamples; - + w = ones(nSamples,1)/nSamples; + end end % for each control input plot_trajectory_particles(x_true, pf_x, pf_w, dt); @@ -84,4 +86,7 @@ %2) ESSmin = 0.4*20; errpos: 0.6882 erryaw=0.1149 %3)ESSmin = always > ess; errpos: 0.5342 erryaw=0.0174 %4)ESSmin = 0.1*20= errpos= 0.8369 err_yae 0.1608 -%Sollen wir hier die Zeit auch noch messen? \ No newline at end of file +%Sollen wir hier die Zeit auch noch messen? + +%Gemeint war, dass ich resamplings nur manchmal mache oder nie oder die +%AArt des resampling. \ No newline at end of file diff --git a/mr/ub9/loc_framework/pf_resample_sys.m b/mr/ub9/loc_framework/pf_resample_sys.m index fc0f86e..95d5831 100644 --- a/mr/ub9/loc_framework/pf_resample_sys.m +++ b/mr/ub9/loc_framework/pf_resample_sys.m @@ -3,10 +3,10 @@ % YOUR CODE STARTS HERE: -ess= 1/sum(arrayfun(@(x) x^2,w)); + M = size(currx, 3); -if(ess < essMin) +%if(ess < essMin)% nicht hier sondern in der plocalize pf. Nach dem resambling alle gewichte auf nextx = zeros(3, 1, M); @@ -21,9 +21,8 @@ end nextx(:,:,m)=currx(:,:,i); end -else nextx=currx; -end + % YOUR CODE END HERE end