kbressem / faimed3d

Extension to fastai for volumetric medical data
MIT License
32 stars 14 forks source link

Regression problems #66

Closed paul-reiners closed 1 year ago

paul-reiners commented 1 year ago

How do you convert, say, the ResNet model to handle regression instead of classification?

kbressem commented 1 year ago

I never worked in regression, so I might not be able to provide detailed guidance. Assuming your target lay between 0 and 1, you could adapt the model head to output one number and then use MSELoss. However, it's a bit hard to answer without knowing what exactly you are trying to achieve.

Maybe check out some of these tutorials in regression with fastai:

https://analyticsindiamag.com/a-hands-on-guide-to-regression-with-fast-ai/

https://walkwithfastai.com/Regression_and_Permutation_Importance