facet.simulation.UnivariateSimulationResult#

class facet.simulation.UnivariateSimulationResult(*, partitioner, mean, sem, feature_name, output_name, output_unit, baseline, confidence_level)[source]#

Summary result of a univariate simulation.

Generic types

~T_Values(bound= generic)

Parameters
  • partitioner (Partitioner[TypeVar(T_Values, bound= generic)]) – the partitioner used to generate feature values to be simulated

  • mean (Sequence[float]) – mean predictions for the values representing each partition

  • sem (Sequence[float]) – standard errors of the mean predictions for the values representing each partition

  • feature_name (str) – name of the simulated feature

  • output_name (str) – name of the target for which outputs are simulated

  • output_unit (str) – the unit of the simulated outputs (e.g., uplift or class probability)

  • baseline (float) – the average observed actual output, acting as the baseline of the simulation

  • confidence_level (float) – the width of the confidence interval determined by the standard error of the mean, ranging between 0.0 and 1.0 (exclusive)

Attribute summary

COL_LOWER_BOUND

The name of a series of lower CI bounds of simulated values per partition.

COL_MEAN

The name of a series of mean simulated values per partition.

COL_SEM

The name of a series of standard errors of mean simulated values per partition.

COL_UPPER_BOUND

The name of a series of upper CI bounds of simulated values per partition.

IDX_PARTITION

The name of the column index of attribute output, denoting partitions represented by their central values or by a category.

data

The simulation result as a data frame, indexed by the central values of the partitions for which the simulation was run, with the following columns:

partitioner

The partitioner used to generate feature values to be simulated.

feature_name

Name of the simulated feature.

output_name

Name of the target for which outputs are simulated.

output_unit

The unit of the simulated outputs (e.g., uplift or class probability).

baseline

The average observed actual output, acting as the baseline of the simulation.

confidence_level

The width \(\alpha\) of the confidence interval determined by bootstrapping, with \(0 < \alpha < 1\).

Definitions

COL_LOWER_BOUND = 'lower_bound'#

The name of a series of lower CI bounds of simulated values per partition.

COL_MEAN = 'mean'#

The name of a series of mean simulated values per partition.

COL_SEM = 'sem'#

The name of a series of standard errors of mean simulated values per partition.

COL_UPPER_BOUND = 'upper_bound'#

The name of a series of upper CI bounds of simulated values per partition.

IDX_PARTITION = 'partition'#

The name of the column index of attribute output, denoting partitions represented by their central values or by a category.

baseline: float#

The average observed actual output, acting as the baseline of the simulation.

confidence_level: float#

The width \(\alpha\) of the confidence interval determined by bootstrapping, with \(0 < \alpha < 1\).

data: pandas.DataFrame#

The simulation result as a data frame, indexed by the central values of the partitions for which the simulation was run, with the following columns:

  • COL_MEAN: the mean predictions for the simulated values

  • COL_SEM: the standard errors of the mean predictions

  • COL_LOWER_BOUND: the lower bounds of the confidence intervals for the simulation outcomes, based on mean, standard error of the mean, and confidence_level

  • COL_UPPER_BOUND: the upper bounds of the confidence intervals for the simulation outcomes, based on mean, standard error of the mean, and confidence_level

feature_name: str#

Name of the simulated feature.

output_name: str#

Name of the target for which outputs are simulated.

output_unit: str#

The unit of the simulated outputs (e.g., uplift or class probability).

partitioner: facet.data.partition.Partitioner[T_Values]#

The partitioner used to generate feature values to be simulated.