class_docstr: For, X -> Y the Linear Gaussian model assumes that the mean
  of Y is a linear function of mean of X and the variance of Y does
  not depend on X.
  
  For example,
  
  .. math::
  
    p(Y|X) = N(-2x + 0.9 ; 1)
  
  Here, :math:`x` is the mean of the variable :math:`X`.
  
  Let :math:`Y` be a continuous variable with continuous parents
  :math:`X1, X2, \cdots, Xk`. We say that :math:`Y` has a linear Gaussian CPD
  if there are parameters :math:`\beta_0, \beta_1, ..., \beta_k`
  and :math:`\sigma_2` such that,
  
  .. math:: p(Y |x1, x2, ..., xk) = \mathcal{N}(\beta_0 + x1*\beta_1 + ......... + xk*\beta_k ; \sigma_2)
  
  In vector notation,
  
  .. math:: p(Y |x) = \mathcal{N}(\beta_0 + \boldmath{β}.T * \boldmath{x} ; \sigma_2)
  
  References
  ----------
  .. [1] https://cedar.buffalo.edu/~srihari/CSE574/Chap8/Ch8-PGM-GaussianBNs/8.5%20GaussianBNs.pdf
class_docstr_tok: ["For",",","X","-",">","Y","the","Linear","Gaussian","model","assumes","that","the","mean","of","Y","is","a","linear","function","of","mean","of","X","and","the","variance","of","Y","does","not","depend","on","X",".","For","example",",","..","math",":",":","p","(","Y|X",")","=","N","(","-2x","+","0.9",";","1",")","Here",",",":","math",":","`","x","`","is","the","mean","of","the","variable",":","math",":","`","X","`",".","Let",":","math",":","`","Y","`","be","a","continuous","variable","with","continuous","parents",":","math",":","`","X1",",","X2",",","\\cdots",",","Xk","`",".","We","say","that",":","math",":","`","Y","`","has","a","linear","Gaussian","CPD","if","there","are","parameters",":","math",":","`","\\beta_0",",","\\beta_1",",","...",",","\\beta_k","`","and",":","math",":","`","\\sigma_2","`","such","that",",","..","math",":",":","p","(","Y","|x1",",","x2",",","...",",","xk",")","=","\\mathcal","{","N","}","(","\\beta_0","+","x1","*","\\beta_1","+",".........","+","xk","*","\\beta_k","\u037e","\\sigma_2",")","In","vector","notation",",","..","math",":",":","p","(","Y","|x",")","=","\\mathcal","{","N","}","(","\\beta_0","+","\\boldmath","{","\u03b2","}",".T","*","\\boldmath","{","x","}","\u037e","\\sigma_2",")","References","--","--","--","--","--","..","[","1","]","https",":","\/\/cedar.buffalo.edu\/~srihari\/CSE574\/Chap8\/Ch8-PGM-GaussianBNs\/8.5","%","20GaussianBNs.pdf"]
code: def __str__(self):
      if self.evidence and list(self.mean):
          # P(Y| X1, X2, X3) = N(-2*X1_mu + 3*X2_mu + 7*X3_mu; 0.2)
          rep_str = (
              "P({node} | {parents}) = N({mu} + {b_0}; {sigma})".format(
                  node=str(self.variable),
                  parents=", ".join(
                      [str(var) for var in self.evidence]
                  ),
                  mu=" + ".join(
                      [
                          f"{coeff}*{parent}"
                          for coeff, parent in zip(
                              self.mean[1:], self.evidence
                          )
                      ]
                  ),
                  b_0=str(self.mean[0]),
                  sigma=str(self.variance),
              )
          )
      else:
          # P(X) = N(1, 4)
          rep_str = "P({X}) = N({beta_0}; {variance})".format(
              X=str(self.variable),
              beta_0=str(self.mean[0]),
              variance=str(self.variance),
          )
      return rep_str
  
file_path: pgmpy/pgmpy/factors/continuous/LinearGaussianCPD.py
imports: import numpy
  import pandas
  from scipy.stats import multivariate_normal
  from pgmpy.factors.base import BaseFactor
label_desc: Use image node_id 7 for calling the LinearGaussianCPD obj's underlying member method code with example usage: obj.__str__() and returns: rep_str