zuko.flows.polynomial¶
Polynomial flows.
Classes¶
Descriptions¶
- class zuko.flows.polynomial.BPF(features, context=0, degree=16, **kwargs)¶[source]
Creates a Bernstein polynomial flow (BPF).
Warning
The Bernstein polynomial is bounded to the interval \([-5, 5]\). Any feature outside of this domain is not transformed. It is recommended to standardize features (zero mean, unit variance) before training.
References
Deep transformation models: Tackling complex regression problems with neural network based transformation models (Sick et al., 2020)Short-Term Density Forecasting of Low-Voltage Load using Bernstein-Polynomial Normalizing Flows (Arpogaus et al., 2022)- Parameters:
features (int) – The number of features.
context (int) – The number of context features.
degree (int) – The degree \(M\) of the Bernstein polynomial.
kwargs – Keyword arguments passed to
zuko.flows.autoregressive.MAF.
- class zuko.flows.polynomial.SOSPF(features, context=0, degree=4, polynomials=3, slope=0.001, **kwargs)¶[source]
Creates a sum-of-squares polynomial flow (SOSPF).
Warning
Invertibility is only guaranteed for features within the interval \([-10, 10]\). It is recommended to standardize features (zero mean, unit variance) before training.
References
Sum-of-Squares Polynomial Flow (Jaini et al., 2019)- Parameters:
features (int) – The number of features.
context (int) – The number of context features.
degree (int) – The degree \(L\) of polynomials.
polynomials (int) – The number of polynomials \(K\).
slope (float) – The minimum slope of the polynomial transformation(s).
kwargs – Keyword arguments passed to
zuko.flows.autoregressive.MAF.