ucl-pond / pySuStaIn

Subtype and Stage Inference (SuStaIn) algorithm with an example using simulated data.
MIT License
135 stars 64 forks source link

multiple sclerosis #20

Closed luantunez closed 3 years ago

luantunez commented 3 years ago

Hello and thank you very much for sharing your work! I am sorry for the trouble, but I am not being able to find out how to run your model for multiple sclerosis outcome prediction on the pretrained pkl you provide. Would it be possible for you to provide some explanation on how to do so, or a reference to some instructions you have already provided and I am not seeing. From the input required, up to the inference process and the expected output. I thank you enormously in advance. Lucia

noxtoby commented 3 years ago

Quick answer here until someone else has time to followup:

luantunez commented 3 years ago

Thank you very much for your help and quick response! I have read the pkl file and I am getting the following content:

The problem is that I do not fully understand them and wouldn´t know how to set them for inference of MS on a new MRI volume. Could you guide me on that please?

{'ml_sequence': array([[[ 7.],
        [11.],
        [ 6.],
        [10.],
        [ 9.],
        [ 3.],
        [20.],
        [ 8.],
        [22.],
        [19.],
        [21.],
        [23.],
        [24.],
        [33.],
        [ 4.],
        [35.],
        [12.],
        [34.],
        [32.],
        [ 2.],
        [36.],
        [16.],
        [17.],
        [37.],
        [ 1.],
        [15.],
        [14.],
        [ 0.],
        [13.],
        [25.],
        [38.],
        [28.],
        [30.],
        [26.],
        [27.],
        [29.],
        [ 5.],
        [18.],
        [31.]],

       [[ 3.],
        [ 4.],
        [ 0.],
        [12.],
        [25.],
        [38.],
        [13.],
        [ 5.],
        [ 1.],
        [ 2.],
        [17.],
        [15.],
        [16.],
        [14.],
        [11.],
        [18.],
        [ 7.],
        [20.],
        [10.],
        [24.],
        [ 6.],
        [ 9.],
        [ 8.],
        [22.],
        [21.],
        [23.],
        [19.],
        [26.],
        [28.],
        [30.],
        [27.],
        [31.],
        [29.],
        [33.],
        [35.],
        [34.],
        [36.],
        [37.],
        [32.]],

       [[ 3.],
        [ 4.],
        [ 1.],
        [ 2.],
        [ 0.],
        [ 5.],
        [12.],
        [11.],
        [17.],
        [ 7.],
        [16.],
        [10.],
        [20.],
        [ 9.],
        [ 6.],
        [15.],
        [ 8.],
        [22.],
        [19.],
        [21.],
        [23.],
        [24.],
        [14.],
        [25.],
        [38.],
        [13.],
        [33.],
        [35.],
        [34.],
        [32.],
        [36.],
        [37.],
        [30.],
        [28.],
        [18.],
        [31.],
        [26.],
        [29.],
        [27.]]]), 'ml_f': array([[0.34185156],
       [0.25388692],
       [0.40426152]]), 'ml_likelihood': array([-137458.80978643]), 'samples_sequence': array([[[ 7.,  7.,  7., ...,  7.,  7.,  7.],
        [11., 11., 11., ..., 11., 11., 11.],
        [ 6.,  6.,  6., ...,  6.,  6.,  6.],
        ...,
        [ 5.,  5.,  5., ..., 18., 18., 18.],
        [18., 18., 18., ..., 31., 31., 31.],
        [31., 31., 31., ..., 30., 30., 30.]],

       [[ 3.,  3.,  3., ...,  3.,  3.,  3.],
        [ 4.,  4.,  4., ...,  4.,  4.,  4.],
        [ 0.,  0.,  0., ...,  0.,  0.,  0.],
        ...,
        [36., 36., 36., ..., 36., 36., 36.],
        [37., 37., 37., ..., 37., 37., 37.],
        [32., 32., 32., ..., 32., 32., 32.]],

       [[ 3.,  3.,  3., ...,  3.,  3.,  3.],
        [ 4.,  4.,  4., ...,  4.,  4.,  4.],
        [ 1.,  1.,  1., ...,  1.,  1.,  1.],
        ...,
        [26., 26., 26., ..., 31., 31., 31.],
        [29., 29., 29., ..., 29., 29., 29.],
        [27., 27., 27., ..., 27., 27., 27.]]]), 'samples_f': array([[0.34028093, 0.3422053 , 0.3422053 , ..., 0.34814804, 0.34880428,
        0.35054254],
       [0.25384016, 0.25389745, 0.25389745, ..., 0.2540744 , 0.25409394,
        0.2541457 ],
       [0.40587892, 0.40389725, 0.40389725, ..., 0.39777756, 0.39710178,
        0.39531176]]), 'samples_likelihood': array([[-137460.9034704 ],
       [-137460.95568907],
       [-137460.95568907],
       ...,
       [-137468.27126633],
       [-137468.40862701],
       [-137468.82692007]])}
noxtoby commented 3 years ago

Did you look at the tutorial notebook?