skg.gauss_pdf¶
Gaussian probability density fit.
The function in this module is normalized to one, as a PDF should be:
For for the unnormalized Gaussian (with an additional amplitude
parameter), see gauss
. For the CDF, see
gauss_cdf
.
Todo
Add proper handling of colinear inputs (and other singular matrix cases).
Todo
Add tests.
Todo
Add nan_policy argument.
Todo
Add axis parameter. Figure out how to do it properly.
Todo
Add PEP8 check to formal tests.
Todo
Include amplitude in integrals.
Todo
Allow broadcasting of x and y, not necessarily identical size
Functions
gauss_pdf_fit (x, y[, sorted]) |
Gaussian PDF fit of the form . |
model (x, mu, sigma) |
Compute . |
-
skg.gauss_pdf.
gauss_pdf_fit
(x, y, sorted=True)[source]¶ Gaussian PDF fit of the form .
This implementation is based on the approximate solution to integral equation (3), presented in Régressions et équations intégrales.
Parameters: - x (array-like) – The x-values of the data points. The fit will be performed on a raveled version of this array.
- y (array-like) – The y-values of the data points corresponding to x. Must be the same size as x. The fit will be performed on a raveled version of this array.
- sorted (bool) – Set to True if x is already monotonically increasing or decreasing. If False, x will be sorted into increasing order, and y will be sorted along with it.
Returns: mu, sigma – A two-element array containing the estimated mean and standard deviation, in that order.
Return type: References