accinv.degeneracy module

class accinv.degeneracy.AddDeltaWeights(weights: <MagicMock name='mock.ndarray' id='139857761889296'>)

Bases: object

This class adds weights to the Jacobian during the fitting process.

The weights are appended along the row, as a diagonal matrix starting from the leftmost column. Remaining columns are padded with zeros.

In the following illustration, the top block is the original Jacobian and the bottom block is the one containing the weights (len(weights) == 3 and J.shape[1] == 6 in this case). Any empty space in the bottom block indicates a zero element. It can be seen that at the left there is the diagonal matrix (w1, w2, w3) which is padded at the right with zeros to match the number of columns of the original Jacobian.

+------------+
|            |
|            |
|            |
|  Jacobian  |
|            |
|            |
|            |
+------------+
|w1          |
|  w2        |
|    w3      |
+------------+
to_jacobian(x: <MagicMock name='mock.ndarray' id='139857761889296'>, jacobian: <MagicMock name='mock.ndarray' id='139857761889296'>) <MagicMock name='mock.ndarray' id='139857761889296'>

Transform the given jacobian taking into account the parameter estimate x.

to_residuals(x: <MagicMock name='mock.ndarray' id='139857761889296'>, residuals: <MagicMock name='mock.ndarray' id='139857761889296'>) <MagicMock name='mock.ndarray' id='139857761889296'>

Transform the given residuals taking into account the parameter estimate x.