HAMA-681: add logistic cost function