Logistics function formula. This should do it: And now you can test it by calling: Update : Note that the above was mainly intended as a straight one-to-one translation of the given expression into Python code. It is not tested or known to be a numerically sound implementation. If you know you need a very robust implementation, I'm sure there are others where people have actually given this problem some thought. which is only a costly wrapper (because it allows you to scale and translate the logistic function) of another scipy function: If you are concerned about performances continue reading, otherwise just use expit .
Комментариев нет:
Отправить комментарий