mixle.doe.mixture module

Mixture experiment designs on the simplex.

In a mixture experiment the factors are component proportions that must be non-negative and sum to one, so the design space is the (q-1)-simplex rather than a box. These generators return a (n, q) array whose rows are valid blends (each row sums to 1). Use them with a mixture (Scheffe) polynomial when modelling the response. lower/upper bounds map the canonical simplex design onto pseudo-components for constrained mixtures.

simplex_lattice(q, m)[source]

{q, m} simplex-lattice design for q mixture components.

Each component takes one of the m + 1 evenly spaced proportions 0, 1/m, ..., 1 and the proportions in a blend sum to one. The design is exactly the set of such blends – C(q+m-1, m) points – and supports a degree-m Scheffe mixture polynomial.

Returns a (C(q+m-1, m), q) array of blends (rows sum to 1).

Parameters:
Return type:

ndarray

simplex_centroid(q)[source]

Simplex-centroid design for q mixture components.

Runs the centroid of every non-empty subset of components: the q pure components, the C(q,2) binary 1/2:1/2 blends, … up to the overall centroid (all components at 1/q) – 2**q - 1 blends in total. Supports the special cubic mixture model.

Returns a (2**q - 1, q) array of blends (rows sum to 1).

Parameters:

q (int)

Return type:

ndarray

to_pseudocomponents(blends, lower)[source]

Map canonical simplex blends onto pseudo-components with per-component lower bounds.

With lower bounds l_i (summing to < 1), a constrained mixture’s feasible region is itself a smaller simplex; this maps a canonical blend x onto the real proportions a_i = l_i + (1 - sum l) * x_i (the standard L-pseudocomponent transform), so any simplex design above can be run inside the constrained region. Rows still sum to 1.

Parameters:
Return type:

ndarray