• 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. 7

Exercise 1: Maximum entropy method

With the maximum entropy method (MEM), it is possible to construct distributions that comply with specific constraints, and contain the least a priori information. The entropy is given by

S=−

N i=1

pilogpi. (1)

a) Maximize Eq. (1) analytically with respect to the probabilities pi of N discrete entities 1,2, . . . ,i, . . . ,N.

Include the prior knowledge,

N i=1

pi=1, (2)

by constrained optimization (Lagrange multiplier).

• Given the symmetry of Eq. (1), what can you state about the solution?

b) ChooseN=10 and use Powell’s method for a numerical optimization of Eq. (1). Note that this algorithm is normally used for minimization. Implement Powell’s method for entropy maximization (Eq. (1), subject to Eq. (2)):

• Implement a functionlinmin(f,a,c,tol)that performs a golden-section search for a 1-dimensional function f(x)∈R,x∈[a,c]⊂R. Use the tolerancetolto terminate the search algorithm once the search interval length falls below the threshold.

• Testlinminwith the function f(x) =x2. Does it work and what happens if the minimum of f(x)is not within[a,c]?

• Create a two-step parameter transformation~p=Θ(~x),~x∈RN, satisfying the constraints 0≤pi≤1 and∑Ni=1pi=1. The first step transformsxi∈R→[0,1], and the second normalizes~p.

• Uselinminand the parameter transformation to minimize the function

−S(~x) =

N

i=1

pilogpi=

N

i=1

Θi(~x)logΘi(~x)

with respect to~x. Copy the code of the solution from the lecture homepage (line 65ff.) and try to follow the procedure of Powell’s method.

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

It should not be surprising that maxent can severely overfit training data when the constraints on the output distribution are based on empirical averages, as described

Das Zweite ist, dass mir im Umgang mit den Schülern im Laufe meiner 20-jährigen Berufstätigkeit doch be- wusster wird, dass beispielsweise die Anzahl der Schüler, die auch

The syntax of FO is given by the usual rules together with an additional ε-rule: If ψ is a formula, and x is a variable, then εxψ is a term (read “an x such

Repeat the exercise with multiplicative log-normally distributed noise by replacing Eq.. (4) represent a model with a

The python method scipy.optimize.least squares is called via least squares(res f un, x0) with res f un corresponding to a function returning (weighted) residuals and x0 corresponding

Compare the result with the one you obtain from using an in-build matrix inversion function (numpy.linalg.inv) instead

I am especially indebted to three teachers and scholars, all lately of Columbia University: Sir George Sansom, under whom I was privileged to study and who first suggested the

Luiz informed Albuquerque "that the king of Narsinga was getting himself ready with .five thousand men on foot and two thousand on horse, for an expedition