Polynomials#

While polynomials are also basic PDFs, they convey mathematically a more special class of functions.

They constitute a sum of different degrees. Polynomial PDFs are useful for modeling smooth backgrounds or for creating flexible parametric shapes.

Below are visualizations of polynomial PDFs with different parameter values to help understand their shapes and choose appropriate initial parameter values.

The general parameter structure includes the coeff, which is a list of coefficients starting at the SECOND coefficient. Since the PDF is normalized, the first coefficient is set to constant 1.0 by default; this can be changed using the coeff0 parameter – it is rarely if ever needed.

To change the overall normalization, use the extended parameter.

Bernstein Polynomials#

Bernstein polynomials are a basis for the space of polynomials defined on the interval [0, 1]. They are particularly useful for modeling smooth shapes with good numerical stability.

Bernstein PDF with different degrees Bernstein PDF with different coefficient patterns

zfit.pdf.Bernstein(obs, coeffs[, ...])

Linear combination of Bernstein polynomials of order len(coeffs) - 1, the coeffs are overall scaling factors.

Chebyshev Polynomials#

Chebyshev polynomials are a sequence of orthogonal polynomials defined on the interval [-1, 1]. They are particularly useful for approximating functions with minimal maximum error.

Chebyshev PDF with different degrees Chebyshev PDF with different coefficient patterns

zfit.pdf.Chebyshev(obs, coeffs[, ...])

Linear combination of Chebyshev (first kind) polynomials of order len(coeffs), coeffs are scaling factors.

Legendre Polynomials#

Legendre polynomials are a sequence of orthogonal polynomials defined on the interval [-1, 1]. They are often used in physics for solving differential equations.

Legendre PDF with different degrees Legendre PDF with different coefficient patterns

zfit.pdf.Legendre(obs, coeffs[, ...])

Linear combination of Legendre polynomials of order len(coeffs), the coeffs are overall scaling factors.

Chebyshev2 Polynomials#

Chebyshev2 polynomials are a sequence of orthogonal polynomials of the second kind defined on the interval [-1, 1].

Chebyshev2 PDF with different degrees Chebyshev2 PDF with different coefficient patterns

zfit.pdf.Chebyshev2(obs, coeffs[, ...])

Linear combination of Chebyshev (second kind) polynomials of order len(coeffs), coeffs are scaling factors.

Hermite Polynomials#

Hermite polynomials are a sequence of orthogonal polynomials that arise in probability, quantum mechanics, and other fields.

Hermite PDF with different degrees Hermite PDF with different coefficient patterns

zfit.pdf.Hermite(obs, coeffs[, ...])

Linear combination of Hermite polynomials (for physics) of order len(coeffs), with coeffs as scaling factors.

Laguerre Polynomials#

Laguerre polynomials are a sequence of orthogonal polynomials associated with the Gamma distribution.

Laguerre PDF with different degrees Laguerre PDF with different coefficient patterns

zfit.pdf.Laguerre(obs, coeffs[, ...])

Linear combination of Laguerre polynomials of order len(coeffs), the coeffs are overall scaling factors.

RecursivePolynomial#

RecursivePolynomial provides a general framework for defining polynomials through recursive relations.

zfit.pdf.Bernstein(obs, coeffs[, ...])

Linear combination of Bernstein polynomials of order len(coeffs) - 1, the coeffs are overall scaling factors.

zfit.pdf.Chebyshev(obs, coeffs[, ...])

Linear combination of Chebyshev (first kind) polynomials of order len(coeffs), coeffs are scaling factors.

zfit.pdf.Legendre(obs, coeffs[, ...])

Linear combination of Legendre polynomials of order len(coeffs), the coeffs are overall scaling factors.

zfit.pdf.Chebyshev2(obs, coeffs[, ...])

Linear combination of Chebyshev (second kind) polynomials of order len(coeffs), coeffs are scaling factors.

zfit.pdf.Hermite(obs, coeffs[, ...])

Linear combination of Hermite polynomials (for physics) of order len(coeffs), with coeffs as scaling factors.

zfit.pdf.Laguerre(obs, coeffs[, ...])

Linear combination of Laguerre polynomials of order len(coeffs), the coeffs are overall scaling factors.

zfit.pdf.RecursivePolynomial(obs, coeffs[, ...])

1D polynomial generated via three-term recurrence.