Improved the custom objective funtion feature of LogReg