predictive-clinical-neuroscience / PCNtoolkit-demo

Demo and tutorial for PCNtoolkit routines
GNU General Public License v3.0
30 stars 16 forks source link

Problems Plotting Centiles of Variation #16

Closed adavidBlancoUPF closed 3 months ago

adavidBlancoUPF commented 4 months ago

Hi, apologies in advance if this question looks naive.

I have created a normative model using BLR following the script BLR_normativemodel_protocol. Now I would like to plot the centiles of variation and I looking for some example code I decided to use the transfer_pretrained_normative_models.ipynb

One of the problems I'm finding is that the normative models created using the code from test don't have "warp params". I mean, nm.blr.warp is None, while the normative models used for the example launched from braincharts contain a WarpSinArcsinh object and a parameter N-params which is equal to 2.

I'm new to all these methods and I'm not very sure about how to bypass this issue in order to be able to plot the centiles of variation or, in case you recommend it more, how to re-do the normative models in order for them to integrate this warp parameter.

Thank you very much in advance, you are doing a great work. Congratulations.

Ángel

amarquand commented 3 months ago

Hi - this means that you are trying to plot the centiles using a model that was training without warping using code where warping is applied. It doesn't make sense to do this. To fix it, you can use an example like this and just remove the parts where the likelihood is warped (i.e you have the mean and variance directly). https://github.com/predictive-clinical-neuroscience/braincharts/blob/master/scripts/apply_normative_models_ct.ipynb