datawhalechina / torch-rechub

A Lighting Pytorch Framework for Recommendation Models, Easy-to-use and Easy-to-extend.
MIT License
374 stars 69 forks source link

Add custom_loss_func and custom_evaluate_func to trainer with example #63

Open yinpu opened 7 months ago

yinpu commented 7 months ago

50 Implemented a custom CVR loss function to accurately reflect the conditional nature of conversion rate calculations. The loss is computed only for instances where click=1, aligning with the typical behavior expected in conversion rate optimization scenarios. This update includes the core implementation of the custom loss function along with examples demonstrating its application and efficacy in relevant contexts.