class_docstr: GPyTorch Linear Truncated Fidelity Kernel.
  
  Computes a covariance matrix based on the Linear truncated kernel between
  inputs `x_1` and `x_2` for up to two fidelity parmeters:
  
      K(x_1, x_2) = k_0 + c_1(x_1, x_2)k_1 + c_2(x_1,x_2)k_2 + c_3(x_1,x_2)k_3
  
  where
  
  - `k_i(i=0,1,2,3)` are Matern kernels calculated between non-fidelity
      parameters of `x_1` and `x_2` with different priors.
  - `c_1=(1 - x_1[f_1])(1 - x_2[f_1]))(1 + x_1[f_1] x_2[f_1])^p` is the kernel
      of the the bias term, which can be decomposed into a determistic part
      and a polynomial kernel. Here `f_1` is the first fidelity dimension and
      `p` is the order of the polynomial kernel.
  - `c_3` is the same as `c_1` but is calculated for the second fidelity
      dimension `f_2`.
  - `c_2` is the interaction term with four deterministic terms and the
      polynomial kernel between `x_1[..., [f_1, f_2]]` and
      `x_2[..., [f_1, f_2]]`.
  
  Example:
      >>> x = torch.randn(10, 5)
      >>> # Non-batch: Simple option
      >>> covar_module = LinearTruncatedFidelityKernel()
      >>> covar = covar_module(x)  # Output: LinearOperator of size (10 x 10)
      >>>
      >>> batch_x = torch.randn(2, 10, 5)
      >>> # Batch: Simple option
      >>> covar_module = LinearTruncatedFidelityKernel(batch_shape = torch.Size([2]))
      >>> covar = covar_module(x)  # Output: LinearOperator of size (2 x 10 x 10)
class_docstr_tok: ["GPyTorch","Linear","Truncated","Fidelity","Kernel",".","Computes","a","covariance","matrix","based","on","the","Linear","truncated","kernel","between","inputs","`","x_1","`","and","`","x_2","`","for","up","to","two","fidelity","parmeters",":","K","(","x_1",",","x_2",")","=","k_0","+","c_1","(","x_1",",","x_2",")","k_1","+","c_2","(","x_1",",","x_2",")","k_2","+","c_3","(","x_1",",","x_2",")","k_3","where","-","`","k_i","(","i=0,1,2,3",")","`","are","Matern","kernels","calculated","between","non-fidelity","parameters","of","`","x_1","`","and","`","x_2","`","with","different","priors",".","-","`","c_1=","(","1","-","x_1","[","f_1","]",")","(","1","-","x_2","[","f_1","]",")",")","(","1","+","x_1","[","f_1","]","x_2","[","f_1","]",")","^p","`","is","the","kernel","of","the","the","bias","term",",","which","can","be","decomposed","into","a","determistic","part","and","a","polynomial","kernel",".","Here","`","f_1","`","is","the","first","fidelity","dimension","and","`","p","`","is","the","order","of","the","polynomial","kernel",".","-","`","c_3","`","is","the","same","as","`","c_1","`","but","is","calculated","for","the","second","fidelity","dimension","`","f_2","`",".","-","`","c_2","`","is","the","interaction","term","with","four","deterministic","terms","and","the","polynomial","kernel","between","`","x_1","[","...",",","[","f_1",",","f_2","]","]","`","and","`","x_2","[","...",",","[","f_1",",","f_2","]","]","`",".","Example",":",">",">",">","x","=","torch.randn","(","10",",","5",")",">",">",">","#","Non-batch",":","Simple","option",">",">",">","covar_module","=","LinearTruncatedFidelityKernel","(",")",">",">",">","covar","=","covar_module","(","x",")","#","Output",":","LinearOperator","of","size","(","10","x","10",")",">",">",">",">",">",">","batch_x","=","torch.randn","(","2",",","10",",","5",")",">",">",">","#","Batch",":","Simple","option",">",">",">","covar_module","=","LinearTruncatedFidelityKernel","(","batch_shape","=","torch.Size","(","[","2","]",")",")",">",">",">","covar","=","covar_module","(","x",")","#","Output",":","LinearOperator","of","size","(","2","x","10","x","10",")"]
code: def power(self, value: Tensor) -> None:
      self._set_power(value)
  
file_path: botorch/botorch/models/kernels/linear_truncated_fidelity.py
imports: from __future__ import annotations
  from typing import Any, List, Optional
  import torch
  from botorch.exceptions import UnsupportedError
  from gpytorch.constraints import Interval, Positive
  from gpytorch.kernels import Kernel
  from gpytorch.kernels.matern_kernel import MaternKernel
  from gpytorch.priors import Prior
  from gpytorch.priors.torch_priors import GammaPrior
  from torch import Tensor
label_desc: Use image node_id 3 for calling the LinearTruncatedFidelityKernel obj's underlying member method code with example usage: obj.power(value) without return types