class_docstr: Metric for testing factorial designs assuming a main effects only
  logit model.
class_docstr_tok: ["Metric","for","testing","factorial","designs","assuming","a","main","effects","only","logit","model","."]
docstr: Args:
      name: name of the metric.
      coefficients: a dictionary mapping
          factors to levels to main effects.
      batch_size: the sample size for one batch, distributed
          between arms proportionally to the design.
      noise_var: used in calculating the probability of
          each arm.
docstr_tok: ["Args",":","name",":","name","of","the","metric",".","coefficients",":","a","dictionary","mapping","factors","to","levels","to","main","effects",".","batch_size",":","the","sample","size","for","one","batch",",","distributed","between","arms","proportionally","to","the","design",".","noise_var",":","used","in","calculating","the","probability","of","each","arm","."]
code: def __init__(
      self,
      name: str,
      coefficients: Dict[str, Dict[TParamValue, float]],
      batch_size: int = 10000,
      noise_var: float = 0.0,
  ) -> None:
      """
      Args:
          name: name of the metric.
          coefficients: a dictionary mapping
              factors to levels to main effects.
          batch_size: the sample size for one batch, distributed
              between arms proportionally to the design.
          noise_var: used in calculating the probability of
              each arm.
      """
      super(FactorialMetric, self).__init__(name)
  
      self.coefficients = coefficients
      self.batch_size = batch_size
      self.noise_var = noise_var
  
file_path: Ax/ax/metrics/factorial.py
imports: from typing import Any, Dict, Tuple
  import numpy
  import pandas
  from ax.core.base_trial import BaseTrial
  from ax.core.batch_trial import BatchTrial
  from ax.core.data import Data
  from ax.core.metric import Metric, MetricFetchE, MetricFetchResult
  from ax.core.types import TParameterization, TParamValue
  from ax.utils.common.result import Err, Ok
  from ax.utils.stats.statstools import agresti_coull_sem
label_desc: Use image node_id 1 to create a new FactorialMetric object from inherited base classes: Metric with example: obj = FactorialMetric(name, coefficients, batch_size, noise_var)