LESYMAP
LESYMAP copied to clipboard
[Help Wanted] Is it possible to save and reload a trained SCCAN model for future prediction?
Hello, thanks for your excellent work. I'm trying to build an easy-to-use pipeline for predicting the risk of a disease. It includes two modules, the automatic segmentation module and a SCCAN prediction module. The segmentation module is implemented in Python and can be easily integrated into the pipeline. For the prediction module, our preliminary results show SCCAN has a promising accuracy.
However, I have no idea how to save and reload the trained SCCAN model for future prediction instead of retraining the model every time we call the function. Could you please give any suggestion?
I think I already did this. You can save the entire output object e.g. lsm=lestmap() then save(lsm). After that, you should be able to load the lam object again and use lsm_predict. Check the help for lsm_predict too. My memory is a bit rusty on the exact command names, but I think the group led by Aaron Boes uses the prediction approach. If you manage to find the solution that works for you, please consider creating a wiki page here on GitHub so others can learn how it's done.
On Wed, Oct 30, 2024, 5:00 AM Tony Cao @.***> wrote:
Hello, thanks for your excellent work. I'm trying to build an easy-to-use pipeline for predicting the risk of a disease. It includes two modules, the automatic segmentation module and a SCCAN prediction module. The segmentation module is implemented in Python and can be easily integrated into the pipeline. For the prediction module, our preliminary results show SCCAN has a promising accuracy.
However, I have no idea how to save and reload the trained SCCAN model for future prediction instead of retraining the model every time we call the function. Could you please give any suggestion?
— Reply to this email directly, view it on GitHub https://github.com/dorianps/LESYMAP/issues/43, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACFJU7NYXDPNKI3P6TTQPV3Z6CN4LAVCNFSM6AAAAABQ3SVDYCVHI2DSMVQWIX3LMV43ASLTON2WKOZSGYZDGMZTGQ2TQNI . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Thank you for your reply, I'll try that.
By the way, is there any idea to do binary prediction with sccan? It is good to do regression, but my goal is classification. I don't know if it reasonable to add some activation function like in deep learning.
Not that I can think of. Sccan is not my creation, you could ask the ANTs channel, maybe @stnava will answer. The closest thing I can think of is to train the model with binary scores, if it works, and then get the predicted output and apply a cutoff threshold, say at 0.5 to binarize it. For machine learning classification is a bit easier than parametric prediction, so you may be in luck with a simple hack.
On Fri, Nov 1, 2024, 8:16 AM Tony Cao @.***> wrote:
By the way, is there any idea to do binary prediction with sccan? It is good to do regression, but my goal is classification. I don't know if it reasonable to add some activation function like in deep learning.
— Reply to this email directly, view it on GitHub https://github.com/dorianps/LESYMAP/issues/43#issuecomment-2451780238, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACFJU7NPBFR5PPQ2MU6TEJLZ6NWJFAVCNFSM6AAAAABQ3SVDYCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJRG44DAMRTHA . You are receiving this because you commented.Message ID: @.***>