A novel gradient-based method for decision trees optimizing arbitrary differential loss functions