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 (finite, non-negative, summing to < 1), a constrained mixture’s feasible region is itself a smaller simplex; this maps a canonical blend x – itself a finite (n, q) array of genuine simplex points (non-negative, rows summing to 1) – 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.

Raises:

ValueError – lower is not a finite, non-negative, 1-D vector summing to less than 1 (i.e. one that itself admits at least one feasible simplex point), or blends is not a finite 2-D array of shape (n, len(lower)) whose rows are genuine canonical simplex points (non-negative, summing to 1). Invalid input is rejected outright instead of silently mapped to an out-of-simplex result (MXR-080-0180): e.g. blend [2, -1] with lower bounds [0.1, 0.1] used to silently return [1.7, -0.7], a negative “proportion”.

Parameters:
Return type:

ndarray