decision-forests
decision-forests copied to clipboard
How we can set loss function?
For example if we need mean absolute error (MAE) , how we can specify as compile parameter doesn't accept loss function?
I found the answer here: https://discuss.tensorflow.org/t/tfdf-custom-loss/2223
@filipstefanovski thanks for linking the current best alternative (add the custom loss in the C++ code).
But I'll leave this as an enhancement and leave it open: having a way to wire a TensorFlow defined loss to the training algorithms is one of our outstanding TODOs. It will be slower then defining it in C++, but much more convenient for experimentation and one-of losses.
Years later, this can finally be closed :)
- Mean Average Error has been a built-in loss in TF-DF for a while now
- You can train models with custom losses through C++ or with the Python wrapper of YDF. These models can be exported to TF-DF. Here is the tutorial