analysis#

Analysis utility functions for examining metrics over the context of an optimization campaign

Functions

calc_ofat_ranges(optimizer, threshold[, ...])

Calculates an OFAT design space using confidence bounds around the optimizer prediction.

obsidian.campaign.analysis.calc_ofat_ranges(optimizer: Optimizer, threshold: float, X_ref: DataFrame | Series | None = None, PI_range: float = 0.95, steps: int = 100, response_id: int = 0, calc_interacts: bool = True)[source]#

Calculates an OFAT design space using confidence bounds around the optimizer prediction. Also includes a matrix of interaction scores.

Parameters:
  • optimizer (Optimizer) – The optimizer object which contains a surrogate that has been fit to data and can be used to make predictions.

  • X_ref (pd.DataFrame) – The reference data point from which the OFAT variations are calculated.

  • threshold (float) – The response value threshold (minimum value) which would be considered passing for OFAT variations.

  • PI_range (float, optional) – The prediction interval coverage (fraction of density)

  • steps (int, optional) – The number of steps to use in the search for the OFAT boundaries. The default value is 100.

  • response_id (int, optional) – The index of the relevant response within the fitted optimizer object. The default value is 0.

  • calc_interacts (bool, optional) – Whether or not to return the interaction matrix; default is True.

Returns:

A dataframe describing the min/max OFAT values using each LB, UB, and average prediction.

Values are scaled in the (0,1) space based on optimizer.X_space.

cor (np.array): A matrix of interaction values between every combination of two parameters.

Each value is the fractional reduction in size for the acceptable range envelope created by a 2-factor variation, in comparison to the corresponding two independent 1-factor variations. As such, diagonal elements are 0.

Return type:

ofat_ranges (pd.DataFrame)