• Keine Ergebnisse gefunden

Statistics and Numerics

N/A
N/A
Protected

Academic year: 2022

Aktie "Statistics and Numerics"

Copied!
1
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Statistics and Numerics

Lecture Prof. Dr. Jens Timmer

Exercises Helge Hass, Mirjam Fehling-Kaschek

Exercise Sheet Nr. 6

Exercise 1: Bias and variance of ill-posed inverse problems

Create a function to compute theN×NHilbert-matrix Ai j= 1

i+j−1 given the dimensionNas input.

a) Generate simulated data~bfor normal distributed noise:

• choose:

xj=sin(2π(j−1)/(N−1)), j=1, . . . ,N

• compute:

i=

N

j=1

Ai jxj (1)

• add noiseεi∼N(0,σ2):

bi=b˜ii b) Estimate~xfrom the data~b:

• Calculate the singular-value decomposition[U,s,V]of A(numpy.linalg.svd). How do the singular valuessirelate to the eigenvalues in case of a symmetric matrix?

• Compute the condition numberκ(A)vianumpy.aminandnumpy.amax.

• Write a function to estimatexifor the givenbifrom Eq. (1), using the inverted matrixA−1based on its singular value decomposition:

A−1=VT[1/si]UT . (2)

Use the built-in functionsnumpy.diag,numpy.divide,numpy.matmulandnumpy.transpose.

c) Test several setups regarding the effect of the regularization, 1/si=0i f max(s)/simax, for different choices of the maximal condition numberκmax, ofNand of the noiseσ.

• N=4,σ=0.001 for either no regularization or forκmax=1000

• N=7,σ=10−5max∈ {100,105,1010}

• N=10,σ=0,κmax=in f (float(“inf”) in python). Compare the result with the one you obtain from using an in-build matrix inversion function (numpy.linalg.inv) instead of Eq. (2). How areA−1and thexiaffected?

• N=42,σ=0,κmax∈ {100,105,1010}

helge.hass@fdm.uni-freiburg.de mirjam.fehling@physik.uni-freiburg.de

http://jeti.uni-freiburg.de/vorles_stat_num/vorles_stat_num.html

Referenzen

ÄHNLICHE DOKUMENTE

Hence, write a function int RK4(f,t0,y0,tend,dt), which takes the function f to integrate (which maps to another function that you have to write that evaluates the two

Exercise Sheet Nr. Plot the trajectories of the first five realisations and the mean value, variance and standard deviation of the realisations as a function of time... b) Repeat

This function should take the initial condition (number of particles of each species), the stoichiometry of the problem, the propensity function which returns the reaction

The measurement is comparable to that of dark field microscopy: An indirect light source and a line scanner camera are mounted below and above the ice core section in the way that

2: 4-point bending strength test results on a silicon nitride material: (a) Probability of failure versus strength in a Weibull diagram: the strength data are aligned along

In the price structure of low-income countries, for example, capital goods tend to be more expensive relative to consumer goods than is the case in high- income

Calculations are based on measured sound pressure signals in the near field around the source and measured transfer functions from the locations of assumed

As it is known during the construction period, the general trend of the results of the instrumentation and the modeling is coincide, but because of the limitation