class_docstr: A GP using a Latent Context Embedding Additive (LCE-A) Kernel.
  
  Note that the model does not support batch training. Input training
  data sets should have dim = 2.
docstr: Construct `Model` keyword arguments from a dict of `SupervisedDataset`.
  
  Args:
      training_data: A `SupervisedDataset` containing the training data.
      decomposition: Dictionary of context names and their indexes of the
          corresponding active context parameters.
      train_embedding: Whether to train the embedding layer or not.
      cat_feature_dict: Keys are context names and values are list of categorical
          features i.e. {"context_name" : [cat_0, ..., cat_k]}, where k is the
          number of categorical variables. If None, we use context names in the
          decomposition as the only categorical feature, i.e., k = 1.
      embs_feature_dict: Pre-trained continuous embedding features of each
          context.
      embs_dim_list: Embedding dimension for each categorical variable. The length
          equals the number of categorical features k. If None, the embedding
          dimension is set to 1 for each categorical variable.
      context_weight_dict: Known population weights of each context.
docstr_tok: ["Construct","`","Model","`","keyword","arguments","from","a","dict","of","`","SupervisedDataset","`",".","Args",":","training_data",":","A","`","SupervisedDataset","`","containing","the","training","data",".","decomposition",":","Dictionary","of","context","names","and","their","indexes","of","the","corresponding","active","context","parameters",".","train_embedding",":","Whether","to","train","the","embedding","layer","or","not",".","cat_feature_dict",":","Keys","are","context","names","and","values","are","list","of","categorical","features","i.e",".","{","``","context_name","''",":","[","cat_0",",","...",",","cat_k","]","}",",","where","k","is","the","number","of","categorical","variables",".","If","None",",","we","use","context","names","in","the","decomposition","as","the","only","categorical","feature",",","i.e.",",","k","=","1.","embs_feature_dict",":","Pre-trained","continuous","embedding","features","of","each","context",".","embs_dim_list",":","Embedding","dimension","for","each","categorical","variable",".","The","length","equals","the","number","of","categorical","features","k.","If","None",",","the","embedding","dimension","is","set","to","1","for","each","categorical","variable",".","context_weight_dict",":","Known","population","weights","of","each","context","."]
code: def construct_inputs(
      cls,
      training_data: SupervisedDataset,
      decomposition: Dict[str, List[int]],
      train_embedding: bool = True,
      cat_feature_dict: Optional[Dict] = None,
      embs_feature_dict: Optional[Dict] = None,
      embs_dim_list: Optional[List[int]] = None,
      context_weight_dict: Optional[Dict] = None,
      **kwargs: Any,
  ) -> Dict[str, Any]:
      r"""Construct `Model` keyword arguments from a dict of `SupervisedDataset`.
  
      Args:
          training_data: A `SupervisedDataset` containing the training data.
          decomposition: Dictionary of context names and their indexes of the
              corresponding active context parameters.
          train_embedding: Whether to train the embedding layer or not.
          cat_feature_dict: Keys are context names and values are list of categorical
              features i.e. {"context_name" : [cat_0, ..., cat_k]}, where k is the
              number of categorical variables. If None, we use context names in the
              decomposition as the only categorical feature, i.e., k = 1.
          embs_feature_dict: Pre-trained continuous embedding features of each
              context.
          embs_dim_list: Embedding dimension for each categorical variable. The length
              equals the number of categorical features k. If None, the embedding
              dimension is set to 1 for each categorical variable.
          context_weight_dict: Known population weights of each context.
      """
      base_inputs = super().construct_inputs(
          training_data=training_data, **kwargs
      )
      return {
          **base_inputs,
          "decomposition": decomposition,
          "train_embedding": train_embedding,
          "cat_feature_dict": cat_feature_dict,
          "embs_feature_dict": embs_feature_dict,
          "embs_dim_list": embs_dim_list,
          "context_weight_dict": context_weight_dict,
      }
  
file_path: botorch/botorch/models/contextual.py
imports: from typing import Any, Dict, List, Optional
  from botorch.models.gp_regression import SingleTaskGP
  from botorch.models.kernels.contextual_lcea import LCEAKernel
  from botorch.models.kernels.contextual_sac import SACKernel
  from botorch.utils.datasets import SupervisedDataset
  from torch import Tensor
label_desc: Use image node_id 2 for calling the LCEAGP obj's underlying member method code with example usage: obj.construct_inputs(cls, training_data, decomposition, train_embedding, cat_feature_dict, embs_feature_dict, embs_dim_list, context_weight_dict) and returns: dict