Is there a way to retrieve some metrics (say sum of squared error) for quantifying the goodness of the fitting? If not, is there a recipe that can be used to calculate such metrics given the output of dwi2tensor?
Using the predicted and original signal, you can then easily obtain the raw residual using mrcalc:
mrcalc dwi.mif dwi_hat.mif -subtract residual.mif
From there, it should be straightforward to calculate error metrics through further manipulation of the raw residual using mrcalc, mrmath, and/or mrstats, depending on what exactly you are after.
If I use >=2 iterations for iterative reweighted LLS, is it true that the weights utilized for current iteration are calculated as squares of predicted signals of previous iteration and can be approximated by using the output predicted signals (because of convergence)?
Having the -predicted_signal option in dwi2fod in the future will make this a lot more convenient, but you can in fact achieve the same currently: it’s just a matter of performing a forward convolution of the FOD(s) with the response function(s) (as opposed to deconvolution). There may be some additional gymnastics required to deal with the fact that shconv can only handle one b-value at a time, but it can be done.
I see that “-predicted_signal” is now an option for dwi2fod in the latest release. Any thoughts on best practices to use FOD residuals to detect image artefacts? Would just looking for large residuals work, or would the FODs fit most artefacts fairly well too? Would there be any benefit in reducing the lmax?
Good question. I’ve not really looked into it yet, but I think it would definitely be useful to look for large residuals (at least, larger residuals than are typical for that data set). I don’t think the FOD would fit such artefacts well, primarily because the CSD constraint is so effective. I expect residual fat sat artefacts would be very prominent in these maps.
I’m not sure about reducing the lmax though – I think the main thing is going to be the smoothness of the response function (not much you can do to the FOD, even at high lmax, that would produce non-smooth signal predictions if the response is smooth). This is something I’d like to look into for QC, but haven’t had the time for…
Also, note that I expect there to be some residual structure in the residuals. The CSD model is always going to be an approximation, so it would be quite remarkable if the residuals turned out to be pure noise…