When solving an inversion problem, it can be useful to look at the residual for a couple of reasons. The first is to see that it is white. The second reason, important in the case of regularized inversion, is to see that the fitting goals have been properly balanced.
In equation (2), we are finding both a filter and missing data at the same time. If the solver focuses entirely on finding the filter, it will not change the missing data and create a filter that is estimated on incorrect data. On the other hand, if the solver focuses entirely on missing data, it does not change the filter and creates incorrect interpolation results.
I found it useful to inspect movies of the gradient to balance the data and filter. Since the individual residuals of and are summed, it does not make sense to look at the total residual to see how well the filter and missing data are balanced. Alternatively, the individual residuals could be looked at before they are summed. However, I found it useful to make movies of each step in the solver of the gradient, equation (4).
By observing the relative sizes of the perturbation of the filter and missing data in movies of the gradient, the two can be easily balanced by scaling the input data, . Conceptually, it may sound better to implement a model weight to balance the filter and the data, but I got better results by merely scaling the input data.