Added non-linear regression functionality