- MultiprocessingSumMetaSimulation.getJtJdiag(m, W=None, f=None)#
Return the squared sum of columns of the Jacobian.
Evaluates the weighted squared norm of each column of the Jacobian matrix. This is usually used to construct sensitivity weighting matrices or for diagonal preconditioners to iterative solvers.
Squared sum of columns of the Jacobian matrix
Internally, this function evaluates the
getJtJdiagmethod of each simulation, then applies the model mapping to the output as:
>>> sq_sum = 0 >>> for i in range(n_sim): ... row = sim[i].getJtJdiag(model) ... sq_sum += W[i] * (sp.diag(sqrt(row)) @ mapping[i].deriv()).power(2).sum(axis=0)
This approach is correct for mapping that match input parameters to a single output parameter, (i.e. the mapping.deriv has only 1 element in each column). For other mappings, it is usually close within a scaling factor, whose accuracy is then controlled by how diagonally dominant
J.T @ Jis.