Python Forum

Full Version: Function for the Normal Loss Function L(z)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am pretty new to Python and my algorithm is working with the Normal loss function L(z)

L(z)=ϕ(z)−z(1−Φ(z))

I have "z" as an input and need "L(z)" as an output.

A table of that looks like this:

İmage


Does a package exist which provides a function to do so? What is the name of the package and function?
You can use SciPy package, it includes ϕ(z) and Φ(z) functions (normal probability density and its cumulative distribution function), so you can easily define
L(z) using them.