Three short derivations

PHYSICS · Multi-part · Fermi University Physics · Mathematical Methods for Physics · Computational Physics · Linear algebra and vector spaces

Scientific Computing for Physicists, Ch Learning from physical data: regression, classification and principal components

Problem

Three short derivations, each checked with numbers. ((a)) A resonant sensor's resonance frequency is estimated by fitting a ring-down curve; the fitting procedure is repeated on K=4K=4 independent noisy records, giving resonance-frequency estimates f^(1)=500.3\hat f^{(1)}=500.3, f^(2)=499.7\hat f^{(2)}=499.7, f^(3)=500.5\hat f^{(3)}=500.5, f^(4)=499.9 Hz\hat f^{(4)}=499.9\ \mathrm{Hz}. An independent static calibration gives the true frequency f0=500.0 Hzf_0 = 500.0\ \mathrm{Hz}, and a new, independent frequency measurement y=f0+εy=f_0+\varepsilon carries noise of variance σ2=0.05 Hz2\sigma^2 = 0.05\ \mathrm{Hz^2}, known from that calibration. With ε∼N(0,σ2)\varepsilon\sim\mathcal N(0,\sigma^2) independent of the fitting procedure, derive E[(y−f^)2]=(f0−E[f^])2+Var(f^)+σ2,\mathrm E\big[(y-\hat f)^2\big] = \big(f_0-\mathrm E[\hat f]\big)^2 + \mathrm{Var}(\hat f) + \sigma^2, then use the four repeats to estimate the bias squared, the variance and their sum, treating the sample mean and the mean squared deviation as the empirical expectation and variance. ((b)) A ring of N=20N=20 Ising spins with periodic boundary conditions has true energy E=−J∑jsjsj+1E = -J\sum_j s_j s_{j+1} with J=0.6J = 0.6 (in units of kBTk_BT), fitted by ridge regression using the general quadratic form E=∑j,kJjksjskE = \sum_{j,k} J_{jk}s_js_k, so that sjsj+1s_js_{j+1} and sj+1sjs_{j+1}s_j enter as two separate, numerically identical feature columns whose fitted coefficients add to give the physical nearest-neighbour term. Show, by minimising the ridge penalty θa2+θb2\theta_a^2+\theta_b^2 over splits of a fixed sum θa+θb=c\theta_a+\theta_b = c, that any strictly positive ridge penalty λ>0\lambda \gt 0 shares whatever sum cc the fit returns equally, θa=θb=c/2\theta_a=\theta_b=c/2. Then, taking the penalty small and the data plentiful enough that ridge's shrinkage of cc itself is negligible, so that c≈−Jc\approx-J, give the approximate value each of the two learned coefficients Jj,j+1J_{j,j+1} and Jj+1,jJ_{j+1,j} takes. ((c)) A linear classifier assigns a magnetic domain the label y=1y=1 (ordered) or y=0y=0 (disordered) with probability p=σ(wx+b)p=\sigma(wx+b), σ(z)=1/(1+e−z)\sigma(z)=1/(1+e^{-z}), treating each labelled configuration as an independent Bernoulli trial. Derive the cross-entropy loss L=−∑i[yiln⁡pi+(1−yi)ln⁡(1−pi)]\mathcal L = -\sum_i\big[y_i\ln p_i + (1-y_i)\ln(1-p_i)\big] from the Bernoulli likelihood and its gradient ∂L/∂w=∑i(pi−yi)xi\partial\mathcal L/\partial w = \sum_i (p_i-y_i)x_i, ∂L/∂b=∑i(pi−yi)\partial\mathcal L/\partial b=\sum_i(p_i-y_i). Evaluate both gradient components at w=0.4w=0.4, b=−0.6b=-0.6 for the three labelled points (xi,yi)=(0.5,0), (1.5,1), (2.5,1)(x_i,y_i) = (0.5,0),\,(1.5,1),\,(2.5,1).

Browse the problem library