maxframe.tensor.special.erf#

maxframe.tensor.special.erf(x, out=None, where=None, **kwargs)[source]#

Returns the error function of complex argument.

It is defined as 2/sqrt(pi)*integral(exp(-t**2), t=0..z).

Parameters:

x (Tensor) – Input tensor.

Returns:

res – The values of the error function at the given points x.

Return type:

Tensor

See also

erfc, erfinv, erfcinv, wofz, erfcx, erfi

Notes

The cumulative of the unit normal distribution is given by Phi(z) = 1/2[1 + erf(z/sqrt(2))].

References

Examples

>>> import maxframe.tensor as mt
>>> from maxframe.tensor import special
>>> import matplotlib.pyplot as plt
>>> x = mt.linspace(-3, 3)
>>> plt.plot(x, special.erf(x))
>>> plt.xlabel('$x$')
>>> plt.ylabel('$erf(x)$')
>>> plt.show()