class_docstr: Multi-Task GP model using an ICM kernel, with known observation noise.
  
  DEPRECATED: Please use `MultiTaskGP` with `train_Yvar` instead.
  Will be removed in a future release (~v0.10).
class_docstr_tok: ["Multi-Task","GP","model","using","an","ICM","kernel",",","with","known","observation","noise",".","DEPRECATED",":","Please","use","`","MultiTaskGP","`","with","`","train_Yvar","`","instead",".","Will","be","removed","in","a","future","release","(","~v0.10",")","."]
docstr: Args:
      train_X: A `n x (d + 1)` or `b x n x (d + 1)` (batch mode) tensor
          of training data. One of the columns should contain the task
          features (see `task_feature` argument).
      train_Y: A `n x 1` or `b x n x 1` (batch mode) tensor of training
          observations.
      train_Yvar: A `n` or `b x n` (batch mode) tensor of observed measurement
          noise.
      task_feature: The index of the task feature (`-d <= task_feature <= d`).
      task_covar_prior : A Prior on the task covariance matrix. Must operate
          on p.s.d. matrices. A common prior for this is the `LKJ` prior.
      output_tasks: A list of task indices for which to compute model
          outputs for. If omitted, return outputs for all task indices.
      rank: The rank to be used for the index kernel. If omitted, use a
          full rank (i.e. number of tasks) kernel.
      input_transform: An input transform that is applied in the model's
          forward pass.
      outcome_transform: An outcome transform that is applied to the
          training data during instantiation and to the posterior during
          inference (that is, the `Posterior` obtained by calling
          `.posterior` on the model will be on the original scale).
  
  Example:
      >>> X1, X2 = torch.rand(10, 2), torch.rand(20, 2)
      >>> i1, i2 = torch.zeros(10, 1), torch.ones(20, 1)
      >>> train_X = torch.cat([
      >>>     torch.cat([X1, i1], -1), torch.cat([X2, i2], -1),
      >>> ], dim=0)
      >>> train_Y = torch.cat(f1(X1), f2(X2))
      >>> train_Yvar = 0.1 + 0.1 * torch.rand_like(train_Y)
      >>> model = FixedNoiseMultiTaskGP(train_X, train_Y, train_Yvar, -1)
docstr_tok: ["Args",":","train_X",":","A","`","n","x","(","d","+","1",")","`","or","`","b","x","n","x","(","d","+","1",")","`","(","batch","mode",")","tensor","of","training","data",".","One","of","the","columns","should","contain","the","task","features","(","see","`","task_feature","`","argument",")",".","train_Y",":","A","`","n","x","1","`","or","`","b","x","n","x","1","`","(","batch","mode",")","tensor","of","training","observations",".","train_Yvar",":","A","`","n","`","or","`","b","x","n","`","(","batch","mode",")","tensor","of","observed","measurement","noise",".","task_feature",":","The","index","of","the","task","feature","(","`","-d","<","=","task_feature","<","=","d","`",")",".","task_covar_prior",":","A","Prior","on","the","task","covariance","matrix",".","Must","operate","on","p.s.d",".","matrices",".","A","common","prior","for","this","is","the","`","LKJ","`","prior",".","output_tasks",":","A","list","of","task","indices","for","which","to","compute","model","outputs","for",".","If","omitted",",","return","outputs","for","all","task","indices",".","rank",":","The","rank","to","be","used","for","the","index","kernel",".","If","omitted",",","use","a","full","rank","(","i.e",".","number","of","tasks",")","kernel",".","input_transform",":","An","input","transform","that","is","applied","in","the","model's","forward","pass",".","outcome_transform",":","An","outcome","transform","that","is","applied","to","the","training","data","during","instantiation","and","to","the","posterior","during","inference","(","that","is",",","the","`","Posterior","`","obtained","by","calling","`",".posterior","`","on","the","model","will","be","on","the","original","scale",")",".","Example",":",">",">",">","X1",",","X2","=","torch.rand","(","10",",","2",")",",","torch.rand","(","20",",","2",")",">",">",">","i1",",","i2","=","torch.zeros","(","10",",","1",")",",","torch.ones","(","20",",","1",")",">",">",">","train_X","=","torch.cat","(","[",">",">",">","torch.cat","(","[","X1",",","i1","]",",","-1",")",",","torch.cat","(","[","X2",",","i2","]",",","-1",")",",",">",">",">","]",",","dim=0",")",">",">",">","train_Y","=","torch.cat","(","f1","(","X1",")",",","f2","(","X2",")",")",">",">",">","train_Yvar","=","0.1","+","0.1","*","torch.rand_like","(","train_Y",")",">",">",">","model","=","FixedNoiseMultiTaskGP","(","train_X",",","train_Y",",","train_Yvar",",","-1",")"]
code: def __init__(
      self,
      train_X: Tensor,
      train_Y: Tensor,
      train_Yvar: Tensor,
      task_feature: int,
      covar_module: Optional[Module] = None,
      task_covar_prior: Optional[Prior] = None,
      output_tasks: Optional[List[int]] = None,
      rank: Optional[int] = None,
      input_transform: Optional[InputTransform] = None,
      outcome_transform: Optional[OutcomeTransform] = None,
  ) -> None:
      r"""
      Args:
          train_X: A `n x (d + 1)` or `b x n x (d + 1)` (batch mode) tensor
              of training data. One of the columns should contain the task
              features (see `task_feature` argument).
          train_Y: A `n x 1` or `b x n x 1` (batch mode) tensor of training
              observations.
          train_Yvar: A `n` or `b x n` (batch mode) tensor of observed measurement
              noise.
          task_feature: The index of the task feature (`-d <= task_feature <= d`).
          task_covar_prior : A Prior on the task covariance matrix. Must operate
              on p.s.d. matrices. A common prior for this is the `LKJ` prior.
          output_tasks: A list of task indices for which to compute model
              outputs for. If omitted, return outputs for all task indices.
          rank: The rank to be used for the index kernel. If omitted, use a
              full rank (i.e. number of tasks) kernel.
          input_transform: An input transform that is applied in the model's
              forward pass.
          outcome_transform: An outcome transform that is applied to the
              training data during instantiation and to the posterior during
              inference (that is, the `Posterior` obtained by calling
              `.posterior` on the model will be on the original scale).
  
      Example:
          >>> X1, X2 = torch.rand(10, 2), torch.rand(20, 2)
          >>> i1, i2 = torch.zeros(10, 1), torch.ones(20, 1)
          >>> train_X = torch.cat([
          >>>     torch.cat([X1, i1], -1), torch.cat([X2, i2], -1),
          >>> ], dim=0)
          >>> train_Y = torch.cat(f1(X1), f2(X2))
          >>> train_Yvar = 0.1 + 0.1 * torch.rand_like(train_Y)
          >>> model = FixedNoiseMultiTaskGP(train_X, train_Y, train_Yvar, -1)
      """
      warnings.warn(
          "`FixedNoiseMultiTaskGP` has been deprecated and will be removed in a "
          "future release. Please use the `MultiTaskGP` model instead. "
          "When `train_Yvar` is specified, `MultiTaskGP` behaves the same "
          "as the `FixedNoiseMultiTaskGP`.",
          DeprecationWarning,
      )
      super().__init__(
          train_X=train_X,
          train_Y=train_Y,
          train_Yvar=train_Yvar,
          covar_module=covar_module,
          task_feature=task_feature,
          output_tasks=output_tasks,
          rank=rank,
          task_covar_prior=task_covar_prior,
          input_transform=input_transform,
          outcome_transform=outcome_transform,
      )
  
imports: from __future__ import annotations
  import math
  import warnings
  from typing import Any, Dict, List, Optional, Tuple, Union
  import torch
  from botorch.acquisition.objective import PosteriorTransform
  from botorch.models.gpytorch import GPyTorchModel, MultiTaskGPyTorchModel
  from botorch.models.model import FantasizeMixin
  from botorch.models.transforms.input import InputTransform
  from botorch.models.transforms.outcome import OutcomeTransform
  from botorch.models.utils.gpytorch_modules import get_matern_kernel_with_gamma_prior, MIN_INFERRED_NOISE_LEVEL
  from botorch.posteriors.multitask import MultitaskGPPosterior
  from botorch.utils.datasets import MultiTaskDataset, SupervisedDataset
  from gpytorch.constraints import GreaterThan
  from gpytorch.distributions.multitask_multivariate_normal import MultitaskMultivariateNormal
  from gpytorch.distributions.multivariate_normal import MultivariateNormal
  from gpytorch.kernels.index_kernel import IndexKernel
  from gpytorch.kernels.matern_kernel import MaternKernel
  from gpytorch.kernels.multitask_kernel import MultitaskKernel
  from gpytorch.likelihoods.gaussian_likelihood import FixedNoiseGaussianLikelihood, GaussianLikelihood
  from gpytorch.likelihoods.likelihood import Likelihood
  from gpytorch.likelihoods.multitask_gaussian_likelihood import MultitaskGaussianLikelihood
  from gpytorch.means import MultitaskMean
  from gpytorch.means.constant_mean import ConstantMean
  from gpytorch.models.exact_gp import ExactGP
  from gpytorch.module import Module
  from gpytorch.priors.lkj_prior import LKJCovariancePrior
  from gpytorch.priors.prior import Prior
  from gpytorch.priors.smoothed_box_prior import SmoothedBoxPrior
  from gpytorch.priors.torch_priors import GammaPrior
  from gpytorch.settings import detach_test_caches
  from gpytorch.utils.errors import CachingError
  from gpytorch.utils.memoize import cached, pop_from_cache
  from linear_operator.operators import BatchRepeatLinearOperator, CatLinearOperator, DiagLinearOperator, KroneckerProductDiagLinearOperator, KroneckerProductLinearOperator, RootLinearOperator, to_linear_operator
  from torch import Tensor
label_desc: Use image node_id 1 to create a new FixedNoiseMultiTaskGP object from inherited base classes: MultiTaskGP with example: obj = FixedNoiseMultiTaskGP(train_X, train_Y, train_Yvar, task_feature, covar_module, task_covar_prior, output_tasks, rank, input_transform, outcome_transform)