obs_var_Zs
- pyoptex.doe.cost_optimal.utils.obs_var_Zs(Yenc, colstart, grouped_cols=None)[source]
Create the grouping matrices (1D array) for each of the factors that are supposed to be grouped. Runs are in the same group as long as the factor did not change as this is generally how it happens in engineering practices.
Parameters
- Yencnp.array(2d)
The categorically encoded design matrix.
- colstartnp.array(1d)
The start column of each factor.
- grouped_colsnp.array(1d)
A boolean array indicating whether the factor is grouped or not.
Returns
- Zstuple(np.array(1d) or None)
A tuple of grouping matrices or None if the factor is not grouped.