class_docstr: An affine deterministic model.
docstr: Affine deterministic model from weights and offset terms.
  
  A simple model of the form
  
      y[..., m] = b[m] + sum_{i=1}^d a[i, m] * X[..., i]
  
  Args:
      a: A `d x m`-dim tensor of linear weights, where `m` is the number
          of outputs (must be explicit if `m=1`)
      b: The affine (offset) term. Either a float (for single-output
          models or if the offset is shared), or a `m`-dim tensor (with
          different offset values for for the `m` different outputs).
docstr_tok: ["Affine","deterministic","model","from","weights","and","offset","terms",".","A","simple","model","of","the","form","y","[","...",",","m","]","=","b","[","m","]","+","sum_","{","i=1","}","^d","a","[","i",",","m","]","*","X","[","...",",","i","]","Args",":","a",":","A","`","d","x","m","`","-dim","tensor","of","linear","weights",",","where","`","m","`","is","the","number","of","outputs","(","must","be","explicit","if","`","m=1","`",")","b",":","The","affine","(","offset",")","term",".","Either","a","float","(","for","single-output","models","or","if","the","offset","is","shared",")",",","or","a","`","m","`","-dim","tensor","(","with","different","offset","values","for","for","the","`","m","`","different","outputs",")","."]
code: def __init__(self, a: Tensor, b: Union[Tensor, float] = 0.01) -> None:
      r"""Affine deterministic model from weights and offset terms.
  
      A simple model of the form
  
          y[..., m] = b[m] + sum_{i=1}^d a[i, m] * X[..., i]
  
      Args:
          a: A `d x m`-dim tensor of linear weights, where `m` is the number
              of outputs (must be explicit if `m=1`)
          b: The affine (offset) term. Either a float (for single-output
              models or if the offset is shared), or a `m`-dim tensor (with
              different offset values for for the `m` different outputs).
      """
      if not a.ndim == 2:
          raise ValueError("a must be two-dimensional")
      if not torch.is_tensor(b):
          b = torch.tensor([b])
      if not b.ndim == 1:
          raise ValueError("b nust be one-dimensional")
      super().__init__()
      self.register_buffer("a", a)
      self.register_buffer("b", b.expand(a.size(-1)))
      self._num_outputs = a.size(-1)
  
imports: from __future__ import annotations
  from abc import abstractmethod
  from typing import Callable, List, Optional, Union
  import torch
  from botorch.models.ensemble import EnsembleModel
  from botorch.models.model import Model
  from torch import Tensor
label_desc: Use image node_id 1 to create a new AffineDeterministicModel object from inherited base classes: DeterministicModel with example: obj = AffineDeterministicModel(a, b)