class_docstr: Generator for Thompson sampling.
  
  The generator performs Thompson sampling on the data passed in via `fit`.
  Arms are given weight proportional to the probability that they are
  winners, according to Monte Carlo simulations.
class_docstr_tok: ["Generator","for","Thompson","sampling",".","The","generator","performs","Thompson","sampling","on","the","data","passed","in","via","`","fit","`",".","Arms","are","given","weight","proportional","to","the","probability","that","they","are","winners",",","according","to","Monte","Carlo","simulations","."]
docstr: Construct lists of mappings, one per outcome, of parameterizations
  to the a tuple of their mean and variance.
docstr_tok: ["Construct","lists","of","mappings",",","one","per","outcome",",","of","parameterizations","to","the","a","tuple","of","their","mean","and","variance","."]
code: def _fit_X_to_Ys_and_Yvars(
      self,
      X: List[TParamValueList],
      Ys: List[List[float]],
      Yvars: List[List[float]],
  ) -> List[Dict[TParamValueList, Tuple[float, float]]]:
      """Construct lists of mappings, one per outcome, of parameterizations
      to the a tuple of their mean and variance.
      """
      X_to_Ys_and_Yvars = []
      hashableX = [self._hash_TParamValueList(x) for x in X]
      for Y, Yvar in zip(Ys, Yvars):
          X_to_Ys_and_Yvars.append(dict(zip(hashableX, zip(Y, Yvar))))
      return X_to_Ys_and_Yvars
  
imports: import hashlib
  import json
  from typing import Dict, List, Optional, Tuple
  import numpy
  from ax.core.types import TGenMetadata, TParamValue, TParamValueList
  from ax.exceptions.constants import TS_MIN_WEIGHT_ERROR, TS_NO_FEASIBLE_ARMS_ERROR
  from ax.exceptions.model import ModelError
  from ax.models.discrete_base import DiscreteModel
  from ax.models.types import TConfig
  from ax.utils.common.docutils import copy_doc
label_desc: Use image node_id 11 for calling the ThompsonSampler obj's underlying member method code with example usage: obj._fit_X_to_Ys_and_Yvars(X, Ys, Yvars) and returns: X_to_Ys_and_Yvars