pyod icon indicating copy to clipboard operation
pyod copied to clipboard

Combined loss functions in Tensorflow Autoencoder

Open msho-nb opened this issue 2 years ago • 2 comments

I have often experienced better training performance when categorical cross entropy loss is applied on one-hot encoded categorical data and mean squared error applied on the scaled numerical attributes.

Is there a way in the Pyod-framework to combine two lossfunctions together (in the case data contains both categorial and numerical types) in a single loss form, e.g. total_loss=categorial_loss+numerical_loss?

msho-nb avatar Mar 11 '22 13:03 msho-nb

so basically pyod is an off-the-shelf library with little flexibility. We do not differentiate the numerical and categorical features...but it should not be hard if you take the code and further update it. PR welcomed for further functions!

yzhao062 avatar Mar 11 '22 13:03 yzhao062

Well, that is the exact reason why I chose Pyod. It's very accesible, and I'm not very seasoned in Python yet. So if you have any suggestion in how to formulate an objective function with combined loss that the current Pyod framework would take, it would be much appreciated! :)

msho-nb avatar Mar 11 '22 13:03 msho-nb