init of logistic model
changed api to use function pointers